? / 10
0 votes cast
Rate this item

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.

Inline Image

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