
Page 1 Page 2
The Thinking Lost to a Programming Generation
Yes, I'm approaching my point here, be still mon ami we are nearly there. Coding well for these old machines required a level of skill and ingenuity which seems missing from so many coders these days. So what if your program runs 20% slower than it could do if you knew enough about what you were doing to have written it more efficiently in the first place? Next year's line of CPUs will run it 30% faster.
Who cares if your stuff uses twice the RAM it needs to? In twelve months time it'll be cheaper and more abundant. These days it not only isn't worth the time to hand craft things in machine code for optimum performance, it isn't even worth writing your C code so it compiles into faster machine language.
I remember programming in the days of DOS and 16-bit Windows, with horrendous segment offset memory models that would drive you insane. Back then when you stepped through your code there was no right clicking in a window and inspecting variables, your view was a line of C code and then the assembly language it translated into. It made you see the direct result of how you wrote your code and what came out the other side.
And basic knowledge of what looked good and what looked bad in machine code told you how just doing simple things in C would make things run noticeably faster. That was a good skill to have, one which is somewhat redundant now. However I'm not sure it is, and the most noticeable area I see it in is ironically an interpreted language which is quite far removed from the days of the ZX Spectrum, yet writing it badly can cause huge performance issues.
Old Skills with New SQLs
Enter the modern relational database system, aka the RDBS, at the heart of almost every modern website and the biggest danger to it's performance. Anyone can download free software and design their own database system, pretty easily, however the pitfalls in making a bad one are far and wide. Do a poor job of it and you end up with a bad legacy that will bite you over and over again. You can even have the best designed database system in the world, and still bring it to its knees by coding awful queries.
Here I find that old classic computer knowledge, and the skills I developed all those years ago, applying themselves rather well. I know what sort of things a CPU can do fast, and what things it does slowly. I know what eats RAM and why, I know what things are quick to compare and why.
Now I'm not saying my first forays into SQL where glorious, in the beginning I was as blind as the next blind person, but as I grew to see how they worked I discovered the pitfalls and the peaks. Can you design a super fast DB without any of this knowledge? Sure you can, but knowing why it finds some things harder than others certainly increases your hit rate.
Coding these days seems far more about pulling off the shelf libraries, over complicated interfaces designed to make things easier, but ultimately all far too much of it does is hide you from complexity you really should know. Sure, some fancy interface might connect to a database on your behalf and write the SQL query for you, heck some of them will even create a whole database without you knowing much about SQL.
But they will almost always come across plenty of situations where complicated querys don't scale, and I guess for most companies that isn't an issue since if the size of the system becomes unwieldy they'll just upgrade the hardware. But so often I wonder how much CPU time and power the world could save, if we just wrote it all properly in the first place.
Why with all this modern day horse power does Microsoft Windows 7 still seem to hang around doing nothing just as often as Windows 95? Why does my Spectrum always seem more responsive than kit millions of times its power? How can Flash and a web browser eat so much of my CPU time and memory? Unless it's working out the cure for cancer in the background, I can only think it's nothing more than badly written.
Now if you'll excuse me, I'm off to play with 64-bit hand coded machine language Linux, it's only 16k. You can write a "Hello World" app in just 31 bytes, try doing that in Windows!Previous Page
Posted by Robert John Shepherd
Do you thin there are just too many short-cuts? I note that many web designers just download templates that inevitably make everything start to look and perform in the same way. That's OK from a users point of view but it gets incredibly boring.
From a programming perspective, with so many communities on the web trading tips and code, there is no longer any imperative to work things from scratch.
In some respects yes.
I have nothing against things that make developing faster. But when it makes things easier at the expense of knowledge then bad things happen. As an example, C is not a difficult programming language, and whilst it can be used to create bad code it doesn't encourage it.
VisualBasic on the other hand let's people who shouldn't be let near code write it, and the nature if the language encourages bad code techniques. Queue HUGE explosion a few years back of awful shareware and freeware. Thanks Microsoft.
I wish that was their only contribution to bad development. However they aren't the only ones, PHP is as nasty.
...and it will just get worse. So what's the solution?!
I'm not sure there is one really. In some respects there are still people around who get down and dirty with hardware, producing amazing things like coding a working 64 bit version of Linux in just 16k of code.
The good side of things is VisualBasic as an app development tool seems long since dead, killed off in part by the open source movement and all that surrounds it providing a collaborative environment with many headstrong leaders that keep amazingly high coding standards. Whenever I scour the source of some projects I often doubt that equivalent code bases of major software producers are that well maintained.
The bad side I think, is web development. All those have-a-go programmers that many years ago wrote awful VB apps now write websites. Although this seems a harmless place for them to play, websites getting hacked regularly demonstrate wholes that shouldn't be there.
Sony being a prime example. Incredible. And the rise of mobilty and tablets will just make this worse.
Heh, I'm not sure if Sony is or isn't a prime example, since they may be more of a demonstration of what happens when you get cheap about your internet presence as a multi-national company.
WordPress and certain bulletin board packages, both of which seem to be a constant stream of vulnerabilities, are maybe better ones. The number of times I read about a SQL injection flaw that brought down a website, never ceases to amaze me. No excuse for it really. :/
In a related note, this weeks Click on BBC News 24 had a nice piece about David Braben's tiny computer, and also spoke about how kids these days at schools are taught how to use applications and not program computers.
I could never get into programming. Although I once spent a little too much time translating a lunar lander program from Research Machines Basic to ZX Spectrum basic (and drove myself bananas in the process as I didn't really follow what I was doing). I never really got any further than:
10 Print "Hello Chunky"
20 Goto 10