Posts Tagged ‘programming’

Which PHP Logical Operator Is Better - ‘and’ or ‘&&’?

Saturday, February 16th, 2008

I was browsing the Sitepoint forum today and somebody raised this question - is it better to use ‘and’ or ‘&&’ as a logical operator in PHP?

In most cases, they evaluate the same way. For example, these two statements are equivalent.

if ($x && $y) { ... }
if ($x and $y) { ... }

So what’s the difference?
(more…)

Five PHP Coding Mistakes to Avoid

Monday, February 4th, 2008

While browsing through dZone the other day, I stumbled on this article - 40 signs you really are a lousy PHP programmer.

While I don’t agree with all of the author’s points, it’s an interesting list of php coding habits to avoid - but that most of us tend to pick up anyway. Here’s a list of my five biggest pet peeves.
(more…)

Time Well Spent, Learning Programming

Friday, February 1st, 2008

Browsing through DZone, I stumbled on an interesting illustration - the Programmer’s Food Pyramid.

The Pyramid illustrates the different activities that someone generally engages in while learning to program. While looking at the pyramid, I thought, “Do I do all these things?”
(more…)