WTF

PHP Functions, you’re doing it wrong…

April 14, 2010
By SeanJA

Just a quick tip today. If your function looks something like this:   <?php /** * A really long function definition * @param string $has * @param bool $a * @param int $lot * @param float $of * @param assoc_array $parameters * @param string $I * @param string $wonder * @param int $what *...
Read more »

Posted in Best Practices, PHP, Programming, Ruby, WTF | 7 Comments »

RE: Top 10 PHP Techniques That Will Save You Time and Effort

March 31, 2010
By SeanJA
RE: Top 10 PHP Techniques That Will Save You Time and Effort

I realise that I already posted something today, but this seemed like an emergency… I thought maybe this was a serious post when I clicked on it, then when I got to number 2 on the list (I had skipped reading his post about how you should write an index page), I thought maybe...
Read more »

Posted in Best Practices, Emergency, PHP, Programming, WTF | 27 Comments »

When is 4 – 1 = 4?

August 27, 2009
By SeanJA

When c like languages say so $a = 5; $b = 1;   $result = $a---$b; echo $a; #=>4 echo $b; #=>1 echo $result; #=>4 public class FunMaths{ public static void main(String[] args) { int result; int a = 5, b = 1; result = a---b; System.out.println(a); System.out.println(b); System.out.println(result); } } Share and Enjoy:
Read more »

Posted in Java, PHP, Programming, WTF | 4 Comments »

On naming functions sanely

May 13, 2009
By SeanJA

When naming your functions, there are certain function prefix/postfixes that should only return specific types. They help the programmers who follow in your footsteps to grasp what it is you were trying to do. It also reduces the number of comments you need because the naming conventions are self explanatory. Here is a short...
Read more »

Posted in Programming, WTF | 1 Comment »

Smarty Best Practices 1

May 7, 2009
By SeanJA

I know I have slagged a lot on smarty in the past, both on my blog and on twitter… It is not because I do not understand it, it is because I see it being misused (at least as far as I am concerned, I may be wrong about it) every day in old...
Read more »

Posted in Open Source, PHP, Programming, Smarty, WTF | No Comments »