The Twelve-Year Mistake Part 2: The Coder

By Shamus Posted Monday May 20, 2013

Filed under: Personal 83 comments

It’s September of 2000. I turned 29 last month. I’m trying to move our family from Boston to Pittsburgh. In the middle of the move, Dad has died.


I only ever saw Dad in the context of sitting around his tiny little efficiency apartments while he drank coffee and chain-smoked. He lived alone and only ate meals that could be prepared with one hand. His kitchen table was always a mountain of incoming mail, with a small spot reserved for his plate and utensils. You can tell where his favorite seat was, because it was the one spot on the couch that didn’t release clouds of dust when somebody dropped into it. His seat was surrounded by different eyeglasses, overflowing ashtrays, coffee stains, and open books.

He never discussed his friends. I inferred that he had friends by the fact that he would abruptly get new stuff around Christmas. Sometimes I'd see personal mail mixed in with the overdue bills heaped up on the table. Once in a long while he'd get a phone call during my visit, but the calls were always terse and he never said who had called or why. His life outside of coffee and cigarettes was opaque to me.

Dad's funeral is… surprising. I can suddenly see that busy other life he lived. That other life was hidden because his friends were mostly fellow members of Alcoholics Anonymous. That was where he invested most of his time and that's where his heart was. I suppose he was trying to save other people from the fate he'd brought on himself. I meet many of these people at the funeral, and I get a sense that he'd helped a lot of them directly.

We'd never really understood each other. I never saw the very personal work he did sponsoring people as they fought to reclaim their lives from addiction. He never got the whole “computer programmer” thing, and was always jokingly (but also earnestly) a little disappointed that I never became a writer.

After the funeral I return to Boston and begin the long job of dragging my family home to Pittsburgh and finding a permanent place to live.

House Hunting

The house search is trying for us. Buying houses takes a lot of time even when done quickly, and in the meantime we're living with grandparents. Space is tight. Our stuff is sitting in storage. My work area is crammed in my bedroom, which isn’t optimal. It’s actually worse here than working in an office. Sure, I can wear comfortable clothes now, but Rachel is toddling around and Esther is still in diapers. Between the two of them they can make a lot of chaos and noise in such close quarters. Heather’s grandparents are good people, but they needle me sometimes. They don’t mean to, but like a lot of people we know they just don’t get this whole internet thing and they don’t really respect what I do.

Her grandparents are generally good people. They’d have to be. They’re letting our family live upstairs from them, and kids are not quiet creatures. They’re generous, but they’re also old-fashioned. They see introversion as a character flaw and they see my working from home as strange. They also don’t like that I keep such odd hours. They make a lot of suggestions: You should visit the family more. Have you thought about changing jobs? No? Have you thought about going to school? I am not respected by people in Heather’s family, and I’ve responded (perhaps petulantly) by ignoring and avoiding them. This does not improve their opinion of me. This ignoring and avoidance thing is a lot harder to pull off now that we’re under the same roof.

While the house-buying is problematic and slow, the sale of our Boston condo is simple and effortless. We technically made $35k on it, which is nearly a year's salary for me. I'm sort of shocked at how little of the money lands in my hands. Realtor fees. Taxes. The legal costs of resolving the paperwork. Moving expenses. Paying off the credit card we stressed out when living in Boston. When it's all over we’ve got just enough for a down payment on a new place.

Rachel, playing in her new yard.

We find a place to live in the extended ‘burbs of Pittsburgh. It's a big house with a yard. There are enough bedrooms that we can give the kids space and still have a quiet room reserved for my office. It's January of 2001 when we move in.

Our lives improve right away. I can give Heather the attention she needs, and she can give me the space I need. I'm able to focus on work. I get some new asthma drugs which basically stop all symptoms and let me live a normal life. Now I can stop putting on weight. Maybe I should think about getting some exercise?

I try writing a private blog for my coworkers to outline the stuff I'm doing and explain why job X was done a day early and job Y was done a day late. It's very much a “here is the most interesting problem I’ve found today” kind of thing. My boss is worried that the public will find the thing and company secrets will be leaked. I put a password on the blog. People stop reading it.

I get a lot out of doing the blog, and I find that the process of writing actually helps me sort through and analyze problems better than just sitting and thinking about them. Despite this, I still have the mindset that the blog is for the benefit of “everyone else”, so when people stop reading I stop writing. I also have a personal blog that follows the same trajectory: Rewarding to write, but ultimately abandoned when I realize I'm talking to myself.


This game ran on Renderware.

Over the last six years with this company I’ve done mostly art, with programming filling out my minor duties. After the move I transition to all programming. I get to do a lot of cool experimental work. Some of it pans out, some of it doesn’t. That’s how it is with prototyping.

Here is an assortment of unrelated programming anecdotes to pad out the rest of this entry:

I come up with a compression system for 3D models. I have this epiphany about how I can make 3D data compress down. My prototype is 15% more effective than standard zip compression. If I’d thought of this four years ago it might be worth something, but the dà¤rk age of dialup is drawing to a close. Broadband is becoming widespread. Also, while a savings of 15% is pretty significant, 3D models represent only a tiny portion of the total volume of data that our users download. Eighty percent of their bandwidth goes to downloading sounds and textures. So my technique only saves 15% of 20% of their total downloads. And finally, my technique takes advantage of the fact that most 3D models are built on a coarse grid. This is becoming less true each day as computers get more powerful and artists dabble with curved surfaces. Basically, this is a clever trick that makes only a small difference for a vanishing number of people and only works on the kind of models nobody makes anymore. This is an idea who’s time has come… and gone.

I write an interface system that auto-generates a dialog of different options into a collapsible list. This makes it very easy to manage huge numbers of options in a single dialog. It’s based on the dialog style used in the Unreal Editor, and it will save us a ton of work over the next decade.

I write some code to procedurally generate trees. It’s very slick, very creative, and completely useless to our company. I end up shelving it, forgetting about it, and eventually losing the code.

Our codebase was begun in 1994. It’s a very old-school set of code, written in vanilla C and tied to Windows on a very fundamental level. Our graphics are handled by Renderware. It’s not a bad graphics engine, except our version is from 1996 and here in 2001 it is now ancient beyond reckoning. For years our codebase was maintained by two guys, who passed files back and forth by email. There are now four coders on the team, and it is decided that the time has come for us to run things with a little more professionalism.

We set up proper source control. We decide to transition from C to C++. We move to using the latest version of Renderware. (This is the same engine and version as the one used in Grand Theft Auto III, which just came out this year.) This means we’ll finally support these new graphics cards that are all the rage these days.

For those of you who don’t write code for a living: C and C++ are sort of the same programming language, except not at all. C was extended to make C++, so any valid C code ought to be valid C++ code. There are a lot of annoying little edge-cases where this isn’t quite the case, and even an experienced programmer can quickly find himself buried up to his neckbeard in esoteric minutiae. This is particularly true if you have one million lines of C code that are using software libraries written by other people in C and now you want to flip a switch and begin programming in C++.

Coding in all C was kind of like fighting with one arm tied behind my back. Sometimes I ran into problems where a C++ class was the right tool for the job, and I couldn’t use it. Now we’ve got a hybrid codebase with a bunch of strange header-juggling and a schizophrenic approach to object-oriented design, so now it’s like fighting with both hands, but hopping on one foot. I can’t tell if this is an improvement or not. It certainly makes the job interesting.


See, the advantage of C++ is the way it shapes your program at a high level. C is a city made up of horse-roads. The roads are cheap and fast and if you want to go somewhere new you just blaze a trail directly there. The end result will be an incomprehensible roadmap of ad-hoc connections and routes. Fast to build, hard to maintain. C++ is like a nice modern city built on a crisp grid. It takes time and planning to set up, but it’s easy to use, document, and maintain. The migration we’re doing is like paving over all those horse-paths with asphalt: It’s a big improvement, but no amount of pavement will turn this tangled spiderweb into a grid.

During the conversion we find some bits of code that nobody wants to touch. Our Jpeg library was written by a fresh college grad in 1994 or so. It is, without a doubt, the most singularly horrifying piece of code I’ve ever seen. Global variables defined in the middle of the file. Mutually recursive functions. The function names are all based on the specific details of jpeg files, so the functions are all named things like JFIF_8 (), APP0_JFIF_Ex (), YCbCr (), XFF (), and so on. They’re all impenetrable and written with unpredictable mixed case. Some of these names are identical to #defines aside from case or underscore placement. So…

//Somewhere in the middle of the file...
#define JFIF8     (something inscrutable)
#define YCBCR     (something inscrutable)
//Then, several hundred lines later...
void JFIF_8 (JPx jx, JPy jy, J2* j)
  a half page of math and bit-shifting
  if (rV > gV || yV == YCBCR) 
    return YCbCr (&j);
  now a bunch of block memory copies using global pointers. Good luck finding 
  where they're freed, because it's nowhere CLOSE to where they're allocated.

(Seriously. I wish I still had access to this code. The stuff I wrote above is just an imitation of the style. I don’t actually remember the specifics these days. The original is much better. It’s poetic in its awfulness.)

Some of this old code is completely inscrutable. We don’t have enough time to properly go and re-write everything to follow C++ conventions, and nobody wants to touch the crazy minefields like the JPEG decoder. So we can’t just make a clean break. Instead, we kind of split the codebase between new and old using stuff like extern C { ... }. This is sometimes messy and problematic.

Work is fun and challenging, but big changes are on the way…


From The Archives:

83 thoughts on “The Twelve-Year Mistake Part 2: The Coder

  1. Lanthanide says:

    Man, I really hope this isn’t like “How I met your mother” and it takes 8 years installments until we actually find out who the mother is what the mistake is.

    1. Psithief says:

      I thought the 20 year mistake was ‘Not being a writer for 20 years’?

      1. Adam says:

        Might be a setup for a punchline.

        “And then I bought the DVD collection of BUFFY THE VAMPIRE SLAYER and couldn’t believe I’d let it pass under my radar so long.”

        1. Nick says:

          Except that’d be a ten year mistake. Unless you ignore the last two seasons, I guess

  2. Collin says:

    The bit about coding is beyond me but this series is wonderful. Thank you for sharing it with me.

  3. Zagzag says:

    It’s certainly interesting to hear that the kinds of problems that come up when coding in a business environment are actually very different to the ones that matter in your personal projects.

  4. Shamus says:


    I didn’t realize I’d hit “publish” on this. I was still touching things up, moving paragraphs around, and proofing. Then I glanced over at the controls and noticed the “publish” button was replaced with “update”.

    So, I’ve probably been live-editing this thing while people were already reading it. That’s… odd.

    Anyway, I guess I can stop messing with it now. IF you glance up and notice that what you see now doesn’t match what you read, this is why.

    1. KremlinLaptop says:

      Oh well, at least you don’t have the habit that I do where if I get stuck on writing something — say an important e-mail with lots of tricky details and calculations that could affect the profits of the company I work for by a significant amount — I’ll vent a bit of frustration by writing out a bunch of curse words. Hitting send by accident then is slightly embarrassing.

      Oh well, luckily my boss has a sense of humor — clients might not be so fuuuuuuckdamndamndamnarsetitswank

    2. GM says:

      only noticed a one new picture so i came in late it seem´s.

    3. Fawstoar says:

      Editing your post at 3AM?! You’re definitely dedicated.

      1. Aldowyn says:

        When you gotta write, you gotta write…

  5. Dai Panda says:

    Personally I’m loving these installments… it’s like an expansion-pack to the autobiography…
    There’s just something about how they’re written… and as someone who hasn’t programmed since around 2001(long story) I even recognize the code and it’s slowly coming back to me while looking at that part.
    Basically, looking forward to more. You’ve had an interesting life and I love that you’re able to put it to words in a way that has such amazing narrative flow, without even missing a beat.
    I wish I could write half as well, personally :D.

  6. Chamomile says:

    “He…was always jokingly (but also earnestly) a little disappointed that I never became a writer.”

    I don’t know whether to laugh or cry.

    1. Cuthalion says:


  7. X2-Eliah says:

    I still have the mindset that the blog is for the benefit of “everyone else”, so when people stop reading I stop writing. I also have a personal blog that follows the same trajectory: Rewarding to write, but ultimately abandoned when I realize I'm talking to myself.

    Aaaaand that’s exactly why my blog’s been abandoned for about 8-9 months. I never saw – still don’t to be frank – the point of taking multiple hours per post just to publish it for a readerbase of nearly nobody…

    1. Daimbert says:

      Kinda the same thing with mine, although the main reason I started it — to give me a place to write things down so that I can stop thinking about them — still holds. It’s just that if I’m busy or tired or want to do other things it’s hard to get around to doing it, especially if it’ll take some time. If I had more readers, I’d probably find the time (like I do for moderating PBF board games) but since there aren’t that many it’s too easy to say “Well, this is just for me, so if I don’t feel like doing it I really shouldn’t”.

      1. Kacky Snorgle says:

        I had a similar experience a few tech generations earlier. I was in college and having a long-distance relationship, and I found that when I sat down once or twice a week to write my girlfriend a letter (yes, on actual paper) about how my life was going, the act of narration really helped *me* to maintain perspective on how my life was going…. After we eventually broke up, I thought about keeping a journal for the same purpose, but it seemed too pointless to invest the time. :(

    2. KremlinLaptop says:

      Also why I don’t see the point of posting my photographs online — especially on tumblr — because while people see them I would really like to get some… you know… feedback? I’d happily shed 50% of the people that follow me for 25% more comments.

    3. X2-Eliah says:

      Related thought: Google Glass might contribute even more to this kind of thing. Imagine, in a decade, nearly everyone* walking around, taking pictures/videorecordings nonstop for absolutely nobody’s benefit, clogging internet infrastructure with pure junk in the order of gigabytes…

      *- hey, it happened with smartphones. You never know.

      1. Paul Spooner says:

        It’s all just detritus accumulation for the AIs to burn through and digest when they arrive. Kind of like fossil fuel.

        1. Primogenitor says:

          If Skynet was trained on heavily post-processed first-person video of meal times, that would explain it’s hatred of mankind.

      2. Mike says:

        Wow. I already need to look out for a large Aleutian man riding a motorcycle around with a nuke in the sidecar? The future is NOW, man!

    4. Aldowyn says:

      Same here. There’s a reason I talk so much on twitter even though I don’t really write that much on my blog :/

      By the way, I’ve been following your blender escapades. I don’t know much about modelling but it’s been somewhat interesting thus far.

  8. Abnaxis says:

    It's September of 2000. I turned 29 last month.

    So…just broadcasting your age to the entire internet with the first sentence? I know it’s the internet, and any bad people who want access to these sorts of facts can probably look it up in minutes, but just how open people are with personal information is weird to me sometimes…

    1. swenson says:

      You do realize Shamus has posted his entire life’s history on here, right? The Autoblography. I think the time to be concerned about him putting personal information on the Internet was several years ago.

    2. anaphysik says:

      Unless you’re a minor, there’s really nothing ‘dangerous’ (or incriminating, for that matter) about voluntarily indicating your age. It’s highly relevant to both the chronology of the story and the points made within it, so Shamus brings it up. (And for those that can’t add, Shamus explicitly mentioned his age in the post about theme updates anyway.)

      For instance, Shamus’ house address at 451 Coolpeople Lane, Earth, Milky Way is FAR more sensitive information.

    3. Syal says:

      He’s got his age on the Author page already (looks a little out of date, but still.)

      If anything, telling people his birthday will cause them to send him games and stuff.

    4. Dave B. says:

      I’ve been thinking about this sort of thing recently. It is a bit strange, how different people handle personal information on the Internet. I, for example, don’t use my full name here or on my blog, but as a licensed amateur radio operator, I have my full name and address on a publicly accessible FCC callsign database. It just seems a bit incongruous that I (and many people) are so paranoid about information like that being on the Internet when hams have been giving out names and addresses on the public unsecured airwaves for a hundred years. I may need to rethink my approach to screen-names…

    5. X2-Eliah says:

      … But what harm is that? Seriously.. where’s the harm in you knowing Shamus’ age? I assume he is smart enough to not have all his passwords be [yyyy+mm+dd], and that’s basically the only application I see for malicious/nefarious/selfish use of Shamus’ age knowledge.

      1. Humanoid says:

        Sensibly it shouldn’t matter, but not all institutions are sensible. When I called my phone provider for example, the only verification requested (other than the phone number itself) was my date of birth. Sure, that’s technically two pieces of information, but phone numbers are likely the easier value to obtain.

        On the other hand, in this post at least, there are still 31 possibilities for Shamus’ actual birthday (though I haven’t read the autoblography).

        1. Syal says:

          And all this assumes it’s the actual date and not dramatic misinformation.

          1. anaphysik says:

            Plus, I’m pretty sure I read somewhere that it’s canon that Shamus is just Josh’s hallucinated superego.

      2. LassLisa says:

        Also, like, the phone book.

        People have different reflexive responses to technology, though. I’m in mind of an exchange I came across where someone was vehemently declaring that you should never put your home address into your car’s GPS, because if your car gets stolen someone could use it to learn where you live.

        Someone else then reminded them that you are required by law (in our state) to keep your car registration, which includes your address, in the car at all times…

  9. AbruptDemise says:

    Really wish you still had that college grad’s code, too, Shamus. Even if I never really learned C, it’d still be interesting to see if I could figure out what the code was supposed to do.

    If anything, maybe it’d give me incentive to improve the commenting in my own programs.

  10. ClearWater says:

    Reminds me of some code I used to work on: it was ported from tcl to c/c++ except for the important code that nobody dared touch, running on Unix with some Windows COM emulation stuff thrown in. Fun times!

  11. swenson says:

    As one of them new-fangled programmers who started off with C++ and never really learned C, that code is horrifying.

    1. Humanoid says:

      On the other hand, as someone who learned both at university a decade ago, and have used neither since, I can still sort of read C, but am utterly hopeless at C++. Admittedly it’s probably because the former was used for the whole three years of the degree, whereas the latter was only introduced halfway through.

      Nowadays I use none of the languages learned from that time, but instead an obscure (but simple) language of which the number of companies using it worldwide can be counted on one’s digits.

      1. Nathan says:

        As someone who writes C code for a living, and works on multiple codebases with > 1Mlines of code, I can say that I’m very glad I don’t have to write C++. Compilation times alone would cost me years of my life. Sometimes I’d prefer to be writing in something modern like Go or Python or D or Erlang, but most of the code I work on is either extremely performance sensitive or memory constrained, or only has the one compiler.

        I’ve never thought my code would be better in C++ though. Properly structured C can get most of the good ideas C++ brought in without their horrible C++ implementation.

        Anyway, counterpoint for people who don’t know any better: some people strongly prefer C to C++.

    2. Deoxy says:

      C and C++ are BOTH horrifying – they allow all kinds of ridiculous things that no sane programmer should ever, ever, EVER do.

      C is incredibly powerful… but then, a 48 inch handsaw with no guard would be incredibly powerful, but no one thinks THAT’s a good idea, eh?

  12. Cybron says:

    Oh man, I wish I could see that piece of code. It sounds amazing.

    We have some bits in our system which originated from coders who absolutely did not understand the language they were using (and didn’t really have any training to begin with), but it’s not as terrible as that.

  13. Hal says:

    You should visit the family more. Have you thought about changing jobs? No? Have you thought about going to school?

    Man, that is just the worst. It stems from the (now long defunct) idea that education = prosperity, and a good degree is a guarantee of a six-figure income, or at least one that will be better than whatever you’re currently doing.

    Let me share a personal story.

    I started grad school for a third time in 2008, the prior times being one misfire (a long story) and one success, but the success was only for a master’s degree and not a PhD. In any PhD program, you move on from the classroom/education part to the bulk of your thesis/dissertation research after you finish your qualifying exams. These exams take different forms depending on the institution and subject matter, but they all boil down to academic hazing. It’s the intellectual equivalent of a sorority girl stripped to her skivvies and standing in a circle of her sisters while having beer and ping pong balls thrown at her. (I don’t know. Isn’t that how it goes? I think I saw that in a movie once.)

    I was doing fine in grad school. Passed my classes just fine, my research was . . . well, it have helped if I’d been seeing good results, but we were working on it. When the qualifying exams came around, I figured it wouldn’t be a problem. The written exam went fine, at least so far as my professors told me. The oral exam, though . . .

    The oral exam takes place with a panel of five professors, one for each subject area of the program. Each spends ~30 minutes grilling you about the subject matter; there’s really no way to know ahead of time what they will ask you. If they don’t think you know the material well enough, they can fail you. If you are failed in a subject matter, you have to return for a new oral exam for that material alone, two hours of examination dedicated to that subject.

    I choked. There’s no sugar coating it. The first professor started questioning me, and I froze up. I stuttered and mumbled my way through answers, but the entire thing went to hell. None of the professors passed me, which meant that if I wanted to stay in the program, I was facing down 10 hours of follow-up oral exams that I absolutely had to pass. For that, and a lot of additional reasons, I bowed out of the program, earning a second master’s degree for my troubles.

    The point of this entire story: When I had to tell my parents how my exams went, and how I’d likely be leaving the program without a PhD, the first thing they said to me was, “Well, why don’t you move back home? You can go back to school to do something else.” Absolutely, utterly deflating to get that from people you love. I had to be very clear when telling them there was no more education, no more degrees in my future.

    1. James Bennett says:

      Man, that’s a crappy story. It sucks that your parents are still pushing for you to get more education when you already have two advanced degrees.

      I have a friend who dropped out of a PhD program with a Master’s degree. He went on to a very nice teaching job at a private school and is much happier now than when he was trying to work on a thesis. I hope things start looking up for you.

      As far as Shamus’ situation, I find it kind of odd. I grew up in the Silicon Valley where programmers got a lot of respect. The idea that Shamus’ in laws would look down on his profession seems downright bizarre to me.

      1. Deadfast says:

        The idea that Shamus' in laws would look down on his profession seems downright bizarre to me.

        In 2000 I don’t find that much surprising. They might have never even used a computer themselves.

        1. James Bennett says:

          I realize that my family was ahead of the curve as far as adopting new technology but still, by 2000 it seems to me that, even if you don’t own one yourself, you should at least realize that computers are kind of a big deal. This is still in the middle of the dot-com boom. Just the year before, people on the news were talking about how the world was going to end because computers were all going to suddenly think that it was the year 1900.

          I realize that an older couple living in the Pittsburgh area isn’t going to be on the cutting edge of understanding new technology, but I had sort of assumed by then that everyone understood that computers (and computer programmers) were kind of a big deal.

          1. suburbanbanshee says:

            The vast majority of people in Pennsylvania, and specifically in Pittsburgh, would have understood at that time (and indeed, from as far back as the 1970’s or 1950’s) that being a programmer is a darned good job.

            It was his misfortune that his in-laws were not in the majority.

            (Sheesh, even my mom, who disapproved of all sorts of things, never disapproved my little brother doing programming.)

            1. Shamus says:

              Oh, I don’t think they were down on the career itself. But to them, working a white-collar job was something you did in a fancy office while wearing a tie, not in your bedroom in sweats. Also, Heather and I had only been married 3 or 4 years by this point. They were still getting used to me.

              I suppose I could have TALKED to them about it and got a feel for where their concerns were coming from. Never did.

              A decade and change later, everyone is fine with me.

              1. Steve C says:

                A decade and change later, everyone is fine with me.

                Is that because you became a paper millionaire? Or because of interpersonal reasons? This sounds like a douche question but I’m really curious. I’ve never had a good relationship with family.

              2. Aldowyn says:

                Which plenty of, maybe even most, programmers totally do, incidentally. (well, maybe not the tie).

        2. Jarenth says:

          “This whole ‘Internet’ thing is just a fad. It’ll pass.” — my dad, circa 1995. We still quote him on it.

      2. Syal says:

        I would venture that many of the habits of people on the other side of the country would seem bizarre.

    2. Zak McKracken says:

      You have my Sympathy.
      I know quite a few people who dropped out of whatever education they were pursuing only to find their true vocation. I also know two people who did make it to PhD (and one even far beyond) with the firm intent to have an academic career but realized more or less on the day they made it that this was not what they really wanted, and who then abandoned that career path more or less quickly.

      … and I think that’s okay. It’s a pity nonetheless, but if at some point you realize you won’t be happy where you’re going, go somewhere else. Better earlier than later.
      All of the people above are now muuuuch more content with what they’re doing for a living.

  14. ZoeM says:

    So… Is this going to be another autobiographical book? Is it going to get long enough for it?

  15. Chris says:

    The migration we're doing is like paving over all those horse-paths with asphalt: It's a big improvement, but no amount of pavement will turn this tangled spiderweb into a grid.

    It all comes back to Boston, eh?

  16. “Have you thought about going to school?”

    It genuinely confuses me that they would make that kind of suggestion to you considering the situation they are fully aware that you’re in. How did they expect the logistics of that to work?

    1. Shamus says:

      I don’t know if they asked that question at that time. It’s more the KIND of question they asked periodically. I can’t remember them all, but it was usually a passive-aggressive way of implying I ought to be doing something else with my life.

      1. Trix2000 says:

        I’ve run into this a lot with my parents, and the ‘worst’ part about it is that they are legitimately concerned about me, and it’s just their way of expressing it. My mom in particular never could understand my tendency to keep my social interactions online more often than not. So I really don’t feel like I can fault them for it…

    2. The Rocketeer says:

      Oh, I know this situation all too well.

      Yes, Mom and Dad, I am still working 12 hours a day, five or six days a week, overseas, in a physically demanding job. No, I’m not attending college full time as well, why do you ask?

      Oh, for my career. Of course. I’ll get right on that.

  17. Deadpool says:

    “Our Jpeg library was written by a fresh college grad in 1994 or so.”

    Was that Bloody Stupid Johnson?

    1. Otters34 says:

      Blindingly Stupid James, actually. Easy mistake to make though!

    2. Canthros says:

      A JPEG API written in C by Bloody Stupid Johnson would contain a method all the other code jumps in and out of via gotos, which just happens to cause the executing machine to play Verdi’s “Anvil Chorus” using the read heads of all of the machine’s hard disks.

      Possibly, it would also let one use the optical drive to toast a bagel.

  18. Galad says:

    This is all immensely satisfying to read, and a lot better than whatever I might be telling my hypothetical kids I did in my younger years..

  19. Alex Broadhead says:

    “See, the advantage of C++ is the way it shapes your program at a high level.”

    Sort of. You can shape your C program in very similar, if not exactly the same, ways. C just doesn’t force you to do that. It gives you all the rope you need, plus an extra few feet to hang yourself.

    So, more properly, the _limitation_ of C++ is the way it shapes your program at a high level. It’s just that many (most?) people need limitations in order to create. I know I do. (Though not so much C++ – I still mostly use (increasingly structured) C. But then much of what I’m coding isn’t naturally or easily represented by objects. When I work on interfaces, though, C++ or Objective C makes a lot more sense.)

    Hope that helps,

    1. Mephane says:

      C++ also does not force you to shape your code in any particular way. I have seen code that pretends to be C++ but had obviously been written by someone with a C background who still wants to just write C code. Not that C code itself is bad per se, but I have seen far too much C++ code written as if it were C that would have been both bad C and bad C++.

      1. Alex Broadhead says:

        True. And the horrifying code I have seen is much more commonly C++ than C, usually written by people who were unclear on the concept of OO. (I have seen C++ that I literally could not figure out how it compiled, much less ran.) C++ wants you to shape your code using OO, and it tries to make it hard to avoid it. But the problem with making things foolproof is that fools are so ingenious.

  20. Mike says:

    So, was R the one who wrote the JPEG code?

    Also, I have to give props again to Shamus for inspiring me in my Single Act of Code:

    I needed to export from the 3D software I was using at the time (Blender) into our ancient, text based file format (Renderware’s .rwx) so that I could stop using the truly abysmal Truespace.

    Truespace, for the blessedly unaware, had an interface seemingly designed by that Star Trek Voyager species which communicates through interpretative dance. Not to mention, the version we used was no longer supported and newer versions would not work with our file format. (Good riddance)

    Shamus and the other programmers’ time was obviously at a premium, there being far more potential work that *could* be done than actual programmer man-hours available, so this was never a priority.

    So I threw myself (a 3d artist) at the problem, largely due to Shamus’ excellent laymen explanations and overall enthusiasm for coding. Thankfully all of Blender scripts are written in Python, which is a really simple language, and very newb friendly.

    It took me about three weeks to write, and probably looks *ridiculous* to a real programmer, but it actually spat out objects that looked right in our engine. Also, I customized it to our software a bit so that our artists, (by which I mean the other one, besides me) didn’t need to hand edit the text file as much, so overall it was a success.

    I can now say “I coded something, once!”, a real tool that served a real purpose, too! I don’t think that I would ever have had the guts to try it without Shamus’ encouragement and enthusiasm.

    Thanks, Shamus!

    1. X2-Eliah says:

      Blender, eh? I’ve literally just started learning the ropes of doing stuff with blender, and – as someone with about 2 year’s worth of dabbling in 3dsMax, I’d like to ask:

      “how the heck do you get *anything* modelled in blender?!” – The interface, and controls blender uses for even basic tools like selection, beveling, extrusions.. Ugh. It’s like the software keeps fighting me with literally every polygon I try to manipulate.. I’ve looked into the compositor, material editor, they seem neat. Cycles is neat. But, ugh, the raw process of box-modelling is just.. horribly obtuse :(
      Does it get easier with time, or is Blender really just plain not meant for meshes with 60k+ tris *without* subsurf?

      1. Mike says:

        *Everything* in Blender is about keyboard shortcuts. It has a very steep learning curve, but it is lightening fast for mesh editing, once you get the keypresses down.

        I haven’t used it in quite a while now (in a different field), so I do not have familiarity with the latest releases. I understand the UI is going through an overhaul, but definitely try and find the key presses for “grab” “extrude” “scale” etc.

        Slowly add to your list of shortcuts as you do things slowly through the menu.

        Also, unfortunately, documentation is somewhat scattershot, being a free open source program, albeit with a well organized community and organization behind it. Read lots of tutorials and watch lots of videos. I know that is probably disappointing to hear, but some things you will just *not* be able to intuit, even though they are actually easy to execute, once you know it.

        In this sense it is the exact opposite of the Truespace UI. It is entirely buttons with words and screens and panels. It is pragmatic almost to a fault, and is all about being absolutely efficient, and not at all about being intuitive.

        If you aren’t going to be using it fairly regularly, I might even recommend another program. Sticking with it is definitely rewarding though, if you are going to be using it regularly.


        If it makes you feel any better I showed this to Shamus, back in the day, thinking that his cyber-enhanced l33t hacker brain would absolutely love it, but he *hated* it.

        Of course, he wasnt doing much in the way of art assets at the time, so I blame that. Or, SHODAN. One of the two.

      2. Mike says:


        To be fair I was never doing high poly (in my mind) models like that. I was always doing meshes for real-time renderers in the thousands of polygon ranges. Every face was important and I found Blender really easy (read: powerful) for that per-vertex or per-face manipulation.

        Of course, people have made Hollywood quality cinematic with it as well, so it seems quite capable in that regard, though I can’t give you a a first hand account of that.

        1. X2-Eliah says:

          Thanks. I’m mostly approaching this from the perspective of “gotta make 3d models for big stuff in games”, where there has to be a ton of detail, but all the fancy subsurface smoothings mustn’t be used.

          I’ve gone through a bunch of tutorials, but interestingly enough nearly all that are to do with modelling are [make a mesh of about a thousand polys, throw subsurf of 2-3 iterations, mess with edge cramping].. That’s really not what I need at all from the tuts :(
          Yeah, I’m moving onto keyboard shortcuts, as there’s really no other way – the UI, and especially the movement gizmo, are rather useless.

          Still, I don’t really have a choice, tbh :) Afaik blender is the only thing even remotely approaching the popularty of autodesk’s software 0 I don’t think I’deasily find tuts & exporters for the lesser-known 100$ range modelling softwares, so blender it has to be…

    2. Shamus says:

      The JPEG thing was written by one of the many fire-and-forget contractors Worlds, Inc hired back in the day.

      1) Hire a random contractor to write a system. Age, training, and experience not required!
      2) Pay them. (Optional.)
      3) Forget about them forever.

      1. Hitchmeister says:

        I imagine it’s quite wonderful how everything comes together after you have a dozen or so systems created in that way.

      2. Mephane says:

        Well, if the coders were treated like something entirely disposable, no wonder they treated their own code the same way. Except, of course, for the people who just cannot code properly and also produce that kind of crap in a secure, long-term job.

      3. Alex Broadhead says:

        It always struck me as strange the things that seemed important to people when I was interviewing for software engineering positions. (And I did a fairly large amount of interviews during and after the dotcom boom.)

        Everyone seemed really interested in whether or not I was a CS grad student – asking me over and over again to implement and optimize string functions as interview questions. Very few ever asked if I’d ever worked on a large code base with other people, used a versioning system, or offered me code to read. (And they typically failed to ask me anything at all related to the specific types of coding they wanted me to do.) Just write a function to reverse this string or find this substring. Guess what – I’m not and never have been a CS grad student – but I got really good at stupid string functions…

        I think that many, if not most companies are kind of at sea when it comes to trying to hire programmers. I’m not really sure why, but there it is.

    3. Zak McKracken says:

      Ohh, trueSpace?

      tS taught me most of the things I know about 3D rendering, and I actually liked the interface. It’s a lot more intuitive than most others. Of course it also makes it really hard to do “high-level” stuff, but you shouldn’t do that anyway because that’ll make it crash…
      I had a beutiful model of a maybug, fully articulated legs and antlers and all … and each time I loaded the model it was in a new pose. “pose” meaning each body part transposed and rotated to end up literally all over the place, so I had to set it up anew.

      … this kind of put a damper on it. Now I’ve been “planning to learn Blender” since … 2004, really. I think Blender’s interface is the opposite of tS. Really hard to get going, really good for high-level stuff. I hope I’ll actually manage to do this some day.

  21. Neko says:

    I’d be interested to read more about the model compression algorithm. I get the feeling you might have touched on it during your Project Frontier posts, but it’s always nice to read about a neat little algorithm.

    It doesn’t matter if it gives marginal benefits over plain ol’ DEFLATE, it’s still interesting to see a different approach. Who knows, maybe someone out there is trying to figure out an optimal pathing algorithm for their enemy AI or a level generator for a puzzle game, and in seeing your algorithm something will just ‘click’.

  22. Sabredance (MatthewH) says:

    OK, so bets on the mistake?

    1.) The house turns out to have been a bad buy (that was the leader going into today’s installment)

    2.) The old Work Blog has come back to haunt him in some way.

    3.) This blog has come back to haunt him in some way.

    4.) And the longshot: the migration of code from C to C++ inadvertently created a computer virus which will crash the internet!

    1. Mephane says:

      My money’s on “should have become a writer all along”, we are already being teased with the idea in today’s installment. :)

  23. matwisto says:

    The original is much better. It's poetic in its awfulness.
    This just made me think of Vogons coding.

  24. Scerro says:

    I wanna see that .jpeg code.

    I took an image processing class and had to encode jpg. Of course it was just in scripting language, but it would be interesting to see fully implement

    I wonder how they do their DCT coding and Huffman coding. On second thought, it could have been really bad.

  25. Drew says:

    Maybe I’m the only one confused about this math, but it’s driving me crazy.

    If your algorithm saves 15% on 3D models, and models are only a portion of the total download (i.e., less than 100%) then how does it save 15% to 20% of the downloads?

    I don’t mean to be picky, but something doesn’t add up, or I’m misunderstanding.

    1. Shamus says:

      20% of the user’s bandwidth is spent on models.

      My system makes downloading models 15% more efficient.

      Therefore, the user saves 15% on 20%. This means it really only reduces their overall bandwidth usage by %3. (0.15 x 0.2 = 0.03)

      1. Drew says:

        Now that makes sense. Thanks.

        I figured out that it says “15% of 20% of their downloads” not “15% to 20%”, which is what I read in the first place.

        Reading is hard.

  26. UtopiaV1 says:

    Huh, funny that you would write and post this article now, just as my girlfriend and I are moving to our own place (3-bedroom semi-detached with a conservatory, not bad for a first house)!

    My girlfriend Rachel is really worrying about it all though, the legal rubbish, fees, moving itself, decorating, forwarding mail, etc etc. Got any tips to make the whole thing easier for her? Did Heather fret a lot when you guys moved to Pittsburgh, or were you guys a dab-hand at it all by that point?

Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun. Your email address will not be published. Required fields are marked*

You can enclose spoilers in <strike> tags like so:
<strike>Darth Vader is Luke's father!</strike>

You can make things italics like this:
Can you imagine having Darth Vader as your <i>father</i>?

You can make things bold like this:
I'm <b>very</b> glad Darth Vader isn't my father.

You can make links like this:
I'm reading about <a href="">Darth Vader</a> on Wikipedia!

You can quote someone like this:
Darth Vader said <blockquote>Luke, I am your father.</blockquote>

Leave a Reply

Your email address will not be published.