Let’s Code Part 33: Taking Contributions

By Shamus Posted Sunday Sep 18, 2011

Filed under: Programming 50 comments

Michael Goodfellow has another installment of Let’s Code up, and it’s packed with important ideas, wisdom, and difficult questions. I struggled a bit with this because I wanted to comment on almost everything. What should I do? Write a series of posts?

I don’t know. I don’t have time for another series. I have a fantastic volume of work staring at me right now, but I don’t want to let this slip by. So let’s just go over his post a bit at a time and see how far we get. Deal? Here we go:

Some of the comments on the blog are about working with other people. Why don’t I use more libraries, why don’t I get some volunteers to help out, why must I do everything myself?

I really enjoy programming, otherwise I would never take on a project this large. So asking me why I want to write all this code is like asking a chef why they want to make all this tasty food, when you could just go out and buy it.

Most professions begin with: I need money to live on. If I agreed to do this thing I dislike, will you give me the money I need?

For programmers, the cause and effect are all mixed up: I need to program. Can you give me enough money so that I can continue programming?

Then there’s the problem of debugging. Things go wrong and you need to isolate the problem down to a particular piece of code. It helps enormously if you’ve written it all yourself. If other people are working in the same area, it’s practically impossible to know whether the bug was caused by the thing you just changed, or by someone else’s change. It also helps that I know my own style and the kinds of mistakes I tend to make.

Using code from strangers is always a gamble. Sometimes, on rare circumstances (perhaps only a few occasions in your career) the clouds will open and you’ll find yourself in a beam of sunlight, looking at a link to the perfect library while angelic music plays. It does happen. But more often than not, you run into the usual chain of dependencies, missing files, lack of documentation, version incompatibilities, inscrutable bugs, missing features, and poor programming interface.

When you try to use someone else’s code, you begin a gamble. You wager, say, an hour of your time. You will find problems with using it, understanding it, getting it to compile, etc. You have no way of knowing if your current problem is the last one, or if another one will appear as soon as this one is sorted.

After an hour, it probably still doesn’t work. Now you’re in for an hour, but you feel like you’re close to solving your current problem. So… might as well wager another one, right? Then after another hour, you’re dealing with another problem. Do you really want to give up now, and walk away with nothing? Actually, worse than nothing, because you have to restore your codebase from a backup before you started and clean up all these files you’ve sprayed all over your hard drive.

Another hour later, and you still have nothing. You’ve fixed a couple more problems, and now you’re boiling mad. Mad at the idiot who wrote this thing. Mad at the forum trolls who sneer at your pleas for help. Mad at the one guy who has something that might help, but he’s offering it under a license that would require you to take your entire project open source. Mad that C++ is such a nightmare. Made at the jeering fanboys who tell you to use some other language that doesn’t have this problem, even though you don’t know that language and it doesn’t acually do what you need. Mad at yourself for falling into this trap. AGAIN.

Using external code is an iterative wager:

  1. Each round, you bet an allotment of time. You don’t know the odds of winning, and you can’t be sure if the prize is what you want.
  2. If you lose, you may wager more time. Your odds of winning will increase – although you still can’t know what they are or how much they improve. At the same time, the odds of the prize being useful to you goes down dramatically. After all, if it’s this much of a pain in the ass to use, it probably wasn’t well designed. And if it were genuinely useful, the documentation would be better written.
  3. Keep wagering an increasing amount of time until you either attain this [increasingly pyrrhic] victory, or run out of time you’re willing to wager.

And when you stop wagering, I promise someone – who wasn’t there to help you during the process – will accuse you of giving up “too soon”.

Sometimes I’m amazed anything works.

I’m also a difficult person to work with. Especially now that my health stinks, I have very erratic work habits, doing nothing for a day or two, then working late at night (it’s 3:30AM as I write this.) More of a problem is that when I decide something is wrong with the code, I’m brutal about just rewriting it. This means important interfaces and classes can squirm around quite a bit until I’m happy with them. I also tend to keep several subprojects going at once, switching between them when I get stuck or bored. All of this is a nightmare for other people to deal with.

Since leaving my day job, I’ve allowed my sleep schedule to spin freely as my muse carries me. I’ve found my schedule is similarly sporadic. This is really curious to me. With artificial lights, my schedule doesn’t need to be constrained by daylight hours, as in pre-industrial times. And without a fixed work schedule, there’s no clock to keep me waking at the same time each day. It seems like my default schedule is “random”.

When I can, I try to maintain the habit of getting up super-early, because I like having a large block of quiet time early in the morning. However, if my creative muse strikes as I’m getting drowsy, I’ll stay awake and indulge it. I’ve learned the hard way that going to bed while feeling creative leads to my mind spinning instead of sleeping, and in the morning the muse will probably be gone. I’ll end up short on sleep with nothing to show for it.

(For the curious, I got up at 3:30am this morning. It’s noon now as I write this.)

Finally, there are these intellectual property issues which have become more and more of a problem over the last twenty years or so.

I can’t even sum this part up. Go read the whole thing.

 


From The Archives:
 

50 thoughts on “Let’s Code Part 33: Taking Contributions

  1. Zombie Pete says:

    FIRST!

    (That’s actually the first time I’ve ever done that in a forum, so be kind.)

    What happened to Shamus Codes or whatever it was called? I want to know what happened to that procedural world(s) dealy.

    1. Brejlounek says:

      Yeah, I want to know too! It was really cool. :)

      1. Chuck Henebry says:

        I third this proposal!

        1. Exetera says:

          Fourthed.

          Although, it might be nice if some more of us get inspired to go off and build our own… I’ve been working on some procedural content myself recently, and it’s actually pretty fun to design.

          1. Funny Money Guy says:

            I’ll take a fifth (of bourbon). Again.

    2. Anachronist says:

      I echo that sentiment. I came to this blog via DM of the Rings, and check in every few months. I’m not a video gamer, I especially couldn’t care less about shooter/combat games, so I can’t relate to most of the posts, but when Shamus gets into things like procedural landscapes and cityscapes (I kept that screen saver for a long time, until I had to replace my PC), or writes about a game that isn’t a first-person-shooter, or even writes some biographical stuff, I get interested again. I understand this blog focuses on gaming. I stick around for those times when it diverts into other topics of interest.

      1. Peter C. Hayward says:

        This post exactly reflects my thoughts and how I relate to this blog!

  2. lazlo says:

    For programmers, the cause and effect are all mixed up: I need to program. Can you give me enough money so that I can continue programming?

    This is not unique to programming. I also don’t believe that it is endemic to programmers. I’ve met plenty of programmers who are doing it to pay the bills, and I’ve met many people in widely diverse careers who all had the epiphany at some point in their life of “what? You mean people will actually *pay* me to do this thing I love? Are you sure that’s not cheating?” I think it’s a shame that the term “amateur” has drifted so far from its origins, tracing its roots back to the Latin “amo”, “to love”. I’m and amateur at my profession because I love what I do.

    I’m always interested in etymology, and I’ve always been a bit conflicted about what to call the checks companies give me for what I do. HR types call it compensation, which I hate because I’m not compensating for anything. Lots of people refer to it as salary, and while I like salt a lot, that still doesn’t work well for me. Pay and wages are OK I suppose.

    1. Rockbird says:

      Re: Doing what you love. It is at least very true for all of us artistic types.

    2. Bryan says:

      Based on what I’ve seen, the group of people who say or think “are you sure that’s not cheating?” is exactly the same group of people that you *want* working on code for you. The group of people that “do this thing that dislike” is, almost without exception, a group of people that you *don’t* want working on code for you.

      The former group is much, much better at it. (See also the Linux kernel.)

      I would even go so far as to say (without *ANY* evidence, mind you!) that the reason engines like those that come out of id work so well, is that the people programming at id are mostly in the former group. And I’d similarly guess (without, again, *ANY* evidence) that the people programming at EA — if there are any anymore — are mostly in the latter group.

      (Though it’s also possible that many of the people programming at EA are in the former group, but the management just sucks. Because it certainly does. OTOH the people in the former group tend to leave when the management sucks, as well, though this doesn’t seem to be as tightly correlated.)

      I would also be surprised to find that this was different in other fields. You probably don’t want someone who writes music “just to pay bills” writing any music for you, if you care about the quality of the result. :-)

    3. Peter H. Coffin says:

      While it’s not endemic to programming (or more generally information technologies), I can safely state that there is nobody that got into computer programming for the money, for the glamor, for the groupies, because they weren’t good at anything else, for the love of animals or helping people, or for the security of the industry. There are precisely zero people in a profession that involves making computers do something useful (as opposed to managing people making computers do something or running a multinational corporation that supplies people making computers do something) that couldn’t be making more money for better hours doing something like plumbing or auto repair.

      1. Nathon says:

        That’s definitely not true. I make more than the median US household income (just one of me) writing code for a living. I’m 28 and have a BS degree in EE. I work longer hours than many, but the last time I came in on a weekend was about 2 years ago and usually if I stay late it’s because I’m enjoying what I’m doing.

        What programmers do is very valuable. If you’re not being paid well for your work and you don’t love it enough that you’d do it for free, look around. There are plenty of opportunities, even in this economy.

      2. Robyrt says:

        I got into programming because I wasn’t good at anything else. Not even plumbing or auto repair. :-P

      3. Tizzy says:

        Besides the issue that not all coders are decent plumbers or auto repairs, what do you make of the issue of life path? How long does one get to stay a coder until they decide they can’t switch careers to become a minimum-wage, bottom of the ladder auto mechanic?

    4. Matt Downie says:

      Money compromises love. Programming when you’re pursuing something you’re enthusiastic about is likely to be fun. Programming for money can lead to all kinds of things that curtail this fun. Like getting a job in computer games because you love RPGs and first-person shooters, and getting stuck working on a Bella Sara pony adventure game. Or working on a game you do like, but the project stretches out for three years, and by the end you hate it. Or spending half your time dealing with version control software that other people on your team are using wrong. Or having to work a seventy-hour week because your deadlines were set to be ridiculously tight. Or making a last-minute mistake that causes the whole project to fail the final submission process, costing your company thousands.

  3. Someone says:

    I agree with the part about not going to bed struck with inspiration. I get that, like, every other night.

  4. burningdragoon says:

    With artificial lights, my schedule doesn't need to be constrained by daylight hours, as in pre-industrial times.

    I actually hate too much artificial light. At work I hate it because I can’t get a feel for time passing, but that may be (definitely is) more about how little I like my job. But I also just hate how bright florescent lighting is. I even had the facilities guys remove the light right above my desk so it would be a little bit darker. (Funnyish, I moved desks and someone asked if I needed anything else and I said “it’s a little bright” not actually expecting anything to come out of it.) The light in my room at home is just bright enough so I can see my keyboard and my eyes don’t strain too much on my computer screen at night.

    For the programming thing, it’s more like “I need to program so I don’t want to smash my face into my desk out of boredom for 8 hours a day”

    1. Ambitious Sloth says:

      This happened to me back during the summer right before I went off to college. My sleep cycle became more random until at one point I reached a point where I spent alternated days being awake, and sleeping for 24 hours straight. All of this was because of some heavy curtains and a ceiling fan with built in lights (I was also probably responsible for most of it). Eventually I I decided to fix it by ripping off the blinds (in retrospect a bad idea once my mom found out) and unscrewing all the light bulbs in the room so I had to live by the natural light from outside. It some time to readjust but it worked.

      Now though, I think my mom has hung up new curtains that are white and even when they’re drawn, still let light into the room. Clearly it was a lasting victory.

  5. Zeta Kai says:

    Forgive me if this has already been addressed, but WHERE IS PROJECT FRONTIER?!? I come to this site for many reasons, & I find something every week (nearly everyday, in fact) that is entertaining &/or informative. But my favorite series by far this year has been Project Frontier, & I have missed it greatly in the past two months. If it is dead, then please say so. If it is on hold, then please tell us when it will return. The last we heard of it, there was a video in the works to showcase all the new features that we saw in the last article, along with a new article explaining how those features came about. Since then… nothing. This makes me sangry, as I hate to see such a fun series, with so much potential, wither on the vine. Please say it ain’t so, Shamus. Say it ain’t so.

    1. RPharazon says:

      Shamus is a fickle beast and is working on a crapload of things at a crapload of times. Last time he went into Project Frontier, it was because he stalled on writing his book. Now that he’s back into writing his book, he’s ignoring Project Frontier for a time.

      Have patience, and realize that blogging, especially when it comes to Shamus, doesn’t please everyone at all times. Nor is Shamus obligated to make compelling content for you.

      Sometimes the Spoiler Warning stuff doesn’t interest me. I went through a long drought of uncompelling content (ME1, ME2, FO3) and it was as if there was nothing good on this site for a while. But I waited and eventually there was a bunch of interesting stuff, like his autobiography, FO:NV, Project Frontier, etc. The SW of Hitman doesn’t really agree with me, but I just wait it out.

      1. Shamus says:

        ^This.

        PF is still there. Temping to work on, but I have to stay focused and finish things. :)

        1. Adam P says:

          Good to hear! I keep coming back here in hopes I will see an update on it. It is profoundly interesting to me. No rush, take care of what needs to be taken care of, but don’t forget about it!

      2. Zeta Kai says:

        Bah. the last time I listened to you, RPharazon, my island was sunk & my world was made bent.

        1. krellen says:

          I wonder how many people besides you and RPharazon (and me, obviously, since I’m commenting on it) actually get the reference.

          1. RPharazon says:

            It took me a few seconds to realize what you were talking about.
            Damn you, 2002 Me, for making this nickname on a whim so many years ago.
            Damn you, general 2004 Me for not making a new one when I started using it across more than one forum.

            Now I need to go read things.

          2. JPH says:

            I certainly don’t.

            :(

            1. krellen says:

              Ar-Pharazon was the last king of Numenor, who built a fleet to assault Valinor, which resulted in the Valar reshaping the world and removing themselves physically from Middle-Earth.

              It’s basically Tolkien’s “cast out from Eden” story.

              1. Bryan says:

                Well, to land on Tol Eressea IIRC, which wasn’t quite part of Valinor. But still, yeah — they sailed west out of sight of the island of Numenor, and broke the ban on doing so.

                And it resulted in the Valar “laying down guardianship of Arda and calling upon the One”, letting Illuvatar answer the challenge that Ar-Pharazon was making. (They figured that this wasn’t an assault on them, exactly, but more an assault on the fact that men died. Death was called the “gift” of Illuvatar to men several times, and so he was the only one who could really answer a challenge like that.)

                Illuvatar reshaped the world (to remove Valinor from it, although Elves were still allowed to find it) and in the process the island of Numenor sank.

                (Though at least Elendil and his sons got out. And unfortunately Sauron survived, as well. Stupid ring. :-) )

                Anyway, geeking-out complete. :-P

              2. Zeta Kai says:

                No, it’s actually Tolkien’s “Atlantis gets pwned” story. Numenor is much closer to Atlantis then Eden, by any standard. Regardless, the gist of it is that Ar-Pharazon was a jerk, defied God & His host of angels, & his entire empire/island paid the price. Hence, I’m taking his advice with many grains of salt.

          3. Rowan says:

            Got it immediately… But I do have over half of the Christopher Tolkien commmentaries in my bookshelf (BoLT, Lays of Beleriands, etc.)

  6. noahpocalypse says:

    Project Frontiiiiieeer.

    (That was its ghost calling to you through the code of this page.)

    (I’m not asking for it to be finished- I just want to know if you’re overloaded with other work, or you’re doing secret ninja improvements to it right now, or you completely forgot. Just a Tweet would be nice (Not that I don’t want it finished. Or that a blog post would be bad. Don’t take that the wrong way. I just… Yeah. Please. :D)).

    1. benjamin says:

      I’d like to hear more about project frontier too, even if that a post saying that you give up the project. before PF you were working on project Hex, a project that I fancied much, and you just gave it up, without explaination. that was quite upseting to speak truly.

  7. Nick says:

    Yeah, I’m in the camp of ‘being paid to write code because I love writing code’, though in reality a lot of the time when you’re being paid on it you need to work on or with other people’s code, deal with paperwork and generally do annoying stuff that isn’t just coding for the fun of it.

    But I’m still happy to get paid to put up with that if I get to code

  8. Neery says:

    Since leaving my day job, I've allowed my sleep schedule to spin freely as my muse carries me.

    I’m envious of people who can make that work for them. If I don’t keep my sleep schedule on track and force myself to go to bed around midnight and get up in the morning, i just end up constantly tired and yet unable to sleep.

    Your entire paragraph about forum trolls reminded me again of how grateful I am for stack overflow’s culture of civility. I’m still at the stage where my programming questions are stupid and n00by enough that I hardly dare to ask them at all, I can’t imagine how I’d ever get help if I had to worry about people yelling at me, too.

  9. Rayen says:

    also run on a random schedule. i thinks nerds geeks and the like simply have this weird thing where we feed on our own amusement rather than actual energy. Also moving a mouse and typing does expend nearly as much energy as say playing a sport, being involved in a drama filled group of people, or whatever it is that normal people do.

    Also what’s up with getting a creative vibe at like 2:00 in the morning? I can only write when it absurdly late at night.

  10. Jethro says:

    Ha, when I read the title of this post I thought Shamus was talking about Paypal contributions, which reminded me it’s been a while since I hit that button, so I went and did it.

    Maybe instead of Donate, the button should say “Tap for Mana”.

  11. Mark says:

    Shamus, do you think this sentiment among hobbyist programmers relates to NIH (Not Invented Here)?

  12. Are you sure your sleep is sporadic? I’ve come to decide that my body simply decides to run on a day longer than the standard 24 hours… perhaps 30 hours?

    I always feel I’m going to bed too early and getting up too early. If I ditch set times and do what feels right, I quite happily have a 20+hr day/8-10 hours sleep.

    You could cut back on your gaming time to fulfil other aspects, but where do you stop? I’ve got a full time day job as well as being swamped with work for my home business. 1.5 hours sleep last night, and 5 max on the weekend. My choice though, but I’m looking forward to some eventual downtime to catch up on the last 12+ months of gaming.

    1. burningdragoon says:

      One of my professors mentioned once that humans actually have a natural sleep cycle longer than 24 hours and that we just adapt to the 24 hour cycle because of that day/night nonsense. I don’t know exactly where he got that from, but he wasn’t one to spout out stuff like that without something to back it up.

      1. Glad to see I’m not the only one that’s thought of the day being too short for at least some people’s bodies. If I didn’t have dayjob/family commitments I’d love to just wing it and see what kind of cycle I ended up on.

        I’ve also met someone who would sleep for only maybe 4 hours a night on weeknights, but then would catch up on weekends with 10+ hours. She wasn’t trying to squeeze extra hours out of the day, that’s just how she found her body functioned. In order for her to be productive during the week she’d run that schedule.

        1. MichaelG says:

          I think there was an experiment where they isolated people from sunlight and let them sleep whenever they liked. The average was longer than 24 hours, but I forget the exact number.

          1. Mephane says:

            As far as I remember, the result was about 25 hours. And personally, that feels somewhat right to me. Whenever I don’t force myself to adhere to the 24 hour cycle – e.g. during vacation-, my days tend to shift forward by about an hour per day.

    2. Tizzy says:

      Are you thinking of xkcd’s 28-hour day?

    3. Mengmoshu says:

      I’ve been jobless for a couple years now, and when I don’t have obligations locking in my sleep schedule it tends towards the 30 hour cycle. So I’ll be up about 20 hours, and then sleep 8-10. As long as I don’t disrupt that pattern I’m rested, alert, and fairly creative when I don’t have other people distracting me. However I also do well in a traditional 24 hour setup, I had a regular job for a couple years that had me up before the sun each day and did fine. Right now various family obligations are forcing me to get up around 10 am at least once a week so I have a pretty fluid sleep pattern that sorta resets once a week.

  13. Sydney says:

    Definitely not just a programmer thing.

    I’m a professional fighter, you could call it. I also have a ‘normal’ job copying the stuff from certain pieces of paper onto certain other blank pieces of paper, and then stapling those pieces of paper together and giving them to people. But it’s definitely a matter of “making enough money to eat food so I can fight”.

  14. Kdansky says:

    Actually, worse than nothing, because you have to restore your codebase from a backup before you started and clean up all these files you've sprayed all over your hard drive.

    Version control will make that take less than a minute. So I beg everyone who ever writes code, use some sort of version control! If you are new to this game, use Mercurial, as it is probably the easiest to get running properly, and doesn’t lack any features at all.

  15. MaxDZ8 says:

    I was just asking myself: what’s going on with the “let’s code” series?
    I’ll stop there.

    1. MichaelG says:

      Still at it. I’m determined to have some kind of game before the one year mark…

  16. Abnaxis says:

    I can't even sum this part up. Go read the whole thing.

    Awww, but I was honestly wondering what comments you would make on that section.

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="http://en.wikipedia.org/wiki/Darth_Vader">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. Required fields are marked *