Smallest ever chess program: 487 bytes

Because computer memory is severely limited these days...

That's not the point. This the nerdy version of souping up your car so that it'll do 0-100 in 4.5 seconds instead of 6.8.

Imagine if all applications were as efficient and small as this one. As somebody with an interest in algorithmics, I get very annoyed by the "RAM and processing is cheap"-viewpoint. That's not what should determine how we code. Efficient code and mathematically optimised code should be foremost in any good programmer's mind. Think how much further we could progress with more efficient code.

From Cormen & Rivest's classic textbook:

As programs increase in size and complexity optimising code it is just not worth it and can become very difficult to do.

You're also ignoring the time/memory trade-off found in many algorithms. In many cases less time is more memory and vice versa. This will especially be evident in games. OK so now your favourite game 10Gigs instead of 50GB, uses less RAM and less processing power. However now your bot teamates are dumb to the point of being useless, NPCs get lost easily and take forever to find their way to you, real-time shadows and effects can't be rendered quick enough etc etc.

It's a waste of programmer time too, even if you manage to improve speed and reduce memory requirements simultaneously. That DLC you want to make will take years instead of a few months because all of the coders will be fiddling with assembly, C and complex algorithms instead of using the scripting language the game engine provides. This in turn makes it more expensive as well.

I'm not saying we shouldn't pursue more efficient code but it shouldn't be a top priority all the time.
 
Last edited:
Nicely commented too.
Lots of BIOS calls, so not so portable other than on x86 with BIOS of sorts.

I was expecting to see some sort of on the fly compression / decompression, and was surprised not to see that.

Brings back memories - My first job ever was doing embedded programming on 6809.

We had 4-8k to use, one EEPROM burner, and an ICE (in circuit emulator) that I rarely got to use, and a rather temperamental Franklin C compiler that didn't always work. You kids have it easy etc etc ;)
 
I had a Jupiter Ace. Forth with a whole 1k.
Pre ZX81 nog al!

Similar crap keyboard though.

My next computer was a Dragon 32. I got everyones hand me downs hehe.
Dragon wasn't a bad computer though, I learned my 6809 on that. Came in handy years and years later.
Still relevant when the Amiga came along as that was 68000.
 
With the exponential increase of machine-to-machine communication, I suspect lower-level programming will become far more popular and competitiveness at the raspberry-pi level and even way smaller will abound.

Basically devices will have a sensor or two, Wi-Fi, an energy source for long durations and the smallest, least power-hungry memory/cpu combinations.

Even if there was no trend towards smaller, I would certainly favour a programmer who codes in bytes as a hobby, for certain coding type jobs.
 
The memories. but yes soundblaster was the most awesome thing :D

My first Apple II+ had an on-board speaker with two positions - 1 was up and 0 was down. Although limited, it could sample and playback voice and music remarkably well and I was blow away by its synthesised Bach Brandenburg 3.

Soundblaster, was therefore a pretty awesome step up for sure and blew our minds as well as the speakers! I can't remember exactly when the transitions were made from 1-bit sound, to 8-bit and then stereo and 16-bit.
 
Luxuries I tell you!

Things were much more manageable though. My Apple had 16k of memory and we could address it from the keyboard in hex or decimal, directly or by compiler. Everything about the Apple was given in one book - each pin, each byte of ROM and all the hooks. What a sense of newfound power! The only setback would be addressing the wrong memory location and the computer would bomb, wiping out the hours of hex inputs!

When the Japs flooded the market with non-Apple RAM, I could afford my upgrade to 48K. Happy days.
 
Top
Sign up to the MyBroadband newsletter
X