Thursday, February 17, 2005
Google Cheat Sheet
Wednesday, February 16, 2005
Nostalgia tripping
Pretty quickly I was able to put together a very simple GUI application for converting between Celsius and Fahrenheit. This was a first day exercise when I taught five-day NeXTStep bootcamps back in '93-'94.
Of course, some advancements have been made such as alignment guides within InterfaceBuilder. There are probably many more, but I didn't find them in my 30 minutes of play time. (I also had to get used to a one button mouse.)
Monday, February 14, 2005
"Do not fail your species"
Friday, February 11, 2005
Heavy metal umlaut and other scholarly topics
How can people say the Internet is full of drivel?
Tuesday, February 08, 2005
Serialized Dickens (made two ways)
Take a look at the Discovering Dickens project at Stanford University for a different take on serialized Dickens. They are distributing reproductions of Dickens' Hard Times as it was originally published. You can download PDF files or you can actually have paper copies mailed to you. The site also has the PDFs for their past novels (A Tale of Two Cities (2004) and Great Expectations (2003)).
Friday, January 28, 2005
Geeky Friday: find, xargs, grep, and spaces
find . -type f -exec grep "blah" {} \;
find . -type f -print | xargs grep "blah"
The second method is slightly better as the grep command will be run only once on all files found whereas the first will run grep for each file.The second method breaks down if find finds filenames containing spaces. If, for example, there's a file named "How To Conquer The World.txt". The xargs grep part will try to search in five files: "How", "To", "Conquer", "The", "World.txt" and grep will complain that these files don't exist.
But wait, it's 2005, surely the geeks of the world have resigned themselves to the fact that some people like to put spaces in file names -- not out of malice towards linux geeks, but just because they don't know what it can do. The good news is that yes, in fact, the geeks working on find and xargs have done something about this.
Their solution is to provide an alternate file name delimiter. The new way to handle this is to do this:
find . -type f -print0 | xargs -0 grep blahThe -print0 tells find to output its list of files separated by nul (ASCII 0) instead of a space. Similarly, the -0 tells xargs to expect that its input is separated by nulls
Friday, January 21, 2005
Geeky Friday: The Daily WTF
Here's a beautiful example:
boolean exceptionFlag = true;
try {
initializeResources();
compareAggregates();
exceptionFlag = false;
} catch(Exception e) {
if(exceptionFlag) e.printStackTrace();
}
if(exceptionFlag) throw new Exception("An Error has occured");
(Sorry non-geeks, it'd take too long to explain the humor in this)
Thursday, January 13, 2005
Geeky Friday (but not as geeky as usual): Aggregator Bliss
I started using an aggregator last summer and I think it's so cool that I wrote an article explaining how it has improved my surfing, what it does and how to get started.
Monday, January 10, 2005
Clever programmers
Friday, January 07, 2005
Geeky Friday: Make Firefox Faster
Place The State
Note that this is the intermediate version of the game. Since it keeps the states you've already placed, it becomes easier with each turn to place the remaining states. There's an advanced version of this game available at the front page of the site. In the advanced game, you have to place each state independently. I tried it once and finished with an average error of 25 miles.
Next I'll try one of the "place the country games".