Monday, June 9, 2008

ah compact ruby!

I have this problem of messing up my desktop all the time.I keep all sorts of temp stuff(files and folders and short cuts) on the desktop and forget to clean up and before I know its one BIG mess.Since I am trying to pick up on a bit of ruby I tried writing a little script that would clean the desktop for me and put all the stuff i haven't touched in a while into a temp folder somewhere

Not to mention wifey was in a bit of a bad mood and I was better off looking busy :-)

I must say Ruby's code was much compact and more elegant than what I would have been able to do with Java.With some basic error handling and re factoring everything into logical methods it was still just 35 lines of code

No comments: