Tag Archive for 'php'

Prototype based object oriented programming in PHP

The other day I’ve found this interestingly controversial submission on reddit and I must admit that after taking a quick look at the code, I ran of for some eye bleach to erase that image from my mind.

While I know that the author had the intention to experiment with the idea of Prototype based inheritance, god forbid something like this goes into a production environment… and trust me, with enough exposure someone will use it.

I’ll gladly share one of my principles with the author:

If you are fighting the language (or framework, library), it means it’s time to ditch it for something else instead of forcing it to work your way… that never turns out well.

Wanting this to not come out as a rant about somebody else’s code (no one likes that), I will instead suggest an implementation that is somehow less obtrusive towards the language, but still an experimentation idea.
Continue reading ‘Prototype based object oriented programming in PHP’

The state of PHP frameworks

Like many other web developers out there I started developing in PHP somewhere around six years ago (it’s already been that long). In a time when PHP 4 was the king, and the community was producing less than acceptable code in large quantities.

It was a time when having a guestbook on your website made you a rock star; a time when PHP development consisted in browsing scripts on hotscripts and hacking them to your needs. A time when development time was primarily focused on trial & error, without all the fanciness you get nowadays with framework and well implemented design patterns.

Even so, it is not a stage of PHP adolescence that I would likely relieve, quite the opposite… I would rather remove it from my memory, eternally and undisputed.
Continue reading ‘The state of PHP frameworks’

Sieve of Eratosthenes in PHP

As mentioned in my last article, I started doing some challenges from the Programming Praxis website. And here comes my PHP solution to the second challenge.
Continue reading ‘Sieve of Eratosthenes in PHP’

RPN Calculator in PHP

I’ve found this nice little blog a couple of days ago called Programming Praxis (it’s in my blogroll as well) which poses a series of programming challenges.

The challenges found there are much more interesting than the other usual ones you can find online. This being the first reason why I’ve decided (as my time permits it) to fool around and have some fun solving them.

And that is why in the lines to follow I will share my PHP solution to the RPC calculator challenge.
Continue reading ‘RPN Calculator in PHP’

Do comunities kill good developers?

Recently I have been asked to join a local community of developers, which I refused. The moment I did that they instinctively, as with any other occasion that you refuse someone, asked me for a reason. While I hadn’t had any obligation to answer their question, I quickly replied Communities are bad! throwing them in a swirl of confusion.
Continue reading ‘Do comunities kill good developers?’




Sitemap