News Feed
Sections




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

PHP in Action:
More beautiful code
November 10, 2008 @ 10:25:34

Continuing on from a previous post, the PHP in Action blog takes another look at their suggestions on "beautiful code" with some responses to the previous post.

I got some interesting comments to my previous post on "beautiful code". Some were pretty strong disagreements. So am I wrong? Did I get carried away? Did my critical faculty go on vacation somewhere nice and sunny? [...] My main point is that it's close to plain English. Not everyone agrees that that's a good thing, but I argue that we're built (genetically wired, in fact) to understand natural languages, not program code.

He reasons that code should be easier to understand than just a bunch of random functions and parameters jumbled together. He thinks that it should read more like a human could understand rather than just the machine. With function names like "assertThat" and "hasSelect", it does make it easier to follow.

0 comments voice your opinion now!
beautiful assertthat hasselect withname hasvalues readable


blog comments powered by Disqus

Similar Posts

PHP in Action: More beautiful code

Stefan Koopmanschap's Blog: Tip: use clearly readable variable names, and constants!

Patrick Allaert's Blog: Readable PHP code #2 - Make your API handle more!

Felix Geisendorfer's Blog: Making error handling for Model::save more beautiful in CakePHP

PHPMaster.com: Practical Refactoring, Part 1 - What is Good Code?


Community Events

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


series unittest development introduction community wordpress laravel opinion library interview language laravel5 extension middleware release framework voicesoftheelephpant api podcast conference

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