On Wed, Apr 14, 2010 at 10:06:39PM +0100, Ashley Sheridan wrote:

> On Wed, 2010-04-14 at 16:52 -0400, Paul M Foster wrote:


>     I've never had other coders looking over my shoulder, and I agonized for
>     years over whether my logical solutions were the "best"
>     approach. Now I
>     just code and take pride in the fact that I can understand what I did
>     later (mostly).
>     Paul
>     --
>     Paul M. Foster
> I think as long as the code is readable, and doesn't have any glaringly 
> obvious
> issues (I've seen people re-writing built in PHP functionality because they
> didn't know the built-in function existed) then it should be OK. Add comments
> to aid any areas where you think you might forget or other people might not
> easily understand what is happening.
> Don't get me wrong, clever ideas are nice, and sometimes with the right 
> comment
> they just work beautifully. Just occassionally though something is done in 
> such
> a neat clever way, that in the future when it comes time to extend the system,
> this neat clever idea is actually a hindrance and causes extra work because it
> has to be re-written a 'less-clever' but more flexible way!

That reminds me of a story. I once wrote what was almost an RPG (RPG--
the language, not the game) interpeter under FoxPro to handle incoming
EDI traffic and update invoicing, etc. The big problem with EDI is that
no one follows the standards properly, so every vendor tendering an
invoice did it differently. So you needed a database driven system which
would selectively make decisions based on each line of incoming EDI
content. Worked great, and when a new vendor came along, you just
analyzed their transactions and populated some more records in the
database to handle that vendor's transactions. I know, it sounds
obscure, but it made perfect sense at the time.

Shortly after that, I left that company. I documented the system, and it
worked fine, but it was hard to wrap your wits around how it worked. And
I just know the next coder on that account was cursing me day and night
for writing that system. 



Paul M. Foster

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to