Saturday, August 17, 2013

Interview Questions - Teaching, !Yet Another For Loop

Q: How would you teach loops to someone who is new to programming?
After the likely:
var loopAction =
  (i) => { Console.WriteLine("Current Value: {0}", i); };
for(var i = 0; i <= 10; i++) {
  loopAction(i);
}
Prompt for a loop that uses a non-numerical loop-control variable.  This should give the developer the opportunity to show that they truly understand the nuts&bolts of what we do.

Friday, August 9, 2013

Interview Questions - i18n and Beyond YU

Q: While updating an  ASP.NET Commerce Starter Kit (CSK) implementation, you encounter the following:
    <asp:dropdownlist font="" id="ddlCountry" nbsp="" runat="server">
        <%/* snip - other countries, for brevity snip */%>
        <asp:listitem value="YU">Yugoslavia</asp:listitem>
    </asp:dropdownlist>
Similarly, the following is in the code behind:
    public enum Country
    {
        /* snip - other countries, for brevity snip */
        [Description("Yugoslavia")]
        YU = 235,
    }
What would make this okay?
If it is not okay, what would you propose to correct this?
Background: In 1991, Yugoslavia and its status as an internationally recognized country disintegrated.
The CSK implementation was originally contracted after 1991. Does this fact change the way you will approach the solution? If so, how?