Abject-oriented programming

Sunday 8 July 2007This is more than 17 years old. Be careful.

Greg Jorgensen shows how not to do it: Introduction to Abject-Oriented Programming:

Inheritance is a way to retain features of old code in newer code. The programmer derives from an existing function or block of code by making a copy of the code, then making changes to the copy. The derived code is often specialized by adding features not implemented in the original. In this way the old code is retained but the new code inherits from it.

His tone is perfect, explaining ludicrous techniques under well-known names, enough so that many commenters took the whole thing seriously.

Comments

[gravatar]
Thanks for the laugh, but reader beware.
Comment #12 from Niel made me snarf the milk I was drinking.


All local variables should be named starting with the prefix �tmp� followed by an index. This makes sense because local variables will disapear once the method scope is exited, hence they are temporary. Allow for 3 digit indexes beacuse a method with more than 999 variables obviously requires a better naming scheme. For example �tmp001A�, �tmp001B� is much clearer.

Also, the only type is String. This makes sense because everything can be represented as a string.

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.