Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can't be serious. This is a bad joke.

Are you trying to defend a software engineer who is bad at writing readable code by... bringing Knuth to the table?

The same Knuth who published "Literate Programming"? "Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do"?



I have worked with people that have a command of a given programming language, and algorithms such that it appears to be magic to me. (C++ is common for this problem).

The readability problems may be the reader.


So we share personal experiences now; okay, let me share mine.

Once, one of my teammates committed an extremely complex piece of code that I wasn't able to understand. As I expected, we soon started to start bug reports. Finally, the original author couldn't fix it properly, so I threw away the code and rewrote it from scratch. I made it simple, readable, and, what's more important - debuggable. And it was correct.

So what? Your personal experience says that you are not the smartest person in the world, and my personal experience says that magic is magic — it doesn't work properly in the real world.

It's easy to build "magic" code that's hard to understand. You can just run any readable piece of code through an obfuscator. Still, no one believes that an obfuscator is genius. If you see "magic" code that, for some reason, truly works, it means that the author did a ton of research and forgot to put that into comments — i.e., obfuscated a code. If, even with comments, it still looks like magic, then the author avoided doing a self-review & simplification of the code. And well, sometimes, even after that, code can still be magic... if we have chosen the wrong tool for doing the job (does it sound like a depiction of genius?).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: