

Learning to Ignore Superficially Ugly Code - budu
http://prog21.dadgum.com/85.html

======
DanHulton
_I'd_ take the time to make the fix, update the indenting, fix up the
inconsistencies, and all that. I know all about the Broken Windows Theory
(<http://en.wikipedia.org/wiki/Broken_windows_theory>), and have seen it in
practice in too many places to ignore things like this and let them "slide".

You let one slide, then another, then another still. Eventually, you start
getting little mistakes like this everywhere, because _all_ of your code is
ugly and difficult to read, and you have built up just mountains of technical
debt.

------
ihumanable
Having come into possession of some of the ugliest PHP code I've ever seen, I
would say it's definitely worthwhile to fix it.

Thousand line files with what appears to be random indentation are a nightmare
to work with. Meaningless variable names make it a game of mental gymnastics
to figure out what $total = $poster * $gmd / $p->lasty is supposed to be
doing.

This is based off my actual real world usage, taking the hour to reformat a
multi-thousand line script which has a habit of exposing interesting edge-case
bugs ever couple of weeks has probably saved me far more time than it cost.

------
mansr
I take badly formatted code as a sign of sloppiness on the part of the author,
and this usually comes through in more than just the formatting. This saves me
the time to actually read the code.

------
muyyatin
Usually pretty indentation helps people read and scan the code faster, and
using a tool to auto-format the code is a very small time investment that
helps save reading time in the long run.

~~~
muyyatin
As another side-note, this is similar to your article being formatted and
indented nicely for reading.

