>PIE

>

We have three children, ages 12, 7 and 4. None of them have ever eaten a savoury pie. Today was the day we ended that.

That is a Marks and Spencers’ roast chicken pie. Selina didn’t like it, Hugo and Alisa said they did but didn’t eat much of it.

We won’t be having another in a hurry.

>Arduino, Servos and SCADA

>

This weekend I was going to play around with servos and motors, but due to a missing diode I only got the servo working, displayed below. Yes, that’s a matchstick attached to it with Blu-Tac.

The processing language is actually very nice to play with. If I squint and pretend it’s Javascript then I can write in it without missing python too much.

The whole purpose of playing around with electronics is deep down I’d like to know a bit more about the factory floor hardware side of things. I’ve written a lot of software for factories but hardware tends to be black box stuff. When I couldn’t find the diode I needed I instead thought I’d see if I could get somewhere with an Arduino and SCADA. Turns out you can. You need some modbus client code from here and the Mango M2M system from here.

What was supposed to be hardware time ended up playing around a lot with Java, Tomcat and understanding what modbus is and does. But at the end of the evening (I packed it in early, I was whacked) I saw this on the Mango interface …

That ‘1’, in the Nodes found list, is the sweet smell of success. Next step would be to fit some sensors on the Arduino and get Mango to monitor them.

>Scrolling LED

>

Hardest thing I’ve wired up so far. Not ‘hard’, just tedious. But it works!! Weeeeeeee.

Buy yours here.

>Amicus18 / Netduino / Arduino

>

OK, whilst I am here, there’s another addition. The Amicus18 could be considered an Arduino with a PIC processor. Once again, the Amicus18 homepage at http://www.myamicus.co.uk/ gives the summary:

Amicus is a multifunction development system inspired by the popular Arduino board, however, the Amicus board uses a Microchip PIC®microcontroller instead of an Atmel AVRtm type

For the moment I am going to focus on the Arduino, learn some .NET and do some Netduino and then play with the Amicus18 in any spare time. Would like to do some assembler with that one. So here’s the current family.

Just one more to join – coming soon.

By the way, the breadboards on the Amicus and Arduino come from Oomlout. They make me happy (the company and the board). Also recommended are Cool Components, where the Netduino came from and Proto-Pic who supplied the Amicus18.  Great service from all three of them.

One more I want to pick up …

>Arduino/Netduino

>

My last posting detailed getting my Arduino displaying a temperature sensor on a LCD. That worked fine. Soon after that I took delivery of a Netduino. A Netduino is … well … to quote from http://www.netduino.com/:

Netduino is an open source electronics platform using the .NET Micro Framework. Featuring a 32-bit microcontroller and a rich development environment. Suitable for engineers and hobbyists alike.

It’s basically an Arduino that you program via the .NET language. I’ve not used Microsoft languages for yonks, so why buy one of these things? Well, I’ve not used Microsoft languages for yonks. Might be fun to play with them again. Maybe Smile.

So my plan was to take what I’d done before, but this time, put the temperature sensor on the Netduino and transmit the data to the Arduino (using the RF link transmitter and receiver shown at http://is.gd/f4n3Q), and the Arduino LCD would display it. I spent quite a few hours working on it last Friday evening. A lot of pain was caused by learning some basics of .NET and C# (many thanks yellowduino on the #arduino irc channel). I fiddled with it relentlessly Friday evening and bits of Saturday and Sunday. I stopped trying to transmit the temperature and instead just worried about transmitting a set string.  But I just could not communicate from the Netduino to the Arduino.

Not quite true. I could see things ‘changed’ when I switched the Netduino on – the data on the arduino might show signs of seeing something. But what i was actually transmitting from the Netduino was never displayed on the Arduino LCD. I switched anything that could possibly interfere off but nothing. Eventually, Sunday evening, I gave in. I really didn’t mind that much, I learnt a lot and that, rather than the accomplishment, was important. But still …

This Friday evening I switched it all back on again and it worked first time. First time.

>Easy peasy Arduino

>

I’ve dealt with software for a long time, over twenty years. Software is quite simple really when you know the basics but to people totally outside of it, it no doubt looks like magic. I’ve always wanted to learn more about hardware. I remember buying an electronics book whilst in Japan but did nothing with it. A short while ago I picked up a starter Arduino kit.

Arduino is (to quote the site) an

open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.

The kit linked to above from oomlout.co.uk contains everything you need although having done the first couple of exercises I let it drop due to pressure of work. I picked it up again recently and made my first real project. It’s actually nothing. It’s an Arduino linked to a LCD (buy that separately from Oomlout) and a temperature sensor. It displays the temperature.

Putting it together was simple using the Oomlout guides for each piece. What was more important for me was understanding how a circuit gets wired up and how to use different components together. In terms of complexity this is very very simple but seeing something in front of me working that I put together has really given me a kick. Hey, little things make me happy!

More importantly it’s made me realise not to think things are complex just because I don’t understand them. That mass of wires looks difficult but they’re all pretty understandable very quickly.

>Chester Zoo

>

Headed to Chester Zoo today, not been there for a year or so. Birthday treat for Alisa (four on Tuesday) and she really enjoyed, as did we all. As a grumpy old man I do wonder why things are so expensive. Five of us meant a family ticket plus another child ticket. And by default they give you the price with a 10% voluntary contribution added came to £67.45. They do ask if that’s OK but the pressure is then on you to decline and feel like a grumpy git.

If you ever go to the Zoo can I recommend the bats and the butterflies. OK, they don’t sound the exciting but both get you close to the action. Exhausted now, time for some cider.

>More code from the pros

>This evening I had the pleasure of looking at a system unconnected with work. The system is critical to the client and put together by a Computer Science graduate and I was asked to give an opinion unofficially for a friend.

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.

>Snow Leopard and 32bit 64bit Psycopg woes

>

Ah yes, let’s quickly do some work this morning. How soon that turns into watching multiple parts of your development environment fail.

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 yes

Now 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.

>Why I don’t care if you have a computing degree or not

>

I have a real problem which I am aware of and compensate for, but it exists.

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.