NYCPHP Meetup

NYPHP.org

[nycphp-talk] (no subject)

Tim Gales tgales at tgaconnect.com
Wed Jan 21 09:10:11 EST 2004


I came across a post:
http://news.php.net/article.php?group=php.internals&article=6997
by Sterling Hughes 

Here is a snippet from that post cut-out (which carries the 
usual caveat of being "out of context").

"... 
Much of the current code in SimpleXML is due to immaturities in either
Zend or the LibXML interface at the time I was writing SimpleXML.  I
wanted 
to have cool things to show at conferences, plus other people wanted to
see 
what was possible with simplexml, so features started to creep in.
xsearch() 
and schema validation were the first added, then came other methods like 
hasChildren() and getChildren() (when a simple xpath query /child::node()
can 
tell you this)

Most of simplexml's methods are either redundant, or redundant based 
upon redundancy (hasChildren(), getChildren(), attributes(), count()).  
Each  of these methods are actually a very simple, very optimized xpath 
expression..."

When I read this I sort of translated it in my mind to read: "Due to
popular demand I allowed non-orthogonal features 
to creep into SimpleXML causing bloat and making it -- well 
not simple."

(I was considering apologizing for allowing a shade of an old 
thread on an old thread at:
http://lists.nyphp.org/pipermail/talk/2004-January/007005.html
to haunt this list -- not. "I wrote it and I'm glad". )

Of course there is nothing wrong with letting an api grow and 
even take on a 'life of its own' -- while its on the 'drawing board',  
because it is in an experimental stage (to see what works).

When preparing an api as a release candidate it is often prudent to use a
'George Forman-esque' grilling approach (to produce leaner and 
meaner results).

The leaner the api the less the need to inject "Klein" solution 
to reduce the discomfort during later surgery.


T. Gales & Associates
'Helping People Connect with Technology'

http://www.tgaconnect.com

"For complex systems, requirements may be ambiguous and hard to state. 
The design may not be able to be finalized without some experimentation 
in an actual program to see what works..." 

Fredrick Brooks 
'The Mythical Man Month'


Brooks also said:
"Plan to throw the first system away you will anyway -- "




More information about the talk mailing list