HwanJoonChoi.com

HwanJoonChoi.com

Dec 25 / 11:44pm

fall through case sucks

ugh just wasted an hour tracking down a bug (Objective-C), only to realize i left out a break statement between two case blocks. this ended up looping between the two cases.  i seem to recall someone telling me i should avoid switch statements at all cost, because it offers very little benefit (and these bugs are bound to happen). ruby got it right with their "when 1,2,3" style switch statements.

on a plus side, i found a royalty-free (donation based) music archive. has a pretty decent collection of reggae music, so i guess i'll be makin g a

Filed under  //  dev   objective c   ruby  

Comments (0)

Dec 13 / 3:14pm

start mongrel on reboot

[/etc/init.d] $ cat curling-site.sh
kill -9 `cat /(blah)/curling/tmp/pids/mongrel.pid`
rm /(blah)/curling/tmp/pids/mongrel.pid
cd /(blah)/curling/
/(blah)/curling/script/server -d -p300
[/etc/init.d] $ update-rc.d script_name defaults
Filed under  //  bash   dev   ruby  

Comments (0)

Apr 26 / 6:51am

mod_ruby

Got mod_ruby to work with apache on my home ubuntu machine.  I wanted to basically replace my php scripts with Ruby without Rails (though I suppose I could have used this chance to learn Python).  Setting it up was pretty painless, but this post helped me get over one last problem I was having.

Filed under  //  apache   mod_ruby   ruby  

Comments (0)