{"id":13366,"date":"2011-09-18T10:55:25","date_gmt":"2011-09-18T15:55:25","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=13366"},"modified":"2011-09-18T10:55:39","modified_gmt":"2011-09-18T15:55:39","slug":"lets-code-part-33-taking-contributions","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=13366","title":{"rendered":"Let&#8217;s Code Part 33: Taking Contributions"},"content":{"rendered":"<p>Michael Goodfellow has <a href=\"http:\/\/www.sea-of-memes.com\/LetsCode33\/LetsCode33.html\">another installment of Let&#8217;s Code<\/a> up, and it&#8217;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?<\/p>\n<p>I don&#8217;t know.  I don&#8217;t have <em>time<\/em> for another series.  I have a fantastic volume of work staring at me right now, but I don&#8217;t want to let this slip by.  So let&#8217;s just go over his post a bit at a time and see how far we get. Deal? Here we go:<\/p>\n<p><!--more--><\/p>\n<blockquote><p>Some of the comments on the blog are about working with other people. Why don&#8217;t I use more libraries, why don&#8217;t I get some volunteers to help out, why must I do everything myself?<\/p>\n<p>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.<\/p><\/blockquote>\n<p>Most professions begin with:  <em>I need money to live on.  If I agreed to do this thing I dislike, will you give me the money I need?<\/em><\/p>\n<p>For programmers, the cause and effect are all mixed up: <em> I need to program.  Can you give me enough money so that I can continue programming?<\/em><\/p>\n<blockquote><p>Then there&#8217;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&#8217;ve written it all yourself. If other people are working in the same area, it&#8217;s practically impossible to know whether the bug was caused by the thing you just changed, or by someone else&#8217;s change. It also helps that I know my own style and the kinds of mistakes I tend to make.<\/p><\/blockquote>\n<p>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&#8217;ll find yourself in a beam of sunlight, looking at a link to the perfect library while angelic music plays.  <a href=\"?p=12304\">It does happen<\/a>.  But more often than not, you run into the usual chain of <a href=\"?p=9557\">dependencies, missing files, lack of documentation, version incompatibilities, inscrutable bugs, missing features, and poor programming interface<\/a>. <\/p>\n<p>When you try to use someone else&#8217;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. <\/p>\n<p>After an hour, it probably still doesn&#8217;t work.  Now you&#8217;re in for an hour, but you feel like you&#8217;re close to solving your current problem.  So&#8230; might as well wager another one, right?  Then after another hour, you&#8217;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&#8217;ve sprayed all over your hard drive.  <\/p>\n<p>Another hour later, and you still have nothing.  You&#8217;ve fixed a couple more problems, and now you&#8217;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&#8217;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&#8217;t have this problem, even though you don&#8217;t know that language and it doesn&#8217;t acually do what you need. Mad at yourself for falling into this trap.  <strong>AGAIN.<\/strong><\/p>\n<p>Using external code is an iterative wager:<\/p>\n<ol>\n<li>Each round, you bet an allotment of time.  You don&#8217;t know the odds of winning, and you can&#8217;t be sure if the prize is what you want.\n<\/li>\n<li>If you lose, you may wager more time.  Your odds of winning will increase &#8211; although you still can&#8217;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&#8217;s this much of a pain in the ass to use, it probably wasn&#8217;t well designed.  And if it were genuinely useful, the documentation would be better written.\n<\/li>\n<li>Keep wagering an increasing amount of time until you either attain this [increasingly pyrrhic] victory, or run out of time you&#8217;re willing to wager.<\/li>\n<\/ol>\n<p>And when you stop wagering, I <em>promise<\/em> someone &#8211; who wasn&#8217;t there to help you during the process &#8211; will accuse you of giving up &#8220;too soon&#8221;.<\/p>\n<p>Sometimes I&#8217;m amazed anything works. <\/p>\n<blockquote><p>I&#8217;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&#8217;s 3:30AM as I write this.) More of a problem is that when I decide something is wrong with the code, I&#8217;m brutal about just rewriting it. This means important interfaces and classes can squirm around quite a bit until I&#8217;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. <\/p><\/blockquote>\n<p>Since leaving my day job, I&#8217;ve allowed my sleep schedule to spin freely as my muse carries me.  I&#8217;ve found my schedule is similarly sporadic.  This is really curious to me.  With artificial lights, my schedule doesn&#8217;t need to be constrained by daylight hours, as in pre-industrial times.  And without a fixed work schedule, there&#8217;s no clock to keep me waking at the same time each day.  It seems like my default schedule is &#8220;random&#8221;.  <\/p>\n<p>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&#8217;m getting drowsy, I&#8217;ll stay awake and indulge it.  I&#8217;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&#8217;ll end up short on sleep with nothing to show for it.<\/p>\n<p>(For the curious, I got up at 3:30am this morning. It&#8217;s noon now as I write this.)<\/p>\n<blockquote><p>Finally, there are these intellectual property issues which have become more and more of a problem over the last twenty years or so.<\/p><\/blockquote>\n<p>I can&#8217;t even sum this part up.  <a href=\"http:\/\/www.sea-of-memes.com\/LetsCode33\/LetsCode33.html\">Go read the whole thing<\/a>.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Michael Goodfellow has another installment of Let&#8217;s Code up, and it&#8217;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&#8217;t know. I don&#8217;t have time for another series. I have a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-13366","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/13366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13366"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/13366\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}