I used to be a full time, professional developer working on internet email and web security services for upwards of 250,000 users, so I figured that I could tackle a simple programming project using a modern desktop development environment.
I was wrong!
I know it has been a few years since I’ve developed anything for a desktop (more like 12!), but I hadn’t expected things to have changed quite so much!
The environment I was working in, .Net Windows Presentation Foundation, is so much more powerful, than the Visual Basic and C (programming GEM on the Atari ST!), I had been used to, but critically it was also far more complex. This might be great for large complex applications, which are always going to be complex to develop not matter what language or environment you use, but for my simple idea, this complexity was almost a show stopper.
I was trying to ‘port’ my favourite little app in windows. I’ve written my Langtons Ant simulator on at least 2 different platforms (GEM on the ST and Visual Basic on Windows) and I might have even ported it to Java, I can’t quite remember, I know I had started the work, so I figured WPF would be easy.
But it wasn’t quite that easy.
The first problem that I came across shows this power and complexity issue very well. WPF’s graphics display is all vector based. This gives you a lot of power, since you can scale anything drawn on screen easily, great for large buttons etc. However I didn’t need this power, well not at first anyway, later it might be good to add the ability to zoom in to the ant as it runs around. But since display is vector based there is no built in way to read the colour of a pixel on screen. I did find some code which it was claimed added this, but it didn’t work and since I didn’t really under stand the code I’d added, I couldn’t work out why.
Not being able to ‘read’ the colour of the screen is a bit of a problem since the ant needs to know the colour of the square it lands on to decide which way it’s going to turn.
Okay, I told my self, this won’t stop me, so my next approach was to keep an internal copy state of the of the grid and use this to determine the ants heading. This is how all serious apps work, what you see on screen is just a view of this internal structure. But for my little program, it seems an awful lot of work.
This is my point, these modern environments ‘scale up’ very well, but they don’t ‘scale down’ quite so well. Great for tackling large scale projects, but what if you are just getting starting in programming? I feel pretty sure, the younger me who cut his programming teeth on first Basic and then C, would have had a very hard time staying motivated to work through the initial were absolutely nothing works at all. It was hard enough with basic, but at least with that you do get some sort of display on screen. It took me several hours before my WPF app displayed anything beyond the basic window.
If we don’t get people interested in programming at a young age we will only get developers that create apps because it’s their job and not because they enjoy it. We will end up with the sort of app’s that Microsoft produce rather than some of the works of programming art we see on the Mac.
I’m not saying that developing my app on the Mac is going to be any easier, I’m looking in to that now and I know it’s going to be much harder!
What we need is a nice simple way to get people in to programming. The environment doesn’t have to be able to produce full working office type applications, but it does need to be able to produce simple graphical apps with relative ease. Once our young developers have got this sort of thing under their belt they will be ready to move on to the next stage of the full blown environments like .Net and Objective C.
If this is the case, then why I am I still struggling, I hear you ask? Probably because I’m getting on a bit now and getting stuck in my ways, finding hard to learn new ones. But I’m sticking at porting Langton’s Ant to both the Mac and Windows. The ants will run again! (it just might take a while!)

Share →

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>