<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>xult.org</title>
	<atom:link href="http://xult.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://xult.org</link>
	<description>...because it&#039;s four letters</description>
	<lastBuildDate>Thu, 03 May 2012 23:05:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>A (small) dose of programming awesome</title>
		<link>http://xult.org/2012/05/03/a-small-dose-of-programming-awesome/</link>
		<comments>http://xult.org/2012/05/03/a-small-dose-of-programming-awesome/#comments</comments>
		<pubDate>Thu, 03 May 2012 22:49:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xult.org/?p=139</guid>
		<description><![CDATA[What really got you into &#8220;computers&#8221;? For me, it was seeing a friend&#8217;s 386 running this (at the time) astonishing piece of code. At home, I was still soldiering on with a monochrome 286 computer, running at (yes) 0.0125ghz. It &#8230;<p class="read-more"><a href="http://xult.org/2012/05/03/a-small-dose-of-programming-awesome/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>What really got you into &#8220;computers&#8221;? For me, it was seeing a friend&#8217;s 386 running this (at the time) <a href="http://en.wikipedia.org/wiki/Second_Reality">astonishing piece of code</a>. At home, I was still soldiering on with a monochrome 286 computer, running at (yes) 0.0125ghz. It even had a button on the front to slow it down to 0.004ghz in case it was going too fast. I had a few games, and of course I played some games on friends&#8217; consoles &#8211; but there was something about this demo that turned my head. I had to get involved.</p>
<p>Since then, I&#8217;ve been amazed by too many programming feats to enumerate or even remember &#8211; but here&#8217;s a few awesome things that you may have missed out on.</p>
<ul>
<li><a href="http://www.pouet.net/prod.php?which=57449">64kb of pure art</a>. You can appreciate it aesthetically without even thinking about the astonishing feats of programming required to create it (if you don&#8217;t want to download, <a href="http://www.youtube.com/watch?v=4oPpcSZa3NE">watch this in HD</a> to get most of the effect).</li>
<li>Raytracers implemented in <a href="http://www.slimeland.com/raytrace/">javascript</a> and <a href="http://www.physics.uq.edu.au/people/foster/postscript.html">postscript</a>.</li>
<li>Conway&#8217;s classic game of Life &#8211; used to create a <a href="http://rendell-attic.org/gol/tm.htm">Turing Machine</a>.</li>
<li>A scrolling starfield implemented in <a href="http://www.df.lth.se/~john_e/small/sstar/star.html">20 bytes</a> of abusive assembly.</li>
<li>A plethora of eccentric programming languages, like <a href="http://progopedia.com/example/factorial/362/">Shakespeare</a>, <a href="http://www.cs.cmu.edu/~dst/DeCSS/Gallery/css-brainfuck.txt">Brainf*ck</a>, and the original novelty language, <a href="http://en.wikipedia.org/wiki/INTERCAL">Intercal</a>.</li>
<li>A bizarre and clever <a href="http://demoseen.com/windowpane/fl0wer.png.html">Chrome/Firefox PNG hack</a>. View source. Wonder&#8230; (Give up? <a href="http://daeken.com/superpacking-js-demos">Here&#8217;s the explanation</a>).</li>
</ul>
<div><span style="line-height: 18px;">&#8220;When I grow up&#8221;, I can only hope to be as smart as the people responsible for the feats above. In the meantime, it&#8217;s back to the day job.</span></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://xult.org/2012/05/03/a-small-dose-of-programming-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I am an idiot. I am a genius.</title>
		<link>http://xult.org/2012/04/11/i-am-an-idiot-i-am-a-genius/</link>
		<comments>http://xult.org/2012/04/11/i-am-an-idiot-i-am-a-genius/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 21:27:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xult.org/?p=130</guid>
		<description><![CDATA[I was pleased to get an invitation to Stack Overflow Careers today. Pretty much everything they touch turns to gold at the moment, and I really wanted a play to see what they could offer. In particular, where did it &#8230;<p class="read-more"><a href="http://xult.org/2012/04/11/i-am-an-idiot-i-am-a-genius/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I was pleased to get an invitation to <a href="http://careers.stackoverflow.com/">Stack Overflow Careers</a> today. Pretty much everything they touch turns to gold at the moment, and I really wanted a play to see what they could offer. In particular, where did it stand on the spectrum &#8211; leaning more towards LinkedIn, or more towards a standard social network profile?</p>
<p>They&#8217;re really keen for you to fill out some free text entries (I haven&#8217;t written a &#8220;personal statement&#8221; since I applied to university!) and it raised the usual crisis of confidence &#8211; am I actually any good?</p>
<p>On the one hand, I look at some of the Big Names in the .NET world, and wallow in my inadequacy. This is reinforced on a daily basis when I pick up my RSS reader and see what <a href="http://ayende.com/blog">Ayende </a>or <a href="http://www.hanselman.com/blog/">one </a>of the <a href="http://weblogs.asp.net/scottgu/">many </a><a href="http://odetocode.com/blogs/scott/">Scotts </a>has to say. How do they absorb and understand so much information, dedicate themselves to the community, and <em>still </em>manage to productively deliver in a full time job?</p>
<p>On the other hand, I can take a simple glance at Stackoverflow and realize that I can place myself above quite a lot of others &#8211; for example, there&#8217;s too many reasons why <a href="http://stackoverflow.com/questions/10030751/url-xml-query-string-with-multiple-where-values">this question</a> has received no answers!</p>
<p>I think I&#8217;ll browse the unanswered section if I ever need an ego boost!</p>
]]></content:encoded>
			<wfw:commentRss>http://xult.org/2012/04/11/i-am-an-idiot-i-am-a-genius/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trying to sign up to Fiverr</title>
		<link>http://xult.org/2012/04/06/trying-to-sign-up-to-fiverr/</link>
		<comments>http://xult.org/2012/04/06/trying-to-sign-up-to-fiverr/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 12:23:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xult.org/?p=117</guid>
		<description><![CDATA[It should be easy to sign up to Fiverr, one of the web&#8217;s newest hot properties. Right? But here are the hoops I&#8217;ve just had to jump through: Try to sign up to Fiverr. But weirdly, every time I hit &#8230;<p class="read-more"><a href="http://xult.org/2012/04/06/trying-to-sign-up-to-fiverr/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>It should be easy to sign up to <a href="http://fiverr.com">Fiverr</a>, one of the web&#8217;s newest hot properties. Right?</p>
<p>But here are the hoops I&#8217;ve just had to jump through:</p>
<ol>
<li>Try to sign up to Fiverr. But weirdly, every time I hit the &#8220;Join&#8221; button, it redirects to the homepage. No errors. No nothing.</li>
<li>Turn off adblock. Same problem.</li>
<li>Try Firefox instead of Chrome. Same problem.</li>
<li>Try IE instead of Chrome. Same problem.</li>
<li>Try all those 3 browsers from another computer on another IP address. Same problem.</li>
<li>Try to sign up using Facebook instead. Same problem.</li>
<li>Initiate a support ticket.</li>
<li>Receive a nice reply from Jenny, suggesting I upgrade Flash. I do so, and reboot. Naturally, same problem!</li>
<li>Ask for more help from Jenny. She suggests using a webmail email address, instead of my personal one (why?). I try to use Hotmail, but Fiverr shows a message saying that they cannot deliver email to Hotmail and I can&#8217;t use it.</li>
<li>Try my work email address instead. Redirect to homepage again.</li>
<li>Use my Gmail address that I rarely use. Suddenly, signup works</li>
</ol>
<p>What. The. Hell.</p>
<p>This is pretty mysterious, to put it politely. An email address is an email address &#8211; why are they discriminating so bizarrely? If they have <a href="http://www.dotmailer.com">deliverability problems</a>, my employer can certainly help!</p>
<p>I wonder if the fine folks at Fiverr have heard of errors? If something goes wrong, for goodness sake tell me about it &#8211; don&#8217;t just redirect me to your homepage. After all, I am here to spend money.</p>
]]></content:encoded>
			<wfw:commentRss>http://xult.org/2012/04/06/trying-to-sign-up-to-fiverr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loops and locks</title>
		<link>http://xult.org/2012/04/02/loops-and-locks/</link>
		<comments>http://xult.org/2012/04/02/loops-and-locks/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 20:27:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xult.org/?p=109</guid>
		<description><![CDATA[These days, there&#8217;s a high chance that you&#8217;re probably using clever wrappers, frameworks, and gizmos that make this irrelevant. But here&#8217;s a pattern that is easy to use in a background service codebase, but one that can get you subtly &#8230;<p class="read-more"><a href="http://xult.org/2012/04/02/loops-and-locks/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>These days, there&#8217;s a high chance that you&#8217;re probably using clever wrappers, frameworks, and gizmos that make this irrelevant. But here&#8217;s a pattern that is easy to use in a background service codebase, but one that can get you subtly into trouble.</p>
<p>Consider this code (a slightly contrived example):</p>
<pre class="brush:csharp">myTimer.Interval = Timespan.FromMinutes(10);
myTimer.Elapsed = Cleanup

protected void CleanUp(object state)
{
    // some code to tidy up some temporary folder
}</pre>
<p>Excellent &#8211; we have some code that runs once every 10 minutes. You couldn&#8217;t have a more simple piece of code. But a danger is hidden here &#8211; what happens if our code takes more than 10 minutes to run (let&#8217;s say we&#8217;re traversing a particularly big directory tree, and doing something slow).</p>
<p>Fine &#8211; we&#8217;ll lock this up:</p>
<pre class="brush:csharp">myTimer.Interval = Timespan.FromMinutes(10);
myTimer.Elapsed = Cleanup

protected void CleanUp(object state)
{
      lock (myLockObject)
      {
            // some code to tidy up some temporary folder
      }
}</pre>
<p>This looks great – there&#8217;s no danger that we could be doing the same thing twice, simultaneously. However, you can gradually starve yourselves of threads if the operation inside the lock takes longer than 10 minutes (or indeed, never completes).</p>
<p>If you don&#8217;t absolutely need to acquire a lock, remember that the “lock” keyword is just syntactic sugar for <strong>Monitor.Enter</strong>.</p>
<p>Here&#8217;s a much safer rewrite with a safety valve:</p>
<pre class="brush:csharp">myTimer.Interval = Timespan.FromMinutes(10);
myTimer.Elapsed = Cleanup

protected void CleanUp(object state)
{
    if (Monitor.TryEnter(myLockObject)
    {
        // some code to tidy up some temporary folder
    }
    else
    {
        // Log the fact that you couldn't do the operation you were expecting to do
    }
}</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://xult.org/2012/04/02/loops-and-locks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Measure everything.</title>
		<link>http://xult.org/2012/03/31/measure-everything/</link>
		<comments>http://xult.org/2012/03/31/measure-everything/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 20:27:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xult.org/?p=100</guid>
		<description><![CDATA[In a large, always on massively multi-user software platform, it can be terrifying when you take stock of your data. There&#8217;s so much of it &#8211; and more coming in all the time. Sure &#8211; you denormalize like crazy into &#8230;<p class="read-more"><a href="http://xult.org/2012/03/31/measure-everything/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>In a large, always on massively multi-user software platform, it can be terrifying when you take stock of your data. There&#8217;s so much of it &#8211; and more coming in all the time. Sure &#8211; you denormalize like crazy into aggregate data structures; and you have dozens of little stats packages running in various corners of your system. You have error logging, email alerts, and you might well have grown to hate your phone receiving SMS alerts at odd hours.</p>
<p>But do you really know what your application is doing? Right now?</p>
<p>You have to <strong>measure everything</strong>, starting now. If you don&#8217;t have a central dashboard showing you in near-realtime what your application is doing, that should be your next mission. Because if you don&#8217;t know what your application is doing, how can you take decisions if things go wrong? How, indeed, will you even know <em>when</em> things are going wrong? How can you measure relative performance over time? Compare current performance against previous versions of your software?</p>
<p>Perhaps worst of all, you&#8217;re missing out on the chance to gain unique insights on how your application is functioning &#8211; and without those insights, you may well miss the opportunity to develop something truly wonderful. I&#8217;ve lost count of the number of times I&#8217;ve implemented a report, or a graph, that measured something for the first time &#8211; and within days allowed me to plan an improvement or new feature.</p>
<p>The shame of it is that measuring is easy &#8211; there is a vast array of ready made software libraries just waiting to help you measure whatever you need to. Store some numbers, graph them, measure change over time, and you&#8217;ll be better for it! Start today&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://xult.org/2012/03/31/measure-everything/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>J&#8217;accuse</title>
		<link>http://xult.org/2011/11/08/jaccuse/</link>
		<comments>http://xult.org/2011/11/08/jaccuse/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 21:15:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xult.org/?p=87</guid>
		<description><![CDATA[Sometimes things go wrong while you&#8217;re writing them. And it&#8217;s all the compiler&#8217;s fault &#8211; there absolutely has to be a problem with it. Oh wait, perhaps it&#8217;s actually just a bad bug in the library. No &#8211; maybe it&#8217;s &#8230;<p class="read-more"><a href="http://xult.org/2011/11/08/jaccuse/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Sometimes things go wrong while you&#8217;re writing them. And it&#8217;s all the compiler&#8217;s fault &#8211; there absolutely has to be a problem with it. Oh wait, perhaps it&#8217;s actually just a bad bug in the library. No &#8211; maybe it&#8217;s the other guy on the team who did that weird checkin yesterday, and something&#8217;s gone wrong with that.</p>
<p>Actually, it&#8217;s probably just you. Almost all of the time, you&#8217;ll have a revelatory moment where you realize that you&#8217;ve missed something. It could be glaring, or it could be subtle. But there&#8217;s a <a href="http://en.wikipedia.org/wiki/Facepalm">facepalm </a>moment, and then you move on with your life.</p>
<p>But not too long ago, I did enjoy independently discovering this little bug in the C# 4 compiler. It&#8217;s a very minor one, but its diminutive status did not decrease my immense enjoyment at its discovery. Behold: an incorrect compiler warning!</p>
<pre class="brush:csharp">using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleApplication
{
    /// &lt;summary&gt;
    /// This example demonstrates a small bug in the C# compiler, which
    /// generates a CS0649 compiler warning saying that the "Field" field
    /// is not used.
    /// &lt;/summary&gt;
    public class Program
    {
        // making this private triggers the compiler warning
        private class Example
        {
            public DateTime Field;
        }

        static void Main(string[] args)
        {
            var bug = new List&lt;DateTime&gt;()
                .AsQueryable()
                .Select(dt =&gt;
                    new Example { Field = dt } // this object initializer isn't spotted by the compiler
                );
        }
    }
}</pre>
<p>I reported this via Microsoft Connect, and I got a very <a href="https://connect.microsoft.com/VisualStudio/feedback/details/646383/c-compiler-warning-bug-with-private-classes">polite response</a> from a Microsoft PM, who (correctly) did not triage it with any great urgency. But it&#8217;s still a notch on the old programming belt.</p>
<p>This does of course mean that after years of conditioning myself to expect that I am the culprit, I am back to believing that everything is actually the fault of the compiler/library/etc. Such is life!</p>
]]></content:encoded>
			<wfw:commentRss>http://xult.org/2011/11/08/jaccuse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exception handling for ScriptServices</title>
		<link>http://xult.org/2011/10/26/exception-handling-for-scriptservices/</link>
		<comments>http://xult.org/2011/10/26/exception-handling-for-scriptservices/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 19:15:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xult.org/?p=80</guid>
		<description><![CDATA[It doesn&#8217;t exist! That could actually be my entire blogpost, but you&#8217;d be left there with a rather disturbed feeling. So we&#8217;ll get into detail. If you have a web service (say, an .asmx file), and you&#8217;re planning on it &#8230;<p class="read-more"><a href="http://xult.org/2011/10/26/exception-handling-for-scriptservices/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>It doesn&#8217;t exist! That could actually be my entire blogpost, but you&#8217;d be left there with a rather disturbed feeling. So we&#8217;ll get into detail.</p>
<p>If you have a web service (say, an .asmx file), and you&#8217;re planning on it returning JSON into the page, you&#8217;ll pop your usual ScriptServiceAttribute in, and get on with it. A few months later, you&#8217;re running happily in production, and suddenly you see some requests failing with an HTTP 500 status. How do they fail? An HTTP header comes back as follows:</p>
<pre class="brush:plain">jsonerror: true</pre>
<p>And instead of the nice JSON you were expecting, you get this:</p>
<pre class="brush:plain">{"Message":"Server was unable to process request","ExceptionType":""}</pre>
<p>Well, that&#8217;s pretty annoying. That didn&#8217;t happen when you built this service. Something must be wrong with the data you&#8217;re trying to return. In debug, this would be showing the actual exception and type, but of course you followed best practice and deployed in <a href="http://msdn.microsoft.com/en-us/library/ms228298.aspx">retail</a> mode, which turned on custom errors. But no problem, let&#8217;s have a look in the application&#8217;s error log &#8211; luckily, you used <a href="http://code.google.com/p/elmah/">ELMAH</a> to log all server exceptions.</p>
<p>Nope, ELMAH is showing nothing. How very odd. After a brief check, you realize that it must be because errors in .asmx methods don&#8217;t go through Application_Error. No problem, you&#8217;ll just have to bite the bullet and check the Windows Event Log.</p>
<p>Nothing is there. The plot thickens.</p>
<p>As far as I know, there&#8217;s nothing you can now do except turn off Custom Errors and inspect the problem. There doesn&#8217;t seem to be any way to get a hold of it. The great Ayende appears to have experienced a <a href="http://ayende.com/blog/3084/asp-net-ajax-error-handling-and-wtf">great deal of frustration</a> at this! As always in programming, there will be a way &#8211; but I cannot think of a tidy and effective way of making error handling work.</p>
<p>If you&#8217;re having this same issue, you might want to assume that there is a problem with serializing a particular type (if you&#8217;re returning complex types); or that your total response is larger than permitted by the <a href="http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.maxjsonlength.aspx">MaxJsonLength</a> set in the web.config.</p>
]]></content:encoded>
			<wfw:commentRss>http://xult.org/2011/10/26/exception-handling-for-scriptservices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interview roulette</title>
		<link>http://xult.org/2011/10/11/interview-roulette/</link>
		<comments>http://xult.org/2011/10/11/interview-roulette/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 20:48:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://new.xult.org/?p=65</guid>
		<description><![CDATA[Recently I&#8217;ve had the chance to help conduct a round of interviews to grow our expanding tech team. Technical interviews should be considerably more straightforward than interviews in other sectors, as it&#8217;s a simple matter of assessing the candidate&#8217;s level &#8230;<p class="read-more"><a href="http://xult.org/2011/10/11/interview-roulette/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve had the chance to help conduct a round of interviews to grow our expanding tech team. Technical interviews <em>should</em> <em>be</em> considerably more straightforward than interviews in other sectors, as it&#8217;s a simple matter of assessing the candidate&#8217;s level of knowledge empirically, and then determining whether they&#8217;d be a good team fit. But somehow it&#8217;s just not that simple.</p>
<p>I&#8217;ve never been through what I&#8217;d call a very technical interview. Sure, I&#8217;ve talked tech, but I haven&#8217;t felt like I&#8217;m undergoing my viva voce. So I&#8217;m not necessarily talking from a position of experience. But I think a good interview could definitely go along these lines.</p>
<h3>Getting to know you</h3>
<p>I&#8217;m nervous when meeting new people. I&#8217;m also nervous when meeting new people, and asking them for thousands of pounds in exchange for my labour. So I&#8217;ll understand, and even expect, you to be nervous. So in the initial stages of an interview, it&#8217;s good just to talk about general, background things. This is the time for small talk &#8211; how did the candidate get to you? If they&#8217;re new to the area, do they have any questions or observations about it? How long have they been in their current/last position, and what sort of things did they enjoy there? Do they have any favourite bloggers? Do they have any personal projects they work on out of hours? Hopefully a 5-10 minute chat should settle them down and clear their mind a little. And do, of course, offer them a drink &#8211; the talking is just getting started!</p>
<h3>What knowledge does the candidate have?</h3>
<p>This is where we need to get a clearer idea of who the candidate is, and what their strengths are. Their CV is likely to be an optimistic take on things, to put it mildly. Unfortunately, CVs go through bullet point filters at the recruiter level, HR level, and so on. If the requisite bullet points aren&#8217;t there, the candidate won&#8217;t get through to see the person they think they can impress. So be prepared for some skill inflation, and be ready to call them on it to find out their real level.</p>
<p>There are already <a href="http://www.hanselman.com/blog/WhatGreatNETDevelopersOughtToKnowMoreNETInterviewQuestions.aspx">some good</a> articles describing some good .NET interview questions (though I hope to one day pen my own) so I won&#8217;t revisit that now. But you should try and go into some detail to work out what aspects of the candidate&#8217;s skills are strong and correlate with the role being recruited for. However, it&#8217;s easy to overlook the fact that the candidate may have some skills that, although not directly applicable to the role, may well demonstrate a more interesting character. So try and discover as much about their competencies as possible.</p>
<h3>The challenge stage</h3>
<p>I think it&#8217;s particularly important that the candidate demonstrate their stated familiarity with the products they&#8217;ll be working with. In our case, that&#8217;s first and foremost Visual Studio. Like it or loathe it, if you&#8217;re a .NET dev, you&#8217;ll probably spend a lot of your time working in this environment. So I&#8217;ll expect that you&#8217;re super-familiar with its usage. In the recent round of interviews we did, we asked people to put together a very small &#8220;todo list&#8221; webapp to demonstrate their ability to use the tools and the stack (ASP.NET, webforms or MVC). The spec was given to the candidate as a screenshot (on paper!), and we gave them a little time to put it together in front of us.</p>
<p>It&#8217;s hard to underestimate the value of watching someone code in front of you. You can immediately form an opinion on them in subtle ways that a verbal interview won&#8217;t ever reveal. For example, if someone cannot touch type, I would say that was a concerning trait. If they spend a lot of time poking around in intellisense looking for simple elements of the framework (e.g. the .Length property of an array), then you start to worry about their competence. And if they&#8217;re spend a lot of time hitting GUI elements in Visual Studio without ever using keyboard shortcuts, I&#8217;ll worry that they are slower developers.</p>
<p>Sure, demonstrating familiarity on strange equipment in an interview environment is tough &#8211; horribly tough &#8211; and I wouldn&#8217;t relish the challenge myself. Some people may normally remap their shortcuts; use <a href="http://www.jetbrains.com/resharper/">ReSharper</a>, or alter their <a href="http://studiostyl.es/">colour scheme</a> - crutches without which they may feel inhibited. But nevertheless, it&#8217;s an egalitarian method of assessing someone that no amount of talking can match, and I think it deserves a high place in a technical interview.</p>
<h3>The freestyle stage</h3>
<p>Here&#8217;s where it gets interesting. It&#8217;s well know that some larger tech companies try to only recruit superstars by asking them bizarre interview questions. How would you weigh a Boeing 747, without using a scale? How many golf balls would fit in your house? These sort of questions are an amusing novelty, and allow the interviewer to have a smug feeling of superiority as the candidate sweats out an answer. But I don&#8217;t feel that they&#8217;re pragmatic, especially when they can be simply replaced with more valuable and interesting questions.</p>
<p>Instead, ask open questions that the candidate can work with. Here are some suggestions:</p>
<ul>
<li>You&#8217;re handed over a legacy web site to maintain. Users are complaining that it&#8217;s running slowly, and pages take ages to get served. Where and how do you start troubleshooting? Which tools would you use to debug the database/code/front end scripts? What are the most common causes of slowdown and how would you identify them?</li>
<li>How would you design an account authentication web service to handle logins for multiple websites? What would you change in your design, if you knew it needed to handle 3 million logins a day? What level of auditing would you provide for failed/successful logins?</li>
<li>Show me a website you like, and describe something you can see that needs a technical overhaul. How would you do it? How do you think they&#8217;re doing it at the moment?</li>
</ul>
<div>These type of questions should allow you to get a good idea of how the candidate thinks, without humiliating them and discussing abstract situations. They&#8217;re also more fun!</div>
<h3>The wrap</h3>
<p>Hopefully at this stage you&#8217;ll have formed an opinion about the candidate. But there&#8217;s a good chance that they may not have formed an opinion about you, or the company. So it&#8217;s now your turn to answer the candidate&#8217;s questions, and you should invite them to ask.</p>
<p>However, this is <em>not</em> an excuse just so sit back and reel off corporate information. The questions the candidate ask may well reveal more about them. If they simply ask rote questions (perhaps about salary, benefits, working hours, etc) then that&#8217;s rather dull. But perhaps they want to know about the products you&#8217;re working on, and the team structure? Maybe they want to know what the team culture is like? These are indicative of a more interesting character and you should pay attention!</p>
<h3>And that&#8217;s all folks</h3>
<p>Hopefully you know all you need to know, now. You&#8217;ve assessed them technically, practically, and culturally &#8211; you should be fully equipped to make a decision. Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://xult.org/2011/10/11/interview-roulette/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The price of backwards compatibility</title>
		<link>http://xult.org/2011/10/09/the-price-of-backwards-compatibility/</link>
		<comments>http://xult.org/2011/10/09/the-price-of-backwards-compatibility/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 20:58:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://new.xult.org/?p=52</guid>
		<description><![CDATA[The .NET framework library is a fairly pleasant place to work. A well documented, rationally structured, and easy to navigate API that always seems to have the right thing when I need it. Culturally sensitive pluralization? Yep. Image rotation? Yep. &#8230;<p class="read-more"><a href="http://xult.org/2011/10/09/the-price-of-backwards-compatibility/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>The .NET framework library is a fairly pleasant place to work. A well documented, rationally structured, and easy to navigate API that always seems to have the right thing when I need it. Culturally sensitive pluralization? <a href="http://msdn.microsoft.com/en-us/library/system.data.entity.design.pluralizationservices.pluralizationservice.aspx">Yep</a>. Image rotation? <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.rotatetransform.aspx">Yep</a>. Oh, you wanted to create your own LINQ provider? <a href="http://msdn.microsoft.com/en-us/library/bb546158.aspx">OK then</a>. Happy days.</p>
<p>Sometimes, though, you come across little oddities that make you groan.</p>
<p>Consider the following – you want to load all files in a directory that end in .doc (typically Microsoft Word files). Should be easy, right? Let’s fire up <a href="http://www.linqpad.net/">LINQPad</a> and find out:</p>
<p><a href="http://new.xult.org/wp-content/uploads/2011/10/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://new.xult.org/wp-content/uploads/2011/10/image_thumb.png" width="244" height="172"></a></p>
<p>Well, that doesn’t look correct at all? I asked for .doc files, but got two more files as well. I guess it’s just expanding my search then, and using an implicit wildcard at the end? If so, I should be able to prove this by searching for .docx files, and only get two files back now.</p>
<p><a href="http://new.xult.org/wp-content/uploads/2011/10/image1.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://new.xult.org/wp-content/uploads/2011/10/image_thumb1.png" width="244" height="142"></a></p>
<p>Wait, what? The .docxx file that came back in the first results, has now not been returned. What could be going on? Well, as a matter of fact, here’s a little clue which might resonate with slightly older readers (if indeed, the post title has not yet given it away):</p>
<p><a href="http://new.xult.org/wp-content/uploads/2011/10/image2.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://new.xult.org/wp-content/uploads/2011/10/image_thumb2.png" width="244" height="150"></a></p>
<p>The clue is, of course, in the <a href="http://msdn.microsoft.com/en-us/library/wz42302f.aspx">MSDN documentation for the method call</a>. The method checks both file names – the current, modern one, and the legacy one that is maintained for backwards compatibility with 16 bit programs, written for Windows 3 or DOS. What a fantastic boon for those continuing to use older apps; and what a curse for the rest of us!</p>
<p>Then again, you can <a href="http://www.youtube.com/watch?v=vPnehDhGa14">upgrade Windows 1 to Windows 7</a>…</p>
]]></content:encoded>
			<wfw:commentRss>http://xult.org/2011/10/09/the-price-of-backwards-compatibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t trust&#8230; user uploads</title>
		<link>http://xult.org/2011/10/04/dont-trust-user-uploads/</link>
		<comments>http://xult.org/2011/10/04/dont-trust-user-uploads/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 20:16:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://new.xult.org/?p=31</guid>
		<description><![CDATA[Does your web application allow the user to upload anything? This is one of the most terrifying parts of secure web development. You&#8217;ve made a decision to permit users to upload files. Perhaps they&#8217;re image avatars? CSV lists for you &#8230;<p class="read-more"><a href="http://xult.org/2011/10/04/dont-trust-user-uploads/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Does your web application allow the user to upload anything? This is one of the most terrifying parts of secure web development. You&#8217;ve made a decision to permit users to upload files. Perhaps they&#8217;re image avatars? CSV lists for you to import? Whatever they are, you&#8217;re going to need to become extremely paranoid, very quickly.</p>
<h3>Don&#8217;t trust the file name</h3>
<p>Surely you can just grab the filename, combine it with your &#8220;user uploads&#8221; folder, and all will be well? Absolutely not! Consider the following piece of code:</p>
<pre class="brush:csharp">string saveAs = Path.Combine(userUploads, postedFile.FileName);
File.WriteAllBytes(
    saveAs,
    new BinaryReader(postedFile.InputStream)
        .ReadBytes(postedFile.ContentLength));</pre>
<p>In most situations, this code will run well. Files will upload correctly into the user uploads folder, and things will tick over nicely. But the subtle problem here is that the FileName property is whatever the user&#8217;s browser specifies. In most modern browsers, it is purely the filename. For example, &#8220;me standing on beach.jpg&#8221;. But for some older browsers, it&#8217;s the fully qualified filename. For example, &#8220;c:\documents\me standing on beach.jpg&#8221;. So the code above can write into folders other than the user uploads folder.</p>
<p><em>At the very least, use <a href="http://msdn.microsoft.com/en-us/library/system.io.path.getfilename.aspx">Path.GetFileName</a> to remove any possibility of a path being present in the name. Better yet, generate filenames yourself.</em></p>
<h3>Don&#8217;t trust the filetype</h3>
<p>This one&#8217;s easy, but embarassingly easy to overlook. Only allow users to upload files that end in the extension you&#8217;re expecting. If you&#8217;re only allowing images, then deny any upload that doesn&#8217;t end in &#8220;.jpg&#8221;, &#8220;.jpeg&#8221;, &#8220;.gif&#8221;, etc. Importantly, block the upload BEFORE you write any bytes to disk anywhere</p>
<h3>Don&#8217;t trust the content</h3>
<p>A more complicated problem is that of the actual content being uploaded. This is more of a problem that varies by context, so I can only give high level pointers. But essentially, you need to try and filter out content that is unexpected or invalid for the situation. An example would be a user trying to upload an avatar image that was 100mb, or a text file that contained binary data. You should always be thinking of what type of data you are expecting, and blocking or quarantining anything that is not right.</p>
]]></content:encoded>
			<wfw:commentRss>http://xult.org/2011/10/04/dont-trust-user-uploads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

