Monday, May 11, 2009

Factorial goofiness

It's Monday afternoon, and it's time for a silly post. Have you ever been browsing the Internet, looking at something completely code irrelevant, yet something struck you: "I bet I could do this in X language"? I saw a tshirt that said "factorial!", when something like that hit me.

Monday, May 4, 2009

Simplifying the JDBC

The title of this post may raise some brows, but I mean what I say. You see, I do a lot of little batch scripting with sqlite databases, and since Scala is my scripting language of choice (as of this writing), I interact with the JDBC API quite a bit. In my situation, it would be silly to import all the 3rd party libraries that make it simple (the big ones being Spring JDBC and Hibernate). Allow me to show you what I mean...

File utilities and the beauty of closures

Arg! I made the same mistake again. You know: the one where you made a bad svn commit, and there are those pesky .svn folders everywhere. Well, it happened to me twice in the same night, and I'm too lazy to delete them by hand. I decided a simple Scala script would do the trick.