FizzBuzz and Problem Finding

Posted in Coding, IT by Will on March 5, 2007.

I followed a series of links to get to Jeff Atwood’s post on Why Can’t Programmers.. Program?  Jeff references, in turn, a post by Imran on Using FizzBuzz to Find Developers who Grok Coding.

Reading through the “Fizz-Buzz” problem they had, I thought to myself, “So, what would I do if presented with this”.

Something like this popped into my head:

        For i As Integer = 1 To 100
            If (i Mod 3) = 0 Then _
                    Console.WriteLine(“Fizz”)
            If (i Mod 5) = 0 Then _
                    Console.WriteLine(“Buzz”)
        Next

Then I re-read the spec and realised, hey, I don’t actually have it outputting the numbers, and it ouputs multiples of 3 and 5 (such as 15) with a linebreak between them.  (Is this iterative development?)

So, it became (again, in my head - which is scary):

        For i As Integer = 1 To 100
            If (i Mod 3) = 0 AndAlso (i Mod 5) = 0 Then
                Console.WriteLine(“FizzBuzz”)
            ElseIf (i Mod 3) = 0 Then
                Console.WriteLine(“Fizz”)
            ElseIf (i Mod 5) = 0 Then
                Console.WriteLine(“Buzz”)
            Else
                Console.WriteLine(i)
            End If
        Next

So, reading through a solution posted by James on Jeff Atwood’s post made me feel smart (they’re basicly identical). After all, if most of these comp-sci people couldn’t figure it out, then I wasn’t as bad a coder as I had feared. (I know I’m not a top-class developer).

Then someone by the name of Toepopper writes “I once interviewed a candidate for a VBA job … whom I asked to swap two variable contents without using a temp variable.”

That one had me stumped.  I wouldn’t have even thought of the excel “answer” that Toepopper said someone tried - but the problem would still remain.  

I guess this is the point where a lack of formal education in comp sci (or experience developing in very memory limited environments) really comes home to roost. However, I could have given an answer by doing a quick google search. Is that acceptable? To some (like Toepopper) this is probably not acceptable - but for me, I’d get the answer, albeit slightly slower (the first time) than someone else with that formal education or background.

The issue comes when someone asks you to do that in an interview, without ‘net access.

LiveWriter needs fixing

Posted in IT, On the Intertron, Rant by Will on March 5, 2007.

Windows Live Writer is an interesting bit of blog-client software.  It offers some MS Word-like features, but simpler - and lets you do blogging in a fairly light-weight and easy-to-use environment.

There are, however - things that really drive me up the wall with it, and there hasn’t been any new updates to LiveWriter for a long time. (August 11th, sheesh?!)

#1 - Image Quality

The LiveWriter has this annoying habit of blurring the pictures which are copied in, unless you remove it’s dropshadowing.

Here’s an example:


(with default drop-shadow setting)


(with photo-paper setting)


(with “Inherit from Weblog” setting)

It doesn’t matter what you do, you can’t change the default to “inherit”, and you can’t fix the blurring - Microsoft needs to fix this. Now.

You can tell blog entries that have been published with LiveWriter, simply by their image quality.

Here’s a completely non-random sampling of my morning’s RSS reading:

The common theme? (Apart from being Microsoft bloggers) They were all published with Windows Live Writer. The key indicator is that there’s dropshadows and blur on the images. Which makes them look (sorry guys) like those joke images that’ve been passed around, embedded in powerpoint documents sent via email through just about every person on the planet.

#2 - Dictionary Support

Having a spell-checker is kinda handy when you’re blogging - and I like that it operates like Outlook’s “spellcheck-on-send” feature.

The thing that really drives me up the wall is that you can’t install other dictionaries. Heck, it won’t even use the installed Office dictionary. 

 

 #3 - No Integrated Proxy Support

This isn’t so much of an issue, most of the time - but even my basic .NET apps let you use the windows account for authentication - it’s about 3 lines of code, plus some switching logic to determine if you need to use this setting.

This also means my password is sent in cleartext (rather than used to obtain a Kerberos token, which is used to authenticate against the proxy), and that I need to keep updating it (passwords expire every 60 days or so here).

 

 

 

Edit: Pingbacks were sent… damn, sorry folks. (I didn’t mean for that to happen)

Velociraptor Safety Message

Posted in On the Intertron, Teh Funnies by Will on March 5, 2007.

Despite my previous attempts at promoting Velociraptor awareness through this blog, it appears Velociraptors are still a major threat.

Today comes a Velociraptor Safety message from an XKCD reader Dr Daniel Snyder:

I notice that many of your comics revolve around people (including yourself) with a phobia of Velociraptor. This phobia revolves around Velociraptor overcoming some 70 million years of extinction and the geographic barriers between its home and yours, leaping out of the underbrush and/or through the kitchen, and doing unmentionable things to your innards with its teeth and claws.

Said Doctor holds a PhD in Vertebrate Paleontology, so is certainly more qualified than others who’ve given anti-raptor advice (such as Sam Neill).

Go read the full message, including some sage advice on how to adequately arm yourself against the inevitable Velociraptor attack.

 

Off to purchase several crates of grape juice.

Geek Humor

Posted in IT, Teh Funnies by Will on March 1, 2007.

Ah, more Bash.org:

#728751:

<ehFk> so today in class Mr. Frank was like “Guys, turn to page 404….”
<ehFk> me being a smartass say “Sir…. I can’t find it”
<ehFk> “Michael, It is page 404″
<ehFk> “SIR! I CAN’T FIND IT!”
<ehFk> I spent the next two minutes explaining  to my class what 404 meant
<ehFk> and they all looked at me like I was the biggest fucking nerd EVER

…Yeah, I wonder why :P

These arn’t new, but funny nontheless:

#6824 Truth in Coding:

<@Logan> I spent a minute looking at my own code by accident.
<@Logan> I was thinking “What the hell is this guy doing?”

#414593 Truth in Relationships:

DragonflyBlade21: A woman has a close male friend. This means that he is probably interested in her, which is why he hangs around so much. She sees him strictly as a friend. This always starts out with, you’re a great guy, but I don’t like you in that way. This is roughly the equivalent for the guy of going to a job interview and the company saying, You have a great resume, you have all the qualifications we are looking for, but we’re not going to hire you. We will, however, use your resume as the basis for comparison for all other applicants. But, we’re going to hire somebody who is far less qualified and is probably an alcoholic. And if he doesn’t work out, we’ll hire somebody else, but still not you. In fact, we will never hire you. But we will call you from time to time to complain about the person that we hired.

#205408 Truth in Internet Relationships

<malaclypse> The general rule on about people on IRC seems to be “Attractive, single, mentally stable: choose two”

TechEd 2007

Posted in IT, Work by Will on March 1, 2007.

I’m trying to organise to go to a few different tech conferences this year - CodeCampOz in Wagga (March 31st & April 1st), and TechEd 2007 (Aug 7-10) on the Gold Coast.

Andrew Coates looks like he’s organising some of TechEd 2007 - and wrote back in January about the different personas of people that Microsoft think might be attending.

The two personas they have listed are both what I identify with:

Dave-ish:

  • I have over 4 years in development (professionally - I spent time hacking together scripts and basic pages for at least another 4-5 on top of that)
  • I am still primarily using .NET 1.x (due to the work environment), though I have developed and maintained app’s in both .NET 2.0
  • I know about more than just .NET and VB6 development - I get in there with a bunch of other technologies (both Microsoft and non-MS), and I have no issue picking up most new/different technologies once I have the concept behind the technology.
  • TechEd 2007 would be my first TechEd (Assuming I can get work to pay for my TechEd pass)
  • I use (mainly) Microsoft tools and Technologies at work, and I work at a large well-known company.

Ulrich-ish:

  • I get most, if not all, of my information about current/emerging/new technologies online (RSS++, Forums, Podcasts).
  • I participate in tech communities online.

I’m hoping to move more to the Ulrich side of things - but retain the overall knowledge that I have atm.

Attributes which don’t fit in anywhere:

  • I’m generally the go-to guy at work (for the people that know me) with almost any IT or telco question, even though I don’t necessarily work on that product.
  • I work primarily on my own, both physically and organisationally. (Again, due to the work environment).  Though, I have no problems working with others.

Newer Entries