Short, Shorthand in PHP

Recently my knowledge of PHP has been developing and I’ve come across some shorthand code that at first glance looks wrong but is actually just obfuscated. How many times have you seen or done this in code:

if($something > 100){
    $something_else = true;
} else {
    $something_else = false;
}

Read More

Exclusivity Creates Demand

"The first rule of Fight Club is, you do not talk about Fight Club. The second rule of Fight Club is, you DO NOT talk about Fight Club".

Standing doing the washing up this morning I was thinking about exclusivity. In the recent film The Social Network they make a point of highlighting the fact that when Facebook was starting up it was exclusive. You needed an Harvard email address to be able to join. Then as the site grew other prestigious schools were allowed to join.

Read More

Developers, Design is Important

I think part of the problem with a lot of developers today is that they don’t spend enough time caring about design. Maybe they are scared of design, maybe they simply don’t want to learn how to do it or maybe they just think it’s not their job.

I’ve touched on this subject before when I explained some of the things that I think made the Nivo Slider so successful. But I really think design plays a big part in how people perceive things that developers create.

Read More

PHP and Triple Equals (===)

Ever seen a statement like if($a === $b) and wondered what the whole triple equals thing is all about? Well it is actually quite simple. Assigning and comparing variables in PHP goes like this:

  • $a = $b - Assign the value of $b to $a.
  • $a == $b - Compare the values of $a and $b.
  • $a === $b - Compare the values and types of $a and $b.

So the triple equals not only compares the values of the variables but also their types. Simple right.

Read More

CodePaste

Following on from my obsession with code just now, over the weekend I created a two day project for pasting code.

CodePaste was actually designed for my own needs. I wanted to be able to paste code without any of the guff that normally comes with such services (such as bloated layouts and ad spam). Following the Apple mantra, CodePaste is designed to “just work”. Find out more about CodePaste.

Previous 1 2 3 4 5 Next