

Why do opensource hackers write obfuscated code? - Iroiso
http://iroiso.posterous.com/why-do-opensource-hackers-write-obfuscated-co

======
VMG
I'd replace the outer list comprehension with _filter()_ but otherwise the
code doesn't look "obfuscated" or even ugly. The alternatives would be _map_
and lambda or expand into a _for_ -block, both of which are less aesthetic
from my point of view.

------
wccrawford
Is that obfuscated? Or just poorly written? There's a difference. 'Obfuscated'
means it was intentionally unreadable.

I don't think they are obfuscating their code. I think they are writing code
that looks good to them at the time. They think it's beautiful for some
reason, and leave it that way.

Ideally, beautiful code should be readable by others, of course. Especially in
Open Source. But some people don't think like that.

~~~
bradleyland
It's a play on words. Obviously the authors of that code weren't making a real
attempt at obfuscation, but they did so unintentionally. I've observed this
myself plenty of times, and it's not limited to open source.

Programmers earn their paycheck (literally and figuratively speaking) by being
smart. Hence, programmers value smarts.

I don't read nearly as much Python as I do Ruby, so when I speak, I'm speaking
of the Ruby I've read. Ruby programmers use a lot of clever idioms. In a lot
of cases, they make things more intuitive. In other cases, they make you
scratch your head and wonder just what the hell is going on. This is usually a
case where a programmer has picked up an idiom that they found clever, then
used it in a scenario where the code actually becomes less clear. This is what
the author is pointing out.

~~~
wccrawford
Then perhaps the author should take his own advice. Using words to mean what
you want instead of what everyone else means isn't a good way to get your
point across. It's even worse than bad code, since it's deliberately wrong.

