<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 19 Jun 2013 14:36:33 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Vinícius Krolow: Some tips to improve your codes readability]]></title>
      <guid>http://www.phpdeveloper.org/news/19090</guid>
      <link>http://www.phpdeveloper.org/news/19090</link>
      <description><![CDATA[<p>
In <a href="http://cobaia.net/php/2013/01/20/some-tips-to-improve-your-codes-readability/">this new post</a> to his site <i>Vinícius Krolow</i> shares some tips he thinks will help to make your PHP code more readable in the long run.
</p>
<blockquote>
What about code readability, from my point of view is one of the most important thing in the code. Who writes code that is easy to read, writes good code. Probably reading code is where you spent most part of your time, and not only your code, probably code of your team mates, or maybe code from the open source community, so write code that is simple and is easy to understand it's really important.
</blockquote>
<p>His tips (seven of them) are:</p>
<ul>
<li>Comment before write your code (DocBlock)
<li>Return frequently, Return early
<li>Break, Continue
<li>Code Standard / Name conventions
<li>Throw Exception
<li>Comment often, but not write stupid comments
<li>Methods can be always smaller than they are
</ul>
<p>
It's a little difficult to read as the English isn't the speaker's native tongue, but it gets the point across. He also recommends <a href="http://www.bennadel.com/resources/uploads/2012/ObjectCalisthenics.pdf">reading this</a> if you'd like more information about writing better OOP code that's easier to read.
</p>]]></description>
      <pubDate>Fri, 25 Jan 2013 09:53:55 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Practical Code Refactoring, Part 2 - Readability]]></title>
      <guid>http://www.phpdeveloper.org/news/18639</guid>
      <link>http://www.phpdeveloper.org/news/18639</link>
      <description><![CDATA[<p>
PHPMaster.com has returned with the second part of their guide to code refactoring. In <a href="http://phpmaster.com/practical-code-refactoring-2/">this second part</a> they pick up where they <a href="http://phpmaster.com/practical-refactoring-1/">left off</a> and focus on code readability this time.
</p>
<blockquote>
In part one of this series I introduced what constitutes good code. As the series on code refactoring continues we'll dive into each of the three aspects and see how to refactor for each of them in order: readability, extensibility, and efficiency. In this part, the focus is on refactoring your code for better readability. Recall the definition of readability: readable code follows some well-known style and documentation practices. To help you start refactoring your code for readability, I've prepared this list of questions you should ask yourself throughout the development, testing, and review process.
</blockquote>
<p>
There's a few different types of things that contribute to readable code, so he breaks the article up into a few sections:
</p>
<ul>
<li>General things like coding style guides, header comments and a reduction of global code
<lI>Naming conventions, well-named variables and methods
<li>Simplified and easy to use expressions
<li>Blocks of code, their average size and complexity.
</ul>]]></description>
      <pubDate>Mon, 22 Oct 2012 10:16:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Volker Dusch's Blog: Mandatory "Template Engines (Twig) vs Plain Old PHP" Post]]></title>
      <guid>http://www.phpdeveloper.org/news/16078</guid>
      <link>http://www.phpdeveloper.org/news/16078</link>
      <description><![CDATA[<p>
<i>Volker Dusch</i> has posted what he calls his <a href="http://edorian.posterous.com/46748563">mandatory templating post</a> comparing the benefits of using plain PHP for templates versus the <a href="http://twig-project.org">Twig</a>.
</p>
<blockquote>
If you read some of my previous posts you know me as a "clean code" guy. I like readable, understandable and maintainable code. The same goes for templates. I need to be able to parse very quickly what is happening.. at least i want to.
</blockquote>
<p>
He argues that, because the syntax of something like <a href="http://twig-project.org">Twig</a> is so much simpler and more readable, it's a better solution in the long run (technical considerations not withstanding). As an example he provides a <a href="http://dl.dropbox.com/u/3615626/blog/twig-vs-php.png">side by side comparison</a> visual image of the a template for each. 
</p>]]></description>
      <pubDate>Tue, 22 Mar 2011 09:44:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Why PHP Namespaces Matter]]></title>
      <guid>http://www.phpdeveloper.org/news/15861</guid>
      <link>http://www.phpdeveloper.org/news/15861</link>
      <description><![CDATA[<p>
<i>Matthew Weier O'Phinney</i> has a new post today talking about <a href="http://weierophinney.net/matthew/archives/254-Why-PHP-Namespaces-Matter.html">why namespaces in PHP matter</a> and why he thinks they're a valuable contribution to the language.
</p>
<blockquote>
You've heard about PHP namespaces by now. Most likely, you've heard about -- and likely participated in -- the <a href="http://en.wikipedia.org/wiki/Bikeshedding">bikeshedding</a> surrounding the selection of the namespace separator. Regardless of your thoughts on the namespace separator, or how namespaces may or may not work in other languages, I submit to you several reasons for why I think namespaces in PHP are a positive addition to the language.
</blockquote>
<p>
He breaks down his reasons into four different categories - the code organization benefits that come with namespace "containers", simplified interface structure, improved readability (no more huge class names) and a simpler method for identifying dependencies
</p>]]></description>
      <pubDate>Fri, 04 Feb 2011 13:23:22 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage's Blog: Stop Sacrificing Readability For Efficiency!]]></title>
      <guid>http://www.phpdeveloper.org/news/12226</guid>
      <link>http://www.phpdeveloper.org/news/12226</link>
      <description><![CDATA[<p>
<i>Brandon Savage</i> <a href="http://www.brandonsavage.net/stop-sacrificing-readability-for-efficiency/">has a recommendation</a> fro developers out there - sometimes readability is more important than any micro-efficiency you might gain in your scripts.
</p>
<blockquote>
Much was made last week over the topic of <a href="http://www.alexatnet.com/node/196">micro optimization</a> in PHP. Most of these argued that micro optimization was a bad idea. [...] There's another reason that micro optimization can be a bad choice: it makes code absolutely impossible to read!
</blockquote>
<p>
He points out one example for validating the length of a string in two ways - one using isset to tell which characters in a string are set and the other using the tride and true call to <a href="http://php.net/strlen">strlen</a>. The first, while benchmarked to give you a (very tiny) improvements, is harder to read at first glance than the check to the string length.
</p>]]></description>
      <pubDate>Fri, 27 Mar 2009 12:58:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Shawn Stratton's Blog: Code Readability, Part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/11729</guid>
      <link>http://www.phpdeveloper.org/news/11729</link>
      <description><![CDATA[<p>
<i>Shawn Stratton</i> has <a href="http://www.shawnstratton.info/code-readability-part-1">posted the first part</a> of his series looking at "Code Readability". This part focuses on something that is often woefully forgotten by many developers - proper code commenting.
</p>
<blockquote>
The simplicity of PHP can sometimes be overwhelming, with so many different ways and approaches to creating solutions for our problems we sometimes lose the ability to think past the current problem and into the future. [...] Today I'm going to try to address some quick ideas that most of you will already be familiar with, things that will aide in the general readability of code for future generations.
</blockquote>
<p>
He looks at the difference between useful and non-useful comments: DocBlocks, putting them near decisions, listing array parameters, recording TODOs and how it can all help you generate API documentation quickly and easily.
</p>]]></description>
      <pubDate>Tue, 13 Jan 2009 10:20:28 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Which reference sites do you trust?]]></title>
      <guid>http://www.phpdeveloper.org/news/8559</guid>
      <link>http://www.phpdeveloper.org/news/8559</link>
      <description><![CDATA[<p>
The SitePoint PHP blog has a <a href="http://www.sitepoint.com/blogs/2007/08/28/which-reference-sites-do-you-trust/">post that asks developers</a> "Which reference sites do you trust?"
</p>
<blockquote>
While completing the tech edit on the <a href="http://www.sitepoint.com/books/phpant2/">2nd edition of the PHP Anthology</a> the issue of linking came up; specifically, linking to authoritative reference material on the web. [...] The issue isn't simple one. Regarding PHP, the <a href="http://www.php.net/docs.php">php.net manual</a> is the authoritative reference site. The various web technology standards are also represented by authority web sites.
</blockquote>
<p>
So what does he thing makes for a good, trustworthy resource? <a href="http://www.sitepoint.com/blogs/2007/08/28/which-reference-sites-do-you-trust/">He includes criteria</a> divided up into three sections - readability, accuracy & trustworthiness and longevity.
</p>]]></description>
      <pubDate>Thu, 30 Aug 2007 10:43:00 -0500</pubDate>
    </item>
  </channel>
</rss>
