Tuesday, November 22, 2005

USD100 notebook

  • Speed: 500MHz
  • OS :a 'light' version of Linux
  • Screen : two-modes color or black-and-white display for
  • view in bright sunlight at four times normal resolution,

  • Power: AC adapter or via a wind-up crank
  • 10-to-1 crank rate- one minute gets ten minutes of power.

    The laptops will be rugged and probably made of rubber.

  • 4 USB ports
  • Wi-Fi
  • cell phone
  • 1GB of memory

    Each laptop will act as a node in a mesh peer-to-peer ad hoc network
    allowing internet sharing on a single online connection.

    Man I wish they will make this a reality soon. It will surely close the 'digital divide'. Imagine our kampung kids using USD100 notebooks !!!

    More info from PC World Article and developer MIT Media Labs
  • Thursday, November 17, 2005

    Oracle - List all tables

    Ok I'm using Oracle databases with PHP scripts for the first time. I'll start posting my 'personal notes' on Oracle + PHP.

    List all the tables used in the current database that is open:

    select table_name from user_tables

    Friday, November 11, 2005

    Still using DOS

    Here's one of my DOS batch scripts that I still use to backup my source code

    Can't imagine after all these years I'm still using DOS batch file and DOS Rar to help me with my daily backup.

    useful because it compresses all the files in a folder using RAR and names the compressed file according to the date (yyyy-mm-dd).

    @echo off
    echo Backing Up RHB Fin files
    echo =============================
    rar a -m5 -r c:\backup\rhbbackup%year%-%month%-%day% c:\www\rhbproj1

    :GetDate yy mm dd
    :: By: Ritchie Lawrence, 2002-06-15. Version 1.0
    :: Func: Loads local system date components into args 1 to 3. For NT4/2K/XP
    :: Args: %1 var to receive year, 4 digits (by ref)
    :: %2 var to receive month, 2 digits, 01 to 12 (by ref)
    :: %3 Var to receive day of month, 2 digits, 01 to 31 (by ref)
    set t=2&if "%date%z" LSS "A" set t=1
    for /f "skip=1 tokens=2-4 delims=(-)" %%a in ('echo/^|date') do (
    for /f "tokens=%t%-4 delims=.-/ " %%d in ('date/t') do (
    set %%a=%%d&set %%b=%%e&set %%c=%%f))
    endlocal&set %1=%yy%&set %2=%mm%&set %3=%dd%&goto :EOF

    Wednesday, November 09, 2005

    Firefox quietl first birthday

    It's PC Mag no. 1 tech product of the year and of course many techies favourite browser.

    I love FireFox!!!

    They celebrated their very first birthday rather quietly.

    Firefox quietly celebrates first birthday

    Ingrid Marson
    ZDNet UK
    November 09, 2005, 12:00 GMT

    'I don't think there will be a big party, as we are all very busy putting the finishing touches to Firefox 1.5,' says the president of Mozilla Europe

    The open source Firefox browser was launched a year ago today, but the celebrations are expected to be low-key.

    Here's a funny conversation I had with one of our company's customer.

    Customer: "Your program got error la in IE".

    Me: "Huh?? You still use IE ah ?? That Spyware magnet??"

    Custommer: "Here in office everybody use IE. Boss don't like to use funny browser like FireFox. IE is defacto browser - industry standard".

    Me: "Ok. Your funeral. Let me fix the error and send back to you .."

    Friday, October 21, 2005

    Dumb Web Programmer under Dumb Project Manager

    I used to write code that is template based
    where programming code is separated from html.
    My favourite templating engine is Smarty.

    Hey that's how web programmers like me keep my sanity.

    Mixing PHP+HTML is ok for small projects but really
    is stupid for a large system we are developing.

    But lately since we got a new project manager that has
    no idea on good software engineering principles (things
    that you learn in first year of a computer course
    whether at diploma or degree level).

    Heck, I'm a DUMB web programmer and even I know that.

    This dumber than dumb project manager just wants things
    fast. We realised even showing him our code one day that he
    doesn't care about code maintainability - either that
    or he is just ignorant of the fact.

    But I don't care now since we are being pushed with tight
    and impossible deadlines to meet. Staying past midnite
    on a Friday night is not my idea of fun.

    So from now onwards I've been writing rojak coding mixing
    PHP with HTML in one file. I don't care.
    And it is effective!! I seem to be churning out code twice
    as fast and my project manager is impressed.

    My project manager don't care as long as deadlines are
    met. Of course the system will be a pain in the ass to
    maintain later on.

    Why do I care?? I will be gone in oh.. say 6 months time.

    LiewCF and Kah Soon, I'll be joining you guys problogging by
    then hopefully.

    Monday, September 26, 2005

    Whatever happened to LiewCF

    It's been a solid 48 hours since the problogger Liew CF posted a blog entry?? Usually he will post a few articles per day.

    Note: I noticed that 10 seconds after posting this I got a spam post on my comments.
    Somebody wrote some API hook to Blogger to spam comments. Sheesh!

    Sunday, September 25, 2005

    Opera Mobile on USB

    By now everybody would have known opera 8 is totally free (no ads).

    This website www.Opera-USB.com tells you how to put Opera into a thumb drive.

    All you need is a thumbdrive min 32Mb - but nowadays tell me where can you find a USB drive LESS than that??.

    Super cool as I can take my personal preferences wherever I go. Oh yeah can throw stupid IE away :)

    Wednesday, September 07, 2005

    PHP is alive!!

    It's so depressing to think that the programming language I specialise in, PHP, is rare and little used in Malaysia.

    However all that changed last week. I got two calls from head hunters looking for PHP programmer.

    I will most probably leave my current job which have banned internet from the office. I don't mind getting any other PHP programming job as long as they give me internet access to do my R&D.

    Thursday, July 28, 2005

    Programming- It's a dog's life

    After being a programmer for several years I really feel old, tired and plain fed up
    with this life.

    Don't get me wrong. I love programming and have a good pay but the company I
    work for is just too money minded. Heh! What am I saying ? Of course companies
    have to money minded to survive in this cut throat business.

    But lately I'm seeing more projects being brought in and me being overburdened. It's
    like a cheap sweatshop here - just like a factory workers - we churn out code after code.

    Finish one project and another comes in. Long briefings on what to do. Tons of documentation to go
    thru. Hundreds of bug-list to fix when the final code is launched for testing.


    To add to the burden, all programmers' Internet access has been revoked.

    The bosses and share holders don't care about reputation as they get in more and more new projects
    while the rush for completion results in more errors and bugs in the final production codes.

    All my superhuman efforts in meeting deadlines is not really appreciated. Some of the codes
    that I thought were ingenious just go unnoticed.

    Our present customers are getting angry but they don't care... as long as they can get new customers.

    Man, I know this is definitely the way to long term corporate death. So just waiting for the day
    this company keels over.

    However, from the profits so far collected I think this company may outlast me. It's a dog's life...

    Sunday, July 17, 2005

    Test Blog

    Test blog message sent from email.

    Thursday, July 14, 2005

    No Internet access.

    That's what the company said today.
    Man how am I going to do any work without any internet access?
    Sure, HR have a point that Internet is the big time waster as
    many employees just browse aimlessly at company's expense.

    But what about a web programmer like me? I've lost access to my
    favourite Guru on the net - "Mr Google".

    I've brought up my predicament to my bosses and they say that
    I can do my R&D later at lunch or after work using our
    pathethic "public PC".

    I am seriously thinking of leaving the company now..

    And oh, I'm blogging this from my handphone at my own cost.

    Saturday, June 25, 2005

    What the hell is BlogShares?

    I did a search for "dumb web programmer" (that's me!) on Google and to my surprise I was listed as No. 1.

    Image hosted by Photobucket.com

    However it was listed indirectly thru BlogShares. What the hell is BlogShares.

    It looks like a blog directory with some strange way of valuating blog sites.

    Friday, June 24, 2005

    Movie Review: Madagascar

    Finally got some free time to go out and watch a movie!! I even missed Star Wars because of my work. You can thank my boss for the late nights...

    Anyway I watched the movie below. (Forgive me as the below is the best pictures I can get - its for mobile phones wall paper !!)

    Madagascar is perfectly fun and cute.

    It’s definitely more entertaining than the likes of Robots or Shark Tale.

    I loved the scene where Alex the Lion gets hit in the nuts.

    I question some scenes where we see cute little animals get eaten though.
    Is that suitable for 5 year olds :)

    The Penguins are the funniest creatures IMHO.

    Now, entering the wild brings out a very interesting conflict.

    Alex, the lion (Ben Stiller) has to fight his natural urge to eat his friends when his steak supply is suddenly non-existent.
    Poor Alex has to exile himself to keep his friends from becoming his snack.

    But it comes at the end of the film and only plays out and everything is humky dory.

    The holes??

    1. Did you notice that they were mostly on the beach most of the time.
    2. Where are the other lions? Are they no lions in Madagascar?

    Hmm... can't put up pictures of the film as I'm unsure of the copyright thingy.

    Anyway, I put up some 'pictures' from my affiliate membership to a mobile phone content account.

    You don't have to (or under any obligation) to click anything here. I just included it here as eye candy relating
    to my 'movie review' that's all.

    Javascript: FrameBreaker

    This is javascript to break out of a frame. Useful if some website 'wrap' your content within their own frame. Place this javascript on your first page (usually index.htm /index.html) and break out of someone else's frame!

    <script language="JavaScript">  
       <!-- // auto-framebreaker
     if (top.location != self.location) {
        top.location = self.location.href
    } //-->  

    Tuesday, June 21, 2005

    Blogger: How to replace Blogger Favicon

    You know the blogger favicon. See below:
    Blogger's Favicon

    I was tired of that Blogger favicon and was wondering if I could replace it with my own.

    So I went about the net to find ways to do it. You know what? It was pretty easy.

    Here are the steps:-

    1. First I created a simple logo icon that contains my initials - DWP. (Dumb Web Programmer lah !!)

    2. I used PaintShop Pro but you can use Windows Paint too I guess.

    How to replace Blogger Favicon

    3. After that, I google-searched "Create Free Favicon Online" and found this great website:


    4. I just uploaded the picture I created (50x50 pixel GIF by the way) and I got my very own favicon created.

    5. Next I just added the following HTML code in my Blogger template:

    < rel = "shortcut icon" href="http://www.yourURL.com/favicon.ico">

    6. I didn't have my webspace so I uploaded the favicon into a friend's website. You could use some free webhosting space.(Geocities doesn't work as they filter out .ico files)

    That's it!!

    Get rid of the boring B logo.

    You can see the result above on your browser address bar.

    Monday, June 20, 2005

    PHP: Bad words filter

    Some stupid person started posting abusive words in my company's tag box (shoutbox) recently so I had to write a simple PHP function to find and replace all the bad words.

    Here it is. Not pretty or even efficient but it works!

    function filter($string) {
    for ($i=0;$i < count($badwords);$i++){
    $string = str_replace($badwords[$i],str_repeat("*",strlen($badwords[$i])),$string);
    return $string;
    Example usage:

    $post = filter($post);

    Wednesday, June 15, 2005

    Palm iPod killer?

    This is an IPOD killer!!

    The first time I read it in last week's Computimes, I didn't know what to make of it. Was it a PDA ? They didn't call it a PDA. Was it a MP3 player like the iPod?

    But it can view movies too.

    It has an internal hard drive just like an iPod. Over 4Gb worth of space.

    Then I read the specs.

    Oh .... it has a Palm OS and have software like DocToGo
    - so it's "just" a PDA but jam packed with features.


    The very first PDA that shipped with a hard drive was thhe Sharp
    Zaurus SL-C3000 but it was only available in Japan.

    Then came iPod as the very first MP3 player with a internal hard drive.

    My first looks: Very Impressive!!

    It weighs only 6.8 ounces but jam-packed with features that include:-

    • 416MHz XScale processor
    • 65MB of RAM
    • 4GB hard drive
    • 480 x 320-pixel
    • 3.9-inch TFT
    • SD slot
    • 802.11b
    • Bluetooth
    • plays MPEG and AVI video
    • plays MP3 audio
    • Palm OS 5.4.
    • USB cable interface

    • Negatives :-

    • probably the price : US 499 (Around RM2000).
    • Battery not swappeable - that's a big boo boo in my books. Cannot change battery when in middle of listening to song.

      PalmOne markets this as a "notebook alternative" and it's pretty cool.

      Still with the shortcoming of no extra battery, the LifeDrive is now no. 1 on my wishlist. I will get it at the end of the year with my bonus (provided
      there is one :)

      Related reviews and links:-

    • Mobile Tech Review
    • CNet Review

    Tuesday, June 14, 2005

    Funny Gif

    Here's a funny animated gif:

    Image hosted by Photobucket.com

    sent in by my friend Vickneswaran

    Got indexed by Yahoo in 1 day!

    Image hosted by Photobucket.com

    Wow!! I got indexed by Yahoo! in less than 24 hours!!

    Can you believe that??!

    I didn't even submit my sites anywhere. Funny thing is Blogger is by Google but I have not been indexed yet by Google. Did Google submit my site to Yahoo! That's a strange thing to do...

    Well anyway I'm proud that I'm the no.1 in Yahoo! Search for Dumb Web Programmer

    How long will it last? I don't care. Took a snapshot to remember it forever :)

    Monday, June 13, 2005


    Ah my first 3 cents from Google Adsense. Ok. Ok.I know it's a mere 3 cents but I just have to document my first online income. I am excited!!

    Wow! And all the tools I used here are free. Only real resource I've used is TIME which I've lots considering how many hours I spend in aimless browsing from site to site.

    He he... from now onwards I'm going to spend more time blogging!

    Thanks to Liew Cheon Fon of LiewCF.com for getting me excited in the first place.

    Google trying to be like Yahoo!

    Originally uploaded by dumbwebprogrammer.
    Google in an effort to make their search engine more personalised for users is shifting direction from a search engine with simple and basic bare features which made it famous (and also appealing to many users like me) to a more complex page layour. Think my.yahoo.com

    You can take a look at it here. Now you can include personalisation such as GMail, Weather, Movies etc just like in Yahoo!.


    Originally uploaded by dumbwebprogrammer.
    Now this is probably one of the best resouces I've found on the web for my web related stuff as well as online money making tips!

    Hail to the master of "Making Money in your Sleep".

    Just can't believe that people can really make money online just by blogging and posting some Google advertisement.

    I just registered with Google Adsense and hopefuly I can earn some pennies too. Will report my earnings if any here...

    Hail to the online money making guru - Liew Cheon Fong (LcF).

    His describes his site as "Probably the best Malaysia tech blog of latest news, gadgets, freeware, tips and tricks…"

    But I think of it is "The Best Malaysia tech blog of latest news, gadgets, freeware, tips and tricks…" !!

    Though I think his grammar needs a bit of work.

    It's "Malaysian tech.." not "Malaysia tech.."

    But then again who am I to correct his grammer :)

    flickr - Photo Tools for BlogSpot

    Originally uploaded by dumbwebprogrammer.
    Learning how to use free online tools to post picture on my blogger(blogspot) account.

    Tried Flickr (a company by Yahoo!). It lets you uploads pictures easily for free as well as lets you include the pictures into your blog.

    I see that it works well here!

    Anyway, quite cool for a dumb web programmer like me. What is surprising is that BlogSpot is by Google and Flickr is by Yahoo! - two of the biggest rivals in the search engine industry having their products work hand in hand with each other!

    To be fair it's Yahoo that's playing catchup in the blogging arena and it has features to update posts into Google blogger to have the pictures included.

    Still, it's an irony of sorts.

    Sunday, June 12, 2005


    Hi. I am a dumb web programmer. I am still learning the massive amount of knowledge needed to be a good web programmer. Hence this blog. It serves as a journal for my learning experience and also reference to problems I managed to solve but most probably forget the next day :)