This is a list of books currently on my To Read shelf... literally. I do not suggest or anti-suggest any of them at this time as I haven't read them yet.
Current Efforts:
Blue Parabola, LLC
HubAustin
web2Project
PHP'ers:
Cal Evans
Eli White
Elizabeth Naramore
Joe LeBlanc
Matthew Turland
Matthew Weier O'Phinney
Planet PHP
Tony Bibbs
Business/mISV:
Bob Walsh
Eric Sink
Joel Spolsky
Micah Baldwin
Paul Graham
Past Projects:
CodeSnipers
HOBY
Judicial Watch
mobile FoxNews.com
NRTW
Great Tools I use:
Drupal
GitHub
NetBeans for PHP
phpUnit
Subversion
Zend Framework
This is not the home of dotProject or web2project. It is the home of CaseySoftware, LLC. Any dotProject support questions should be referred to their support forums.
Everyone knows the common reasons for Encapsulation...
But last week, I found another reason perfect for Encapsulation:
Encapsulation is a defense against incompetence.
That's right! By wrapping a particular piece of functionality together in a little package, someone that doesn't have a freakin' clue can actually protect themselves. The separation of interface and implementation is the key here.
The clueless person - alright, I'll be more polite... the newbie - can be helped by someone with a little more skill. That second person can come along and clean up the implementation without changing anything else. In some cases, this could be a small optimization or completely gutting everything and rebuilding it from the ground up.
The instance where I saw it, the friend passed along a 40+ line function to handle date formatting. It converted a date from a 12 hour am/pm time to a 24 hour clock, parsed out the minutes and seconds to know whether they should be displayed as plural, and a few other things that I don't want to think about. It was a complete mess filled with nested if's, a loop, usage of a three of globals, and a even a lost book of the Bible*.
The clueful friend managed to replace all of that mess and chaos with two lines of code... using the language's underlying date/string functionality.
* Ok, I'm exagerating a bit... he only used two globals.
Post new comment