Skip to content

Commit

Permalink
making wrong code look wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
raganwald committed Aug 24, 2011
1 parent f570612 commit 25f077d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 2011/08/hungarian.md
@@ -1,7 +1,7 @@
Hungarian PBKAC
---

Hungarian notation (whether apps or systems) is useful, especially when you want some of the benefits of an untype language but want to make wrong code look wrong. The trouble with it is just like the trouble with any documentation that isn't checked or enforced automatically: Over time the words diverge from the code, making it worse than useless because it actively deceives.
Hungarian notation (whether apps or systems) is useful, especially when you want some of the benefits of an untyped language but want to make [wrong code look wrong][1]. The trouble with it is just like the trouble with any documentation that isn't checked or enforced automatically: Over time the words diverge from the code, making it worse than useless because it actively deceives.

Here is some actual code I found in a current project today.

Expand All @@ -19,6 +19,8 @@ Here is some actual code I found in a current project today.

Sure, a generator could be used to DRY up the code. But before we get there... What do the method names promise and what do the methods deliver? Need I say that a quick "blame" in git revealed that these lines were written by the usual suspect?

[1]: http://www.joelonsoftware.com/articles/Wrong.html "Making Wrong Code Look Wrong - Joel on Software"

**(more)**

Follow [me](http://reginald.braythwayt.com) on [Twitter](http://twitter.com/raganwald). I work with [Unspace Interactive](http://unspace.ca), and I like it.

0 comments on commit 25f077d

Please sign in to comment.