<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Pither.com: Recruitment homework question</title>
    <link>http://www.pither.com/articles/2006/09/14/recruitment-homework-question</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>by Simon Pither, freelance developer and systems administrator</description>
    <item>
      <title>Recruitment homework question</title>
      <description>&lt;p&gt;This is one of the homework questions that Digitalbrain has recently been giving out to prospective candidates for a Linux system administrator role.&lt;/p&gt;

&lt;p&gt;Working with a large, complex application with many thousands of users, we very often have to manipulate significant amounts of textual data.  Perhaps as part of a process to create new student accounts within a school, or to feed to one of our management tools to delete or relocate a collection of user files, or maybe to collate data from one of the many log files.&lt;/p&gt;

&lt;p&gt;So this question is based on the kind of work that is a core (if not very interesting) part of the role.  I would have expected it to be a core part of any Linux sysadmins knowledge too.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The question:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Attached is a CSV file (a sample from a much larger file).  This file needs cleaning and altering in the following ways:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;capitalise the first letter of the two name fields&lt;/li&gt;
&lt;li&gt;sanitise the formatting&lt;/li&gt;
&lt;li&gt;move the username column to the beginning of each line&lt;/li&gt;
&lt;li&gt;the phone number is missing the area code - look up the city in the following table, and add it to the beginning of the phone number column&lt;/li&gt;
&lt;/ul&gt;

&lt;table&gt;
&lt;tr&gt;&lt;th&gt;City&lt;/th&gt;&lt;th&gt;Area Code&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;London&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Brighton&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Manchester&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;Please detail what you did, how, any scripts involved and provide the corrected CSV.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="/files/db-test.csv"&gt;The CSV file&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Our recent experience seems to suggest that being able to answer this is a rare skill, even for people who advertise themselves as experienced Linux system administrators (and are applying for such a job)!&lt;/p&gt;

&lt;p&gt;Are we being unfair?&lt;/p&gt;

&lt;p&gt;Are we expecting too much?&lt;/p&gt;</description>
      <pubDate>Thu, 14 Sep 2006 18:00:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:cd55251b-8c2b-4c95-b5bd-72e1472ee0d8</guid>
      <author>Simon</author>
      <link>http://www.pither.com/articles/2006/09/14/recruitment-homework-question</link>
      <category>sysadmin</category>
      <category>work</category>
      <enclosure type="text/x-comma-separated-values" url="http://www.pither.com/files/db-test.csv" length="459"/>
    </item>
    <item>
      <title>"Recruitment homework question" by Rus</title>
      <description>People that can't solve this easy problem, suck, badly!

PS. PHP isn't a solution.</description>
      <pubDate>Fri, 15 Sep 2006 08:54:26 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:339212bb-2ace-4d1d-a1b0-1765bd521c40</guid>
      <link>http://www.pither.com/articles/2006/09/14/recruitment-homework-question#comment-5</link>
    </item>
  </channel>
</rss>
