Eclipse PDT, Zend Framework, PHPUnit

I am currently in love and coding some personal projects using Eclipse PDT with the Zend Framework as foundation. Unit testing is accomplished using PHPUnit.

I love the ability of Eclipse to be extended with plugins so that I can have intelligent code completion and integrated subversion client. To my surprise, Eclipse runs very well on my seasoned 4 years old notebook.

I am a learner by practice so late last year I tried to penetrate the Ruby team at my company. However I didn’t make it because of company re-organization so requisitions were suspended (or something like that). I guess Ruby and I was just not meant to be together.

Eclipse PDT

Zend Framework really helps a lot in building applications really quick minus the bells and whistles of nice graphics. I am incompetent when it comes to creating nice graphics with Photoshop. πŸ™

I am relatively very new to the MVC concept but I am very comfortable with it. It was just recently that I realize the importance of unit testing.

I must grab the unit testing concepts very quickly because I have just moved into a new role as a release engineer for a week. πŸ™‚

On another development, I was also doing some Flash ActionScript 2.0 a couple of weeks ago and experimented on the XMLSocket object. The Flash movie connects to a server, and since I needed threading I decided to use Java. Eclipse is also superb with Java codes since I think it was originally meant to be a Java IDE.

Signing off.

MacBook Air Is Too Expensive For Me

Hey hey hey… looks like MacBook Air’s price has been released in Malaysia. However when I took a glance at Machines Sunway Pyramid last weekend I didn’t see any hint (not even a flier) about MacBook Air.

The least expensive model is priced at RM6,299.00 (~US$1,949.25) – which is actually logical for an Apple notebook. However, analyzing the tech specs, I can get a very high-end x86 machines with that kind of money! Unless I have a never-ending flow of money, or am very rich, I don’t think I will get one of those. The most expensive model is RM10,899.00 (~US$3,372.74) which is jaw-dropping. πŸ™

In the States, the prices are US$1,799.00 (~RM5,813.46) and US$3,098.00 (~RM10,011.19) respectively.

Sure, the physical design is extremely beautiful. But if I really want to use Mac OS X I guess I can try installing it on a normal x86 machine. I guess we can’t expect a good balance between physical beauty and excellent tech spec!

I guess I’ll just have to forget about self-adjusting keyboard backlight and multi-touch trackpad. Michael Dell, I’m coming your way!

Sun Acquired MySQL

For those who have been busy or simply missed the news, MySQL has been acquired by Sun Microsystems (last month). There are many speculations on the effect of this acquisition, some good and some bad.

I just hope Sun will preserve MySQL as an open source project and keeps the dual-licensing option. According to Kaj Arnâ (MySQL VP of Community Relations) nothing bad will come. However Solaris users will definitely have an advantage as “Solaris has a special position in MySQL’s heart”. πŸ˜‰ I never really knew that MySQL was initially developed on Solaris!

The thing I remember the most is that when David Axmark (co-founder) was in Malaysia for Fosscon 2003 he mentioned that MySQL is named after Michael “Monty” Widenius’s (co-founder/CTO) daughter My (pronounced “me”) in 1983.

MySQL certainly have a very bright future, and I am actually happy that David and Monty decided not to sell to Oracle when offered in 2006. MΓƒΒ₯rten Mickos (CEO) said, “We will be part of a larger company, but it will be called MySQL”. MySQL is here to stay.

This is the press release on MySQL acquisition.

Related:

Oracle Buys Sleepycat Software

Plant A Tree While Buying A Dell Server

Yes, I have been busy.

I just want to share you an interesting finding while “shopping” for a server at work today. While customizing a DELL 2950 III server, at the end of the customization page Dell offers and Environmental Options section.

Want to help the environment? Through Dell, you can plant a tree to help offset the carbon dioxide emissions generated to power your new system.

DELL Tree Planting Option

I think it’s cool what they are doing. I wonder if they have a planting site somewhere where each tree is labeled with the buyer’s name? πŸ˜‰

Apple MacBook Air, Anyone?

MacBook Air

I can’t believe my eyes when I saw this notebook. It’s as thin as air hence the perfect name is given. At 1.94cm, it is as thick as two foolscap binders stacked on top of each other. The weight of 1.36kg is simply acceptable.

It looks like I made the right decision not to get myself a MacBook Pro late last year. Of course, we still don’t know how much it’ll cost and when will it arrive in Malaysia. It has just been launched in the States.

At that thickness I would never though this machine would be able to have the “almost” normal configuration. It comes with either 1.6GHz or 1.8GHz Intel Core 2 Duo processor, standard 2GB RAM, 13.3″ screen, the latest 802.11n Wi-Fi, built-in Micro-DVI output (VGA & DVI with provided adapters, S-Video & Composite with optional adapters), the cool backlit keyboard with ambient light sensor, and a battery that lasts for 5 hours.

Did I mention about storage? It comes standard with a traditional 4200RPM IDE (aka parallel ATA) or optionally a 64GB solid-state drive. The SSD is cool, and would be very invulnerable to shocks caused by moving round.

Well, that’s my summary. Go here for a detailed spec. Now, let me spend some time to watch the guided tour. πŸ™‚

To Be Or Not To Be

I wish I had found the site “Joel on Software” by Joel Spolsky earlier in my life. It contains a lot of precious insights and good points in the area of software development.

Being a partial developer myself, I would have never thought of doing programming as a full day job anymore in this lifetime. However, reading on how Fog Creek values their programmers made me realize that there just might be a light at the end of the tunnel.

I’ve also been reading Joel’s book: Smart and Gets Things Done. Although his style might not be suited for many people especially the typical management, I see it as a very good way to get good technical staff and to retain them in an organization.

Programmers are human too, and for everyone there’s a price. Just keep them happy and they’ll do a good job.

The book is an interesting read for those who can keep an open mind; programmers and management alike. Just don’t bother to get it if you already have a firm way of managing people and not willing to change. Trust me, this is no conventional way of managing technical people. Conventional managers will only scoop some of the points that are advantageous to them, not for everyone.

As for me I don’t think I’ll have any chance to work in the States, perhaps one day I can create such company myself. Who knows…

Local Ponzi Schemes Sprouting Everywhere

I don’t know about you but since several past weeks I have been receiving emails that claims to make you rich. Almost everyday, yeah. The unique thing about these emails are that they are in Malay, and originating from Malaysia and Singapore.

So far I can easily classify these emails into a few categories:

  • Mobile Wallet – pay as low as RM100 to them, activate your account via SMS and you can sell mobile products such as prepaid reloads. How can you be sure that they will not just take your RM100 and flee?
  • Easy Funds – pay some money, refer friends, and be paid. Ponzi!!!
  • Money pools – participate in a money pool. Pay about RM52 and be in the run for the jackpot of RM60,000+
  • Email Referrals – refer people via email and get paid.
  • Classic Ponzi or Matrix System – nothing special about this one. Everyone knows how a pyramid or matrix system will end.

Almost all of these emails claimed that you can be a millionaire in a couple of months if you join them. Are you kidding me?

One word of advice, it is better if you keep your money for something useful or invest it in a Government certified fund.

I know the Malaysian Securities Commission has been actively blocking many foreign sites for offering fraudulent investment programs, but I wonder how are they going to handle these which are originating from the country itself. Despite of warnings issued by the Government the number of people who fell into these traps are still surprisingly high. And when they realize what actually has happened they will blame the Government. Duh!…

IE7 and document.body.scrollTop

After being nagged by my Windows Automatic Updates for quite some time, I finally decided to give in and just install the IE7 update. I made a mistake by not backing up my IE6 files, or trying to find a method to have IE6 co-exist with IE7.

Anyway, I found that the document.body.scrollTop method to find out how much of the page has been scrolled down doesn’t work anymore. Now I have to use document.documentElement.scrollTop. And since the only difference of IE7 and IE6 is reflected inside a long string in the navigator.appVersion or navigator.appName objects, a little Regular Expression has to be built.

Here is the snip I ended up with, to cater both IE6 and IE7:

switch(navigator.appName)
{
  case 'Microsoft Internet Explorer':
    var myregex = /MSIE 7\.0/i;
    var myArray = navigator.appVersion.match(myregex);
    if(myArray.length > 0) scrollY = document.documentElement.scrollTop;
    else scrollY = document.body.scrollTop;
  break;
  default:
    scrollY = window.pageYOffset;
}

Anyone found a better solution?

Does PageRank Matter?

As many of us has experienced, Google has finally slapped everyone who has paid links on their site. PageRanks have been stripped off by as much as 2 on most sites. A good example would be this site which has been penalized from PR4 to PR2. I am not complaining, since I never have any good chance to analyze my site to abide by all of Google’s quality guidelines.

This event makes me think on how PageRank really matters for websites. It matters because all of us make it so, by acknowledging the authority of the scheme. Hell, I know I will be happy if my PageRank gets a certain boost.

Google has announced for quite some time now, that they don’t like paid links. This is understandable because this kind of link will effect the PageRank and search results. However this is a critical move for many bloggers who makes money via paid posts where they are not allowed to include the rel="nofollow" tags in the links inside the paid posts. And to make things worst – there is a cyclic dependency: PageRank will be lower for paid bloggers, and paid bloggers are ranked by PageRank.

Being an occasional paid post writer myself I realize that many paid post operators uses and acknowledge the authority of external ranking systems such as PageRank and Alexa. The higher their rank, the better chance they get to grab those high value posts. Alexa is still alright, since it is based purely on traffic but stricter schemes like PageRank is sure a pain for those who have been seriously blogging for money.

And do not forget: advertisers seeking to put paid links on your site will also look at your PageRank! πŸ˜‰

Once obvious thing for this site is the occasional paid posts, and the sponsored links. For now, I shall only put links from advertisers who agrees to allow the rel="nofollow" tag on their links. This way they will benefit from clicks and not from search engines. When I have the time I think I’ll look into the guidelines and use the Google Webmaster tool to ask for reconsideration.

How about you? How much does PageRank matter to you?

Why I Set Up VPN On DD-WRT On My Router

Everyday I receive a massive number of emails from many sources and half of them are valid (i.e. not spams). And at certain times I receive huge attachments from friends with pictures or other things. With a normal Streamyx ADSL connection this is fine, but when it gets hiccups my email retrieval process normally gets interrupted in the middle (timed out). 90% of the time my Thunderbird go nuts and corrupted its own “state” database. This means that it “forgets” which message it has downloaded and which has not.

This will not be a big problem if I set my email client to “delete from server” each time but I set it to “leave on server” as an online backup. I know I know I am a freak. Because of this, the next time it retrieves, my email client will download every message from my Inbox (which is in the thousands because I still keep my emails since 1997). This is insane.

I needed a more robust solution and as a Linux geek I used fetchmail to download my emails to a local server and set it to “leave on server”. From my observation, it does not have the same corrupting effect as Thunderbird when a timeout occurs. Good, one problem solved. Next, I set my Thunderbird to retrieve email from the local server which is faster than a speeding bullet. OK, I exaggerated. I set it to “delete from server” where the server is the local server. Good, another problem solved.

Now I have my emails intact regardless of what the connection condition is.

But… when I am on the road I have a problem to retrieve my emails. I heard someone is shouting, “why the hell don’t you just use the webmail?”. When it comes to email, I think I have Obsessive Compulsive Disorder. Except for GMail, I will need my Thunderbird to compose my emails.

This is when I realized that I can do something about it. I enabled a simple VPN server on my Linksys WRT54G router which I have flashed with DD-WRT. Here’s a complete guide that I followed: http://www.dd-wrt.com/wiki/index.php/PPTP_Server_Configuration.

I have never regretted since, but I do have to make sure that the connection to my home is stable enough. But please be warned that this will only work if the connection you are using allows PPTP pass through.

There you go, a story of someone having email OCD. What’s your excuse?

Oh BTW I also have a PAC (Proxy Auto Configuration) setting on my browsers so when there is a connection to the Squid box at home (the VPN is connected), it’ll utilize the cache. πŸ˜›

Spam or Not Spam

While monitoring some of the servers I am maintaining today, a user forwarded me an amusing email message:

Received: from [218.111.170.31] by web38606.mail.mud.yahoo.com via HTTP; Mon, 03 Sep 2007 07:01:19 BST
Date: Mon, 3 Sep 2007 07:01:19 +0100 (BST)
From: hairiehasnie <[email protected]>
Subject: Dear XXXX,
To: XXXX XXXX <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=”0-1107947314-1188799279=:79252″
Content-Transfer-Encoding: 8bit
Message-ID: <[email protected]>

–0-1107947314-1188799279=:79252
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

I use a good spam filter, and you probably do the same.
I have whitelisted you and that means that I will receive all the emails you send to me.
I would appreciate it if you would whitelist my email address: [email protected] in your spam filter.

If you don’t have a spam filter, I can recommend SPAMfighter. It is a highly effective free spam filter for Outlook and Outlook Express.

You can get the free SPAMfighter here:
http://www.LINKREMOVED.com/Pro

I hope that you will whitelist me, so we can continue to communicate safely via email in the future.

Best regards

hairie

This email is amusing because:

  1. It promotes a spam filter for Outlook, but this email is sent from Yahoo! Webmail
  2. The URL inside the email is neither phishing nor a referral URL

So I guess this hairiehasnie guy has nothing better to do. Who else has received this message? I am pretty sure it was not sent only to my user! πŸ˜‰ And yes, I put his email clearly here on purpose. Let there be SPAM in his email. After all he has SPAMfighter! πŸ˜€

Pidgin 2.1.1 Released

The official Pidgin 2.1.1 has been released, and the official Pidgin Portable 2.1.0 Released.

So since John T. Haller of PortableApps has packaged this, I will stop packaging Pidgin Portable for the public. This is the end of My Version of Pidgin Portable. Hope all who have used it found it useful. I guess the guy who have always accused me of embedding keyloggers will be extremely happy now. LOL.

PHP 5 In CentOS 4.5

Just a short sharing note, for users of CentOS 4.5 who is looking to update PHP to version 5 instead of the default 4.3.9 there is a clean and easy way to upgrade your PHP.

  1. Open up /etc/yum.repos.d/CentOS-Base.repo and look for the section centosplus:

    [centosplus]
    name=CentOS-$releasever - Plus
    mirrorlist=http://mirrorlist.centos.org/...
    #baseurl=http://mirror.centos.org/...
    gpgcheck=1
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
    priority=2
    protect=1

  2. Change enabled=0 to enabled=1
  3. Save the file
  4. Run yum update php*

And the rest is up to you… when it finishes restart Apache (service httpd restart) and you’ll be up and running with PHP 5.

How to check PHP version on the server?

Use rpm -qa | grep php and you’ll see the list of installed PHP packages. In this case PHP on the server has been upgraded to PHP 5.

php-pdo-5.1.6-3.el4s1.7
php-cli-5.1.6-3.el4s1.7
php-pear-1.4.11-1.el4s1.1
php-ncurses-5.1.6-3.el4s1.7
php-mbstring-5.1.6-3.el4s1.7
php-pgsql-5.1.6-3.el4s1.7
php-gd-5.1.6-3.el4s1.7
php-odbc-5.1.6-3.el4s1.7
php-common-5.1.6-3.el4s1.7
php-5.1.6-3.el4s1.7
php-snmp-5.1.6-3.el4s1.7
php-ldap-5.1.6-3.el4s1.7
php-mysql-5.1.6-3.el4s1.7
php-devel-5.1.6-3.el4s1.7
php-xmlrpc-5.1.6-3.el4s1.7
php-imap-5.1.6-3.el4s1.7
php-xml-5.1.6-3.el4s1.7

Good luck!