Snow Snow Snow

Yesterday it snowed, in easter! (queue lots of randoms citing that global warming is clearly a myth, popular culture has a lot to answer for). We took the children to play in the snow which was kinda cool. Tom and Beth were both daft enuff to come stand under a tree with me (trigger scott shaking the tree and two supprised and irritated children ;-)). Maddie was initially interested (never seen snow), I fed her some which she found kind odd. Ultimately I think though her opinion was yeack. She would not walk she cuddled (and complained) all the time!

We made a couple of snow men, well snow/mud men as the snow covering was insufficient to mean that you could avoid picking up mud with the snow balls. Had a snow ball fight (which I am pretty certain I won!).

Coolest image of the day was driving up to ditchling beacon to see a field COVERED in people sledging, nice image that should be on a post card.

Kinda glad we went out early in the morning as by the afternoon it was melting and by the monday it was all gone .. *sob* I had to goto work.

Bear hunting

This morning I went on a bear hunt with beth, we walked through some woods while Tom was at football practice. Beth insisted on making arrows out of sticks so we could find our way back which was sweet. She also helped me up the hills by holding my hand .. does she think me old already?

Noticed today that Tom & Beth have both outgrown their trousers.

Maddie is short

Last weekend post arry stag, we went to a party for maddies first birthday. She was one weeks ago but this was for all her NCT friends (or should that be for anna’s NCT friends 🙂 ) anyways she is SHORT. Compaired to the other children she looked like half the size. I can see she is going to have to be hung from her ankles!

Installing MYSQL on a mac

MYSQL installs trivially on a mac using the packages downloadable from the mysql web site. I therefore did not follow this installation path 😉

Under the hood OSX is BSD, to this end many unix packages have been ported to OSX. The easiest way to install and manage these is via darwin ports http://www.darwinports.com . I want to play with some CMS software that requires php5 and mysql. Rather than try to manage this all by hand I installed Dports and dumped mysql apache2 and php5. Apache was pretty simple, mysql has proved harder.

Firstly we have to find the package

sudo port search mysql

This tells me I want to install mysql5, next check for varients (build options and integration options)

sudo port variants mysql5

This lists:
universal
darwin_8
server

I have _NO_ idea what these mean so a quick google sends me to http://mysql5.darwinports.com Now I still don’t know what this means but at least I know what compile options are targeted by each variant. Reading the server ‘stuff’ it talks about setting up users and files to allow it to run at system startup .. this all makes sense so to the install

sudo port install -v mysql5 +server

Now time for a brew .. tic tic tic

Notable bits of stuff spurged from the installer:

###########################################################
# A startup item has been generated that will aid in
# starting mysql5 with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
###########################################################
—> Installing mysql5 5.0.45_0+darwin_8+server
******************************************************
* In order to setup the database, you might want to run
* sudo -u mysql mysql_install_db5
* if this is a new install
******************************************************

So first of all looking a the startup item. LaunchD is an osxism that allows you to start stuff when stuff happens, (on instance of stuff is the system starts up). Its used to startup key services. To see what services run:

sudo launchctl list

I dont see mysql5 so running

sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist

Will install the service. OK so now lets try and start the service (pah like this will work!)

sudo launchtl start org.macports.mysql5

No feedback suggests its not running?! OK lets try killing it

sudo launchtl stop org.macports.mysql5

Again no feedback, is that good? ok so a restart and then try to initiate the DM from the blurb that ports printed out:

sudo -u mysql mysql_install_db5

Blah crash and burn…

Boris:/opt/local scott$ sudo -u mysql mysql_install_db5
Installing MySQL system tables…
070801 11:57:41 [Warning] Setting lower_case_table_names=2 because file system for /opt/local/var/db/mysql5/ is case insensitive
ERROR: 1005 Can’t create table ‘db’ (errno: 13)
070801 11:57:41 [ERROR] Aborting

ls – in /opt/local/var/db/mysql5 finds a few dirs owned by root .. hmm should I remove or chown them ?? Remove seems sensible.

OK so rerunning the command .. lots of crap is printed .. but *erm* no errors!

Next job setup some passwords..

/opt/local/lib/mysql5/bin/mysqladmin -u root password ‘new-password’
/opt/local/lib/mysql5/bin/mysqladmin -u root -h host94.msm.che.vodafone password ‘new-password’

It says you can start the daemon with:
cd /opt/local ; /opt/local/lib/mysql5/bin/mysqld_safe &

I thought the launchd would do this?! Ho hum.

It also notes that there are some tests you can run:

cd mysql-test ; perl mysql-test-run.pl

First job, passwords erm or not!
error: ‘Can’t connect to local MySQL server through socket ‘/opt/local/var/run/mysql5/mysqld.sock’ (2)’
Check that mysqld is running and that the socket: ‘/opt/local/var/run/mysql5/mysqld.sock’ exists!

So lets try and start mysql per the instruction:
cd /opt/local ; /opt/local/lib/mysql5/bin/mysqld_safe &
(adding a -u mysql for good measure!)

OK so I have a process running .. doing the password thing (again) .. raa no errors!

Next test, install the mysql admin packages from the web and try to connect to the local instance. NOPE! Failed to connect through socket /tmp/mysql.sock. Changing to connect via 127.0.0.1 and stuff connects?!?! OK so thats odd but I guess there is a short circuit for localhost.

OK next question, will mysql5 still be there after a reboot?! Lets find out …. …. back soon!

Trousers and shoes

BRILLIANT.

Tom returned from swimming yesturday clad in a towel,  having lost one shoe and his trousers.  I am sure my mother would empathise with the dispair Anna and I felt for his cluelessness!  I cant help but be a little proud of my genetic heritage.  I dont think there was anything i did not lose while growing up.

We had to be cross of course,  to at least try and get him to take more care in the future but to be honest I found it all more than a little amusing.

Rules of IT

Some of my own .. some lifted from collegues – again stored to review later.

Dont get sucked into trends, build what you need not whats fashionable.

A prototype speaks volumes, if you don’t know what you want to build, build something fast and be prepared to throw it away.

Don’t throw good design on top of bad, deletion is a refactoring pattern.

Consider non functional requirements at the start, of a build – can you support the product post delivery

Not all programmers are created equal some develop some design, some do both use them to their strengths DON’T consider change of working practice to be a promotion (ie don’t promote good developers into designers as a matter of course)

Manage the process not the technology, managers manage developers develop don’t get the two confused.

Educate the development group, the more developers know about the problem space the better the solution. HOWEVER the flip side is to be clear as to the requirements don’t point a developer at a business problem.

Refactor business process alongside code, supporting flawed business process with development is always costly. Sometimes its cheapear and easier to change the way the business work rather than changing an application.

 

Observations on IT

I posted this to a mailing list I belong too,  however I think it might be interesting to come back and read it later .. so cross posting here.  These are conversation suggestions,  discussion points to have with managers entering the IT space to equip them to help improve the space.

 

Take the long view – IT is a long term investment so look at ROI as a long term thing. Short term costs may bring long term returns. It might be useful to look at infrastructure (I don’t mean hardware – I mean infrastructure in the broadest sense). From a software perspective for example the most productive projects are the ones that invest in framework design up front, the cost is high the short term return is low. Long term productivity gains are hard to quantify but experience shows them to be real.

Open source integration – building on the previous topic, a big initiative within the industry at the moment is accepting open source at the lowest level of development. The offshoring initatives are all about doing the right thing in the right zone at the right cost. This mind set has started people thinking about what our business (as software engineers is). Within the dark days of C++ everyone implemented vector / list / string classes because there was nothing there, it was acknowledged that this was a waste of developer cycles tools/stl replaced this low leve development raising the abstraction bar. Now we are looking at other framework topics (inversion of control, logging, DAL, monitoring etc) and looking to bring in integrated standards. Sunguard for example have adopted a raft of open source projects integrated them into a framework and are now offering them for use by their customers.

Offshoring as a cost saving – globalisation is meaning that low cost centers soon become high cost centers. Software and service is being offshored how are savings realised? Labour is cheapers within other centers, however globalisation means that labour does not stay cheap for long. Dublin was seen as a low cost center and within a decade became a high cost center. Various low cost centers within the US have moved the same way. Recruitment in india/singapore is becoming a burdon as the developers realise their worth. The current attitude is to move low risk development to low cost centers this strategy only works if the low cost centers remain low cost. A more attractive strategy is outsourcing to specialist firms, this strategy is gaining ground again (it was the vogue 5 years ago). Outsourcing work to a different company makes sense if the other company can perform the work faster/cheaper/better than you can. Service is a good example, utilisation of first line support is low.  Given appropriate escallation first line support can be outsourced to a different company that can improve resource utilisation by increasing the number of products/companys a single resource supports improved utlisation reduced costs (as costs become shared).

IT as an art form – the function of management, an effective manager will defend development resources from the delivery pull in a project. Projects are pulled by lots of factors, cost (there is demand to deliver faster), requirements change, sr managements bad attitude. A good manager will create an eye of low stress within the project that allows the developers to focus on a specific task and deliver it well without having to manage the greater project preasures. A bad manager channels (and even amplifies) the stresses of the project to the developers which creates a difficult if not impossible working environment.

Process as a lever – developers are a pretty arogant bunch most of them have very little understanding of their place or at least their functions place within the organisation. This is particularly true of companies where development is not the main focus of the business. Process is a good way of stopping them having to care as long as the process is clean and non burdonsom.

IT as a fashion statement – blogs and the web have allowed idiots to spout rubish with authority, syndication of blogs have amplified this rubbish and created defacto standards based on the rantings of idiots. Management should be cautious of listening to the trends they see published on the internet as they often lack substance. Architectural decisions (hardware and software) should be based on business need and critically evaluated against a requirements match. Far to frequently decisions are being made based on whats new and shiney.