Monday, October 17, 2016

We can identify the redneck programmer from his source

All the comments are old code  just commented out. In fact, typically 2./3 of his source is prior, often experimental, source, commented out.  Otherwise, there are no comments.  His commmented code is his release system, much simpler.

In the source, you often find:

if opMode and &H0084 : do_something()

OK, so the redneck programmer is using bits to select various paths through the nest? And, he is using the hieroglyphics on the right?  And, no comments, naturally.

But, you see, the computer can search code faster than the critic can read comments.  And if you select opMode, then do search and search again, the editor will tell you, in symbolic syntax, what the code is doing. Why bother the programmer with the trivial explanations, especially if he is not that sure.

The redneck programmer will name his most important variable xxx, and  make it global.  Smart idea, no one else in their right mind would do that, so symbol conflicts are minimized.

The redneck is famous for feats of print debugging, known to pack up to 10  variables on a single line in some shell, somewhere.  No fool runs redneck software from the shell.  In olden time we knew them as printf miracle workers.

Interface and implementation hiding? No, the purpose of the interface is to make it easy to find and screw with the implementation. Libraries? Naw, what does the code want to import? He hunts it down and steals it, makes it local. If its that valuable, keep it close.

Can't be reformed, and system administers hate them.

No comments: