NYCPHP Meetup

NYPHP.org

[nycphp-talk] Re: Good PHP Apps (Was: suggestions for re-training of a, junior VB/.netprogrammer)

Jayesh Sheth jayeshsh at ceruleansky.com
Wed Jun 30 14:01:25 EDT 2004


Hello all,

this is an interesting discussion: is a "good" program one that is 
comprised of clean code, or one that fulfills a need?

John wrote:
 >In VB/M$ land, "Hello World" is an example of professional programming.
 >In OS/PHP land (to read these recent posts) even writing phpBB is 
 >unworthy.

This is an interesting point. Thinking back to my own experience, I have 
the following to say: I created a content management system which I have 
successfully customized and resold to several customers. It gets the job 
done, it works without major (security / data loss / usability) bugs, 
and the customers are happy. But from the point of view of "cleanliness 
of code" and overall "architecture", there are many things that I would 
like to change.

I sat down one afternoon, determined that a complete rewrite was the way 
to go. After a couple of weeks of work, I made quite a bit of progress; 
but the new system had hardly any features, and quite a few visible 
bugs. The architecture was nicer, the code was (ostensibly) cleaner - 
but from a value-added point of view, I had not gotten that far.

In that moment, I realized that all the hours I had spent writing Rilke 
CMS were also hours spent learning PHP. And that, while the code 
contained therein was not the equivalent of a well-aged Chianti Classico 
or a sumptuous piece of Vermont cheddar, it satisfied the customer's 
hunger for a system that let him update his own site.

All the little tacked-on addons, all the little code pieces shoehorned 
into a system that was growing too fast - they all did something useful.

When Netscape engineers decided to throw out the old Netscape 4.x code 
base in favor the new, unfinished Gecko codebase in 1998, they went 
through what I am feeling now: "old is bad, new is good".

In evaluating the usefulness of software, it pays often to think of the 
business value added by that program. Even if I write a piece of 
software that has the cleanest code in the world - if it does not do 
something unique, if it does not scratch someone else's itch, then it 
probably will not scratch mine.

All these pieces of often-derided software: PHPBB, Gallery, Microsoft 
Windows, etc - they all have served useful purposes at some point.

But what about security? Yes, that's a valid point - writing secure 
software is important, but it does not always happen. Business 
deadlines, fulfilling marketing requirements and the desire to stay in 
business by shipping attractive products on time force companies to 
think of producing software that will be in demand - not software that 
cannot be broken into.

I think it speaks to the inner-burglar in all of us when reports of 
another computer trojan or virus outbreak storm the front pages of 
newspapers. As food for thought: why should banks have locks and 
security cameras? Why do houses have doors and locks?

Does the problem lie in the weakness of locks, or the lack of human 
restraint?

Best Regards,

- Jay





More information about the talk mailing list