<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
  <title type="text">bitquabit</title>
  <id>http://bitquabit.com/feeds-noredirect/atom/</id>
  <updated>2012-05-11T10:23:45Z</updated>
  <link href="http://bitquabit.com/" />
  
  <subtitle type="text">Opinionated Rants on Life and Software</subtitle>
  <generator>Werkzeug</generator>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/bitquabit" /><feedburner:info uri="bitquabit" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry xml:base="http://bitquabit.com/feeds-noredirect/atom/">
    <title type="text">Cargo-cult debugging</title>
    <id>/post/cargo-cult-debugging/</id>
    <updated>2012-05-11T10:23:45Z</updated>
    <published>2012-05-11T10:23:45Z</published>
    <link href="http://feedproxy.google.com/~r/bitquabit/~3/inv-2utv3V0/" />
    <author>
      <name />
    </author>
    <content type="html">&lt;p&gt;I&amp;#8217;ve been &lt;a href="http://bitquabit.com/post/coding-is-priority-number-five/"&gt;coding full-time for only a few weeks&lt;/a&gt;, and already I&amp;#8217;m going somewhat insane by people engaging in what I&amp;#8217;d call &lt;em&gt;cargo-cult debugging.&lt;/em&gt;  Cargo cults were religions that developed when primitive societies, who&amp;#8217;d had little exposure to &lt;em&gt;any&lt;/em&gt; technology, were suddenly confronted with top-of-the-line modernism in the form of World War II military machines.  When the armies disappeared at the conclusion of festivities, they took all of their modern marvels with them.  The locals, believing that they&amp;#8217;d observed gods bringing them promised goods, attempted to make the gods provide more cargo by building crude imitations of what they had seen&amp;mdash;bamboo airplanes, fake landing strips, wooden radar dishes, and the like&amp;mdash;without really having any proper idea what any of the things they were building actually &lt;em&gt;were&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cargo-cult debugging is when, having seen effective debugging, you imitate the motions, but without having any actual clue what you&amp;#8217;re doing or why.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let&amp;#8217;s take a look at some cargo-cult debugging in action.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;h4&gt;Problem Description&lt;/h4&gt;
  
  &lt;p&gt;Two problems, likely unrelated, but including both for completeness since they started at about the same time: car tilts to the left and slightly backwards, and there is a grinding noise coming from the rear-left wheel-well.&lt;/p&gt;
  
  &lt;h4&gt;Current Hypothesis&lt;/h4&gt;
  
  &lt;p&gt;Engine belt is likely applying too much torque, resulting in car listing to one side.&lt;/p&gt;
  
  &lt;h4&gt;Solutions Attempted&lt;/h4&gt;
  
  &lt;ol&gt;
  &lt;li&gt;Tried turning on left blinker, since car tends to lean right during left-hand turns.&lt;/li&gt;
  &lt;li&gt;Tried having extremely fat man sit in passenger&amp;#8217;s seat and drive car via strings attached to steering wheel to balance the frame.&lt;/li&gt;
  &lt;li&gt;Attempted to drive car backwards.  (Note: visibility extremely hampered in this mode; file bug upstream with manufacturer.)&lt;/li&gt;
  &lt;li&gt;Tried covering wheel-well with thick cloth to muffle sound, thereby evening out the frame.&lt;/li&gt;
  &lt;li&gt;Tried driving with windows down to change airflow.  (Note: test cut short due to sparks flying from rear-left wheel-well and a small resulting fire, which also prevented further testing.)&lt;/li&gt;
  &lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;The &lt;em&gt;structure&lt;/em&gt; of a good debugging session is there&amp;mdash;the facts, the possible solutions, and a hypothesis&amp;mdash;but even being &lt;em&gt;very&lt;/em&gt; generous to the tester, their ideas and hypothesis &lt;em&gt;make no sense&lt;/em&gt;.  You&amp;#8217;re going to solve the problem with exactly as much speed and precision as if you played Tetris for an hour and then changed five lines of code at random.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve seen every developer engage in this behavior sometimes, and that includes me.  Not only that; every developer I&amp;#8217;ve seen who does this does it for one of two very closely related reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;They do not understand the problem.&lt;/li&gt;
&lt;li&gt;They &lt;em&gt;do&lt;/em&gt; understand the problem, but the most likely solution involves rewriting some very hard-to-understand code, or some code that they&amp;#8217;re personally very attached to.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I&amp;#8217;ve got a bug right now that&amp;#8217;s right in between these two, and guess what?  I&amp;#8217;m guilty.&lt;/p&gt;

&lt;p&gt;Our internal build of Kiln doesn&amp;#8217;t run on 32-bit Windows 2003 systems, even though the 64-bit build works fine, and the 32-bit build works fine on all other Windows platforms we support; just not Windows 2003.  The error message Windows generates is beyond unhelpful, and googling it indicates that the problem likely has to do with a bad manifest&amp;mdash;something I barely know anything about.  They go in resource forks, I modified one in Copilot once to get theming in Windows XP, and I seem to recall XML being involved.  That&amp;#8217;s it.&lt;/p&gt;

&lt;p&gt;Here is the right way to address this bug:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Learn more about manifests, so I know what a good one looks like.&lt;/li&gt;
&lt;li&gt;Take a look at the one we&amp;#8217;re generating for Kiln; see if anything obvious screams out.&lt;/li&gt;
&lt;li&gt;If so, dive into the build system &lt;em&gt;[blech]&lt;/em&gt; and have it fix up the manifest, or generate a better one, or whatever&amp;#8217;s involved here.  This part&amp;#8217;s a second black box to me, since the Kiln Storage Service is just a &lt;a href="http://www.py2exe.org/"&gt;py2exe&lt;/a&gt; executable, meaning that we might be hitting a bug in py2exe, not our build system.&lt;/li&gt;
&lt;li&gt;If not, burn a Microsoft support ticket so I can learn how to get some more debugging info out of the error message.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here&amp;#8217;s the first thing I actually did:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Look at the executable using a dependency checker to see what DLLs it was using, then make sure they were present on Windows 2003.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is not the behavior of a rational man.  But it&amp;#8217;s the behavior of a man who&amp;#8217;s flirting with the edge of his knowledge and has no desire to screw with the build system: fixing DLL dependencies involves tweaking a line or two in &lt;code&gt;setup.py&lt;/code&gt;, which is &lt;em&gt;way&lt;/em&gt; easier than learning a bunch of new stuff about manifests, diving into how py2exe makes its particular brand of sausage, and then patching it upstream or mucking about on the build server to add post- or pre-build steps as appropriate.&lt;/p&gt;

&lt;p&gt;So here&amp;#8217;s my call to action: &lt;strong&gt;do not engage in cargo-cult debugging.&lt;/strong&gt;  Whenever you&amp;#8217;re about to try a debugging session, force yourself to answer the question, &lt;em&gt;Why do I believe this is the &lt;strong&gt;most likely&lt;/strong&gt; solution to the problem?&lt;/em&gt;  If the answer is, &amp;#8220;I have no idea,&amp;#8221; or even worse, &amp;#8220;It&amp;#8217;s not, but it&amp;#8217;s easier to check than this other more likely solution,&amp;#8221; then keep looking.  Is your app slow even though the CPU is basically idle?  Increasing the size of the thread pool probably won&amp;#8217;t help.  Web service occasionally timing out?  Your Redis server is unlikely to hold the answer.  Occasionally getting your app&amp;#8217;s network messages out-of-order?  Attacking layer 4 of your networking stack with Wireshark is probably premature.&lt;/p&gt;

&lt;p&gt;We developers pride ourselves on being &amp;#8220;lazy&amp;#8221; in the sense of &amp;#8220;developing solutions that minimize the work we have to do.&amp;#8221;  If you engage in cargo-cult debugging, you&amp;#8217;re being &lt;em&gt;intellectually&lt;/em&gt; lazy, which is entirely different.  Intellectual laziness turns you from a great developer into a mediocre one.&lt;/p&gt;

&lt;p&gt;Be a great developer.  Don&amp;#8217;t engage in cargo-cult debugging.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bitquabit/~4/inv-2utv3V0" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://bitquabit.com/post/cargo-cult-debugging/</feedburner:origLink></entry>
  <entry xml:base="http://bitquabit.com/feeds-noredirect/atom/">
    <title type="text">Coding is priority number five</title>
    <id>/post/coding-is-priority-number-five/</id>
    <updated>2012-04-13T10:54:19Z</updated>
    <published>2012-04-13T10:54:19Z</published>
    <link href="http://feedproxy.google.com/~r/bitquabit/~3/kDC9tKaVCBE/" />
    <author>
      <name />
    </author>
    <content type="html">&lt;p&gt;Let&amp;#8217;s set the scene.  It&amp;#8217;s the summer of 2010.  Kiln had been launched into the wild for all of six months, after a grueling year-long, no-revenue sprint to turn my dinky prototype that ran only on my personal laptop into a shipping application that worked &lt;em&gt;both&lt;/em&gt; in Fog Creek&amp;#8217;s hosted environment &lt;em&gt;and&lt;/em&gt; in a gazillion ever-so-slightly-different on-site installations.  We&amp;#8217;d had all of a few months actually charging people, and were only just barely making a month-to-month profit, let alone having a positive ROI.  We were thinking about What Would Come Next, and how to deliver That, and What Would It Look Like, because everyone knows that standing still is death.  And me?  I was enjoying coding every day to turn the vision in my head into something that our customers could actually use.&lt;/p&gt;

&lt;p&gt;But then it happened.  I came into work one day, and &lt;a href="http://bjk5.com/"&gt;Ben Kamens&lt;/a&gt;, the head of the Kiln and FogBugz teams, called me into his office to tell me that he&amp;#8217;d decided to leave Fog Creek and join the &lt;a href="http://www.khanacademy.org/"&gt;Khan Academy&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I felt sick.  &lt;a href="http://tghw.com/"&gt;Tyler&lt;/a&gt;, who&amp;#8217;d help found Kiln, felt sick.  We left the office in a daze and had a lovely lunch that consisted mostly of beer, then came back and did a half-assed job pretending we were doing work for the rest of the day before we went home.&lt;/p&gt;

&lt;p&gt;Part of our despair was personal, but a lot of it was professional.  Here&amp;#8217;s the thing: you may not know what your team lead does, but if they&amp;#8217;re awesome the way Ben was, a huge number of problems get solved without you ever hearing about them, which frees you to work on &lt;em&gt;actually shipping amazing products.&lt;/em&gt;  So his leaving meant that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;No one would be shielding us from all of the problems peripheral to actually shipping new versions of Kiln; and&lt;/li&gt;
&lt;li&gt;We were going to be making fewer, crappier releases as a result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Of course, it wouldn&amp;#8217;t &lt;em&gt;actually&lt;/em&gt; come to that; one of us was going to learn how to become a team lead so that (provided we were good at it) we&amp;#8217;d be able to continue to shield the rest of the team from all that stuff.  At the end of the day, I stepped up and took the job.&lt;/p&gt;

&lt;p&gt;Six months later I&amp;#8217;d be at the end of my rope.  I hated my job.  I felt like I wasn&amp;#8217;t accomplishing anything, I felt like I wasn&amp;#8217;t competent at what I was doing, and my attitude deteriorated until my fiancée came home one night to find me physically ill from stress.&lt;/p&gt;

&lt;p&gt;The thing is that &lt;em&gt;I didn&amp;#8217;t stink at my job.&lt;/em&gt;  In fact, both my team and the rest of the company have told me that I&amp;#8217;ve been a great team lead.  The problem I was suffering from is that the only job I&amp;#8217;d known at Fog Creek up to that point had &lt;em&gt;nothing&lt;/em&gt; to do with the job I suddenly found myself thrown into.&lt;/p&gt;

&lt;p&gt;We have a general cultural issue when it comes to coders.  It has to do with career paths.  Here&amp;#8217;s how your typical coder career path works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Hey, it looks like you can code!  Why not try writing this feature over here?  There&amp;#8217;s the spec for it; just follow it and you&amp;#8217;re golden.&lt;/li&gt;
&lt;li&gt;Whoa, neat!  You do a great job writing exactly what I tell you!  Here&amp;#8217;s a problem customers want solved; can you do that?&lt;/li&gt;
&lt;li&gt;Awesome!  That&amp;#8217;s totally amazing.  I heard you have an idea for something that&amp;#8217;d be the bee&amp;#8217;s knees, or at least one of its major joints; can you build it?  Here&amp;#8217;s a team who&amp;#8217;ll work with you.&lt;/li&gt;
&lt;li&gt;Insane!  Congratulations!  You are an amazing coder.  You have founded a product that shipped and is in the black!  You know what we should totally do with you?&lt;/li&gt;
&lt;li&gt;Based on your long history of dealing with insanely complex technical issues, we&amp;#8217;ve decided to make you a manager in charge of five to twenty people, because this is totally both the same skill-set and the same general area of interest as what you had before!  Please as to enjoy with maximum intensity!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You spend &lt;em&gt;years&lt;/em&gt; of your life focused on &lt;em&gt;building things.&lt;/em&gt;  Sometimes you have the idea, sometimes other people do.  You like it better when you have the idea, because you &amp;#8220;know&amp;#8221; it&amp;#8217;s the right thing, but the point at the end of the day is &lt;em&gt;you build stuff.&lt;/em&gt;  You build &lt;em&gt;hard&lt;/em&gt; stuff sometimes that requires you to talk to and convince five, ten, fifteen, twenty developers that yours is the right way to go about things, which is definitely &lt;em&gt;leadership&lt;/em&gt; and kind of &lt;em&gt;looks&lt;/em&gt; managery, but you&amp;#8217;re still down in the trenches writing code the whole time.  Chances are pretty good &lt;code&gt;hg churn&lt;/code&gt; and &lt;code&gt;git log&lt;/code&gt; are gonna have your name there at least as much as anyone else&amp;#8217;s.&lt;/p&gt;

&lt;p&gt;Team leads are different.  Your job, should you accept it, is to become what I&amp;#8217;ve lovingly dubbed Shit Umbrella.  Your goal is to find all of the peripheral stuff involved in getting the product out the door&amp;mdash;&lt;em&gt;important&lt;/em&gt; stuff, such as making sure the delivery schedule for the new servers makes sense for when you want to ship the product that needs them, or taking customer calls at 11 PM on a Sunday because their account quit working and they want to know why they should keep paying you, or figuring out when doing features the sales and support teams want makes financial sense&amp;mdash;and then coming back and presenting a focused direction to all the developers so that they can get the features written without worrying about how they actually ship.  You switch from &lt;em&gt;doing the building yourself&lt;/em&gt; to &lt;em&gt;enabling others to build stuff on your behalf.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I keenly remember sitting in our General Manager&amp;#8217;s office, explaining how I just couldn&amp;#8217;t do all of my job responsibilities, and him responding that I probably just wasn&amp;#8217;t thinking about my job properly.  We sat down and enumerated all of my responsibilities.  We came up with five tasks, and then we ordered them by priority.&lt;/p&gt;

&lt;p&gt;&amp;#8220;Writing code&amp;#8221; was priority number five of five.  If I had &lt;em&gt;anything&lt;/em&gt; I needed to do in one of the other four categories, that had to come first.&lt;/p&gt;

&lt;p&gt;Once I accepted what I needed to do, I was both better at it and vastly more relaxed.  As a developer, a good day is one where I land commits all day long, or hammer out a blog post that gets people talking, or solve a complex support case.  As a team lead, a productive day might consist entirely of phone calls, one-on-ones, and emails that let the &lt;em&gt;rest&lt;/em&gt; of your team get &lt;em&gt;their&lt;/em&gt; stuff done.  &lt;em&gt;If you&amp;#8217;re serving as a multiplier for your team&amp;#8217;s productivity, then you&amp;#8217;re being a great team lead.  You need to redefine your success as helping others achieve success.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I learned a lot and became a pretty good Kiln Team Lead over the last couple of years, but several weeks ago, I came to the realization that it wasn&amp;#8217;t what I wanted to be doing right now.  I missed building things with my own hands, and I wasn&amp;#8217;t really learning anything new about leadership, management, or the process of writing software.&lt;/p&gt;

&lt;p&gt;At a lot companies, this is where you&amp;#8217;d see me writing something like, &amp;#8220;so I&amp;#8217;ve decided to leave &lt;code&gt;$COMPANY&lt;/code&gt;, take a sabbatical, and then join &lt;code&gt;$OTHER_COMPANY&lt;/code&gt; to find new challenges.&amp;#8221;  At Fog Creek, that&amp;#8217;s not how it works.  Joel and Michael have a strong attitude that good developers should be rewarded &lt;em&gt;as developers.&lt;/em&gt;  When I went to them and told them that I wanted to get new experiences and get back into the &lt;em&gt;writing&lt;/em&gt; part of writing software, they were really happy to make that happen.&lt;/p&gt;

&lt;p&gt;So today?  Coding is priority number one.  Or occasionally two or three, but never five of five.  I&amp;#8217;m the senior-most developer on the Kiln team, and I&amp;#8217;m back to writing code in that capacity.  At the same time, to keep learning new things, I&amp;#8217;m working both with a high school in Queens on their CS curriculum, and with an awesome &lt;a href="http://www.techstars.com/"&gt;TechStars&lt;/a&gt; company as a mentor providing leadership advice and technical guidance.  I&amp;#8217;ll hopefully have a few other announcements over the next several months as well.&lt;/p&gt;

&lt;p&gt;If you like the sound of an environment that understands developers that way, you should &lt;a href="http://www.fogcreek.com/careers.html"&gt;come join me&lt;/a&gt;.  Me?  I&amp;#8217;m right where I need to be right now.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bitquabit/~4/kDC9tKaVCBE" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://bitquabit.com/post/coding-is-priority-number-five/</feedburner:origLink></entry>
  <entry xml:base="http://bitquabit.com/feeds-noredirect/atom/">
    <title type="text">Learning coding from boredom</title>
    <id>/post/learning-coding-from-boredom/</id>
    <updated>2012-02-27T12:00:00Z</updated>
    <published>2012-02-27T12:00:00Z</published>
    <link href="http://feedproxy.google.com/~r/bitquabit/~3/tqsB0359NFU/" />
    <author>
      <name />
    </author>
    <content type="html">&lt;p&gt;I think the &lt;em&gt;point&lt;/em&gt; of math class is probably to teach people math, but what many of the best developers I know actually &lt;em&gt;learned&lt;/em&gt; in math class was how to program.&lt;/p&gt;

&lt;p&gt;Nearly every high school math class I took was really, really boring.  Not through the fault of the teachers; they were actually awesome.  But I consistently knew just enough to be bored, yet not enough to actually skip the class.  At first, I tried to &lt;em&gt;act&lt;/em&gt; like I was paying attention, which meant that my face had to be vaguely directed at the teacher, even if I was actually studying the posters on the wall.  It was in that mode of thought that I finished off Algebra II able to regurgitate π out to maybe 50 decimal places.&lt;sup class="footnote-ref" id="fnref-1"&gt;&lt;a href="#fn-1"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;But that only lasted so long before it occurred to me that, &amp;#8220;hey, I know how to program!&amp;#8221; combined with &amp;#8220;hey, I have a programmable calculator!&amp;#8221;&lt;sup class="footnote-ref" id="fnref-2"&gt;&lt;a href="#fn-2"&gt;2&lt;/a&gt;&lt;/sup&gt; meant the inevitable &amp;#8220;hey, I can program this thing to do my math homework!&amp;#8221;  So I began writing programs to do factoring, to solve equations, to help rotate ellipses and parabolas by arbitrary angles, and pretty soon reached a point where doing a lot of homework mostly involved firing up the right program, plugging in some numbers, and writing down the result.&lt;sup class="footnote-ref" id="fnref-3"&gt;&lt;a href="#fn-3"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;While I&amp;#8217;d done a fair amount of programming by this point, my calculator programs were the most exciting to me &lt;em&gt;because I was really using them&lt;/em&gt;.  Yeah, okay, the what-kind-of-rock-is-this database I made for science fair taught me more about data structures, but these were the first programs where I cared about the user interface, where I spent time refactoring so that extending the thing would be easier, or where I&amp;#8217;d spend 20 minutes optimizing just to shave off a second or two.&lt;/p&gt;

&lt;p&gt;That&amp;#8217;s my story.  But I know a &lt;em&gt;lot&lt;/em&gt; of developers who have almost the exact same story.  Some couldn&amp;#8217;t use their programs on assignments; some wrote video games instead of math helpers.  But in all of these cases, people started getting passionate about what they were writing.  And when I&amp;#8217;ve talked to them about &lt;em&gt;why&lt;/em&gt; this was the first time they really cared, I always get back the same answer: because for the first time, they had end users they cared about. &lt;em&gt;Themselves&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;My high school also had a CS course.  I didn&amp;#8217;t take it.  No one I knew who really liked programming took it, in fact.  And those who &lt;em&gt;did&lt;/em&gt; take the class universally went on to do something, &lt;em&gt;anything&lt;/em&gt; else, when they got to college.  What was painful for me was that even as a clueless high school student, I knew why: because the whole damn course was totally irrelevant to them!  No bearing on what they were doing &lt;em&gt;at all&lt;/em&gt;.  Here the programmers-to-be were writing toy programs that they were using daily, even competing to see who could make the fastest, most useful ones.  The AP class?  Write another three implementations that sort random numbers.  Yip-de-frickin&amp;#8217;-do.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s not that you shouldn&amp;#8217;t teach that&amp;mdash;and, in fact, the number of applicants here at Fog Creek who don&amp;#8217;t grok basic algorithms drives me crazy.  But it&amp;#8217;s completely the wrong way to &lt;em&gt;introduce&lt;/em&gt; people to programming.&lt;/p&gt;

&lt;p&gt;Programmers like to program because they can do cool things, or because they can solve problems, or both.  It&amp;#8217;s both &lt;em&gt;creative&lt;/em&gt; and it&amp;#8217;s &lt;em&gt;practical&lt;/em&gt;.  If the goal of a high school course is to get people interested in programming, then the course must build around these two pillars.&lt;/p&gt;

&lt;p&gt;You wanna appeal to the first group?  Show them &lt;a href="http://www.amazon.com/gp/product/B001USHRYI/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=bitquabit-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B001USHRYI"&gt;Mindstorms&lt;/a&gt; so they can show their friends a cool robot.  Show them &lt;a href="http://www.twilio.com/"&gt;Twilio&lt;/a&gt; so they can see how to make a little voice-controlled system.  Show them &lt;a href="https://love2d.org/"&gt;LÖVE&lt;/a&gt; so they can put together a simple video game.&lt;/p&gt;

&lt;p&gt;You wanna appeal to the second group?  I think you could do worse than to introduce them to something like VBScript or AppleScript so that they get a flavor of manipulating the applications they use every day.  If the total lack of ideological purity of those two bugs you, then introduce them to some &lt;a href="http://www.greasespot.net/"&gt;Greasemonkey&lt;/a&gt;, or some light shell scripting, or maybe even (gasp!) TI-Basic.&lt;sup class="footnote-ref" id="fnref-4"&gt;&lt;a href="#fn-4"&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;When you attack programming this way, students get hooked.  They become their own critics and their own users, so they genuinely care about improving their work.  They&amp;#8217;ll naturally hit the limit of what they can do, and the good ones&amp;mdash;the ones who are going to go on to become programmers&amp;mdash;will naturally &lt;em&gt;want&lt;/em&gt; to start learning more of the theory, the underlying technologies and techniques, so they can continue to improve their craft.  When those students get to an AP prep class later in the curriculum, they&amp;#8217;ll be ready for it and enjoy it, because &lt;em&gt;they&amp;#8217;ll understand why it matters&lt;/em&gt;.  It will have become relevant to them.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m lucky right now to be working with Bayside High School in Queens, who&amp;#8217;s developing a program for CS students that looks a lot like the above, with  introductory classes focusing on tangible results students can play with immediately (web applications, little GUIs, and dumpster-diving through massive datasets) rather than wading knee-deep into theory right from the get-go.  But there are many, many high schools out there who have nothing remotely like this, who teach programming the same way they teach math.  If the high school in your area&amp;#8217;s like that, volunteer to teach something more inspiring.  The students will love it, and we&amp;#8217;ll get more impassioned developers as a result.&lt;/p&gt;

&lt;div class="footnotes"&gt;
&lt;hr /&gt;
&lt;ol&gt;
&lt;li id="fn-1"&gt;
&lt;p&gt;I can still recite about 25.  Why I&amp;#8217;ve forgotten about half the digits of π, but can still happily rattle off the advertising jingle to Kanine Krunchies, &lt;em&gt;which isn&amp;#8217;t even a real product&lt;/em&gt;, is anyone&amp;#8217;s guess.&amp;nbsp;&lt;a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 1 in the text."&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn-2"&gt;
&lt;p&gt;Anyone else think Texas Instruments has the best racket ever?&amp;nbsp;&lt;a href="#fnref-2" class="footnoteBackLink" title="Jump back to footnote 2 in the text."&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn-3"&gt;
&lt;p&gt;My teachers took what in retrospect was an unbelievably forward-looking attitude to this: as long as I was writing all the programs myself, and could explain how they worked, it was fair game.  I have no idea what would have happened otherwise.&amp;nbsp;&lt;a href="#fnref-3" class="footnoteBackLink" title="Jump back to footnote 3 in the text."&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn-4"&gt;
&lt;p&gt;I know some of you want me to mention UserRPL here, but I think it&amp;#8217;s time to admit that the HP-48 is the Amiga of graphing calculators.&amp;nbsp;&lt;a href="#fnref-4" class="footnoteBackLink" title="Jump back to footnote 4 in the text."&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/bitquabit/~4/tqsB0359NFU" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://bitquabit.com/post/learning-coding-from-boredom/</feedburner:origLink></entry>
  <entry xml:base="http://bitquabit.com/feeds-noredirect/atom/">
    <title type="text">Enslaving your interns for evil and profit</title>
    <id>/post/enslaving-your-interns-for-evil-and-profit/</id>
    <updated>2011-10-07T15:34:16Z</updated>
    <published>2011-10-07T15:34:16Z</published>
    <link href="http://feedproxy.google.com/~r/bitquabit/~3/090mGMvnUKw/" />
    <author>
      <name />
    </author>
    <content type="html">&lt;p&gt;I should be in the middle of an interview right now.  About fifteen minutes into it, in fact.  About the part of my interview where we stop talking about awesome stuff the candidate has worked on in the past and start diving into writing some actual code.  A stack with O(1) data access that also always knows its maximum, for example.  Or perhaps a rudimentary mark-and-sweep garbage collector.  It&amp;#8217;s usually my favorite part of the interview: I get to see how the candidate thinks, how they process information, how they problem solve, and how they code.  The best candidates even teach me something in the process.&lt;/p&gt;

&lt;p&gt;But I&amp;#8217;m not in the middle of an interview right now.  I&amp;#8217;m in Emacs.  And instead of being excited about watching someone solve an interesting problem, I&amp;#8217;m upset and full of righteous indignation on behalf of the now-former job candidate.&lt;/p&gt;

&lt;p&gt;&lt;div style="float: right"&gt;&lt;img src="http://media.bitquabit.com/blog/2011/10/dracula.png" alt="The Kiln Dodo monitors your success with gusto" /&gt;&lt;/div&gt;You see, the candidate works for a company that is &lt;em&gt;very scared&lt;/em&gt;.&lt;sup class="footnote-ref" id="fnref-1"&gt;&lt;a href="#fn-1"&gt;1&lt;/a&gt;&lt;/sup&gt;  I know this because they made the candidate&amp;mdash;let&amp;#8217;s call him Bob&amp;mdash;they made Bob sign a non-compete contract.&lt;/p&gt;

&lt;p&gt;Non-competes are annoying, but not the end of the world.  I can understand why, say, Apple, might be legitimately angry to have a senior iPhone manufacturing executive jump ship to HTC: a large part of the candidate&amp;#8217;s value to HTC would be his knowledge of the internals of Apple&amp;#8217;s manufacturing process.  But &lt;em&gt;very few&lt;/em&gt; jobs work like that.  And even there, most companies don&amp;#8217;t forbid you from working &lt;em&gt;at all&lt;/em&gt; for a competitor; they forbid you from working in the same area of expertise.  So, for example, maybe the iPhone executive couldn&amp;#8217;t work on HTC&amp;#8217;s manufacturing operations, but he could still head a software development team.&lt;/p&gt;

&lt;p&gt;But Bob&amp;#8217;s company decided that, nope, Bob couldn&amp;#8217;t come work for us, because the existence of Joel on Software&amp;#8217;s &lt;a href="http://careers.joelonsoftware.com/jobs"&gt;careers board&lt;/a&gt; made us a direct competitor with them.&lt;/p&gt;

&lt;p&gt;Let me tell you something about the Joel on Software careers board: Fog Creek doesn&amp;#8217;t even make it.  We outsource the whole thing to a little-known company called StackOverflow.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s true.  The lie exposed.  If you&amp;#8217;re in doubt, take a look and notice the admittedly subtle similarities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://careers.joelonsoftware.com/jobs"&gt;Joel on Software Careers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://careers.stackoverflow.com/jobs/"&gt;StackOverflow Careers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Shocking, I&amp;#8217;m sure.&lt;/p&gt;

&lt;p&gt;Yet based on this, Bob&amp;#8217;s company told him that Fog Creek and his firm were direct competitors, and therefore he couldn&amp;#8217;t even come to work with us on, say, Kiln.&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s the thing: &lt;strong&gt;Bob&amp;#8217;s a junior in college, and the company doing this to him is one he merely interned at.&lt;/strong&gt;  There is no way that Bob has inside knowledge of how a job board runs that could help us.  And even if he somehow &lt;em&gt;did&lt;/em&gt; have that knowledge, &lt;em&gt;we don&amp;#8217;t even run the job board!&lt;/em&gt;  There&amp;#8217;s no way he could actually give us anything that would help us!  But Bob&amp;#8217;s company made him turn us down, before we could even interview him, because they were absolutely, utterly &lt;em&gt;terrified&lt;/em&gt; that their intern, who is still in college, was so amazing that his coming to work for us could crash their entire company.&lt;/p&gt;

&lt;p&gt;I actually feel really bad for Bob&amp;#8217;s company.  They&amp;#8217;re so unsure of their own ideas, so negative on their own potential,  that they believe a former intern being physically near a company with an outsourced jobs board would be enough for that company to absolutely crush them.  I don&amp;#8217;t want to imagine what it feels like to get up every day and face that world.  But that&amp;#8217;s no reason to inflict such a morose world view on your interns.&lt;/p&gt;

&lt;p&gt;So I&amp;#8217;m upset on Bob&amp;#8217;s behalf.  Bob got shafted by a company he interned at.  A company that has so little confidence that they&amp;#8217;ve decided the best route to their success is to limit Bob&amp;#8217;s choices.  Limits that mean we miss out on an awesome candidate, and Bob misses out on an awesome job.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve got two real points to make, at the end of the day:&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;re an intern, &lt;strong&gt;don&amp;#8217;t sign a non-compete contract.&lt;/strong&gt;  You have absolutely no idea where your life is going to take you, and you don&amp;#8217;t want your direction being shaped by one crappy employer.  And, trust me on this: no reputable software company I know of (Google, Microsoft, or Fog Creek) makes their interns sign non-compete contracts.  You can find a job that won&amp;#8217;t make you do that.&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;re a company, &lt;strong&gt;don&amp;#8217;t be a vampire.&lt;/strong&gt;  If you&amp;#8217;re so scared of everyone else that you believe that you have to give your interns a non-compete contract in order to stay competitive, then guess what?  You&amp;#8217;re not competitive.  Get a better idea.&lt;/p&gt;

&lt;div class="footnotes"&gt;
&lt;hr /&gt;
&lt;ol&gt;
&lt;li id="fn-1"&gt;
&lt;p&gt;And based on the quality of their homepage, probably with good reason, but that&amp;#8217;s neither here nor there.&amp;nbsp;&lt;a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 1 in the text."&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/bitquabit/~4/090mGMvnUKw" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://bitquabit.com/post/enslaving-your-interns-for-evil-and-profit/</feedburner:origLink></entry>
  <entry xml:base="http://bitquabit.com/feeds-noredirect/atom/">
    <title type="text">Make Love, Not Flamewars</title>
    <id>/post/make-love-not-flamewars/</id>
    <updated>2011-06-28T08:23:08Z</updated>
    <published>2011-06-28T08:23:08Z</published>
    <link href="http://feedproxy.google.com/~r/bitquabit/~3/SVTxTifxOoo/" />
    <author>
      <name />
    </author>
    <content type="html">&lt;p&gt;I sincerely doubt that the statement &amp;#8220;I like Mercurial&amp;#8221; will catch anyone who reads this blog by surprise.  I brought it to Fog Creek.  I evangelized for it on the Fog Creek World Tour.  I helped build a whole product around it.  I&amp;#8217;ve gone to a Mercurial coding sprint, I&amp;#8217;ve sent a whizkid to a Mercurial coding sprint, and I&amp;#8217;ve even written a few patches (mostly trivial) for Mercurial.  So let&amp;#8217;s agree that I like Mercurial an awful lot.&lt;/p&gt;

&lt;p&gt;Reading &lt;a href="http://programmers.stackexchange.com/questions/87217/why-is-mercurial-considered-to-be-easier-than-git"&gt;crap like this&lt;/a&gt; pisses me off.&lt;/p&gt;

&lt;p&gt;The question &lt;em&gt;seems&lt;/em&gt; innocuous enough at first glance: &lt;em&gt;Why is Mercurial considered easier-to-use than Git?&lt;/em&gt;  A legitimate, simple question.  And in a sane world, perhaps, a fair one.&lt;/p&gt;

&lt;p&gt;But that&amp;#8217;s not how things work amongst us developers, because we have these utterly inane religious flamewars.  Emacs is for octopuses, Vim is for beep mode.  Ruby is a language for potheads, Python is for BDSM fetishists.  DOS is for PCP-using masochists&amp;#8230;okay, that one may be legit, but it&amp;#8217;s also kind of moot at this juncture.  Point is, there are some topics where developers just cannot have a rational discussion anymore.&lt;/p&gt;

&lt;p&gt;Mercurial versus Git is one of them.  To save you time, here is every single Mercurial v. Git discussion I&amp;#8217;ve read since 2005:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Harry&lt;/strong&gt;: Mercurial is awesome, because it is easy.&lt;/p&gt;
  
  &lt;p&gt;&lt;strong&gt;Sally&lt;/strong&gt;: It&amp;#8217;s not easier than Git!  You&amp;#8217;re just too dumb to see the light!&lt;/p&gt;
  
  &lt;p&gt;&lt;strong&gt;Harry&lt;/strong&gt;: Okay but like Git is written in Perl!  And it doesn&amp;#8217;t run on Windows!  And I had my changesets fucking &lt;em&gt;garbage collected&lt;/em&gt; once!  And the man pages are like 900 pages!&lt;/p&gt;
  
  &lt;p&gt;&lt;strong&gt;Sally&lt;/strong&gt;: It&amp;#8217;s not, it&amp;#8217;s written in C, and it&amp;#8217;s ninety bajillion times faster than Mercurial!  And I had to screw with its database once!  Also Git does too run on Windows, and I lost nine weeks worth of stuff in Mercurial once due to enabling the &lt;code&gt;MQ&lt;/code&gt; extension!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But don&amp;#8217;t take my word for it; you can &lt;a href="http://www.reddit.com/r/programming/comments/iaac2/why_is_mercurial_considered_to_be_easier_than_git/"&gt;go watch the internecine fanboyism play out at Reddit&lt;/a&gt;, right now!  In response to that crap question!  Again!  God!  I live in Groundhog&amp;#8217;s Day!&lt;/p&gt;

&lt;p&gt;You know what?&lt;/p&gt;

&lt;p&gt;Both sides are full of shit.&lt;/p&gt;

&lt;p&gt;Yeah, I believe that Mercurial is easier to use than Git.  But the best example anyone can provide on StackExchange is &lt;em&gt;converting the author names in a pile of commit messages&lt;/em&gt;?  Really?  Because, okay, yes, I&amp;#8217;ve done that.  Maybe twice.  And even if it &lt;em&gt;completely stank&lt;/em&gt;, I&amp;#8217;d just memorize how to do it and get on with my life.&lt;/p&gt;

&lt;p&gt;What about the &lt;em&gt;daily&lt;/em&gt; workflow?  Is that easier?  Why?  Is it fewer commands?  Is there more protection from you shooting yourself in the foot?  Does the protection come with less power?  Why do Git users swear by branching, if &amp;#8220;it&amp;#8217;s in Mercurial since &amp;lt;some low version&amp;gt;&amp;#8221;?  Why do Mercurial users swear by &lt;em&gt;their&lt;/em&gt; branching system?  Does Git have an emulation of it?  Why or why not?  What are the trade-offs here?  Do they actually end up mattering?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;These questions matter&lt;/em&gt;.  And they&amp;#8217;ve been answered, very eloquently, many times.  But for whatever reason, that doesn&amp;#8217;t resonate with people.  They want to find the weak argument that they can refute, and then that gets traction specifically because it&amp;#8217;s weak, and everyone can have the fight all over again.&lt;/p&gt;

&lt;p&gt;This stops now.&lt;/p&gt;

&lt;p&gt;I have a solution.&lt;/p&gt;

&lt;p&gt;Instead of talking about &lt;em&gt;why you are better than the other guy&lt;/em&gt;, let&amp;#8217;s focus purely on &lt;em&gt;why your system of choice rocks&lt;/em&gt;.  That&amp;#8217;s it.  No &lt;code&gt;whyfooisbetterthanx.com&lt;/code&gt;.  Just &lt;code&gt;whyfooisgreat.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here, I&amp;#8217;ll get us started.  I whipped up &lt;a href="http://ilovemercurial.com"&gt;I Love Mercurial&lt;/a&gt;, a site where you can talk until you pass out about why Mercurial is awesome.  Just tweet with the &lt;code&gt;#ilovemercurial&lt;/code&gt; hashtag, and we&amp;#8217;ll pick it up and post it.&lt;/p&gt;

&lt;p&gt;Note: &lt;em&gt;why you love Mercurial&lt;/em&gt;.  Not why Mercurial is better than X.  Not why X causes brain tumors in lab rats and sterilizes your children.  Just, things that Mercurial does that you love?  Talk about &amp;rsquo;em on Twitter with the &lt;code&gt;#ilovemercurial&lt;/code&gt; hashtag.  We&amp;#8217;ll post &amp;rsquo;em.  Then, the next time, someone asks you why you like Mercurial, just point them to that site.  Or the hashtag.  I honestly don&amp;#8217;t care.  Point is, show them why Mercurial rocks, and not why the other guy sucks.&lt;/p&gt;

&lt;p&gt;And then maybe, just maybe, just &lt;em&gt;maybe&lt;/em&gt;, at least on &lt;em&gt;this one little topic&lt;/em&gt;, the flamewar can die in a pile of love on &lt;em&gt;why my tool is awesome&lt;/em&gt; instead of &lt;em&gt;the 92835 deficiencies your tool has that mine doesn&amp;#8217;t&lt;/em&gt;, and I don&amp;#8217;t have to wake up to my alarm clock playing &lt;em&gt;I Got You Babe&lt;/em&gt; ever, ever again.&lt;/p&gt;

&lt;p&gt;Please remember to update manners to &lt;code&gt;tip&lt;/code&gt; before tweeting.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bitquabit/~4/SVTxTifxOoo" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://bitquabit.com/post/make-love-not-flamewars/</feedburner:origLink></entry>
  <entry xml:base="http://bitquabit.com/feeds-noredirect/atom/">
    <title type="text">Cache me if you can</title>
    <id>/post/cache-me-if-you-can/</id>
    <updated>2011-06-10T12:03:12Z</updated>
    <published>2011-06-10T12:03:12Z</published>
    <link href="http://feedproxy.google.com/~r/bitquabit/~3/f__H0MyGSQQ/" />
    <author>
      <name />
    </author>
    <content type="html">&lt;p&gt;&lt;div style="float: right"&gt;&lt;img src="http://media.bitquabit.com/blog/2011/06/kiln.png" alt="The Kiln Dodo monitors your success with gusto" /&gt;&lt;/div&gt;I remember, when we first launched Kiln, that I was desperately hopeful that it&amp;#8217;d actually make a dent. I was honestly quite scared that we might end up in a situation where, after we&amp;#8217;d put in all of this effort, spent all of this time designing and coding and testing and writing really arcane and annoying crap like billing code, that no one would want Kiln, and we&amp;#8217;d be forced to close shop.&lt;/p&gt;

&lt;p&gt;Good news!  That&amp;#8217;s no longer the problem.&lt;/p&gt;

&lt;p&gt;The problem now is that we&amp;#8217;re too successful.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What?!&lt;/em&gt; I hear some of you ask.  &lt;em&gt;Don&amp;#8217;t you &lt;strong&gt;want&lt;/strong&gt; to be too successful?!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I think I speak for my entire team when I say: &lt;strong&gt;hell yes!&lt;/strong&gt;  We want to keep on being too successful.  If anything, we want to be &lt;em&gt;even more too successful&lt;/em&gt; than we currently are.&lt;/p&gt;

&lt;p&gt;But success &lt;em&gt;does&lt;/em&gt; present problems.  It&amp;#8217;s awesome to have thousands of customers and terabytes of data, but then you start dealing with the boring details of questions like where do you &lt;em&gt;put&lt;/em&gt; those terabytes of data, and how do you &lt;em&gt;get&lt;/em&gt; that data to the customers in a timely manner.  And that can be a really tough cookie to crack.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m going to be talking about several different aspects of how we&amp;#8217;re handling scaling Kiln over the next few weeks, but today, I want to focus on one single narrow thing: caching.&lt;/p&gt;

&lt;h4&gt;The WISC Stack&lt;/h4&gt;

&lt;p&gt;The main part of Kiln that you all know and love&amp;mdash;the website&amp;mdash;is a fairly typical &lt;a href="http://www.artificialignorance.net/blog/wisc/stackoverflow-and-the-power-of-wisc/"&gt;WISC&lt;/a&gt; application.  We have a couple of web servers running IIS and the Kiln website, which talk to several SQL Server boxes.  The nice thing about well-engineered WISC stacks is that, like LAMP, you can scale the databases and the web servers independently.  This is the bread-and-butter of designing a scalable application.  So far, so good.&lt;/p&gt;

&lt;p&gt;The thing is, just adding more SQL boxes isn&amp;#8217;t always the answer.  If you have complex queries that take a long time to run, then adding another box won&amp;#8217;t help anything.  It just gives you another box to run your complex query on at the same slow speed.  Even if you&amp;#8217;re only doing simple queries, adding more database boxes isn&amp;#8217;t necessarily the answer. Good SQL boxes are expensive&amp;mdash;doubly so if you&amp;#8217;re using a big commercial DB package such as SQL Server or Oracle. While you might be &lt;em&gt;able&lt;/em&gt; to afford buy more, you don&amp;#8217;t &lt;em&gt;want&lt;/em&gt; to if you can avoid it.&lt;/p&gt;

&lt;p&gt;Instead, you should focus on just not hitting the database in the first place.&lt;/p&gt;

&lt;h4&gt;The &lt;em&gt;S&lt;/em&gt; in WISC&lt;/h4&gt;

&lt;p&gt;It turns out that there are already some mechanisms we had in place to help with this.  We prefetched certain data that we knew we needed nearly every request (like the full list of repositories), and then used that cache for any other lookups during the request.  And LINQ to SQL does a bit of its own per-request object caching in certain situations (such as querying an entity by primary key), so we already had some actual data caching going on.&lt;/p&gt;

&lt;p&gt;While that kind of stuff &lt;em&gt;can&lt;/em&gt; help, what we &lt;em&gt;really&lt;/em&gt; wanted to do was to try to avoid talking to SQL at all for common operations.  Those complex queries that Kiln does&amp;mdash;things like showing the amalgamated DAG for all related repositories&amp;mdash;take a long time to run, but the resulting data doesn&amp;#8217;t actually change that often.  This is a clear and wonderful win, if we can pull it off.&lt;/p&gt;

&lt;h4&gt;Making it Happen&lt;/h4&gt;

&lt;p&gt;There were two problems we had to solve: where do you cache the data? and how do you get it there?&lt;/p&gt;

&lt;p&gt;&lt;div style="float: right"&gt;&lt;img src="http://media.bitquabit.com/blog/2011/06/membase.png" alt="Membase" /&gt;&lt;/div&gt;The first one was pretty easy: use Memcache.  Memcache is used everywhere, is extremely well-understood, and has great implementations for both Windows and Linux.  We ended up settling on &lt;a href="http://www.couchbase.com/products-and-services/membase-server"&gt;Membase&lt;/a&gt; as the particular server implementation we liked, due to its easy-to-use administration console and trivial clustering support.  For the client, we ended up going with the &lt;a href="http://code.google.com/p/beitmemcached/"&gt;BeIT Memcached library&lt;/a&gt;, due to its easy customizability and simple design.&lt;/p&gt;

&lt;p&gt;The second part was much more difficult.  Kiln uses LINQ to SQL for its database access layer.  That meant we had a problem: LINQ to SQL is a very complex beast, where objects have a database context that in turn is aware of all the objects that it&amp;#8217;s managing.  If you just grab a random LINQ object and throw it into Memcache, then it is not going to deserialize cleanly.  Throw in that we have piles of custom logic in our LINQ-to-SQL-backed models, and you&amp;#8217;ve got a recipe for pain.&lt;/p&gt;

&lt;p&gt;We ended up solving this in two different ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We modified our models to allow for detaching and reattaching to the database context.  Before serialization, the object is detached, so it has no controlling database context.  On deserialization, we attach it to the current context.  This isn&amp;#8217;t as fast as grabbing an attached object out of a cache (such as the old per-request prefetch cache mentioned earlier), but ends up incurring minimal overhead for the common case.&lt;/li&gt;
&lt;li&gt;We also had to modify our models to know that they might not have come from the DB.  We rely heavily on signal handlers to make changes in a given model class propagate to all the parts of Kiln that need to be notified.  These were firing erroneously as the deserialization code set piles of properties.   The fix we came up with was to suppress signals for deserializing objects&amp;mdash;which, since most of our model modifications are done by &lt;a href="http://msdn.microsoft.com/en-us/library/bb126445.aspx"&gt;T4 templates&lt;/a&gt; anyway, was very easy to do in a DRY manner.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With these two changes, we were able to reliably store LINQ database entities in Memcache, get them back out, and work with them.&lt;/p&gt;

&lt;p&gt;It was easy enough to verify that the number of queries was down, but would the caching code make a real difference?&lt;/p&gt;

&lt;h4&gt;The Result&lt;/h4&gt;

&lt;p&gt;I think this graph of what load looks like on one of our DB boxes, before and after the caching deployment, says more than I could in several paragraphs of text:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.bitquabit.com/blog/2011/06/sql-load.png" alt="SQL Server load dramatically decreasing" /&gt;&lt;/p&gt;

&lt;p&gt;We&amp;#8217;ve cut the amount of data we&amp;#8217;re getting from SQL by &lt;em&gt;75%&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The benefits we&amp;#8217;re seeing are already impressive.  We have faster load times and less DB traffic.  But we can still do a lot more: now that we have the outlines of a caching framework, we can continue to profile and to move more of our expensive queries into the cache. Based on what we&amp;#8217;ve seen so far, this should yield immediate and real benefits to our Kiln On Demand customers.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bitquabit/~4/f__H0MyGSQQ" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://bitquabit.com/post/cache-me-if-you-can/</feedburner:origLink></entry>
  <entry xml:base="http://bitquabit.com/feeds-noredirect/atom/">
    <title type="text">Making Your Interns Addicts: a How-To Guide</title>
    <id>/post/making-your-interns-addicts-howto/</id>
    <updated>2011-05-27T08:22:15Z</updated>
    <published>2011-05-27T08:22:15Z</published>
    <link href="http://feedproxy.google.com/~r/bitquabit/~3/q4NZXHdU2vI/" />
    <author>
      <name />
    </author>
    <content type="html">&lt;p&gt;I was thinking back last week on why I started working at Fog Creek.  If you don&amp;#8217;t know, I got started on this thing called &lt;a href="http://projectaardvark.com/"&gt;Project Aardvark&lt;/a&gt;, which eventually ended up becoming &lt;a href="https://www.copilot.com/"&gt;Copilot&lt;/a&gt;, the project I worked on for my first couple of years at Fog Creek.  I don&amp;#8217;t generally reminisce much about that time, simply because that was a very different point in my life, back before I found fashion, yet after I figured out how to end up in front of cameras constantly.&lt;/p&gt;

&lt;p&gt;&lt;div style="display: float; float: right"&gt;&lt;img src="http://media.bitquabit.com/blog/2011/05/jumpjumpjumparound.png" alt="Jump, jump, jump around..." /&gt;&lt;/div&gt; So my friends are usually quite good at reminiscing about that time on my behalf, which is &lt;em&gt;plenty&lt;/em&gt;.  But with this summer&amp;#8217;s batch of new Fog Creek interns arriving in just over a week, I&amp;#8217;ve been thinking about it a lot.  What was good, what was bad, what about the experience made me need to stay at Fog Creek.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve realized there are quite a few parallels between what got me into Fog Creek and what gets people hooked on hard-core drugs.&lt;/p&gt;

&lt;p&gt;Not in the bad way, mind you. I have yet to see an intern maniacally chase source code into a dirty toilet, for example.&lt;sup class="footnote-ref" id="fnref-ts"&gt;&lt;a href="#fn-ts"&gt;1&lt;/a&gt;&lt;/sup&gt;  What I mean is, I almost feel like our internship is custom-tailored to pound the crap out our interns&amp;#8217; sense of awesome so that they just &lt;em&gt;have&lt;/em&gt; to come back for more. Just, unlike with drugs, the effect is that they have a great summer, &lt;em&gt;and&lt;/em&gt; they want to work for us, &lt;em&gt;and&lt;/em&gt; I honestly feel they end up being way more productive in the process. What I find remarkable is that while nearly every part of Fog Creek has changed since my initial internship, the actual way we run our internships continues almost unedited.&lt;/p&gt;

&lt;p&gt;I really want all the interns in the world to come work for us, but I also want all the interns in the world to have amazing summers, and the best way to do that is to tell you what we&amp;#8217;re doing to get our interns hooked.  So without further ado, I&amp;#8217;m happy to begin my first and last guide to deliberately getting someone addicted. &lt;/p&gt;

&lt;h4&gt;Step 1: Get Them Excited&lt;/h4&gt;

&lt;p&gt;The first thing that matters is getting them psyched just to be there.  When I was an Aardvark, that was easy: we knew we were going to be in a movie.  Being in a movie is &lt;em&gt;exciting&lt;/em&gt;.  It&amp;#8217;s even more exciting when the film-maker comes to your house before the summer starts just to interview you and film you doing a really botched version of a Chopin nocturne that he manages to edit so you sound competent.  I mean, who could say no to that?&lt;/p&gt;

&lt;p&gt;Our interns this year may not be excited because they&amp;#8217;ll be in a movie, but they can be excited for a different reason: they&amp;#8217;re going to be working on a young project that still has thousands of customers and manages over half a terabyte of data across nearly 25,000 active repositories.  They&amp;#8217;ll get a chance to be making a difference.&lt;/p&gt;

&lt;p&gt;Find something that you yourself are excited about, and get your interns excited in that.  Or, if you don&amp;#8217;t have anything at your job that excites you, &lt;a href="http://www.fogcreek.com/Careers.html"&gt;find another job&lt;/a&gt;.  We&amp;#8217;re hiring, after all.&lt;/p&gt;

&lt;h4&gt;Step 2: Get Them Doing Real Work&lt;/h4&gt;

&lt;p&gt;Of course, if the thing you&amp;#8217;re getting your interns excited about is playing with a widely used application, it &lt;em&gt;does&lt;/em&gt; require you let them, you know, &lt;em&gt;touch the code&lt;/em&gt;.  My first coding internship, at a company that shall remain nameless,&lt;sup class="footnote-ref" id="fnref-mordor"&gt;&lt;a href="#fn-mordor"&gt;2&lt;/a&gt;&lt;/sup&gt; involved me writing a tremendous amount of Ruby code.  That could be awesome, and in a way, it was.  Except that the Ruby code I was writing were scripts to do things like automatically upload new advertisement photos to the intranet, collated by the date the photograph was taken.  Or, when I wasn&amp;#8217;t so lucky, it was to make a blog engine that could hold exactly one blog post, and then display a little red icon if the blog post it was showing at the time was Bad For The Company&amp;trade;.  Not exactly central to the product, you know?&lt;/p&gt;

&lt;p&gt;So at Fog Creek, we always make sure our interns are doing real stuff for the project they&amp;#8217;re working on.  When I was an intern on Aardvark, I wrote most of the Windows helpers.  Other intern classes have written a new wiki for FogBugz, and given Kiln its API and its large files support.  Hell, an intern class was integral to getting the first version of Kiln done in the first place.  It feels &lt;em&gt;so much better&lt;/em&gt; to actually be contributing code to something you know is going to make a real difference to the product.&lt;/p&gt;

&lt;p&gt;Or, you know, have them write a one-post blog engine or whatever.  It&amp;#8217;s cool.  Just make sure they know at the end of their internship that &lt;a href="http://www.fogcreek.com/Careers.html"&gt;we&amp;#8217;re still hiring&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Step 3: Give Them Instant Feedback&lt;/h4&gt;

&lt;p&gt;You know what sucks about automating some random task that you&amp;#8217;ve been assigned to do as an intern?  Getting absolutely no feedback on what anyone thinks about it.  Is it useful?  Does it stink?  Who knows.  It&amp;#8217;s a fricking &lt;em&gt;compilation of advertisements on a corporate intranet.&lt;/em&gt;  For all I know, no one even reads this at all.&lt;sup class="footnote-ref" id="fnref-reading"&gt;&lt;a href="#fn-reading"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;With one exception,&lt;sup class="footnote-ref" id="fnref-perfection"&gt;&lt;a href="#fn-perfection"&gt;4&lt;/a&gt;&lt;/sup&gt; Fog Creek interns always get to see Creekers using their code &lt;em&gt;immediately&lt;/em&gt;, because we code right alongside them.  We&amp;#8217;re running their changes on our development systems, and, in many cases, running that code on our &lt;a href="http://en.wikipedia.org/wiki/Eating_your_own_dog_food"&gt;dogfood systems&lt;/a&gt; just a day or two after it&amp;#8217;s written.  Not only does this generally mean that our products are better, because we&amp;#8217;re using new features heavily ourselves long before they ever reach our customer&amp;#8217;s hands; it means that our interns are getting feedback almost immediately, both from within and outside their team, on what worked and what didn&amp;#8217;t.&lt;/p&gt;

&lt;p&gt;Or you can send feedback three weeks after the internship ends.  By email.  That works, too.&lt;/p&gt;

&lt;h4&gt;Step 4: Make Them Feel Awesome&lt;/h4&gt;

&lt;p&gt;People like feeling good.  And the simple fact is, if you&amp;#8217;re using your interns&amp;#8217; code almost immediately, and giving them rapid feedback, you&amp;#8217;re going to end up having your interns produce really great stuff.  So: &lt;em&gt;tell them that.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Not in a fake way, mind you: some things just honestly take a lot of revisions before they&amp;#8217;re good, no matter &lt;em&gt;how&lt;/em&gt; awesome the people involved are, and your interns are going to know you&amp;#8217;re offering them bull if you tell them something&amp;#8217;s awesome that they know isn&amp;#8217;t.  But there&amp;#8217;s all those intermediate steps, the little victories, the occasional big one, where you owe it to your team to acknowledge that, yup, they did well.&lt;/p&gt;

&lt;p&gt;Saying &amp;#8220;good job&amp;#8221; is one way to show you care, but actually &lt;em&gt;getting to know your interns&lt;/em&gt; is even better.  At Fog Creek, we hang out with our interns outside of work by taking them to documentaries like &lt;em&gt;Harry Potter 7&lt;/em&gt;, to Yankees &amp;#8220;games&amp;#8221;&lt;sup class="footnote-ref" id="fnref-pummel"&gt;&lt;a href="#fn-pummel"&gt;5&lt;/a&gt;&lt;/sup&gt; at the new stadium, and, my personal favorite, to &lt;a href="http://www.bowlmor.com/"&gt;top-shelf-martini-powered bowling&lt;/a&gt;.  If you don&amp;#8217;t have these available in your town, take them to the airport so they can bond over a TSA freaky frisk-fest.  The point is, do something with your interns so you actually get to know and like them as something other than a coding automaton.&lt;/p&gt;

&lt;h4&gt;Step 5: Ship, dammit!&lt;/h4&gt;

&lt;p&gt;But all of that comes to naught if you don&amp;#8217;t &lt;em&gt;actually ship stuff.&lt;/em&gt;  Sure, maybe you worked on Kiln, and sure, maybe &lt;em&gt;Kiln&lt;/em&gt; makes a difference to the company, and sure, maybe your boss likes you.  But what about your own stuff?  Do customers care?  Does it just go into a bit bucket at the end of the summer, never to be seen again?&lt;/p&gt;

&lt;p&gt;&lt;div style="display: float; float: left"&gt;&lt;img src="http://media.bitquabit.com/blog/2011/05/party.png" alt="Celebrate the successes" /&gt;&lt;/div&gt; Our interns won&amp;#8217;t have to wonder too much about that: thanks to &lt;a href="http://blog.fogcreek.com/release-cycles-of-the-fast-and-the-furious/"&gt;Kiln&amp;#8217;s fast release schedule&lt;/a&gt;, they&amp;#8217;ll be seeing their code go out to customers multiple times this summer, get feedback from customers about their changes, and probably even do a second round or two that integrates that feedback.  So while they&amp;#8217;re busy being excited, writing production code, getting feedback, and doing fun stuff, they&amp;#8217;ll also be knowing, &lt;em&gt;even during their internship&lt;/em&gt;, exactly what a difference they&amp;#8217;re making.&lt;/p&gt;

&lt;p&gt;You see what I mean?  It&amp;#8217;s exactly like an addiction.  Just because our interns are awesome, work on great products, and make a real difference, they get this crazy positive feedback loop that means they not only have a great summer, but that they want to keep coming back, again and again.  We&amp;#8217;ve literally had freshman interns who come back every single summer because they love it here so much.  We&amp;#8217;re doing something right.&lt;/p&gt;

&lt;p&gt;And I hope that, if your interns aren&amp;#8217;t already feeling the same way, this guide can help you get there.  I remember what it was like to feel like an undervalued intern, and I remember what it was like to feel like I was king of the world.&lt;/p&gt;

&lt;p&gt;Help your interns have their own king-of-the-world moments, and everyone wins.&lt;/p&gt;

&lt;div class="footnotes"&gt;
&lt;hr /&gt;
&lt;ol&gt;
&lt;li id="fn-ts"&gt;
&lt;p&gt;I hate Trainspotting so hard.&amp;nbsp;&lt;a href="#fnref-ts" class="footnoteBackLink" title="Jump back to footnote 1 in the text."&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn-mordor"&gt;
&lt;p&gt;The East India Company.&amp;nbsp;&lt;a href="#fnref-mordor" class="footnoteBackLink" title="Jump back to footnote 2 in the text."&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn-reading"&gt;
&lt;p&gt;Actually, I know people read it, because I got bored and figured out how to use &amp;#8220;DHTML&amp;#8221; to log who was viewing the page.  But you get the point.&amp;nbsp;&lt;a href="#fnref-reading" class="footnoteBackLink" title="Jump back to footnote 3 in the text."&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn-perfection"&gt;
&lt;p&gt;It turns out that, try as we might, even Fog Creek can&amp;#8217;t achieve perfection.  Just reallygoodtion, with an eye towards learningfromyourmistakesery.&amp;nbsp;&lt;a href="#fnref-perfection" class="footnoteBackLink" title="Jump back to footnote 4 in the text."&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn-pummel"&gt;
&lt;p&gt;My editor informed me that calling them &amp;#8220;Red Sox beat-downs&amp;#8221; was not appropriate if I didn&amp;#8217;t want to offend my audience.&amp;nbsp;&lt;a href="#fnref-pummel" class="footnoteBackLink" title="Jump back to footnote 5 in the text."&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/bitquabit/~4/q4NZXHdU2vI" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://bitquabit.com/post/making-your-interns-addicts-howto/</feedburner:origLink></entry>
  <entry xml:base="http://bitquabit.com/feeds-noredirect/atom/">
    <title type="text">Why how is boring and how why is awesome</title>
    <id>/post/why-how-is-boring-and-how-why-is-awesome/</id>
    <updated>2011-04-28T11:48:18Z</updated>
    <published>2011-04-28T11:48:18Z</published>
    <link href="http://feedproxy.google.com/~r/bitquabit/~3/d7ME_c4pzlo/" />
    <author>
      <name />
    </author>
    <content type="html">&lt;p&gt;Last fall, Joel came to me and said, &amp;#8220;Congratulations! We&amp;#8217;re doing another World Tour. Also, we want to teach distributed version control. That&amp;#8217;s your job. Make it happen.&amp;#8221;&lt;/p&gt;

&lt;p&gt;This sounded totally awesome. Not only would I get to one-up George Clooney in flight time; I was &lt;em&gt;made&lt;/em&gt; for doing something like this. In high school, I was in the NFL, which, sadly, means the National Forensics League, which means the National People Who Talk Good &lt;a href="http://en.wikipedia.org/wiki/Zoolander"&gt;and Wanna Learn To Do Other Stuff Good Too&lt;/a&gt;, and not the National Football League. My specialty was original oratory, where you give an original speech you&amp;#8217;ve rehearsed ahead of time. Add in there that I love to teach, and that I&amp;#8217;m the one who introduced Fog Creek to Mercurial in the first place, and I should be the perfect person to do this.&lt;/p&gt;

&lt;p&gt;I of course said yes, went back to my office, and fired up Emacs, ready to &lt;em&gt;go!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And then promptly suffered through two weeks of intermittent writer&amp;#8217;s block.&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s the problem: yes, I love using distributed version control. Yes, I love teaching. And yes, &lt;a href="http://blog.bitquabit.com/2011/03/14/have-a-mission/"&gt;I believe I have a mission to teach people about DVCS&lt;/a&gt;. But the talk I had to give, by definition, was an introduction to the &lt;em&gt;basics&lt;/em&gt; of distributed version control.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve been using distributed version control for over half a decade, first as &lt;a href="http://en.wikipedia.org/wiki/GNU_arch"&gt;arch&lt;/a&gt; and &lt;a href="http://wiresong.ca/monticello/"&gt;Monticello&lt;/a&gt;, then &lt;a href="http://darcs.net/"&gt;Darcs&lt;/a&gt;, then super-early versions of Mercurial. The basics of &lt;em&gt;how do you do this?&lt;/em&gt; were super old-hat to me, and, well, &lt;em&gt;boring.&lt;/em&gt; There was nothing exciting to me about how to commit a file, or do an elementary merge, but I &lt;em&gt;had&lt;/em&gt; to cover that material.&lt;/p&gt;

&lt;p&gt;Further, if you only cover the basics, you can&amp;#8217;t possibly demonstrate &lt;em&gt;why you want to use a DVCS&lt;/em&gt;. There are minor benefits you can note&amp;#8212;hey, you can work offline!, or: hey, things are actually fast now!&amp;#8212;but you don&amp;#8217;t really get to any of the actual &lt;em&gt;meat&lt;/em&gt;, the things that teach you &lt;em&gt;why do you want to make this transition.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After two weeks of running in circles, I sat down with my friend &lt;a href="http://shipordie.com/"&gt;Jason&lt;/a&gt; (who now works for the &lt;a href="http://www.khanacademy.org/"&gt;Khan Academy&lt;/a&gt;, named after Genghis Khan, who invaded the Enterprise in Star Wars II to teach Captain Kirk calculus), and asked him how to get out of this mess. Over half an hour of conversation, I realized that I already had the answer.&lt;/p&gt;

&lt;p&gt;Yes, I needed to cover the basics. No, those would not be super-interesting. But I could keep that as short as humanly possible, and as soon as I&amp;#8217;d done that, I could spend the rest of the talk discussing &lt;em&gt;why you should care.&lt;/em&gt; We could cover workflows that it took lots of trial and error to discover. We could show merge scenarios that caused traditional tools to barf. We could show how Mercurial made it really easy for us to ship lots of versions of FogBugz without dropping bug fixes. In other words: spend half the talk with the basics of basics, just enough to understand how things worked, but then jump straight ahead to answering the question of what did distributed version control ever do for you.&lt;/p&gt;

&lt;p&gt;I went back to Emacs, and quickly identified what I thought were two of DVCS&amp;#8217; killer scenarios: maintaining multiple versions of a product without dropping bug fixes, and being able to reliably develop new features of a product while always being ready to ship a bugfix in a heartbeat. I built the talk so that the audience would start with nothing, and build up to understanding how to realize those two workflows.&lt;/p&gt;

&lt;p&gt;The result? Distributed Version Control System University, or: &lt;a href="http://www.fogcreek.com/kiln/worldtour2010-dvcsu.html?fccmp=bqb-howteach"&gt;how do I actually use distributed version control in a meaningful way&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m actually really happy with how everything turned out. Even though the code I ended up using was silly, audiences responded well, and understood the potential power and flexibility that distributed version control provides. They asked intelligent questions, they were engaged, and a lot of them signed up for Kiln trial accounts and decided to start playing with Mercurial.&lt;/p&gt;

&lt;p&gt;One of my goals in the future is to try to beef up &lt;a href="http://hginit.com/"&gt;hg init&lt;/a&gt; with some of the workflow examples in my talk. I also want to take some time to go into more detail about how we do workflow here at Fog Creek. But if you or a coworker has been wondering what the big deal is about distributed version control, watch the video. I think it provides a great overview in a way that any dev can immediately relate to and get excited about.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bitquabit/~4/d7ME_c4pzlo" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://bitquabit.com/post/why-how-is-boring-and-how-why-is-awesome/</feedburner:origLink></entry>
  <entry xml:base="http://bitquabit.com/feeds-noredirect/atom/">
    <title type="text">Finding Literate Programmers</title>
    <id>/post/finding-literate-programmers/</id>
    <updated>2011-04-14T08:39:17Z</updated>
    <published>2011-04-14T08:39:17Z</published>
    <link href="http://feedproxy.google.com/~r/bitquabit/~3/mdRr16hCCJM/" />
    <author>
      <name />
    </author>
    <content type="html">&lt;p&gt;So &lt;a href="http://blog.bitquabit.com/2011/04/13/drowning-in-a-c-of-interviews/"&gt;we&amp;#8217;re making candidates nervous by using C, and we&amp;#8217;re not gaining anything by using C&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But are we &lt;em&gt;losing&lt;/em&gt; anything by using C?&lt;/p&gt;

&lt;p&gt;Yes. We&amp;#8217;re losing any ability to test for literacy.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.amazon.com/Smart-Gets-Things-Done-Technical/dp/1590598385"&gt;&amp;#8220;Smart and gets things done&amp;#8221;&lt;/a&gt; is a famous mantra, and one that I agree with and believe has served us very well. But even at Fog Creek, we don&amp;#8217;t go &lt;em&gt;entirely&lt;/em&gt; by &amp;#8220;smart and gets things done&amp;#8221; when it comes to developers. If we did, we&amp;#8217;d happily hire anthropology majors who had gotten a few papers published. After all, they&amp;#8217;re smart and get things done, right? But we care, at a bare minimum, about one other thing, which is passion for software development. Intern candidates especially may not be the best coders we&amp;#8217;ve ever seen, but we expect them to demonstrate at least some proficiency in basic programming tasks &lt;em&gt;in addition to&lt;/em&gt; being smart and getting things done. The threshold may not be super-high, but it&amp;#8217;s there.&lt;/p&gt;

&lt;p&gt;What does this have to do with interviewing in C? Software development, like a few other fields such as mathematics, English, and art, is something you can practice as a hobby even at a very young age. The best coders have to practically &lt;em&gt;fight&lt;/em&gt; not to code in their spare time. My girlfriend routinely asks me to get the hell off the computer, I am not kidding, why are you still coding even though work&amp;#8217;s over, dammit why does this computer keep working even after I&amp;#8217;ve deliberately poured a bucket of water on it, what do you mean you can waterproof things like this because you said you couldn&amp;#8217;t when it was my camera, I am leaving you and taking the cats with me, and so on. You pretty much have to pry the machine away from our fingers.&lt;/p&gt;

&lt;p&gt;So even young coders, coders with very little experience who make piles of &amp;#8220;dumb&amp;#8221; errors, have generally written at least a smattering of little hobby projects. They may not be that interesting, and they may be duplicating something that already exists, but they&amp;#8217;re there.&lt;/p&gt;

&lt;p&gt;As they program more, something magical happens: they start to really &lt;em&gt;get&lt;/em&gt; a language. They start to learn the common parts of its libraries, the common idioms used when writing in it. It&amp;#8217;s like learning to write English well: you start with the basics, but then begin building an ever-better lexicon as you need to make more nuanced distinctions between concepts. You begin making allusions to other works you&amp;#8217;ve read that made an impression. Your writing just becomes more refined, and, eventually, &lt;em&gt;good.&lt;/em&gt; Part of your oeuvre.&lt;/p&gt;

&lt;p&gt;That&amp;#8217;s what I meant by &amp;#8220;we aren&amp;#8217;t testing for literacy.&amp;#8221; If you&amp;#8217;re trying to solve problems, especially if you&amp;#8217;re a new programmer, you almost &lt;em&gt;have&lt;/em&gt; to pick up at least the basics of the library of the language you&amp;#8217;re working in. &lt;em&gt;Especially&lt;/em&gt; if you&amp;#8217;re a college kid, because, let&amp;#8217;s face it, college kids are &lt;em&gt;lazy&lt;/em&gt;. Any line you don&amp;#8217;t have to write is one you can&amp;#8217;t have points deducted for, so you&amp;#8217;ll lean on that standard library as heavily as you possibly can. You build up a vocabulary of functions and classes and methods that allow you to get more done with less code. You become literate in the language.&lt;/p&gt;

&lt;p&gt;If I let you program in the language of your choice, you have an opportunity to demonstrate that literacy. And, because the better you understand the language, the more you can accomplish in a short period of time, the more interesting and complex my interview question can be, too. No longer am I restricted to abstract data-types, like I am in C or some hypothetical Minimal Language You Learn For The Interview. Suddenly, asking a student to sketch an outline of a 6502 emulator becomes a totally legitimate request for a 60-minute session.&lt;/p&gt;

&lt;p&gt;Let me take a break here and make clear what I am not advocating: I do not think candidates should have to know their language libraries inside and out. Someone really enthusiastic about programming, but who&amp;#8217;s only just getting started, may not understand &lt;code&gt;strcmp&lt;/code&gt; even if they&amp;#8217;re destined to hack on the Linux kernel for fun, and the next &lt;a href="http://en.wikipedia.org/wiki/Why_the_lucky_stiff"&gt;_why the lucky stiff&lt;/a&gt; may not yet understand how to make a method take a block. You have to recognize that you&amp;#8217;ve got a diamond in the rough there, and evaluate them in other ways.&lt;/p&gt;

&lt;p&gt;But for those few who come in and who &lt;em&gt;are&lt;/em&gt; super-literate at a language? It&amp;#8217;s so &lt;em&gt;fun&lt;/em&gt; to do those interviews all of a sudden! I get a chance to be totally blown away by how well you know your craft, you have a chance to be totally creative, and we both get out of the yet-another-data-structure interview question hell (or its lovely variant, how-do-I-get-three-beings-across-a-bridge-in-a-limited-amount-of-time-when-they-all-want-to-eat-and/or-kill-one-another question). Forcing everyone into a language they&amp;#8217;re equally (un)familiar with may be &amp;#8220;fair,&amp;#8221; but it also needlessly penalizes some of the best craftsmen you&amp;#8217;ll see.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m not abandoning &amp;#8220;smart and gets things done&amp;#8221; for &amp;#8220;smart and gets things done and writes goodish.&amp;#8221; But I&amp;#8217;d like to abandon it for &amp;#8220;smart and gets things done, &lt;em&gt;and is optionally simply awesome.&lt;/em&gt;&amp;#8221; It&amp;#8217;s hard to do that if you restrict your interviews to a single language that most candidates won&amp;#8217;t even have used before.&lt;/p&gt;

&lt;p&gt;But if you let everyone use their native tongue?&lt;/p&gt;

&lt;p&gt;You might be surprised what you&amp;#8217;ll find.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bitquabit/~4/mdRr16hCCJM" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://bitquabit.com/post/finding-literate-programmers/</feedburner:origLink></entry>
  <entry xml:base="http://bitquabit.com/feeds-noredirect/atom/">
    <title type="text">Drowning in a C of Interviews</title>
    <id>/post/drowning-in-a-c-of-interviews/</id>
    <updated>2011-04-13T08:12:59Z</updated>
    <published>2011-04-13T08:12:59Z</published>
    <link href="http://feedproxy.google.com/~r/bitquabit/~3/InPd8Mf7W2o/" />
    <author>
      <name />
    </author>
    <content type="html">&lt;p&gt;&lt;a href="http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html"&gt;The Guerrilla Guide&lt;/a&gt;. It is the be-all, end-all of how to look for candidates.&lt;/p&gt;

&lt;p&gt;Except for one paragraph.&lt;/p&gt;

&lt;p&gt;And I&amp;#8217;ve come to realize that I agree with that paragraph; just not Fog Creek&amp;#8217;s implementation of it.&lt;/p&gt;

&lt;p&gt;In The Paragraph In Question, Joel writes:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I&amp;#8217;ve come to realize that understanding pointers in C is not a skill, it&amp;#8217;s an aptitude.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The paragraph goes on. But for Fog Creek, it stops right there. In fact, it stops even earlier. The version that Fog Creek has implemented, in practice, reads:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I&amp;#8217;ve come to realize that understanding C is not a skill, it&amp;#8217;s an aptitude.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Since literally before I&amp;#8217;ve joined, Fog Creek has conducted all coding interviews in C. Period. If you want to work at Fog Creek writing nothing but pure JavaScript apps using Node.js, you will do your interview in C, and you will &lt;em&gt;like&lt;/em&gt; it. In this one little sense, I became a heretic a few months ago. I quit giving my interviews in C.&lt;/p&gt;

&lt;p&gt;And you know what?&lt;/p&gt;

&lt;p&gt;Nothing changed.&lt;/p&gt;

&lt;p&gt;Well, that&amp;#8217;s not true. Candidates were a lot more relaxed, and asked a lot fewer nervous questions about how strict I was going to be about syntax. But my confidence that I could tell whether they would be good programmers, and more importantly, my acceptance rate, didn&amp;#8217;t change whatsoever. I certainly didn&amp;#8217;t feel like I was losing any data by not conducting my interview in C.&lt;/p&gt;

&lt;p&gt;How is that possible?  Let&amp;#8217;s read through what Joel actually wrote after that introductory sentence:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;In first year computer science classes, there are always about 200 kids at the beginning of the semester, all of whom wrote complex adventure games in BASIC for their PCs when they were 4 years old. They are having a good ol&amp;#8217; time learning C or Pascal in college, until one day the professor introduces pointers, and suddenly, they don&amp;#8217;t get it. They just don&amp;#8217;t understand anything any more. 90% of the class goes off and becomes Political Science majors, then they tell their friends that there weren&amp;#8217;t enough good looking members of the appropriate sex in their CompSci classes, that&amp;#8217;s why they switched. For some reason most people seem to be born without the part of the brain that understands pointers. Pointers require a complex form of doubly-indirected thinking that some people just can&amp;#8217;t do, and it&amp;#8217;s pretty crucial to good programming. A lot of the &amp;#8220;script jocks&amp;#8221; who started programming by copying JavaScript snippets into their web pages and went on to learn Perl never learned about pointers, and they can never quite produce code of the quality you need.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you read the whole thing, you realize that Joel&amp;#8217;s not advocating the idea that a candidate must know C; rather, he&amp;#8217;s advocating the idea that &lt;em&gt;C forces you to understand concepts that you may not otherwise understand&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Inventing questions that force candidates to understand pointers without using C isn&amp;#8217;t too hard. Nearly any question that forces candidates to invent a data structure (e.g., a hashtable, an AVL tree, or the like) will test how they handle indirection, the idea that &lt;em&gt;having a thing&lt;/em&gt; is different from &lt;em&gt;having a pointer to that thing&lt;/em&gt;. So I&amp;#8217;ve picked a question that forces candidates to design a data structure. And, sure enough, I see candidates who have a lot of programming experience, but who don&amp;#8217;t &amp;#8220;get it&amp;#8221;, completely bomb out in my interview.&lt;/p&gt;

&lt;p&gt;I think there&amp;#8217;s a tremendous amount of value in Joel&amp;#8217;s original point. Understanding indirection, and pointers in particular, seems to be innate. But doing interviews in C doesn&amp;#8217;t really test for that; it tests for the candidates&amp;#8217; understanding of C. And I think, in our dogged pursuit of that, we&amp;#8217;ve probably erred. We&amp;#8217;re making candidates nervous about how well they know C, and focusing too much on how well they understand C&amp;#8217;s semantics, but not really getting any meaningful indicators back in return.&lt;/p&gt;

&lt;p&gt;For the moment, I&amp;#8217;ll continue conducting my interviews in the language of the candidate&amp;#8217;s choice as an experiment, but I think it&amp;#8217;s inevitable that the Wall of C will fall.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bitquabit/~4/InPd8Mf7W2o" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://bitquabit.com/post/drowning-in-a-c-of-interviews/</feedburner:origLink></entry>
</feed>

