Newsreel
Products & Services
Web Watch
Software Update Resource Directory
Events Diary
Articles
The Magazine
Subscribe
Contact Us
Search DNJ Online |

Disposable Objects 18
Greymatter humour
Most computer company Web sites tend to be dry, humourless places. However, check out
www.greymatter.co.uk and you will find that all is not lost. Tucked away under the heading of Technical Support, just below ’Free newsletter’, you will find a link labelled ‘Humour’. Throwing caution aside, we thought it our duty to explore further on behalf of our readers.
And a good thing we did, for hidden under the directory
www.greymatter.co.uk/humour
we found no less than 78 documents, packed with useful information!
For example, there is the following truism: “Applications programming is a race between software engineers, who strive to produce idiot-proof programs, and the Universe, which strives to produce bigger idiots.”
Or there is Brooks’ law of programming projects which states: “Putting twice as many programmers on a project that is late will make it twice as late.”
Then there is the invaluable advice contained in the document, ‘How to Write Unmaintainable Code’. This lists over 50 specific techniques, so we can cover just a few in this small space:
-
Lie in comments - you don't have to actively lie, just fail to keep comments as up to date with the code.
-
Make sure that every method does a little bit more or less than its name suggests. As a simple example, a method named isValid(x) should as a side effect convert x to binary and store the result in a database.
-
Use acronyms to keep the code terse. Real men never define acronyms; they understand them genetically.
-
In the interests of efficiency, avoid encapsulation. Callers of a method need all the external clues they can get to remind them how the method works inside.
-
Never use local variables. Whenever you feel the temptation to use one, make it into an instance or static variable instead to unselfishly share it with all the other methods of the class. This will save you work later when other methods need similar declarations. C++ programmers can go a step further by making all variables global.
As the document says, follow these rules religiously and you will guarantee yourself a lifetime of employment, since no-one but you will be able to maintain your code.
Top of the page
Have you read Angie Baxter?
Articles Main Menu
|
Issue 24
Issue 23
Issue 22
Issue 21
Issue 20
Issue 19
Issue 18
|