<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>divisionbyzero &#187; php</title>
	<atom:link href="http://divisionbyzero.net/blog/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://divisionbyzero.net/blog</link>
	<description>question . authority</description>
	<lastBuildDate>Tue, 06 Jul 2010 16:43:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Vacation and PHP</title>
		<link>http://divisionbyzero.net/blog/2009/07/13/vacation-and-php/</link>
		<comments>http://divisionbyzero.net/blog/2009/07/13/vacation-and-php/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 02:53:40 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Rant]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[perl5]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://divisionbyzero.net/blog/?p=153</guid>
		<description><![CDATA[I took a much needed vacation the latter part of last week. Prior to that, I was helping a few coworkers with getting PHP Web Applications developed on Fedora Core 5 to run on CentOS 5 with upgraded PHP, Apache, and libraries. Every time I work with PHP, it gives me serious perspective as to [...]]]></description>
			<content:encoded><![CDATA[<p>I took a much needed vacation the latter part of last week.  Prior to that, I was helping a few coworkers with getting PHP Web Applications developed on Fedora Core 5 to run on CentOS 5 with upgraded PHP, Apache, and libraries.  Every time I work with PHP, it gives me serious perspective as to why the <a href="http://www.modernperlbooks.com" alt="Modern Perl">Modern Perl</a> / <a href="http://www.enlightenedperl.org">Enlightened Perl</a> / <a href="http://search.cpan.org/~mschwern/perl5i-20090424/lib/perl5i.pm">perl5i</a> Projects are incredibly important.  The Matt&#8217;s Scripts Perl era needs to die.  This stagnant snapshot has poisoned Perl&#8217;s reputation for too long.</p>
<p>The main difference between Perl and PHP, is writing maintainable, intelligent Perl is only slightly more work <em>at first</em> than writing horrible Matt&#8217;s Scripts style Perl.  With PHP, writing decent PHP is possible, but it&#8217;s incredibly difficult.  The majority of the PHP I&#8217;ve come across is code written by a web developer with no programming experience and the language design and direction accommodate that demographic.  PHP&#8217;s language design gets in the way of writing sane, maintainable code.  It&#8217;s not impossible, but you have to really, really want it.</p>
<p>When you write good Perl, the programming experience becomes easier, and more fun.</p>
<p>I&#8217;m trying to get back to my programming projects, and thus back to writing more on Perl.  For now, understand that if you think Perl and PHP are the same beast, you&#8217;re wrong.  I&#8217;ve been paid to develop both for periods of years.  Perl is much more eloquent, evolutionary, and intelligent.</p>
]]></content:encoded>
			<wfw:commentRss>http://divisionbyzero.net/blog/2009/07/13/vacation-and-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Perl is Dead</title>
		<link>http://divisionbyzero.net/blog/2009/04/05/perl-is-dead/</link>
		<comments>http://divisionbyzero.net/blog/2009/04/05/perl-is-dead/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 00:49:47 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[catalyst]]></category>
		<category><![CDATA[dbix::class]]></category>
		<category><![CDATA[mason]]></category>
		<category><![CDATA[moose]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[perl::critic]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://divisionbyzero.net/blog/?p=94</guid>
		<description><![CDATA[I&#8217;ve been doing web application development for years in several languages. I&#8217;ve spent time with PHP, Java, but primarily Perl. I consider myself a &#8220;Perl Programmer&#8221; first, everything else second. Until recently, most people would equate that to &#8220;Dinosaur.&#8221; However, there&#8217;s been a revival of Perl these days! There are a number of reasons for [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing web application development for years in several languages.  I&#8217;ve spent time with PHP, Java, but primarily Perl.  I consider myself a &#8220;Perl Programmer&#8221; first, everything else second.  Until recently, most people would equate that to &#8220;Dinosaur.&#8221;  However, there&#8217;s been a revival of Perl these days!  There are <a title="Movable Type, Open Source" href="http://www.movabletype.org/" target="_blank">a</a> <a title="Enlightened Perl Org" href="http://www.enlightenedperl.org/">number</a> <a title="The Perl Foundation" href="http://www.perlfoundation.org/">of</a> <a title="Perl Sphere" href="http://perlsphere.net/" target="_blank">reasons</a> <a title="Perl Buzz" href="http://perlbuzz.com/" target="_blank">for</a> <a title="Modern Perl" href="http://www.modernperlbooks.com/mt/index.html" target="_blank">this</a>.</p>
<p><span id="more-94"></span></p>
<p>It all started with the concept of &#8220;Inside Out Objects&#8221; as a safe, functional object development methodology.  From there a number of modules sprouted attempting to do Inside-Out better.   Around this time, the Perl 6 <a title="Perl 6 Apocalypses" href="http://dev.perl.org/perl6/doc/apocalypse.html" target="_blank">Apocalypses</a> were being published and translated in Conway&#8217;s <a title="Perl 6 Exegeses" href="http://dev.perl.org/perl6/doc/exegesis.html" target="_blank">Exegeses</a>.  Conway  published &#8220;<a title="Perl Best Practices" href="http://oreilly.com/catalog/9780596001735/" target="_blank">Perl Best Practices</a>&#8221; and very soon after, <a title="Perl::Critic @ The CPAN" href="http://search.cpan.org/~elliotjs/Perl-Critic-1.096/" target="_blank">Perl::Critic</a> showed up on the <a title="The CPAN" href="http://www.cpan.org" target="_blank">CPAN</a> to enforce the rules laid out in the book.  Perl::Critic became a critical authority on the most maintainable way to write Perl code.  TIMTOWTDI will never die, but clean, maintainable code does outweigh some stranger interpreter abuses.</p>
<p>The modern looking object system for Perl 6 made it debut, and instantly the Army of CPAN began figuring out clever ways to implement fancy object notation in Perl 5.  his eventually led to the development of Class::MOP, from which the &#8220;post Modern Object System for Perl 5,&#8221; Moose, blossomed.</p>
<p>Concurrently, Ruby on Rails had layed waste to the entire scope of PHP Scaffolding systems in existence, building off the Model-View-Controller (MVC) Ideology implemented earlier in Perl 5 through Maypole.  As RoR gained traction, Python&#8217;s Django framework, through it&#8217;s association with the MVC philosophy, began to see serious deployment.  This made sense as a lot of large Open Source and Commercial companies were using Python for much of their behind the scenes development.  The result left PHP staggering and dizzy in the corner.</p>
<p>Unfortunately, there was a horrible association of PHP to Perl in most people&#8217;s heads, which sounded the Death Knell for Perl as well.  This wasn&#8217;t the case, as Perl, inside it&#8217;s mostly impenetrable Echo Chamber had not stagnated at all.  Perl 5.8.x was a huge performance and syntactical modernization of Perl 5.  This improvement was eclipsed with the release of 5.10, drawing from the Perl 6 Design Documents, and the push of the Echo Chamber for a more Modern Language.</p>
<p>The Army of CPAN was still hard at work in the background throughout all of this.  ORM&#8217;s drawing on the Success of the MVC philosophy took shape and evolved.  Rose::DB, Class::DBI, and the current forerunner DBIx::Class simplified database development through the use of abstraction through modules like SQL::Abstract.  Maypole, an simplified, earlier implementation of MVC sparked other MVC efforts in Perl 5, the most popular of which are Catalyst, Jifty, and CGI::Application.  Each have their strengths and weaknesses.</p>
<p>All of these modules are beginning to converge to create a beautiful, post modern web application development platform in pure Perl.  Additionally, projects like Strawberry Perl, and Padre are aiming to expand Perl&#8217;s reach into realms it&#8217;s shied away from: Windows &amp; IDEs.  The future is bright for Perl thanks to efforts of countless volunteers and programmers.</p>
<p>Perl is dead.  Long live Perl.</p>
]]></content:encoded>
			<wfw:commentRss>http://divisionbyzero.net/blog/2009/04/05/perl-is-dead/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP, Are you serious?</title>
		<link>http://divisionbyzero.net/blog/2006/07/26/php-are-you-serious/</link>
		<comments>http://divisionbyzero.net/blog/2006/07/26/php-are-you-serious/#comments</comments>
		<pubDate>Thu, 27 Jul 2006 03:55:44 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://divisionbyzero.net/blog/2006/07/26/php-are-you-serious/</guid>
		<description><![CDATA[A long time ago, in a galaxy far, far away, I programmed in PHP for a mortgage company. I ended up leaving that job for personal reasons. Apparently, 40 hours/week truly is not enough. I was a Perl programmer prior to that excursion, and I guess I never grew out of it. I always felt [...]]]></description>
			<content:encoded><![CDATA[<p>A long time ago, in a galaxy far, far away, I programmed in <a title="PHP Site" href="http://www.php.net">PHP</a> for a mortgage company.  I ended up leaving that job for personal reasons.  Apparently, 40 hours/week truly is not enough.  I was a Perl programmer prior to that excursion, and I guess I never grew out of it.  I always felt uncomfortable there.  For a while I thought it might be social, but after further reflection, it&#8217;s obvious it was actually PHP&#8217;s fault.</p>
<p>To frame this, I just got back from <a title="YAPC::NA Chicago" href="http://www.yapcchicago.org">YAPC::NA</a>.  I learned all kinds of new techniques and tricks from MJD, chromatic, brian d. foy, Randal Schwartz, Damian Conway, and countless other acquaintances.  What&#8217;s not to love about <a title="Mason Headquarters" href="http://www.masonhq.com">Mason</a>, <a title="DBIx::Class" href="http://search.cpan.org/~jrobinson/DBIx-Class-0.06003/lib/DBIx/Class.pm">DBIx::Class</a>, and the brain bending functional tricks you can learn from MJD and chromatic?  I never knew that @INC could contain a subroutine reference, did you?  I also never thought of something so clever as recursively calling an anonymous sub ref contained in a scalar by using another anonymous subroutine that dereferences that ref at runtime.</p>
<p><span id="more-13"></span> So now, after refactoring a TON of my code to <a title="PBP @ O'Reilly" href="http://www.oreilly.com/catalog/perlbp/index.html">Perl Best Practices</a>, I&#8217;m back into the land of PHP temporarily.  Our administration group at work is looking for a project tracking system.  After favorable experiences with <a title="dotProject Homepage" href="http://www.dotproject.net">dotProject</a> a year ago, I suggested that.  I hadn&#8217;t touched dotProject or PHP since dotProject&#8217;s 1.x branch.  They&#8217;re now at 2.0.4 and it seems there just might be a few more hands in the pot.  The code is not as coherent and refreshing as I remember it.</p>
<p>I&#8217;ve been spending time building a module for additional &#8220;fund&#8221; tracking.  PHP seriously gets in my way.  Granted, I have a very heavy bias against anything but Perl, but my god, there&#8217;s a reason why <a title="Google :: " href="http://www.google.com/search?q=php%20sucks">this Google Search</a> exists.  They&#8217;re not lying.  I&#8217;m dealing with PHP4, so perhaps PHP5 has gotten better, but I harbor serious doubt that even by getting &#8220;better&#8221; that PHP5 would approach anything a serious computer scientist / programmer would consider usable.</p>
<p>The language is a patchwork of functions.  There&#8217;s no real defining factor or consistency.   As a matter of fact, the only thing consistent is the fact that regardless of what library in PHP you&#8217;re using, chances are the function names and argument orders lack consistency in that module and in the whole picture.</p>
<p>Don&#8217;t get me wrong, PHP is great for web designers and novices.  There&#8217;s a very low barrier to entry.  However, we now have a landscape littered with horrible PHP applications that expose servers to vicious attacks from outsiders.  PHP is not by any means a language that should be taken seriously by any serious developer.  Please invest your time elsewhere.  I&#8217;d even recommend Python over PHP.  Ruby would be a more worthwhile excursion.</p>
<p>PHP makes simple things simple and hard and obscure.  Hard things are impossible.  The biggest hole in the language from the perspective of a Perl or Lisp programmer is the complete lack of lexical scope.  I know, inside of a function there&#8217;s a lexical scope, but it&#8217;s not really a lexical scope, it&#8217;s a hack.  You  have your choice between global scoped variables, or variables scoped inside of a function.  No other closure provides an effective measure to force destruction and garbage clean up.  More importantly, certain techniques become ridiculous without proper lexical scope.</p>
<p>Early version of PHP3, maybe even &#8220;late&#8221; versions, had no scoping even for functions.  This became a problem to anyone used to using recursion to solve recursive problems.  Recursion relies on the fact that each call to the function can resolve independantly of the rest of the call stack.  Modifying variables that are still in wait on the stack can cause some &#8220;unexpected&#8221; behavior.</p>
<p>There also seems to be a problem with ternary operators.  Unexplainably, if the false condition of a ternary construct is in itself another ternary, the false is evaluated.  In order to &#8220;nest&#8221; ternary operators, <a title="Aboslute Bullshit Nested ternary operators." href="http://us2.php.net/manual/en/language.operators.comparison.php#56572">you need to enclose each INDIVIDUAL ternary in its own set of parentheses</a>.  Find precident for that illogical BS.  Why in the hell are we evaluating the false condition if the current ternary operator has returned &#8220;true&#8221; ?</p>
<p>It&#8217;s been a painful process, but in order to program in PHP, I&#8217;ve learned that you absolutely need a function reference.  It is impossible for a human being to formulate a logical function naming convention (is it &#8220;noun then verb? verb than noun? do I separate with underscores, or just smash it together&#8221;?) let alone the argument order even inside the same &#8220;module&#8221;.  Just peruse the <a title="PHP Function Reference" href="http://us2.php.net/manual/en/funcref.php">function reference on the php.net site</a> to see what I&#8217;m talking about.  Zero consistency.  Please, pick an interface and stick with it.</p>
<p>Bottom line, PHP is a good place to start, but don&#8217;t stop there.  Pick up another language.  I recommend Perl.  I&#8217;ll even teach you.  I&#8217;m gonna be teaching at NIH in the near future and I&#8217;ll be sharing my course material here.</p>
]]></content:encoded>
			<wfw:commentRss>http://divisionbyzero.net/blog/2006/07/26/php-are-you-serious/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
