
Ask HN: Where can I find easy to read code, that can be understood completely? - morbidhawk
I only program my side projects on the weekends, when I come back to the code I realize how poorly it&#x27;s been written, especially if I&#x27;ve skipped a weekend. I&#x27;m really striving to make my code readable. A great book I read is &quot;The Art of Readable Code&quot;, and while it focuses on code readability from a micro-level (making a small code sample readable), I find more knowledge is needed to make a program readable when reading it from start to finish.<p>The code I find most readable is imperative code that can be read line-by-line. I find abstractions hide away important knowledge of understanding completely how things work. Additionally I prefer reading algorithmic code than reading a bunch of helper functions that are at a level of indirection away from understanding the code at hand. For this reason I try to write in more imperative style instead of OOP or functional. But I find that programs I write that can be followed line by line end up having a lot of variables that make it hard to keep track of everything.<p>I&#x27;ve tried to look for other projects that can be read line by line easily but I haven&#x27;t found one yet. I&#x27;ll end up spending way to much time trying to figure out what helper objects, functions, or structs are doing and they require jumping to a bunch of other files while trying to keep in my head what I read previously.<p>It seems these 2 things are at odds with each other: readable code vs code that can be read and understood completely. I don&#x27;t want algorithms hidden away but when they are right there in place with the other code it becomes too much.<p>Is completely readable code even possible? I&#x27;ve heard &quot;abstract just barely as much as you need&quot; or &quot;just use right level of abstraction&quot; but that doesn&#x27;t give me anything concrete I can do. Is there a project that you know about that was large but very easy for a new person to read and understand completely? Do you know how to write code like that?<p>Any ideas are appreciated. Thanks!
======
oblib
I know there's a lot of code out there I cannot read and suspect we're hardly
alone with that issue.

I comment my own code very heavily so I don't have to spend as much time
studying it at a later date.

And I don't try to get too tricky either. I don't fret over converting a block
of code into an obfuscated one liner. I avoid that instead.

