Archive for the 'PHP' Category

Installing PEAR Spreadsheet_Excel_Writer

Saturday, 16th May, 2009

Quick post to consolidate information around the net. Installing this package is not as straight forward as most, as it’s in the beta channel.

Failed to download pear/Spreadsheet_Excel_Writer within preferred
state "stable", latest release is version 0.9.1, stability "beta", use
"channel://pear.php.net/Spreadsheet_Excel_Writer-0.9.1" to install
Cannot initialize 'channel://pear.php.net/Spreadsheet_Excel_Writer',
invalid or missing package file
Package "channel://pear.php.net/Spreadsheet_Excel_Writer" is not valid
install failed

Behold:

pear config-set preferred_state beta
sudo pear install ---onlyreqdeps Spreadsheet_Excel_Writer

Include the onlyreqdeps switch so that the dependency package PEAR OLE is installed.

Interview with David Hussman on Agile Development

Sunday, 22nd April, 2007

InfoQ has a decent interview with David Hussman on Agile Development, it’s 40 minutes but a worthwhile insight into Agile methods from a veteran.

I realise my posts have been few and far between this year but I’m slowing getting organised, I’ve actually got a bed to sleep in now, and a new job! (yes another one)

I had PHP in Action on pre-order with Amazon but it’s release date got pushed back so I signed up to the Manning Early Access Program (MEAP) to get hold of the complete chapters early.

Groovy is what it says on the tin

Tuesday, 27th February, 2007

I can’t believe I never stumbled across this before; I’ve seen a few posts about Groovy on dzone.com previously and just ignored them. A couple of weeks ago however I bother to investigate this language - how I wish I’d done this earlier!

I recently bought the second edition of Agile Web Development with Rails, which is good and all but when I scour the net to see where Ruby is on the job front, it’s pretty bleak (at least in the UK if you don’t live in London).

Back to Groovy though; the first time I stumbled across some of the source I smiled - this is what I’ve been waiting for… I can see how the reduction in syntax could make purists turn red faced but from a productivity standpoint, not having to write such overly verbose code that is Java really appeals to me! (probably my nasty PHP habits)

It’s made Java fun again, dare I say it, it’s made Java groovy :) (please put down those tomatoes).

I think stumbling across Groovy now is no co-incidence, what with version 1.0 just out the door and numerous books making it to the shelves. Things went from good to great when I Googled around for some Grails tutorials - the amount that can be achieved in such a succinct amount of code was a breath of fresh air.

Working with PHP all day (not exactly a verbose language), Grails looked like a significant improvement in productivity. Perhaps it’s the pedigree of the developers that have forged Groovy and Grails - PHP has always suffered from it’s low barrier to entry - Grails looks well designed and time will confirm this for me.

I’ve ordered Groovy in Action, and PHP in Action just for the hell of it (I saw Marcus Baker (who ran the PHP London user group until Mar 2007) in the authors list and thought this has to be a decent read since I’ve seen him speak nothing but sense on SitePoint’s PHP Application Design forum).

I’m not the only one who’s enthused… hopefully given Groovy’s heritage and the volume of Java programmers that can make an easy switch; commercial acceptance may be faster than that of Ruby, or at least taken more seriously/readily by big(ger) business.

The biggest bottleneck: developer time, not double quotes

Saturday, 2nd December, 2006

It’s hard to drag a community the size of PHP’s towards such things as standards and using frameworks. From my experience many PHP developers still struggle/refuse to adopt others standards.

When I started PHP, PEAR didn’t exist, and even when it did (and probably even today) much of community is used to “rolling their own” solutions for 99% of tasks. Most developers I’ve worked with don’t trust/use PEAR classes and I can’t really blame them. Most early efforts were authored by developers who at the time didn’t really grasp the OO concept and made god classes.

The Ruby community has one up here, their community was kick started by Rails - many good programming practices have been spoon fed from the start. Couple this with Ruby probably not being many Ruby-newbies first language. I digress…

In every company I’ve worked at code re-use has been low because “every problem is different”. Now this isn’t normally true, the nucleus of the project is but the rest is made up of much of the same stuff tackled on every project (database abstraction, session management, form validation, data sanitisation, the list goes on…).

What holds the PHP community back from adopting frameworks and standards is the majority of the community’s obsession of prematurely optimising the mundane (++$i vs $i++ in loops etc). Just check the comments in the manual on language basics, or most forums - how long has the single vs double quote debate been running?

I’ve read threads about removing white space and pre-processing include/require statements to speed up execution. Neither of these would address the true bottleneck in an application.

Only in circumstances where the coding has been exceptionally poor has PHP ever been a bottleneck on the sites I’ve worked on, 99% of the time it’s the database that you’ll run up against before seeing any PHP performance issues. This obession with squeezing performance before a performance issue has been identified scares most developers off the idea of using a “bloaty” framework that’s too heavy weight for their needs and instead they go back to re-inventing the wheel again.

When the larger community becomes seasoned enough and recognises the biggest bottleneck is developer time and not double quotes then hopefully we’ll see some proper standards materialise.

PHP5 Certification Announced

Thursday, 14th September, 2006

Somewhat late (just like me posting this news) but Zend have finally announced PHP5 certification. I purchased my voucher 3 months ago, now all I need is the study guide to materialise!

You are currently browsing Greg’s blog (software development and operating systems) archives in the PHP category.

Categories

My Bookshelf

PHP in Action: Modern software practices for PHP Agile Web Development with Rails
xhtml 1.1 compliant   xhtml 1.1 compliant