Archive for June, 2010

TV presenter win

Tuesday, June 22nd, 2010

“The good thing for North Korea is that the way it’s reported back in their country, they won that game, 9-0.”

(Portugal vs. North Korea, 7-0)

puush: screen capture

Friday, June 18th, 2010

puush is up and running! You can instantly upload any portion of your screen or files using keyboard shortcuts, which will automatically upload and leave behind a URL in your clipboard for easy sharing. Good job, peppy.

Office 2010 is out!

Wednesday, June 16th, 2010

You can grab the academic version for $99 from Microsoft at http://www.microsoft.com/student/office/en-nz/default.aspx.

Perl, anyone?

Thursday, June 10th, 2010

Remember the good old times when we were trying to see who could write the shortest “guess-a-number-from-1-to-100″ game on a Casio graphics calculator?

I took the night off to read the official Perl introduction and came up with a Perl version of the game. I know it’s very icky, but I did it in 10 minutes and it’s my first time using Perl, so you can’t really expect that much:

#!/usr/bin/perl
my $ans = int(rand(100))+1;
for (my $c = 0; $c < 6; $c++) {
    my $guess = <STDIN>;
    die "invalid input" if ($guess !~ /^[0-9]+$/);
    print "bigger\n" if ($guess < $ans);
    print "smaller\n"  if ($guess > $ans);
    win() if ($guess == $ans);
}
print "lose\n\n";
exit 0;

sub win {
    print "win\n\n";
    exit 0;
}

The validation for input could probably be better if it was

/^[1-9][0-9]*$/

but in the end it’s only a minor thing.

Perl’s not as nightmarish as I thought it’d be. Sure, the sigils are a bit of a nuisance but once you get over that it’s not terribly bad (and you’re probably used to shift+4 from PHP anyway :P ).

Quality of Study Notes

Wednesday, June 9th, 2010

This is something I recently (as in very recently) noticed, a disturbing trend on the quality of my study notes:

Basically, no notes for stuff you know extremely well, but the most detailed notes are usually for the stuff you know fairly well already anyway, and the stuff you don’t know usually has the worst notes. That’s not a very effective way of writing notes or an effective way of studying, since you don’t really learn anything anyway…?