News Archive
PhpRiot Newsletter
Your Email Address:

More information

Mashable Interview

Note: This article was originally published at Planet PHP on 4 December 2010.
Planet PHP

I was fortunate enough to be interviewed on Mashable by Jolie O'Dell recently, cited as a aoPHP experta

Here's a full transcript of the original email interview, some responses make more sense in context:

Am running a bit behind but here are my answers for your interview, please let me know your feedback and if this gets published:

-What advice would you give to a developer just starting to learn PHP?

- keep on top of best practices including a healthy approach to security
- read the code of seasoned devs, there's always a better/cleaner way to do things
- ensure your code is human readable, if you can't understand it 6 months later, how will it be for other devs
- always try and simplify your interfaces, it's much more difficult to write simpler code but consistent refactoring will save you a lot of time and headaches when it comes to maintenance
- don't reinvent any wheels, you will always have more than enough to program, use reputable libraries whenever you can avoid writing the code yourself
- read up on some of the great programmers (eg: and find out how they stayed passionate about the art of programming so many years later

-In your opinion, what's PHP's biggest strength? Biggest limitation?

I think it's easier to start off with its biggest limitation first: so many people criticise PHP that you'd be tempted to think it's a rubbish language; that couldn't be further from the truth. The biggest limitation is _aspects_ of PHP are easier to learn than comparable aspects in other languages, so PHP attracts a lot of aodevelopersa who don't have a clue, write horrendous code, show their ignorance in forums and generally dangerously decrease the signal to noise ratio for the rest of us.

When I first started with PHP in 2000 I remember discovering of project by a German developer that struck me as very well designed yet according to the critics this should have been impossible:
- it was done in one of the earliest versions of PHP4 (4.0.0, released in 22 May 2000, yet still displayed all the sophistication of someone who understood software engineering
- the language itself supposed had all sorts of limitations and defects that meant using it for OOP was technically impossible: wrong

See for yourself, still not updated since 2000 and still probably better than most PHP that gets written today:

The point is a simple one: if you're a developer who has the discipline to learn about software development, PHP can be an excellent tool.

The strengths of the language are simple and obvious:
- it stays close to its C roots while removing some of the unnecessary pain points like memory management, pointers and the compile cycle
- the OOP implementation is simple, elegant and easier to read than its peers
- the Java mantra of aocomplexity at any costa is nowhere to be found, concise method names are used throughout
- libraries and extensions exist for pretty much every technology on the planet
- hacking activity and community participation most likely the highest of any programming language

There are however a few difficult situations that are directly linked and result from the above positive list:
- there is too much choice when it comes to selecting a library or framework to work with, and the information available is often biased and unreliable (posted by teenagers) so a lot of time can be wasted searching for quality
- the core development team is somewhat hysterical and not professional at times which has resulted in backwards compatibility being broken often, and in unacceptable ways, and our current namespace implementation
- there currently isn't any decent IDE for PHP, not something comparable to what's available for Java. This became increasingly obvious when I got into Objective C and Mac development, Xcode really sets the standard. A new candidate that seems promising and is non-free is PHPstorm, so far I've found it a relief to use compared to Netbeans. Eclipse, on the Mac at least, I don't think is even in the race.

-For more intermediate or advanced PHP devs, what are some tips that have helped you along the way?

One of the key problems with PHP is the absence of any authoritative standard library, something which is literally taken for granted in Java, Python, Ruby, Perl and others. PEAR could have been it, but Zend chose to fork for political reasons,

Truncated by Planet PHP, read more at the original (another 1472 bytes)