Tuesday, 2 February 2010
More code from the pros
Oh my god.
I knew I was in for fun when the schema had tables with mixed upper/lower case - and field names with spaces, percentages, dollar signs and all manner of exciting characters. The system had comments only in what (I presume) was the first part of the system. There was nothing useful in the comments but the programmer declared his genius (not making this up) in taking the work of somebody else and 'sorting it out'.
Hang on - pain in the eyes.
OK. Back.
The schema seems to have come from the school of "I have an access database and I'm not afraid to use it". People who think because they know how to use Filemaker Pro or Access or similar revel in their new found status of "Programmer". No, you are not a programmer. Frankly I'm probably not a programmer any more either but at least I know when code is wrong. if I know how to use Excel does that make me an accountant? No. If I know how to use Paint it doesn't make me an artist. You have used Access and (I'm sorry) on the evidence shown the only status achieved is "wank stain, second order". Your exclamations to your poor suffering client (Yes, they showed me the emails), that "Enabling numeric analysis of this data will require some days work in installing the necessary mathematical modules" is wonderful. Your problem is you only knew how to use a varchar (strange, I've seen that a few times before) and you're now realising why data has types.
But take heart. You may not have a clue what you're doing. And you may struggle to put your trousers on the right way. But you have a degree in IT. Virtually everyone I know will therefore trust you and your future is assured.
Unfortunately, you're still a wank stain. C'est la vie.
Saturday, 24 October 2009
Snow Leopard and 32bit 64bit Psycopg woes
I want to pull some data from a Microsoft SQL Server and into Postgres using Python/Django. The ODBC drivers come from http://www.actualtechnologies.com and I paid 30 quid for a small license that allows 5 concurrent users. It's only me using it so I only need one so that's cool. I say 30 quid -that's for Mac. If you want to use their Linux version it will be somewhere around 600 quid. Hey ho. Well ok - I'll just do this on a Mac then.
Now the problems start. Basically, the ODBC drivers won't work with 64 bit apps. OK, So I'll force my Snow Leopard python into 32 bit mode using.
jlp:~ icottee$ defaults write com.apple.versioner.python Prefer-32-Bit -bool yesNow psycopg2 won't work. And I spend some time faffing around. Eventually I discover to get psycopg2 to work you'll need to get yourself a 32 bit version of postgres. So the magic rule is download the code for postgres, configure and make install it AFTER you have done:
export CC="gcc -arch i386"Now you reinstall psycopg2 and wahey you can at last get on with what you were supposed to be doing.

Sunday, 18 October 2009
Why I don't care if you have a computing degree or not
When I see CV's come into my company for technical jobs and that person has some form of IT degree something inside me dies. Now, I am old enough to recognise that. I have and do and will continue to employ people with IT related degrees. But just because you have a degree in some discipline of computing doesn't mean you know jack shit that is any use to me.
The following is an example of why.
Akemi has just started a three year full time degree called 'Internet Computing'. Let's read the yada yada of what that actually means. From the web site:
The internet has become central to a wide range of commercial, educational, and leisure activities. As a result, the internet is used directly by a diverse collection of individuals and organisations, with different requirements and priorities. This course provides knowledge and understanding of the architecture and design of web-based systems and web development tools. it also provides skills that underpin the development and evaluation of collaborative and interactive web sites in commercial settings.Nope, I've got no idea what that means. Currently she's learning about ARM Processor architectures and Java and bash scripts and management techniques! So today she's asking about aliases. I rarely use aliases (I don't like having commands working on one machine that don't work on another) so I give my stock response.
Her: I can't get this alias to work
Me: No idea, google it
Her: Not allowed to, we must use man
I google it
Me: Do this
Her: How did you find that out?
Me: I googled it.
Her: I am not allowed to do that. I must use man
Now what sort of goddamn computing course forces you to search 'man' for answers whereas you can find informed, understandable, easy to read answers virtually anywhere else. man was useful for finding out information approximately never. OK, OK - you could argue that before widespread availability of the Internet, man had a part to play. But you're wrong. I remember back in the early 90's sitting with a hulking big professionally published and printed copy of Linux How-to's, tutorials etc because 'man' was no bloody use. I think 'man' was named by a woman as a jibe. It has all the information you want but it's bloody impossible to make any use of it.
Have you ever tried to get anything useful out of man? Try it.
Let us turn to our most loved bible of computing misanthropy, The UNIX- HATERS Handbook. Click here for a downloadable pdf and treasure it for ever. If you don't laugh A LOT you're probably dead. Anyway, back to 'man'. What does this book that was written in 1994 have to say about 'man'?
man was great for its time. But that time has long passed.That was in 1994. Here we are, in 2009, and computing courses (Internet computing courses, for the love of all that is holy!) are teaching their students to use 'man'. By the way, there's a whole chapter in that book about documentation, it's great.
Where was I? Oh yes, IT related degrees.
This ability of Universities to provide minimum useful information but excel in modern techniques of Arse Hattery is stupendous. Now I can't blame the Universities completely because really, whether people have degrees or not in computing doesn't have any effect that I can see on whether they can 'do it' or not. But when your teaching material is so far removed from real life (unless your goal in life is to write man pages) what is the fucking point? Teach something that is useful. In some ways these degrees are the worst things that can happen because you're making people think they actually know something about the real world requirements of computing. I remember years ago arguing with a newly indoctrinated graduate about how to tackle a certain issue. My years of experience were no match for their shiny little degree certificate although I assume their management technique training did give them more gravitas that my rather to the point 'fuck off'.
Now some disclaimers. I assume there are good and bad Universities, courses, lecturers etc. It is very likely that within this world medicore programmers are being educated and improved. My two favourite programmers both have degrees (although only one has an IT related one). But when I get a CV I have no idea what side of the divide you are. I can find that out by talking to you and working with you. And at that point, I really don't care about degrees.
And no, I don't have a degree.

Tuesday, 13 October 2009
Mighty Mouse - The emperor has no clothes
Yes, I know every BLOODY one of the different ways to get scrolling again. There are whole bloody communities founded on trying to get the things to work for - well, you know - an afternoon would be nice. They're like the alchemists of old, searching for how to get gold from this lump of god damn useless lead and pissing their lives against the wall in the process. Guess what? I don't want to spend every couple of hours dousing it with tabasco, rolling it over Indonesian virgins' thighs or planting it in an organic phase matter transmuter alligned to the lost civilisation of "Are we fucking there yet?". I want the damn fucking thing to fucking scroll!! In both directions. For more than an hour. Is it so FUCKING HARD!??
So goodbye mighty mouse. I have three wireless mice on this desk. All Logitech. They all work. Repeatedly. My latest is a Logitech V470 which arrived today for my Mac to replace the previous insult on practicality. Go and look at the top reviews on the Amazon page. Who wrote them? Bloody mac users fed up with the bloody shitey mouse. And it's a damn site cheaper than the Apple crap.
Fix the bloody thing already Apple. It's shite.

Sunday, 4 October 2009
The importance of developers working with clients
The place where I found that to be most effective was taking testing, sort of, to the ultimate: going to visit customers. I did some of that early in my career and that was a great experience, having to go live with a customer for a week, helping them to install a new system, and helping them to work out the problems with using it.In my experience this has been very true. Working directly with customers ON SITE can be very painful initially (and management tend to be very wary of letting developers loose on client sites). But handled correctly it benefits everybody. From a personal point of view I love developing on site. It stops distractions, it speeds up feedback and it puts your mind into a different mode.
It gave me a huge amount of insight into what it’s like to actually use our stuff and what I want to be doing for the benefit of the people who are going to be using my stuff. Going back afterwards, developers who had not had that experience all seemed arrogant to me in a way which was completely inexcusable. The lack of respect they had for the people who used our stuff was appalling and it was basically a consequence of their having never met those people.
Oh, go and order the book now if you haven't got it already. As a developer (on a good day) I really love the way that different people (brilliant people) have different views on good development. And if you're not a developer, borrow a copy and leaf through. You'll learn a little about how they tick.

Thursday, 1 October 2009
Windows 7 / Emacs / Ubuntu
The Dell is back in Windows land, with Windows 7 installed. I’m using it with the setup I detailed here and everything works as expected.
A word about Emacs. I spent quite a bit of time over the last couple of months sorting out the mish mash of different emacs configs I had running. Now there is one config which handles everything I want it to. Whereas before I used to keep the configs in svn, this time I am using Dropbox to share the configs between Ubuntu, Windows and Mac and the .emacs (currently 211 lines long) works perfectly between all three. So when I add a keybinding or piece of emacs code into one they appear on all four machines. Losing version control doesn’t bother me so much, I rarely want to look back through versions – having everything applied immediately is much more useful.
The Ubuntu VM’s I am using on the Windows machine have Dropbox linked through the vmware shared folders. With my current setup I can create a fully working Ubuntu 8.04 environment with all my emacs customisations in less than five minutes.
If you expand that picture you’ll see it’s using ECB mode – something which I used for a few years but stopped using some time ago when I had some issues with it. Starting from the top left and going down and then across we have.
1. ECB Directories window
2. ECB Current directory window
3. ECB Methods and variables browser (showing items for the DateTime.py file)
4. ECB History Window (files recently visited)
5. DateTime.py (something I am actually editing!). Although it’s not switched on here I have flymode on which is linked to various utilities that can display PEP8 infringements or syntax errors inline.
6. DIRED view of a directory I am working in.
7. irc (#django channel on freenode)
8. Editing the hosts file. This is actually in sudo mode, using tramp. Means I can go sudo and edit a file without starting another terminal up.
The Dell’s 1920x1080 resolution makes this worthwhile. I can reboot this machine into Mandriva and have the same development environment straight away. Or switch to the Mac, Ubuntu desktop or even Ubuntu Netbook and have it all working exactly the same. Very nice.
Tuesday, 29 September 2009
Printing
- Jaunty works 95% of the time. Sometimes it just stops and wants a restart before coming back to life.
- Windows 7. Works about 50% of the time. Sometimes just nothing happens. The Windows 7 machine will sometimes think everything is fine but nothing appears on the XP machine. Sometimes it will just hang. Sometimes it will print. Usually a reboot will help.
- Mac OS X Snow Leopard. Had to resort to the CUPS interface (http://localhost:631) just to get it to see the printer. Now seems to be working. Seems to be.
- Son's XP machine. Prints around 70% of the time. Same symptoms as the Windows 7 machine when it doesn't print.

