Art of writing unmaintainable code.
thc.org
thc.org
You can tell that he's not talking about this from a theoretical point of view and that the majority of those samples were encountered in real life code.
I've seen a couple of them myself over the years (and I've been guilty of at least a few, especially in the beginning). To be able to compile such a vast set of examples must point to a very colorful career.
The best part of the whole thing is that you can read it two ways, invert every line in meaning and you get a pretty good naming conventions and coding standards guide.
Recursively, of course.
switch (n)
{
case 1:
p = "one";
if (0)
case 2:
p = "two";
if (0)
case 3:
p = "three";
break;
}As an aside, do any other Haskell hackers find that single letter variable names are a lot more usable than in other languages? x:xs, y' and their ilk seem more readable than in other languages and often more readable than long variable names in Haskell.
"The following tips will help you corrupt the original intent of Hungarian Notation"
But it's not really that clear if you've not heard what proper Hungarian Notation is before.
Conversely, never underestimate how much havoc you can create by using spaces for indentation. With tabs, the level of indentation is clear and atomic. With spaces, it is arbitrary, and, wait for it...
hard to maintain
Carriage (or cursor, if you prefer), go to the next tab stop. [2]
For typewriters it means to go "literally" to where the next stop is. For text editors (at least for emacs)[1], it means to insert as many spaces as needed so the next column on the current line matches with the last non-space column on the previous line.
So, in the same way I use the table tag for tabular data in markup, I use the tab key for tabular text.
[1] http://www.jwz.org/doc/tabs-vs-spaces.html [2] http://en.wikipedia.org/wiki/Tab_key#Origin
I do this by accident all the time.
And this is the funniest thing I've read on the internet all year:
"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."
It always makes me laugh when my colleague ends up going through it to add another method and can't get his head around the fact one of mine has a hidden dependency obscured by an autoloader, with irreverent comments like `// lets get some validation up in this bitch` littered all over it.
PHP autoloaders and magic methods are a great source of such frustration when pulled off right.
Common problem found in coding, attempting to do things in a hifi way, when simple things server the purpose.
- when we're told to write maintainable code :: MY CODE IS GOOD !! I'm sure Bob/Igor/Venkatachalapathy (coworkers) understand it just fine
- when we're told - these are the tricks of unmaintainable code .. :: HOLY COW !!! so THIS is what Bob/Igor/Venkatachalapathy has been using against me !! no wonder my promotion's been slow
I'm more afraid of the "Use threads With Abandon" tip.
Also makes me think how long it takes big teams to filter out people like this.
The domain suggests something else, though: "THC dot org" :-)
(What are you people, on dope?!?)
Isn't that the first item of Effective Java? Factory methods? Which is a good thing.
Meta-obfuscation in the obfuscation guide?