Pbo

Keep It Simple

Why PHP Is Fun and Easy But Python Is Marriage Material

Media_httponstartupsc_sccgc

When I started Zoolu Web, I had to make a similar choice of what language would we use to build our platform.  Right before we started, Zoolu Web was actually going to consist of 3 developers and 1 graphic designer. We decided to go with Python for the reason explained in this article. However, when push came to shove, and by the time Zoolu Web got off the ground, the company consisted of little ole me.  Which really meant I had no time to waste learning a new language, so the choice seemed clear: PHP.

Looking back I would still choose PHP again, I mean hey, we finally got namespaces, but honestly the PHP community can be a bit frustrating. There are a lot of amazing people and developers out there, but with them comes an even larger pool of people who have no standards, no understanding of computer science, and quite frankly don't care. I can't tell you how many times I have purchased a few scripts only to find out it was a spaghetti's addict wet dream.  Like this article says, sometimes a choice of what language you choose can determine the type of programmers you attract. So although I would still choose PHP, especially for doing local sites and with simple easy to use cms's like Wordpress and Joomla!, I wonder, what would it have been like if I had gone with Python.

Anyway, check out this article for good write up on the subject.

Filed under  //   php   tech  

High CPU Usage Running CentOS As Guest on Virtualbox

Last week I installed CentOS 5.3 as a guest on VirtualBox and upgraded PHP from 5.2 to 5.3.

While it was fun to finally get around to playing with the namespaces and closures, I noticed that my host cpu was not too happy.  I was constantly locked around 100% cpu usage.  Hmmm, that's no good, I'm not gonna get much work done.   So off to Google I go...

I found two helpful links if you are experiencing the same issue

According to the first article

It turned out that the real cause of the problem was the high frequency at which the stock CentOS kernel is clocked, 1000Hz

So long story short, I updated /boot/grub/grub.conf,and added divider=10clocksource=acpi_pm at the end of the kernel line.

Like magic, cpu went down to an acceptable number, and my host and guest can continue their wonderful symbiotic relationship.  Hopefully if you are experiencing similar problem this easy fix can help you out. 

Happy Coding!

Filed under  //   php   tech   virtualization  

Installing PHP 5.3.x on RedHat ES5, CentOS 5, etc

wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

Been a todo of mine for awhile, so I figured what better to do on an early Saturday morning then install PHP 5.3 on my vm. The two most obvious features I'm excited to start playing around with are Namespaces and Closures.

That being the case, found this article, which made installation a breeze... so what are you waiting for...

UPDATE: Upgrade to 5.3 complete!  w00t!

Moz-screenshot-php53

Filed under  //   php   tech   virtualization  

Bossie Awards 2010: The best open source application development software

Media_httpwwwinfoworl_ghcuf

Congrats to the team at Zend and the community of developers, well done!

Filed under  //   php   tech  

HipHop for PHP

Media_httpwikidevelop_xddxm

This week, facebook announced their new PHP “compiler,” called HipHop, available as open source software.

As a developer who mostly works with php, my first reaction was "when I can start using this.... wait.. what's the catch?"

According to facebook, HipHop for PHP, has been used to reduce the CPU usage on Facebook Web servers by an average of about 50%, and is currently being used in production.  This is not some experiment or theory.  They are actually using this on production servers.  Cool.

Essentially, HipHop gains its performance increase by transforming the scripted PHP language into the compiled C++ language.  The reality is that most sites using PHP performance issue has little to do with PHP itself, and more to do about the database. 

That being said, this still will still have a huge impact on the reputation of PHP.  Currently Java and .net rule the enterprise.  Over the past few years, with the help of Zend pushing it's Zend Framework and the community begining to adopt best practices and enterprise design patterns, PHP has attempted to be the alternative to this enterprise duopoly.  Hip Hop will give more options to companies and developers when it comes to scaling and outgrowing their current system on how PHP can help them get there.

I personally have not tried using Hip Hop, but I plan on doing so in the future.  To the future...

Filed under  //   php