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.
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)
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.