Tag Archive | "PHP"

Tags: , ,

PHP shell rocks

Posted on 09 November 2009 by Demian Turner

shellI’ve written about this before, but since the interactive mode of PHP (php -a) seems to be broken on OS X, I think it’s worth singing the praises of Jan Kneschke’s php shell project once again.

It’s a piece of cake to install the tool with the PEAR installer, and since I last used it 2 great new features are on offer:

  • tab completion for all (or many) PHP functions and built-in classes and interfaces
  • handling of fatal errors

What a relief to have this working again!  I was ssh-ing onto my Fedora servers just to test out code but of course this became impractical pretty quickly.  And did I mention it runs great on PHP 5.3?

And if you’re tempted to use the similarly named phpsh project from the Facebook open src stables, I can confirm this is not an option with the latest version of PHP.

Comments (0)

Tags: , , , , ,

PHPterror on OXID eShop

Posted on 26 August 2009 by Demian Turner

puremvc-patternsI can’t believe Zend is publishing articles on OXID eShop, this is definitely some of the worst code I have seen in ages.

As “the PHP company” I think Zend ought to at least select projects that have some merit in terms of software design, as surely beginner PHP devs look to Zend for good examples and copy/emulate whatever they showcase.

PHPterror took a closer look at some of the OXID code, really jaw-dropping stuff.

Comments (4)

Tags: , ,

Introducing PHPterror: bad PHP usage exposed

Posted on 24 August 2009 by Demian Turner

unit-testing-webdesigner

A new look at how to create unit tests – using Photoshop!  Sense of humour required …

Comments (1)

Tags: , ,

Working with unreliable APIs

Posted on 27 July 2009 by Demian Turner

Bad API

Thanks to Andrew Betts, a PHPlondon regular, for coming up with BadAPI, a service that allows you to simulate misbehaving APIs.

These days there’s almost no such thing as a web app that’s not integrating data from various external APIs, and with that integration comes a new set of problems the developer must handle.

From the BadApi website:

BadAPI allows you to simulate misbehaving APIs. This is useful if your site relies on the availability of service X, and you want to ensure that any downtime experienced by that service has minimal impact on your own application.

Comments (1)

Tags: , ,

How to measure code quality

Posted on 28 April 2009 by Demian Turner

This comic perfectly captures that elusive but all-important question: what are the universal hallmarks of good quality code.

Comments (17)

Tags: , , , , , ,

Taming Netbeans

Posted on 25 February 2009 by Demian Turner

I’m really glad to see so many posts by PHP devs switching over to Netbeans – I don’t think there’s any real competition when it comes to a PHP IDE with a decent feature set that’s not painful to use.  Obviously this last requirement rules out anything based on Eclipse.

But there are a few niggling hitches remaining in Netbeans that need to be addressed.  Others have written about this already but I’ll paraphrase:

  1. fix the double-click drag select bug
  2. get a more native-looking Mac look and feel
  3. get some themes at least as good as Textmate, eg the default ‘blackboard’ theme

The first problem is in fact very painful and I haven’t been able to find any remedies for it.  Netbeans being a Java app, the GUI is implemented in Swing, which by default doesn’t seem to support the ability to double-click a string of text, then with the mouse button still depressed, drag to select additional words of text.

In any browser, for example, this works as expected: you can click the mouse in the middle of a word, double click to get the whole word, then drag left or right to get the string of words you need.  Not having this feature can be extremely painful because the alternative means you must place, with pixel precision, the cursor at exactly the beginning and end of a word, then click, then drag.

The former system lets you work a lot faster, and in a text selecting business like programming can really cut down on the agro in a day’s work.

If this problem drives anyone else crazy, or someone knows a workaround I’d love to hear about it.

For the second point the Netbeans 6.7 M2 release, out today, seems to address some of the issues.  But it has to be said the IDE is still on the ugly side of things, however slightly less bubbly now which I think is an improvement.

For the third point I dug up a theme this afternoon which is a definite improvement over the sparse selection of themes offered with the Netbeans download.  Check out Ruby Dark Pastels – Mac users beware that the .nbm file gets .jar appended to it when you download the component which makes it unusable.  Simply remove the .jar in the Finder.

The theme is not perfect however, method names are black on a dark blue background, and many code elements (constants, static methods, etc) are white and get match-highlighted in yellow making them unreadable.  Many of these elements are not configurable in the Fonts & Colours preference option.

Comments (20)

Tags: , , ,

Is vendor sponsored software certification the way to go?

Posted on 19 February 2009 by Demian Turner

In his article Three elements of certification success, Darren Hague, a friend and former colleague, argues that when software vendors are driving the certification process, there is a conflict of interest worth examining.

For example, in the case of Zend PHP certification which has been around for several years now, who ultimately benefits more from the programme – the software devs or Zend?

Currently Zend certification is one of the only options available to PHP devs who want to get accredited, however.  But judging by general feedback from the community  it would appear that, despite the current certification choices, quality discrepancies between PHP devs on the market can still be pretty … impressive.

Getting quality programmers is no problem as long as you have a bulletproof hiring process I hear you say – that’s another subject ;-)

Darrens’ final comment gives a nice insight into why PHP certification might not be more widespread:

The third major element of certification is market demand. Of course, if you are a doctor or a lawyer, then you cannot legally practice unless you are certified, which certainly helps with the demand side of things. Unless professional IT certification is legislated (an unlikely prospect for the forseeable future), then certification will only succeed if customers demand it.

Maybe industry demand for certification is not higher due to the lack of independent certifying bodies?

Comments (6)

Tags: , , ,

Seagull 0.6.6 Released

Posted on 27 January 2009 by Demian Turner

A new version of the Seagull framework has been released, download it here.

This is mostly a bugfix release but with some important improvements:

  • Improved preferences management
  • Better handling when DB connection is down
  • Updated FCKeditor to 2.6.3
  • Added German utf-8 support
  • Updated Horde_Routes lib
  • Consolidated translation features (SGL_Translation, SGL_Translation2) into new SGL_Translation3 PHP5 only package
  • Added media2 module which makes ajax uploads easier and provides media features to the CMS module

The Seagull framework release coincides with a new release of the CMS module, and an announcement of Doris, our new productivity app.  You can read the announcement here if you’re not on the mailing list.

This will be the last release of the CMS module as a mainly developer-focused download.  Version 2.0 of CMS will get its own website, improved developer and enduser documentation, and a Pay as You Go format for those who need the convenience of a hosted service.  Read more about the improvements and try the preview here.

Comments (4)

Tags: , , , ,

Error Message Control

Posted on 06 January 2009 by Demian Turner

Technorati error messages

I’m always amazed to discover quite high profile sites letting goofy errors out in the open.

Comments (4)

Tags: , ,

Unit tests, new packages, good practice

Posted on 06 January 2009 by Demian Turner

In case anyone missed it quite a nice PEPr proposal came in the other day, suggesting guidelines for software best practices and writing testable code.

Check out the original article too, it’s slightly better formatted.

Comments (0)

Advertise Here
Advertise Here

Subscribe by email

Enter your email address:

Delivered by FeedBurner

Categories

Books

Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists

Affiliates

PHPkitchen recommends you also check out the following sites :

Accounting for Small Businesses

FreeAgent sign-up