<?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>Fri, 24 May 2013 12:22:23 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Reddit.com: Let's Make PHP's Function Names Consistent!]]></title>
      <guid>http://www.phpdeveloper.org/news/19091</guid>
      <link>http://www.phpdeveloper.org/news/19091</link>
      <description><![CDATA[<p>
On Reddit.com there's <a href="http://www.reddit.com/r/PHP/comments/174qng/lets_make_phps_function_names_consistent/">a heated discussion</a> going on in response to <a href="https://bugs.php.net/bug.php?id=52424">this bug</a> filed asking about aliasing PHP function names to make them more consistent (specifically "htmlentities_decode" versus "html_entity_decode").
</p>
<blockquote>
[...] Current naming conventions are really horrible. For instance, look at differences between str_replace, strlen, parse_str, htmlspecialchars. All work with same type but their names are completely different. So, string functions should go to String namespace (Stringreplace()), array functions to Array namespace (Arraysearch()) and so on.
</blockquote>
<p>
Back in the <a href="http://www.reddit.com/r/PHP/comments/174qng/lets_make_phps_function_names_consistent/">Reddit post</a> most of the commentors agree that this kind of thing would be beneficial to the language, but - as several point out - this could have serious backwards compatibility issues. What do you think? <a href="http://www.reddit.com/r/PHP/comments/174qng/lets_make_phps_function_names_consistent/">Voice your opinion</a>!
</p>]]></description>
      <pubDate>Fri, 25 Jan 2013 10:32:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Rafael Dohms' Blog: Book Review: The Art of Readable Code]]></title>
      <guid>http://www.phpdeveloper.org/news/17604</guid>
      <link>http://www.phpdeveloper.org/news/17604</link>
      <description><![CDATA[<p>
<i>Rafael Dohms</i> has posted <a href="http://blog.doh.ms/2012/02/27/book-review-art-of-readable-code/">a new review of a book</a> that focuses on helping you create better, more readable code - "The Art of Readable Code" (<i>Dustin Boswell</i>, <i>Trevor Foucher</i>, O'Reilly). This is isn't about "pretty code" as much as it is manageable, easy to follow structures and logic flows.
</p>
<blockquote>
"The Art of Readable Code" was written by Dustin Bowell and Trevor Foucher and basically focuses on concepts and suggestions to make you code not just readable, but comprehendible by other developers, or as the author's suggest, yourself in six months. Code readability is a topic that I truly believe the PHP community does not focus enough on and i really wanted a look at this book to see what kind of ideas it had and what I could do my best to bring to the attention of other developers.
</blockquote>
<p>
The book is language-agnostic and provides ideas that developers should keep in mind when doing their development - clear variable names, making comments that make sense, refactoring tips and hints for implementing your ideas in code. He recommends the book to any developer (in any language) to help them make code that will stand the test of time and be easier to manage/understand in the future.
</p>]]></description>
      <pubDate>Wed, 29 Feb 2012 10:41:12 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: 9 Confusing Naming Conventions for Beginners ]]></title>
      <guid>http://www.phpdeveloper.org/news/15330</guid>
      <link>http://www.phpdeveloper.org/news/15330</link>
      <description><![CDATA[<p>
On NETTUTS.com there's <a href="http://net.tutsplus.com/articles/general/9-confusing-naming-conventions-for-beginners/">a new article</a> that list nine different conventions that developers (PHP, Javascript, general web) could get confused about when they are just starting out.
</p>
<blockquote>
Especially when first getting started with various web development languages, it can prove to be a difficult task to learn all of the various naming conventions from language to language. This can be even more confusing when developers disagree on what's considered best practice. To help ease the transition for beginners, this list will describe some of the more common conventions.
</blockquote>
<p>
Some of the conventions that they mention that are more specific to PHP developers are underscores before property names, uppercase constants, capitalized first letters in variables and alternative syntax (like ternary).
</p>]]></description>
      <pubDate>Mon, 25 Oct 2010 11:39:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Emran Hasan' Blog: Changing the default controller naming convention in CodeIgniter]]></title>
      <guid>http://www.phpdeveloper.org/news/13254</guid>
      <link>http://www.phpdeveloper.org/news/13254</link>
      <description><![CDATA[<p>
<i>Emran Hasan</i> has <a href="http://www.phpfour.com/blog/2009/09/codeigniter-controller-naming-convention-modified/">a quick new post</a> to his blog today looking at how you can change the default controller naming scheme that the CodeIgniter framework uses (to prevent things like naming conflicts and the like).
</p>
<blockquote>
CodeIgniter is one of my favorite framework and I often use it for developing application quickly. Although it is very flexible in most cases, I find its naming convention to be strict. Many times I have faced this problem when my controller's class name and a model/library's class names are the same '" a Fatal error is inevitable.
</blockquote>
<p>
His method involves extending the core CI_Router class to change the _validate_request method to change the location and the naming convention (from Users to UsersController) for the default controller settings. Code for the update is included.
</p>]]></description>
      <pubDate>Mon, 21 Sep 2009 09:43:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Shawn Straton's Blog: Code Readability Part 2, Code Structure]]></title>
      <guid>http://www.phpdeveloper.org/news/11767</guid>
      <link>http://www.phpdeveloper.org/news/11767</link>
      <description><![CDATA[<p>
<i>Shawn Straton</i> has <a href="http://www.shawnstratton.info/code-readability-part-2-code-structure">posted the second part</a> of his look at code readability today. This time the focus is on the structure of the code - file structure, code layout, etc.
</p>
<blockquote>
I've had the pleasure of
maintaining a legacy application developed by people who were past
deadline the second they had their assignment handed to them in the
past and it can get really interesting rather quickly when you see
how sloppy you can get when you are in such a hurry. Here are some
guidelines I've given myself to ensure that the structure is correct
at the end of the day.
</blockquote>
<p>Some of his suggestions include:</p>
<ul>
<li>Breaking larger files apart into smaller, easier to maintain pieces
<li>Correctly naming functions/variables/etc 
<li>Tabbing/spacing in to indent code blocks
<li>Input validation and error checking should always be included
</ul>]]></description>
      <pubDate>Mon, 19 Jan 2009 12:59:41 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Keith Casey's Blog: Useful Naming Conventions]]></title>
      <guid>http://www.phpdeveloper.org/news/11538</guid>
      <link>http://www.phpdeveloper.org/news/11538</link>
      <description><![CDATA[<p>
In a <a href="http://CaseySoftware.com/blog/useful-naming-conventions">new post</a> to his blog <i>Keith Casey</i> shares a few tips on naming conventions that can help increase readability in your code and make maintenance simpler in the future.
</p>
<blockquote>
In my regular web wanderings recently, I found a great post entitled "<a href="http://www.gameproducer.net/2008/11/11/the-7-worst-verbs-programmers-use-in-function-calls/">The 7 Worst Verbs Programmers Use In Function Calls</a>" and couldn't help but be reminded of a system that I worked on a few years ago.  The core function of the system was named - no kidding - "doStuff".  Everything in the application led towards that, used it, and then did other things as a result.
</blockquote>
<p>
He suggests a structure he uses - "verbAjectiveNounStructure". Starting with an action, moving to a description of the action, to the target of the action and finally an optional structure - how the returned data is formatted.
</p>]]></description>
      <pubDate>Tue, 09 Dec 2008 15:31:15 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[IBM developerWorks: Five good programming habits in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11506</guid>
      <link>http://www.phpdeveloper.org/news/11506</link>
      <description><![CDATA[<p>
<i>Nathan Good</i> has <a href="http://www.ibm.com/developerworks/opensource/library/os-php-5goodhabits/index.html?ca=dgr-jw64os-php-5goodhabits&S_TACT=105AGY46&S_CMP=GRsitejw64">posted five tips</a> PHP developers should use in their work to develop good programming habits to the IBM developerWorks site today.
</p>
<blockquote>
Just like any language, developers can write code in PHP that ranges in quality from truly awful to very good. Learn good programming habits that can help you bridge the productivity gap. [...] Bad coding habits seem to accompany defects in code and can cause code to be difficult to change without introducing new defects. The following five good habits, when applied to your PHP code, will help you avoid these pitfalls.
</blockquote>
<p>Here's the list:</p>
<ul>
<li>Use good naming.
<li>Take smaller bites.
<li>Document your code.
<li>Handle error conditions.
<li>Never, ever, copy and paste.
</ul>]]></description>
      <pubDate>Thu, 04 Dec 2008 12:04:56 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: Dynamic Models in CakePHP 1.2]]></title>
      <guid>http://www.phpdeveloper.org/news/10772</guid>
      <link>http://www.phpdeveloper.org/news/10772</link>
      <description><![CDATA[<p>
In <a href="http://www.littlehart.net/atthekeyboard/2008/08/05/dynamic-models-in-cakephp-12/">this new post</a> to his blog <i>Chris Hartjes</i> mentions a "nifty little feature" that the latest version of the <a href="http://www.cakephp.org">CakePHP framework</a> has - dynamic models.
</p>
<blockquote>
By default now, Cake will automatically use the AppModel class and create a unique alias to a database table if it does not find the file. This means that if you have a table that follows the Cake conventions, needs no validation, and has no associations to other tables, you don't even have to create the model file any more. Woah, talk about a serious time saver in some cases. 
</blockquote>
<p>
He also mentions a gotcha to keep an eye out for - misspelling the model name when you use it. It'll definitely break things. You can find out more about models in CakePHP from <a href="http://book.cakephp.org/view/66/models">this section</a> in their manual, The Cookbook.
</p>]]></description>
      <pubDate>Wed, 06 Aug 2008 09:34:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PEAR Blog: PEAR Group Meeting Minutes 2008-07-13]]></title>
      <guid>http://www.phpdeveloper.org/news/10630</guid>
      <link>http://www.phpdeveloper.org/news/10630</link>
      <description><![CDATA[<p>
A <a href="http://blog.pear.bluga.net/2008/07/17/pear-group-meeting-minutes-2008-07-13/">new entry</a> has been posted to the PEAR blog with the latest minutes for the group's July 13th meeting.
</p>
<blockquote>
Some highlights from the meeting include new/upcoming RFCs for package naming schemes, exception handling in PHP 5.3, and a vote on extending the current PEAR2 Policies. Heavy stuff, check it out!
</blockquote>
<p>
You can check out the <a href="http://wiki.pear.php.net/index.php/MeetingMinutes20080713">full notes here</a> on the PEAR portion of the PHP.net wiki.
</p>]]></description>
      <pubDate>Thu, 17 Jul 2008 14:08:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: Namespaces in PHP? Why *wouldn't* you want them?]]></title>
      <guid>http://www.phpdeveloper.org/news/10520</guid>
      <link>http://www.phpdeveloper.org/news/10520</link>
      <description><![CDATA[<p>
With more recent talk about namespaces in PHP 5.3, bloggers all over are tossing their comments into the discussion. <i>Chris Hartjes</i> is one of the latest with <a href="http://www.littlehart.net/atthekeyboard/2008/06/30/namespaces-in-php-why-wouldnt-you-want-them/">his thoughts</a> on the point of the functionality.
</p>
<blockquote>
I'm an outsider when it comes to tracking the going-on in the world of PHP internals. So, because of that, I'm not going to comment on the actual syntax of how namespaces will be implemented or it's impact on internals. That's not really important as far as this particular discussion goes. 
</blockquote>
<p>
He <a href="http://www.littlehart.net/atthekeyboard/2008/06/30/namespaces-in-php-why-wouldnt-you-want-them/">mentions</a> one of the primary arguments for namespaces from the casual developer's perspective - keeping things separate and so classes can have the same naming as some of their cousins in other namespaces. 
</p>]]></description>
      <pubDate>Tue, 01 Jul 2008 11:14:51 -0500</pubDate>
    </item>
  </channel>
</rss>
