February 28, 2007
In case anyone else is wondering, I did find the problem with opening my saved Haskell file in WinHugs.
At the same time, apparently there are different dialects of Haskell, and it is difficult for a casual observer to tell.
Specifically:
- If I go to Haskell.org, click on Hugs, then Download, and the WinHugs, download it and install it.
- And I then go back to Haskell.org, and click on Haskell in 5 easy steps, I would expect that the provided examples would work. In fact, if I look at Haskell in 5 easy steps, it gives absolutely no indication that the examples they are using will not work with Hugs. They even provide suggestions on how to download and install Hugs as part of that tutorial.
This is not a slam on Haskell, Hugs, or any person out there who writes, enjoys or uses Haskell! I am not criticizing anyones abilities, intelligence or judgment.  I am simply pointing out that for a casual amateur, this is not the most friendly of introductions, and I’m sure that a lot of people give up at this point, rarely to return.
As for me, thanks to Don and Neil’s help, I can actually try experimenting with Haskell now and see what I can learn.
Thanks, guys!
February 27, 2007
A while back I had a great discussion in the comments about the right number of founders.  My “antagonist” felt that one was just as good as two, and I disagreed, feeling that at least two is key to iron out weaknesses, etc.
Dharmesh Shah has some additional information on this - apparently the “optimal” number of co-founders is 2.09
February 26, 2007
I thought I would spend some time this morning trying to learn Haskell. I happen to have downloaded a copy of WinHugs, and it seems to be functioning properly.
Alas, every function definition example I try to use blows up on me.
From: Beginning HaskellÂ
Hugs> myNum :: Int
ERROR - Undefined variable “myNum”
Hugs> square :: Int -> Int
ERROR - Undefined variable “square”
Hugs> square n = n*n
ERROR - Syntax error in input (unexpected `=’)
Hmm, maybe the syntax is different? Looking at the WinHugs documentation, it says it is Haskell 98 compliant, except in some strange ways. Well, there’s always “Haskell in 5 steps”
Hugs> let fac n = if n == 0 then 1 else n * fac (n-1)
ERROR - Syntax error in expression (unexpected end of input)
Hugs> fac n = if n == 0 then 1 else n * fac (n-1)
ERROR - Syntax error in input (unexpected `=’)
Hmmm. Looking further at the Haskell in 5 steps, it seems like maybe I have to write the factorial program seperately, and load it into WinHugs? So I create fac.hs, and put it in:
C:\dev\haskell
C:
My Documents
C:\Program Files\WinHugs\
Can it find it in any of those locations? No.  Even when I use the “Open” command from within WinHugs, it still can find fac.hs, even though I can clearly see it in my file explorer.
So I think that’s enough for one day.
Thanks to the miracle of iTunes, we are now finally caught up with the complete 3rd season of Veronica Mars, after watching Season 1 and Season 2 on DVD,thanks to the miracle of Netflix.
Wednesday, the 28th will be the first VMars we’ve actually seen “live” (although we’ll probably watch it via the miracle of the (now nerfed) ReplayTV)
I will be sad when my last ReplayTV dies. But not sad enough to try to watch it on a PC.
February 20, 2007
Mark Levison provides us with his debut Carnival. Thanks Mark!
February 16, 2007
Alistair Cockburn wrote a great web page about Risk Reduction Patterns. I wanted to format it as an offline doc, so I could read it, refer to it, etc. So I did, and I thought I would share the results of that effort here.
To make doubly sure this is clear - I did not write this - I simply reformatted it for easier offline consumption and printing.
Risk Reduction Patterns
February 12, 2007
Steve Yegge escalates the pompous programming punditry, telling us all exactly what you need to know to be one of the world’s best programmers. And I bet you can guess how well those skills intersect with the Venn diagram of Steve’s own skills.
Now, applying the lessons of this article to punditry, I need to mention three things that Steve can do better than I can before I criticize him:
- Steve clearly knows more about programming language internals and concepts than I do, even more than I knew when I wrote a few interpreters back in the day.
- Steve has some great advice on recruiting and phone screening.
- Steve works for Google, and I don’t
There’s no doubt that Steve knows his stuff. And I would feel, if I were to ask him about a programming question, that if he answered swiftly and decisively, he would probably be right.
Now, having said all that, I think he’s developing into a Clooney-esque perfect storm of self-satisfaction.  There’s no way he can make this claim legitimately.
a) He’s not omniscient. He can only apply his assertion to the domains that he has actually worked with in depth.
b) The definition of “best” is quite amorphous. The best GUI programmers, the best O/S programmers, the best real-time systems programmers, the best customer-domain experts probably do not find that lexical programming is the lump of coal that gets them over the hump into the “world’s greatest” class.
c) These claims of absoluteness are risible when they are made by politicians about law and government. They are typically risible when made by scientists, beyond some super-well-proven facts.  And about software… a field that is so young and raw that we still debate whether strong or weak typing is better? Hah!
Don’t get me wrong. Learning and knowing about programming language internals is valuable. It was extremely enlightening in a number of ways. But it is not, by any means the height of perfection that Steve would claim it to be, and it would be a disservice to the young people of the world if someone did not point out that Steve is conflating his opinion with absolute fact in an embarrassingly simplistic way that is unbecoming of his experience and intelligence.
February 7, 2007
There are certain phrases that are repeated throughout geekdom. These are the ones I can remember off the top of my head, in no particular order, limited to one per movie. What are some of your favorite movie phrases you repeat over and over?
- “My Precious” - Gollum - FOTR
- “Khaaaaaaaaaaaaaaaaaaaannnnnnnnnnnnnnnnn!” - Kirk to the sky - Star Trek 2
- “Wherever you go, there you are.” - Buckaroo Banzai to his audience - Buckaroo Banzai
- “I came here to chew bubble gum and kick ass, and I’m all out of bubble gum.” - Roddy Piper - They Live
- “Shop Smart… Shop S-Mart.” - Ash - Army of Darkness
- “Uh Uh Uh, You didn’t say the magic word.” - Nedry from Jurassic Park
- “These aren’t the droids you’re looking for.” Obi Wan Kenobi - Star Wars
- “Welcome to the Real World” - Morpheous - The Matrix
- “We are the knights who say… ‘Ni!’ - The Knights of Ni to King Arthur in Monty Python and the Holy Grail
- “I’m sorry Dave, I can’t do that.” - Hal to Dave in 2001
With great anticipation I clicked on the link from Digg, wondering what interestingly geeky movies I might have missed.
Delightfully, however, it turns out I’ve seen all of them, and own most of them.
The comments hold a bunch of others, and I would have to say that:
1) The Star Wars and LOTR sagas both need to be in the list.
2) I would have put Blade Runner in place of Darkman
3) Sneakers was lame.
4) I liked Primer, but it is pretty confusing, and not for everyone.
5) same for Donnie Darko
6) 2001 probably should be in the list
7) Independence Day isn’t really imaginative enough to deserve to be on the list.
Tron - meh.
9) Jurassic Park is a must!
10) Dark Star is quite good, but definitely not for everyone.
11) Silent Runnings - the same
12) Alien and Terminator both belong. Predator, not so much
13) Big Trouble in Little China & Buckaroo Banzai are two of my all-time favorite geek movies.
14) The original Planet of the Apes series is great campy fun. The new one sucked.
- What is a useful application of the Y Combinator? I found a JavaScript example, which I understand syntactically, but I don’t see the point. Is it just the “flavor of the month” in geek one-uppedness?
- Finding an implementation of Haskell that runs on MacOS would appear to be an exercise in pain and IRC. Both of which I try to avoid.
- I love the way that everyone and their brother is telling us what the “characteristics of a great programmer” are. Two observations:
- The lists are always different in significant ways
- The writer always seems to feel that they themselves have most, if not all, of the characteristics of a great programmer.
So really these posts should all be read as “Here’s why I’m a great programmer.”
Update: Reg Braithwaite says “Learn the Y Combinator because it makes you a better programmer.” He then proceeds to write a blog post showing how he does exactly that. Which, while I respect Reg a lot, is yet another example of “Here’s why I’m a great programmer.” Reg’s approach, of course, is completely different from all the other posts on the same subject.
For the sake of argument, assume that every single of them is telling the truth, and that they are all, in fact, great programmers. What can you infer from that?
Update 2: In the comments, Reg insists he is not, in fact, a great programmer. I’m not sure I can agree with him on that :)  He also insists that his approach will make one a better programmer, not a great programmer.
February 1, 2007
I’ve been looking at 9 things you may not know about javaScript, and I thought it would be interesting (where appropriate) to see if ActionScript 3.0 shows the same behavior (where appropriate)
- (Binary Trees) - nothing to add here
- (Concat Performance) - counterintuitively, ActionScript is almost twice as fast with concatenation as it is with Array.join
- (Binding Objects To Methods) - works exactly the same in AS3 as JavaScript
- (Custom Sort Functions) - works exactly the same way in AS3 as JavaScript
- (AssertException) - similar. I created a seperate class, for clarity, and when you throw the exception it pops a message up on top of the app, which can be disruptive if you’re in production. I suppose you could turn off that behavior in production.
- (Static Variables) - ActionScript 3 has native support for static variables
- (Undefined, Null and Delete) - slight behavior change here. delete seems to remove a property, and both Alert.show() and Text.text reveal it as blank, instead of undefined.
- (Deep Nesting) - this one was the most significant difference - because everything in ActionScript3 is strongly typed, you can’t link a String to a TextInput.text element, for example. However, you can link objects to each other. For example:
if I have a Form a, with a FormItem b, and a TextInput c
I can do this:var linkTextInput:TextInput = c; // linkTextInput.text will always == c.text
But I can’t do this:
var textString:String = c.text; // if the user enters new text into c, textString will still contain the old text.
9. (FireBug) - there’s a built-in debugger in Flex, so none of this really applies.
Update: 2/2/07 - added #5, 6 and 7.
Update: 2/5/07 - added #8 and #9
I declare today, February 1st, 2007 to be New Years Resolution Amnesty Day.
In other words, you are hereby forgiven for not following up on your New Year’s resolutions. You have a clean slate.  You need no longer feel guilty about not following your resolutions.
You have been granted another chance to start them up again. No one will fault you for not getting started properly in January. After all, New Year’s day was on a Monday, so it threw off your whole schedule. January was a practice month.
I am offering you a second chance, a chance to re-engage and try again.
And if you make an effort today, even for fifteen minutes, you have created a new beginning. If, tomorrow, after you’ve started work on that book, or that program, or that exercise routine and someone asks you “How’s that New Year’s Resolution coming?” You can honestly say “So far, so good.”