Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Stoyan Stefanov:
How to write unmaintainable PHP code
Sep 24, 2015 @ 15:35:38

Stoyan Stefanov has reposted an article he wrote for the PHP Advent (now Web Advent) site with a tongue-in-cheek look at how to write unmaintainable code in PHP applications.

With the unemployment rates lately being at the levels that they are, everybody realizes that job security is important. And what's the best way to keep a job but to be irreplaceable, one way or another. The simple truth is that if no one can maintain the code you write, you have a job for life. Writing unmaintainable code is a special skill that, strangely enough, seem to come quite naturally to certain developers. But for the rest of you, here are some tips and hints to get you started.

He humorously suggests poor practices in your development such as:

  • starting your new job by being vocal about "shifting paradigms" and "enterprise" code
  • making it impossible for someone to change one thing without effecting another
  • ban coding conventions
  • don't write unit tests
  • not use templating

...and more. It's a funny piece that has a good message behind it. It's a perfect example of what not to do in development (and what to avoid if you're not doing them currently). The interesting thing is that this was originally published in 2009 and just about all of the points in it are still valid today.

tagged: unmaintainable humorous code opinion funny phpadvent

Link: http://www.phpied.com/how-to-write-unmaintainable-php-code-2009/

PHPEverywhere:
Is PHP4 the new perl?
Feb 20, 2006 @ 13:23:27

From PHPEverywhere today, there's a new post from John Lim that asks the question, "Is PHP4 the new Perl?"

Tim Bray, one of authors of XML, voices concern about PHP: "So here's my problem, based on my limited experience with PHP (deploying a couple of free apps to do this and that, and debugging a site for a non-technical friend here and there): all the PHP code I've seen in that experience has been messy, unmaintainable crap. Spaghetti SQL wrapped in spaghetti PHP wrapped in spaghetti HTML, replicated in slightly-varying form in dozens of places.

But in the big picture, it feels vulnerable to me."

John argues that it's not the language's fault if the code that's written is bad (more coders need this). He also suggests that maybe PHP4 is perl for the web - simply because of the one of the reasons it's popular - it's potential for abuse from badly written code.

tagged: php4 new perl abuse spaghetti unmaintainable php4 new perl abuse spaghetti unmaintainable

Link:

PHPEverywhere:
Is PHP4 the new perl?
Feb 20, 2006 @ 13:23:27

From PHPEverywhere today, there's a new post from John Lim that asks the question, "Is PHP4 the new Perl?"

Tim Bray, one of authors of XML, voices concern about PHP: "So here's my problem, based on my limited experience with PHP (deploying a couple of free apps to do this and that, and debugging a site for a non-technical friend here and there): all the PHP code I've seen in that experience has been messy, unmaintainable crap. Spaghetti SQL wrapped in spaghetti PHP wrapped in spaghetti HTML, replicated in slightly-varying form in dozens of places.

But in the big picture, it feels vulnerable to me."

John argues that it's not the language's fault if the code that's written is bad (more coders need this). He also suggests that maybe PHP4 is perl for the web - simply because of the one of the reasons it's popular - it's potential for abuse from badly written code.

tagged: php4 new perl abuse spaghetti unmaintainable php4 new perl abuse spaghetti unmaintainable

Link:


Trending Topics: