News Feed
Jobs Feed
Sections




News Archive
feed this:

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

Oscar Merida:
Smelly PHP code
November 09, 2012 @ 09:21:57

Oscar Merida has written up a sort of continuation to this series from Adam Culp about clean code, one that shares more tips on knowing when to refctor.

Adam Culp posted the 3rd article in his Clean Development Series this week, Dirty Code (how to spot/smell it). When you read it, you should keep in mind that he is pointing out practices which correlate with poorly written code not prescribing a list of things to avoid. It's a good list of things to look for and engendered quite a discussion in our internal Musketeers IRC.

His suggestions include things like "Comments are valuable", "Using switch statements" and a few other smaller ones involving error suppression, globals and prepared statements in database usage.

0 comments voice your opinion now!
smell code refactor tips clean development


Adam Culp:
Clean Development Series (Parts 1, 2 & 3)
November 06, 2012 @ 11:26:26

Adam Culp has posted a three part series to his blog with some guidance about how to create "clean code" in your application development:

Whether we're experienced developers or newcomers, we've all seen code that could/should have been done better. Many times it's even code we ourselves wrote and revisited later for one reason or another. I, for one, have seen my share of code written by a "past me" and wondered what on earth I was thinking when I wrote that. Of course there has also been times when I was hired to fix another developers code, and it can be scary also.

There's three posts in the series:

0 comments voice your opinion now!
clean development cause effect smell tutorial series


Matt Frost's Blog:
Prevent Overcomplication
July 06, 2012 @ 12:56:13

Matt Frost has a new post to his blog talking about reducing complexity and preventing overcomplication in your code and application structure.

We've all come across code that's written so craftily that it takes us some time to figure out what's actually going on in that block of code. We've never written things like that ourselves of course....seriously though, if you're collaborating, not doing things in the simplest terms will create an issue when other people start to look at your code. There is something about us; when we have an opportunity to show off how smart we are; we really try to go for it. The point is that it's not helping anyone and crafty code !== good code.

He makes a few recommendations about how to keep things simple in the various aspects of your development:

  • Know your tools
  • Know what you're doing
  • Check your smells
  • Ask "what value does this add?"
By simplifying things, you give others a chance to look at what you are doing and help you understand what you did right and what you can do to improve that section.
0 comments voice your opinion now!
overcomplify opinion tools knowledge value smell


Metapundit.net:
Code Smells II
October 26, 2006 @ 09:14:00

Following up from the previous article on the Metapundit.net blog, there's part two of the "Code Smells" series - a look at bad things to do in your code (to make it "smell").

This (and any subsequent posts in the series) will be more limited in scope - a single bad example and a corresponding solution.

This time, the spotlight is on parameterised queries - inserting the variables directly into a SQL statement string versus filtering them or inserting them via a custom query() function. He points out that there's no need to create this kind of filtering/database handling class on your own, though - there's already been one created by the fine folks of PEAR (using the autoExecute function

0 comments voice your opinion now!
smell parameterised queries sql validation filtering smell parameterised queries sql validation filtering



Community Events











Don't see your event here?
Let us know!


project framework performance facebook package hack component database podcast security symfony2 introduction install hhvm application example composer language release unittest

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework