Showing posts with label Fun. Show all posts
Showing posts with label Fun. Show all posts

Friday, 28 November 2025

You can't possibly enjoy that

Why would anybody actually enjoy maintenance programming?

It's a long story. Bear with me.

I grew up in the 70's and 80's when all my heroes worked at Bell Labs, but they were just these weird guys who did computer stuff that nobody paid attention to at the time. They wrote code because they needed to do shit, not because it was sexy.

I cut my teeth writing BASIC on a VIC-20. Not very sophisticated, but I felt I was doing more or less the same thing those guys were doing: I wanted the computer to do something it didn't do out of the box, so I taught myself how.

In the beginning, I was a terrible, unsophisticated, uneducated programmer, and I spent a lot of time rewriting my own code.

So what?

I got used to the notion that if I didn't get everything just right, the program would crash if you looked at it wrong. Refactoring wasn't a side quest, it was what I did after writing a long function to figure something out and then needed to break it down into manageable parts.

Fast-forward twenty years, and I decided this was something I'd like to do for a living, so I got the education I so desperately needed. I learned about data structures and software engineering and project management.

But I never forgot those early years rewriting my own code over and over, making it better, making it right. It was satisfying to me, and it still is.

I've spent a good deal of my career either porting or maintaining other people's code, mostly because nobody else wants to do it. They want to start something new, work on a feature, do the sexy things. That's cool, I get that, but that code might hang around for years, and it's unlikely to be perfect or completely future-proof.

Then it's time to call in the maintenance programmer. I've got you, dude.

Sunday, 20 August 2023

Campeonas

Just watched the WWC final. If you weren't following this year, you should have. Top notch football all the way through. For a change it didn't come down to penalties, and everybody will agree that the score line matched the run of play.

The final was bittersweet for me this year: I'm overjoyed to have seen Lori's beloved Roja Furiosa win, but it's so very painful that she wasn't here to see it with me.

Somos los campeones, mi luchita.

Thursday, 12 December 2019

It's better in person

All checked in, waiting for our flight. Things at YVR couldn't be more different (better) than my online check in experience.

We hit the airline counter when they opened, everything went smooth as silk. Huge line at passport control, still got through in 10 minutes. I think we walked a couple miles to the gate, but I guess somebody has to be furthest.

It's pretty clear that the airlines' internal systems are a hell of a lot more squared away than their external systems.

Wednesday, 11 December 2019

A Spanish Christmas (nearly)

We're off to Spain until Dec 24th. Herself and I have spoken often about going away for Christmas -- though to be honest, the talk was usually about Whistler or Harrison Hot Springs. Still, Christmas in a different culture seems like a thing I'd like to try at least once.

Airline check in went poorly as it always does for us: We're not actually checked in yet, because apparently online check in is not a solved problem. I did manage to reserve seats, so I suppose it'll probably be fine, but when the support line's tech support doesn't know what went wrong, it doesn't inspire a high degree of confidence.

Remember when "checking in" meant just showing up, and you were assigned seats when you booked the flight months and months in advance? Maybe I'm getting too old for this.

I think once we're wheels down in Madrid, everything's gonna be fine.

Hasta próxima

Friday, 24 January 2014

Whether I need to or not

Just having a whip round my bookmarks, and I realize that it's been exactly a year since my last post. Seems like something a guy should do at least annually, so let's do a review of 2013.
  • Went to Spain
  • Quit smoking. Again.
  • Left my job at a game studio, invested in a new game studio. What the hell was I thinking?
There's probably some other major stuff, but it's a bit of a blur now. Other minor (but perhaps fun) things:
  • Taught my sister's kids how to say "What's that do?" just like Gir
  • Joined the 21st century and got a smart phone (albeit a crappy one)
  • Started losing weight instead of gaining it for a change
  • Finally set up an LDAP server successfully.
  • Read a surprisingly large amount of surprisingly good sci-fi, both old and new
Is that enough? Can I go?

Monday, 3 September 2012

CPU emulator - Part II

OK, posting version 1.0 - hopefully somebody finds it interesting. Everything I mentioned in the previous post is done. No hardware interrupts at this point, but there's no peripherals that would need one yet.

Get it here.

The docs need some work, but if you're the sort of person who's interested in this kind of thing, the architecture and brief instruction set are probably all you need. Maybe the peripherals. I've included a test assembly file that I think exercises the entire instruction set.

BTW, the files are hosted at cx.com, as an ex-coworker of mine works for them now, and it seems pretty cool.

Sunday, 12 August 2012

CPU emulator - Part I

I messaged the mailing list a few days ago regarding a CPU emulator that I found last week. I played around with it for a day or two, and then decided that,
  1. It was missing at least one instruction I wanted, and
  2. the source is Delphi, and I don't want to go down that road.
So of course now I have to make one myself, so that I can alter the instruction set and add peripherals. And perhaps make it a little more configurable - put the peripherals on ports of my own choosing, select interrupts, etc.

All this is in aid of getting closer to a machine, any machine. Sure, I could just learn/write x86 assembly, but that just doesn't seem like enough "fun" to me. Plus, this gives me a little more freedom to be imaginative.

I'm currently writing it for Win32, simply because it's easier to hook up a GUI. If it makes you feel any better, the core is pretty much standard C++98 (I don't use any exotic C++ features), and I'm building it with a cross-compiler on my Ubuntu VM. This is mainly because modern MS compilers seem to require a fairly advanced version of Windows, and I want some backwards compatibility (Luddites rejoice!). You don't need Windows 8, or any .NET bullshit, or much of anything except a bare-bones Win32 installation; in theory it could run on Win98, but Win2K and up for sure.

At some point I might explore some sort of Linux GUI, but regardless of that, I'm fully committed to making sure the core CPU classes are portable enough that one could easily connect it to a simple console program. Load machine code, step, examine registers/memory, step, etc. We'll see. FYI, bitching always sounds to me like volunteering...

Current Feature Set
It's an 8-bit microprocessor, with (predictably) 256 bytes of RAM. It has 4 general purpose registers - AL, BL, CL, DL - and 4 special purpose registers - IP, SP, BP, SR (aka FLAGS). I've implemented all the move, arithmetic, binary logic, and comparison instructions. The GUI can load a machine code file, and you can step through it; RAM and registers are on display full-time.

Coming soon...
Obviously need to expand the instruction set - branching, procedure calling, interrupts, and I/O. Definitely want to make some peripherals, and I'd dearly love to implement them via some sort of pluggable interface, though I don't know how portable that would be. Plus there's currently no assembler, so I'm hand-assembling the machine code for now, which is even less fun than it sounds if you have to test a feature that requires any real set up.

I'll post a build once it has coalesced into something useful, if you can call it that.