Even More Happily Employed at Google
03 Mar 11

On the teaching of programming

Thanks to my friend Peter Boothe, I found a blog post urging me (and anyone who read it) to make a pledge that they wouldn’t teach Java at the college freshman level or earlier.

Intrigued as to why java was singled out (but not say, C++), I continued reading. The author makes a great point:

Here’s a common error — it’s a faulty method declaration.

public void foo();  
{    
    // blah, blah blah
}

The error you get is: missing method body, or declare abstract. Sure, that message makes sense if you understand about semi-colons and blocks, but if you don’t…”What’s abstract?!? I have a method body there — why doesn’t it see it?”

Here’s the one that I saw multiple times (both versions), which I find just infuriating.

while (a < 4);
{
    // do something in here, and probably change "a"
}
if (sometest());
{
   // do something if true
}

These are infuriating because there is no error — the first generates an infinite loop, and the third one just always executes the body, ignoring the result of the test. Programs don’t work, and the compiler gives no clue that the students did something that only experts can handle correctly.

Fortunately, there are solutions to this problem. The clang project has shown us that we can have excellent error reporting for C++ (I use it at least once a week), and if we can do that well on C++ errors, Java, with it’s relatively easy-to-parse spec should be a piece of cake. Anyone know if there’s a project to drastically improve Java errors?

Comments (View)
20 Nov 09
(Moments later, the White Witch rolls up and, confused, tries to tempt the probe with a firmware upgrade.)

(Moments later, the White Witch rolls up and, confused, tries to tempt the probe with a firmware upgrade.)


Comments (View)
19 Nov 09
Comments (View)
09 Nov 09
Canadian history can be best summed up as ‘Quebec said no.’
SuperNintendoChalmer
Comments (View)
08 Nov 09

My New Favorite Song

We’ve recently begun singing a new song at church that I absolutely adore:

Micah 7

What misery is mine?
The fruit that I desire
Does not remain.
The upright man is gone
And those that love your name
Cannot be found.
But I will wait for God
And His forgiveness will
Hear my cry.

Chorus:
Who is like God,
Who pardons sin?
Who is like God
Who won’t forget
The oath of grace
He made long ago?

I’ve sinned and I should bear
The indignation of
The Lord my God.
But Christ has plead my cause,
And He will satisfy
The debt I owe.
He’ll bring me to the light
And then I shall be free
To bless His name.

Chorus.

Comments (View)
07 Nov 09
[Flash 9 is required to listen to audio.]

Possibly my favorite Death Cab for Cutie song ever. (‘Death of an Interior Decorator’ from ‘Transatlanticism’)

Comments (View)
07 Nov 09
hexodus:

aaronwhite:

Good lord, what has science done?!
(via hiten: iomegadrive agentmlovestacos)

hexodus:

aaronwhite:

Good lord, what has science done?!

(via hiteniomegadrive agentmlovestacos)


Comments (View)
05 Nov 09
Common sense would tell me it would be easier to grind up rocks into sand with my bare hands in order to make kitty litter than it would be for me to brave the slew Christmas shoppers at Walmart.
Violent Acres
Comments (View)
03 Nov 09

Things I Need (Part 1)

I’m going to start a mini-series on this blog of the things that I think I, as a programmer/system administrator need. I have not been able to find anything similar in a quick google search, so I’m crowdsourcing. Who knows, I may even add it to my list of projects.

Anyway, the thing I really need is a http server that is fast enough/secure enough/robust enough to compete with apache, but with a configuration file syntax that is a) simple enough for a novice server admin to create virtual hosts and rewrite rules, and b) translatable into an equivalent apache configuration. In other words, the webserver shouldn’t depend on a deep understanding on my part of how virtual hosts work — it should just handle the common cases, and shouldn’t worry about supporting wierd edge cases. In particular, it probably shouldn’t worry about IP-based virtual hosts as much — those can be handled by having multiple instances of the server running, bound to different addresses.

Comments (View)
02 Nov 09

My Rails Journey, Part 1

Just installed Rails, using the always excellent resource at Hivelogic. One thing I noticed right off the bat — gems take forever to install, especially at the point where it’s installing the documentation. Such a change from the days of easy_install in the python world :(

Comments (View)