PHP best practice: always wrap conditional statement in closing brackets

July 22nd, 2008

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 the rest of this entry »

My first taste of Flock Web Browser

July 15th, 2008

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.

My oil price conspiracy theory

July 14th, 2008

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 …

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

July 3rd, 2008

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!

The new F word LOL

June 19th, 2008

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

Firefox 3 Guinness World Record

June 18th, 2008

I have never seen any software release more spectacular than this one. Firefox 3 is setting the Guinness World of the records for the most downloaded software in a day!

Finally, Apple released iPhone video calling kit, iReflect

June 12th, 2008

Ever wondered how to do video calling with an iPhone (Gizmodo)?

Apple video calling kit (Gizmodo)

The kit nicknamed by many as “iReflect” currently cost $29, and many believe this will, like iPhone, revolutionize and raise the standard of the mobile industry. Many are currently queuing to buy this latest Apple gadget. Those who have bought it say that the user experience is like no other mobile phone video calling technology. We have never seen anything as good as this, IMHO in a very long time, if ever.

“We’ve built the world’s best cellphone—again,” said Steve Jobs, Apple’s CEO and famed fried tofu fan. “But it didn’t feel… complete. So I said to Phil, hey! Phil, yo! Where’s the damn front camera? Can we do iChat AV with this shit? He said we couldn’t, but then… then he pulled out his hand mirror and said: ‘what about this?’”

This is so revolutionary that some Apple fans still don’t believe it:

this looks so fake. I cant see APPLE actually doing this.

I call fake! Apple would never release a wood colored accessory!

i don’t know guys… i thinking this is a fake.

None of this can be true.

Warning to early adopters, I’ve heard some rumours that Apple is going to drop the price in 6 weeks and release newer version with more space, variation of colours (e.g.: black and silver) and possibly hands free for only $9!

Still bad news for Java Programmer, this gadget, like iPhone, will not support Java, because Java won’t fit in with the rest of the design and too slow. A limited Objective-C SDK will be released soon.

Nokia, whose N95 has been compared to iPhone, seems to be speechless and not able to respond to this latest Apple’s gadget.

Time’s Invention of the Year is … Apple’s iPhone … ?!?!

May 22nd, 2008

I’m not sure if this is a joke or what (doesn’t seem so), but there is this article from Time magazine’s website: Invention Of the Year: The iPhone.

The article’s author, Les Grossman, went on to the reasons why iPhone made it as invention of the year:

  1. it is pretty
  2. touchy-feely
  3. it will make other phones better
  4. it’s not a phone, it’s a platform
  5. and it’s sold more than 1.4 million.

There is this discussion about it on cnet.

The invention of the year is a mobile phone that consists of 5-10 years old technologies? Sure there are a lot of very happy iPhone customers out there, but I would expect invention of the year to be something more.

How about some life-saving technologies, something that benefits the environment for the generations to come, or something that helps cure chronic diseases?

Now if you still can’t think of a better thing than iPhone that should have been named as invention of the year, check out this article for some idea.

ROFL Conference?

May 15th, 2008

Somehow from Twittering, I ended up looking at this website called ROFLCon.org

Mix up a bunch of super famous internet memes, some brainy academics, a big audience, dump them in Cambridge, MA and you’ve got ROFLCon.

super famous?

Who is Coming?

* XKCD
* Homestar Runner
* Tron Guy
* Dinosaur Comics
* I Can Has Cheezburger
* Chuck Norris Facts
* Brad Neely
* Leeroy Jenkins
* 4chan
* JibJab

Well I know XKCD (love the cartoons quite a bit) and Chuck Norris Facts (I heard he can kill two stones with one bird), and my co-worker mentioned JibJab the other day. I don’t know all the others.

The Daffodil Principle

May 7th, 2008

The Daffodil Principle is an inspirational story that I stumbled upon …

That is, learning to move toward our goals and desires one step at a time–often just one baby-step at time–and learning to love the doing, learning to use the accumulation of time. When we multiply tiny pieces of time with small increments of daily effort, we too will find we can accomplish magnificent things. We can change the world .

How true that is!

After some digging, I found a bit of explaination about the origin of the daffodil principle story.

Every year, high in the San Bernardino mountain range of Southern California, five acres of beautiful daffodils burst into bloom. Amazingly, this special spot, known as “The Daffodil Garden,” was planted by one person, Gene Bauer, one bulb at a time, beginning in 1958.

Planting 50,000 bulbs is a very big task for one person. And yet someone did it and her achievement has been such an inspiration to many.

Use the Daffodil Principle. Stop waiting…..

* Until your car or home is paid off
* Until you get a new car or home
* Until your kids leave the house
* Until you go back to school
* Until you finish school
* Until you clean the house
* Until you organize the garage
* Until you clean off your desk
* Until you lose 10 lbs.
* Until you gain 10 lbs.
* Until you get married
* Until you get a divorce
* Until you have kids
* Until the kids go to school
* Until you retire
* Until summer
* Until spring
* Until winter
* Until fall
* Until you die…