• One stupid thing you can do with a UNIX shell and root access

    sudo chown -R dick /

    instead of

    sudo chown -R dick ./

    You won't be able to su - or sudo to chown the ownerships back properly because the sudo executable needs to be owned by root. Some people should never have unfettered sudo rights... like me.

  • Determining web page size - the wrong way

    Got an email today that disputed web page sizes I reported (diplomatically telling me to get my facts right):

    Regarding the size, if you save the homepage as webpage complete you can get the size of the iframes files individually.

    <teenage-angst>Ick... Learn to use Firebug or a Web Page Analyzer. Or anything else that does better than saving the page from a web browser.</teenage-angst>

  • Essential Firebug video for web developers

    If you're doing web development or design of any sort, you have to check out Joe Hewitt's talk on Firebug at Yahoo! - download the movie or watch it online, just make sure you watch it.

    If you aren't already using Firebug, this will convince you. If you are, you'll probably find some gems in there that you didn't know before. I didn't know that you could log events to elements on the fly, or press the up and down arrow keys to adjust numerical values (such as margins and paddings), or edit the values in the box model layout diagram, or hover over variable names to see a tooltip of their values in the JavaScript debugger, or conditional breakpoints.

    Now if only it were able to detect JavaScript syntax errors that cause an entire JS file to be ignored by the browser.

  • BarCamp Singapore Jan 2007

    I just got back from BarCamp Singapore a few hours ago. I was only vaguely familiar with the Rules of BarCamp prior to this, and actually only found out about the event from Choon Keat (of RssFwd fame - check it out if you haven't already) 2 days ago.

    Anyway, props to the organizers for putting this together (especially the free BarCamp t-shirts from Yahoo!). Personally, I felt the icebreaker game took up too much time that could have been used for the sharing sessions - the tech track of sessions were crammed up towards the end of BarCamp.

    BarCamp Singapore logo


    Notably, Harish Mallipeddi, who interned at Bezurk for a couple of months, shared with us an introduction to Django together with some working code on a site he is working on. I didn't know a whole lot about Django before and was impressed that there is a "free" admin application for Django applications. We (Choon Keat, Harish, and I) had a small debate over Django's templating system (briefly, Django has it's own templating system for its views, whereas Rails ERB is basically Ruby code mixed in HTML). To this day I am still convinced that PHP is already a templating language despite my old Smarty card-carrying days. Relating back to the Django templating system, Choon Keat and I didn't like the idea of having to learn to use a templating language when the base language itself (Ruby or Python) would suffice. Obviously Python syntax wasn't suitable for web designer consumption so Django had to come up with its own templating language.

    Michael from PetrolWatch showed us some flashy scriptaculous effects on his site and demoed the Ruby on Rails-inspired CakePHP. It's a nice framework if you had to use PHP and performance is a concern (it's true, Rails apps run more heavily than PHP scripts, and the difference in performance is very clear in servers with minimal resources). But the lack of a good testing framework was discouraging. Still, I must say I'd have used it (or a similiar framework) if Rails didn't exist or if I was tied to using PHP for web development.

    Choon Keat showed the non-believers the power of Rails' script/console as well as the flexibility of Ruby in allowing developers to make their own extensions to existing classes (aka "who needs hooks from God?"). I probably should have stepped in and showed some basic Rails migrations stuff that would have impressed (hopefully) the Django and CakePHP fanbase (all 2 of them) - but my laptop was running out of battery (and I was shy).

    Oh and I saw a good number of Macs there, and at least 3 laptops running a Linux distro of some sort. Cool.

  • RubyGems 0.9.1 - required update

    RubyGems has been updated to 0.9.1 and is a required update due to a security issue. The blog announcement reveals more:

    The most important change in RubyGems 0.9.1 is that RubyGems no longer allows files to be installed outside of the installation directory.

    It's a required update as the RubyForge gem repository will soon disallow installation of gems if you have an older version of RubyGems.

    Anyway, a new feature I found very useful is gem outdated, which lists the gems you have installed that are currently not the latest versions (I just realized that mongrel is actually already up to 1.0 RC!). And don't forget multiple gem uninstallation with gem uninstall.

    Update your RubyGems by running:

    gem update --system

subscribe via RSS