NoshBar's Dumping Ground


I keep claiming it's the worst written code on the planet... and recently someone asked if they could have the source to "play around with" (more likely it would have its way with them).

After being quite happy that I had lost the source a while back and could not prove that theory... well, curiosity got the better of me and I played with some undelete tools on an old hard-drive I had.

So here it is, the source code for my 15 minutes of fame, released under the "don't tell anyone I wrote it unless they think it's awesome" license.

I've been hesitant to release it in the past, because it is truly awful, from over a decade ago, before I could program, or even knew what the "Object" in Object-Pascal meant (which should be quite obvious).
I'd hate for this ever to hurt my chances of anyone ever employing me based on this code, so I would just like to state that I am infinitely better now.
But also, keep in mind that somehow I managed to keep working on this, understanding the mess, knowing exactly where in the bazillions of lines of code things happened... only a smart person could do that. Nod nod nod. Did I write smart? I meant to type "loony".

So anyway, use this at your own peril, and do NOT come asking for me help... especially not if it starts sucking your soul out...
It used to compile with Delphi 6 Personal Edition, and somewhere along the line I managed to use the ... Delphi... Studio... something... I don't remember what it was called, all I remember is that it required .NET 1.1, was incredibly bloated and slow, and crashed more than TISFAT.

And some of the many things I learnt doing this:

  • Never put code directly in an event handler, make it call an objects function or something
  • $I including files in Delphi is not smart, it's evil, and made debugging almost impossible (back in Delphi 5 days at least)
  • Delphi objects... well, you don't need to allocate memory for them in the traditional malloc() way, nor do you need to use pointers to them... instance := object.Create() works juuust fine, and is a lovely way of doing things.
  • When designing a file format, do just that, design it! The amount of fudges in the TISFAT format just to cater for tiny variances in previous versions... geez.
  • I quite enjoy working in my own filth.

[ view entry ] ( 624 views ) permalink print article

First there was the fine motor skills of an elephant.
Then there was TISFAT, which worked for a while, mostly, almost.
Then there was an unreleased tisfatTOO, which did nothing but frustrate me.

But now that tablets are common-place, and there are touch-screens actually capable of being useful (eat dust, resistivity!), I decided it would be fun just to see what animating a stick figure on them would be like.
So I whipped up a quick prototype to test it... and, well, damn. I've got the disease again.

It may not look like much, but the original TISFAT started with something way more basic/hideous.
AND it runs on iPad, TouchPad, and PlayBook already, huzzah!

To the FutureMobile!

[ view entry ] ( 144 views ) permalink print article

It's been a while since I touched Delphi, but I've always loved it for rapid prototype development... hell, I made TISFAT in it without even knowing how to code (and boy does it show!).

Since I recently decided to make a Drumpster configuration file editor, I thought I'd dust off my old Delphi installation, but sadly, I couldn't find my dear old Delphi6Personal.exe download anymore (and Em..Embar... THEM aren't being nice anymore).
Seeing as this also had to be pretty OS portable, I thought this was a perfect time to look at FreePascal and Lazarus again.

The last time I looked, FreePascal was awesome and were talking about exciting ARM versions (iPhone/GameBoy coding for morons, woohoo!).
Lazarus however... well... the last time I used it, it was not a very pleasant experience at all.
The debugger was never really sure that the app had started, or if it had finished, or paused, or if it could even feel its legs.
The IDE itself would panic all the time, proudly telling me to save stuff before it went completely tits up.

But now?
Oh wow.

Lazarus has come a long way, but the past few years have seen it rapidly become something incredibly useful and handy.
Sure, it still generates executables that consume the sun with their size (helloooo strip.exe!), but it's delightful to code in now.
The intellisense is great, the debugger now talks to the IDE, I can right-click-and-go-to-definition, I can minimize the main window and it will take its children to the flaming pits of hell with it...

It's slick, smooth and sexy.

And portable, huzzah!

Good job guys.

[ view entry ] ( 200 views ) permalink print article