PHP best practice: always wrap conditional statement in closing brackets

This has caught me today, so I thought I’d write this down here so it’d stuck in my head.

Check out this code:

$p = ‘abcd’.($b)?‘e’:‘f’;

What would $p be if $b is true and what would it be if $b is false?

Read More »

Posted in PHP | Tagged , | Leave a comment

My first taste of Flock Web Browser

I just tried this new web browser on the block called ‘Flock‘ - the social web browser. To me, it looks and smells too much like Mozilla Firefox with custom theme and collection of plugins that integrate popular services like GMail, Facebook, Youtube, Yahoo, Flickr, etc.

Flicker imageAccording to Wikipedia, Flock(web browser) has received about $30M funding. I was so dumbfounded-jaw-droped-shocked at first. I mean it is (at least from my brief observation) just taking Mozilla Firefox + theme + plugins. But then I realised, this is about collective advertising of the biggest websites on the planet, hence the amount of money reflects the brands, not the technology.

I think it is very clever how the people at Flock uses the best browser to build their platform on. I can definetely see other big companies follow suit and pay good amount of money to get their services featured and tightly integrated into Flock.

Would I use it? Yes, I think I would, or at least try it. I use many of the services already integrated into Flock web browser, so I think I’ll try it to see if it will make my online experience better.

Posted in Browser, Firefox, Flock | Tagged , , | Leave a comment

My oil price conspiracy theory

I think the expensive oil price has to do with Athabasca Oil Sands in Canada, the largest oil deposit second only to Saudi Arabia. The upside (to the West) is that Canada is a Western country, the downside? It is expensive to extract because the oil is in the sand and they have to separate them first using a giant boiler. E.g.: not as cheap as milking the oil out of the ground.

Now, if the Western countries are to reduce their dependencies to Middle East, they must start looking for alternaltive to cheap oil. And guess what’s an alternaltive of cheap oil is? Expensive oil!

The time is right to sell to the public that oil is expensive because of the war in Iraq and high demand in China and India. With the public convinced that the high price is caused by those ‘genuine’ reasons, if Saudi Arabia decide to cut off some oil supply, we can just switch to Canadian oil and the public would not notice the price (because it is already high). In other words, the high price is a conditioning excercise.

Ofcourse being a conspiracy theory, the high oil price might just be caused by war in Iraq and high demand …

Posted in Uncategorized | Tagged , , | Leave a comment

Firefox Guinness World Record for the most downloaded software in 24 hours with 8,002,530 downloads

I received the official announcement email today that Firefox did set the Guinness World Record for the most software downloads in 24 hours.

a Guinness World Record for the most software downloads in 24 hours … 8,002,530 downloads.

The most spectacular software release in history. Congratulation Firefox!

Posted in Firefox, Uncategorized | Tagged , , | 2 Comments

The new F word LOL

The new F word from the leading Internet browser company whose shall remain nameless

Posted in Video | Leave a comment