    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: Afterwood</title>
        <link>https://members.accu.org/index.php/articles/2461</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Process Topics + Overload Journal #143 - February 2018</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c221/">Process</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c78/">Overload</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c382/">o143</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c221-382/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c221+382/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;Afterwood</h1>
<p><strong>Author:</strong>&nbsp;Bob Schmidt</p>
<p>
<strong>Date:</strong> 01 February 2018 16:13:46 +00:00 or Thu, 01 February 2018 16:13:46 +00:00</p>
<p><strong>Summary:</strong>&nbsp;Can you code on paper in an interview? Chris Oldwood recounts his attempts to write a calendar.</p>
<p><strong>Body:</strong>&nbsp;<p>The interviewer slid a pencil and a sheet of A4 paper over in my direction and said â€œIâ€™d like you to write a little bit of code to print a calendar.â€ I thought to myself â€œthat doesnâ€™t seem too hardâ€.</p>

<p>This wasnâ€™t the very start of the interview, there were a few pleasantries exchanged before cutting to the chase. In that opening introduction, I quickly learned that my interviewer did not work in my department or even my programming language of choice. His personal preference was for Java but given that this was a brand new team with only a project manager who hadnâ€™t written a line of code in years, he was drafted in from another team to fill the void. I let out a disguised sigh of relief as I realised I wasnâ€™t going to get quizzed about obscure C++ trivia.</p>

<p>I quickly doodled a picture of a calendar in the corner of the paper just to clarify what kind of thing he might be after, and he muttered in agreement.</p>

<p>I then traced over the doodle again, which is odd, because I never doodle in my log book. All of a sudden I became aware of the situation I was in â€“ a job interview. I tried to focus, thinking to myself â€œI just need to write a function to draw a calendar; that should be pretty easy. He doesnâ€™t even know C++ so itâ€™s not a language test; he just wants to see me write some simple code.â€</p>

<p>The room began to feel small. Being a typical corporate meeting room the dÃ©cor was noticeably drab, this wasnâ€™t the place youâ€™d ever consider bringing a customer; so it can be palmed off onto a bunch of IT people. The lack of a whiteboard also suggested this was no place for collaboration, which was odd, because so much of what is wrong in software development is down to a distinct lack of this very exercise. Once again my mind wandered from the task at hand as I begin to consider whether this omen was foreboding.</p>

<p>More time passed and Iâ€™ve still written no code. This canâ€™t be looking too promising now so I make a light hearted attempt to cover my tracks by suggesting itâ€™s really weird writing code with a pen and pencil. Which of course it is.</p>

<p>I break the impasse by just writing a boilerplate function signature <code>void printCalender()</code> and then add a couple of braces. I immediately realise adding the closing brace was stupid, how can you insert code on a piece of paper? Once more I make light heart of the situation by commenting on how used to a text editor Iâ€™ve become. He agrees. I ask him to pass the â€˜delete keyâ€™, by pointing at the rubber just out of reach, and he obliges.</p>

<p>I need to get a grip. I tell myself to stop making small-talk and get on with the task at hand.</p>

<p>Finally I seem to be able to concentrate. My sketch of the calendar suggests a 2D structure so I start writing a pair of loops, one from one to seven for the days of the week and another for up to 5 weeks. As I mentally walk through the output I realise itâ€™s just a stream and so I only need one loop and some modulo arithmetic. I apply the â€˜delete keyâ€™ liberally once again and focus on the single loop approach. Only now I canâ€™t see what it looks like as my mind has raced ahead to realising I have no idea what date type Iâ€™m going to use, such as for working out which day of the week the 1st of the month is, or how many days the month has, or if itâ€™s a leap year, or â€¦</p>

<p>My vacant expression and another period of extended inactivity has come to the interviewerâ€™s notice and once more Iâ€™m on the back foot. This time I bemoan that lack of a decent date/time class in C++ and waffle on about Boost, <code>time_t</code> and OLE date/times. He sympathises but, probably unintentionally, only makes things worse by pointing out how much you get out of the box in Java. This time I joke about the lack of access to Stack Overflow, or the internet in general for assistance.</p>

<p>Itâ€™s now dawned on me that I didnâ€™t start with a failing test! Test-first development is still fairly new to me at this point due to being knee deep in legacy code for years, but I want him to know that itâ€™s something I would normally do. I fire off a throwaway comment and try to gauge his response but fail to detect if TDD is his natural way of life or not and therefore have to let it go.</p>

<p>I realise Iâ€™ve just blamed the test process, again! Where is the Singularity to swallow me up and put an end to this nightmare...?</p>

<p>Timeâ€™s up! The page contains some faint scribbles and I try my best to elucidate my thought process, in particular how my gut says itâ€™s just a simple loop and some modulo arithmetic and I apologise for failing to get anything remotely readable down on paper in time.</p>

<p>He thanks me for my time and slips me a small piece of paper with his email address on it and, almost as a passing gesture suggests I could always contact him later with the answer. I know heâ€™s just being polite though.</p>

<p>I trudge home, annoyed at how badly Iâ€™ve done. Similarly, I lament to the agent about my inability to write such a simple piece of code. Naturally heâ€™s supportive but it makes little difference to my self-deprecating mood.</p>

<p>The evening slowly passes and my thoughts turn to the piece of paper with his email address on it. I start to ponder â€œwas it a genuine lifeline, or just an act of consolation? Is he merely offering me closure or a second chance to redeem myself?â€</p>

<p>I fire up my computer and start bashing out some code. I decide Iâ€™m not just going to answer the question, but Iâ€™m also going to do it both ways â€“the two loop approach I fumbled towards, but also the single loop, streaming approach I knew was possible. And I was going to do both using a test-first approach for good measure!</p>

<p>At about 10 pm I zipped up both sets of code and mailed them off. I was happy that even if he didnâ€™t read the email I knew that I could have done it given a normal working environment.</p>

<p>The following morning I took the kids to school and just got on with my life knowing there were other jobs out there and that Iâ€™d have my day soon enough. Then the phone rang, it was the agent, â€œI donâ€™t know what you did but they want to see you again right away!â€</p>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
