|
Build on what you already have with OO
If I start recalling a "Goons" sketch, then I'll show my age .... but never mind. It was a RERUN that I saw ;-)
Spike Milligan is counting votes at an election. "Two thousand, six hundred and forty two". "Two thousand, six hundred and forty three". "Two thousand, six hundred and forty four" ...
"Would you like a cup of tea" - a pleasant young gent walks up. "Thank you" says Spike. Sound effect - tea slurping.
"Two thousand, six hundred and .....". "Two thousand and .....". Pause. "One". "Two". "Three" ...
It's a classic, and we all laughed. And yet, when we're programming, it's so tempting to develop code from scratch - not to build on existing logic but to redevelop something that's already been redeveloped. And that's why the Object Oriented principle of inheritance is so brilliant and efficient. Taking one class defeinition, you define a new class ... not from scratch, but rather in terms of specifying only those things that are added or changed.
If Spike had jotted down the number he was at on a piece of paper, he could have carried on so easily after his cuppa. Of course, it wouldn't have been funny, but then programming isn't funny. (written 2006-08-17 08:29:57)
Associated topics are indexed under H108 - Objects in PHPY116 - Python - Best Programming PracticeP704 - Managing Perl ProjectsQ907 - Object Orientation and General technical topics - Object Orientation: Design TechniquesC239 - C and C based languages - Putting it all togetherJ715 - Putting the Java Language Together
Some other Articles
Computers, Brides and Cream TeasReporting on the 10 largest files or 10 top scoresTalking about other training companies.Tomcat - Shutdown portBuild on what you already have with OOPython - when to use the in operatorPython makes University ChallengeOld Wardour CastleDisplaying data at 5 items per line on a web pageComparison of Object Oriented Philosophy - Python, Java, C++, Perl
|
1893 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38 at 50 posts per page
This is a page archived from The Horse's Mouth at
http://www.wellho.net/horse/ -
the diary and writings of Graham Ellis.
Every attempt was made to provide current information at the time the
page was written, but things do move forward in our business - new software
releases, price changes, new techniques. Please check back via
our main site for current courses,
prices, versions, etc - any mention of a price in "The Horse's Mouth"
cannot be taken as an offer to supply at that price.
Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).
|
|