Tag Archives: development

PHP Dos and Don’ts aka Programmers I Don’t Like

I will find you meme - Taken (2008)

I am sure every PHP developer has a colleague they hate because he/she coded the application they started maintaining. This is mostly because the code is old. New standards become common, they learn what they used to do was inefficient, unreadable, or complicated. As PHP is a language that changed significantly over the years, code written a few years ago will certainly look outdated.

That being said, this post is not about the old PHP code. This post shows how to be a bad programmer even when following standards. Please don’t be this person.

  1. Too many nested if statements
  2. Extra brackets and braces
  3. Unnecessary casting
  4. Useless checks
  5. Slow PHP built-in functions
  6. Long functions
  7. Too many function arguments
  8. Long lines
  9. Long if-else blocks
  10. Wrong function / class name casing
  11. Lack of coding standards

Too many nested if statements

This is probably the one I hate the most. It also makes the lines too long because of the indentation caused by each of the nested if statements.

Continue reading PHP Dos and Don’ts aka Programmers I Don’t Like

Why Linux is Better as a Server Compared to Windows

As a web developer having experience on Windows and Linux, I prefer to work on Linux servers. Here are the reasons why (for CentOS – might not be same for all distributions):

  1. Viewing error and access logs
  2. No need to waste RAM
  3. Many free tools
  4. Easier to access remotely
  5. No need to reboot Continue reading Why Linux is Better as a Server Compared to Windows