I finally got a chance to play around with Ruby on Rails. I looked around for a simple and straightforward tutorial that covers the basic, and settled with Curt Hibbs’ Rolling with Ruby on Rails on ONLamp.com. It’s a two-part article. Not overly long to follow, like 30 minutes or so (including searching and reading some API documentation), and I got a functional application at the end of the tutorial. All without too much knowledge about Ruby language, just have some prior understanding of the MVC (model-view-controller) model general concept and you’re all set.
Ruby on Rails is what J2EE should have been.
Oh, man, was I ever excited! After finishing that tutorial, I immediately searched for information about the existance of an Oracle adapter for ActiveRecord. It turned out that there is one, it’s included in recent versions of ActiveRecord and is based on the ruby-oci8 driver. I started my development Oracle server and immediately generated a scaffold for a test model. There were two minor problems. The first problem was that my table and column names did not follow the proper naming conventions expected by Rails, so I had to override it in the model class with set_table_name (doc) and set_primary_key (doc). No worries. The second problem was that the web server seemed to freeze after about 5-10 seconds of inactivity. It must have been something to do with the oci8 driver or ActiveRecord’s oci8 implementation, because it worked flawlessly with mysql. I didn’t have time to investigate further. It was good enough for me for now. I’m sure if it really was a problem with the driver then someone more knowledegable will catch it real soon and we’ll have a fix.
So, in conclusion, I wish Ruby on Rails had existed many years ago therefore, it could save me many weeks worth of tedious and error-prone coding. It beats PHP and J2EE any day. I will definitely use Ruby on Rails for my next web development project. And to summarize for those of you that are lazy or don’t have the time to follow the tutorial, install Ruby on Rails, then create a table in your database called products with these columns: id, name, description. Then create the rails structure with rails productlist, go inside the newly-created productlist directory, edit config/database.yml accordingly then run ruby script/generate scaffold Product. Then run the built-in WEBrick web server with ruby script/server then open your browser and go to http://127.0.0.1:3000/products. VoilĂ ! That was ‘hard’. Now you can concentrate on what’s important, your application and its design, not tedious, repetitive and error-prone coding.
Mutt has a little-known feature to detect duplicate messages. I’m quite sure it detects duplicates by their Message-ID header, but it could be from something else in addition to that. You can do a pattern match duplicate messages in a mailbox and do whatever with them, e.g. delete or move them somewhere else.
Let say you want to delete all duplicate messages in the current mailbox. Just do a tag-pattern (bound to T here), put in ~= as the pattern, then all duplicates will be tagged. After that, you can delete tagged messages (bound to ;d, or just d if you have $auto_tag=yes).
Duplicate messages are also indicated by = in the thread if you sort the messages by thread and you have $duplicates_thread=yes (it’s yes by default).
Another MD5 collision has been found. They provide two files as a proof of concept. These are practical, not theoretical, real-life (looking) files.
ronny@mambo:~/m$ ls -l
total 8
-rw-r--r-- 1 ronny users 2029 Jun 11 00:20 letter_of_rec.ps
-rw-r--r-- 1 ronny users 2029 Jun 11 00:20 order.ps
ronny@mambo:~/m$ diff letter_of_rec.ps order.ps
Files letter_of_rec.ps and order.ps differ
ronny@mambo:~/m$ md5sum letter_of_rec.ps order.ps
a25f7f0b29ee0b3968c860738533a4b9 letter_of_rec.ps
a25f7f0b29ee0b3968c860738533a4b9 order.ps
Should we start considering replacing or even combining MD5 usage with “stronger” alternatives like SHA or Tiger? Any others?
(via Bruce Schneier)
Calling all bloggers and graphic designers!
We need a logo for Planet Terasi. Based on suggestions from Avianto and Pujiono, I’m going to hold a Planet Terasi Logo Contest.
Update: Thomas offered an additional prize for the winner! Read below.
Update: This contest has officially ended with no winners, since there were no submitted entries. Thanks.
Read the rest of this entry »
Oh my God! This thing has been around for years in Indonesia (and most Asian countries I assume), and they just caught up with it now?! These electric mosquito rackets are really a lifesaver, by the way, speaking from the perspective of someone who has experienced living in a tropical country where the number of mosquitos seems uncountable and keeps growing every day, no matter what time of the year it is. The species that lives and breeds in Indonesia is equipped with bionic eyes and supermosquito speed, unlike their cousins in Canada which are bigger but much dumber and slower. The mosquitos in Indonesia are especially cunning and well trained to maneuver human attacks, normally in the form of hand grab swoosh, hand clappings which makes a loud noise but no kill, or using any kind of large but usually thin and round or square object like a book, sapu lidi, or body pillow. All these usual kinds of attack are no good, unless you’re Flash. I can hear the mosquitos laughing while avoiding these attacks with great ease.
I love these electric rackets! Not a lot of effort is needed to use this racket. Just swing the racket while pressing the button. I always zap them 99% of the time. It gave me a certain satisfaction each time because these mosquitos are unbelieveably annoying. These rackets are relatively inexpensive and easy to get in Indonesia. I haven’t tried them with flies yet. I might get one of these electric rackets here in Sydney if I can find them in Chinatown because apparently it’s illegal to just bring them in to Australia without special permission from the government. The flies here in the summer are crazy, you wouldn’t believe it.
Update: OK, here’s something new that BoingBoing informed us, research showed that when the bugs exploded after being zapped, the bacterias and what not inside their guts are spread into the air and causing potentially more harm than the bugs themselves. It’s probably not such a good idea to use these rackets or other bug-electrocution devices that cause the bugs to explode after all.