Hacker News new | ask | show | jobs
by throwaway2048 2393 days ago
There is lots of code that is difficult to understand, for anyone.

What about code that proves a complex, many page mathematical theorem?

What about code that does complex and very math heavy things like GCM encryption modes, or statistical compression via prediction by partial matching and arithmetic coding?

Just reading the code isn't always enough, plenty of complicated code requires understanding of concepts far outside what you could hope to fit in a comment.

1 comments

> What about code that proves a complex, many page mathematical theorem?

The hard part should be understanding the theorem. If you understand that and the code is still difficult, then the code should be better written.

I guess one exception is when you're optimizing for performance and make an explicit decision to sacrifice maintainability.