I pretty much read the code for every dependency I use. It helps me understand how it works and what the docs are fibbing about. If I can't read the code because it's proprietary, I always strace it to see what it's doing. For me, it makes it easier to reason about the behavior of my program. Currently my favorite code to read includes: key/value databases written in C and other "lower level" languages, and the golan…
Ask HN: What code do you frequently read?
21–30 of 64 posts
Re: Ask HN: What code do you frequently read?
#22Re: Ask HN: What code do you frequently read?
#23Re: Ask HN: What code do you frequently read?
#24Re: Ask HN: What code do you frequently read?
#25I pretty much read the code for every dependency I use. It helps me understand how it works and what the docs are fibbing about. If I can't read the code because it's proprietary, I always strace it to see what it's doing. For me, it makes it easier to reason about the behavior of my program. Currently my favorite code to read includes: key/value databases written in C and other "lower level" languages, and the golan…
Would you mind going into detail about how you use strace in that context? Or about how you learned to do that? That's a very handy skill which I need to learn.
Re: Ask HN: What code do you frequently read?
#26Looking through my code reminds that I can do hard things. I can solve hard problems, even elegantly. Other times it reminds me how painful a project was to finish or I chuckle at how BAD of a coder I was back then compared to now. It helps me feel like I'm making progress despite the relentless stack of issues, problems, and assignments.
And when I do feel motivated to be a better coder, I try to explain somebody else's source code to somebody else. It helps me be a better reader and writer.
Re: Ask HN: What code do you frequently read?
#27My goal is to complete a game in C++ using SDL2 this year, so i've been reading a ton of that on Github just to see how other people do it.
Re: Ask HN: What code do you frequently read?
#28If I am returning to a piece of code frequently it's not because the code is good, but because the documentation is bad.
I think some of the best code I use is that which I don't look at frequently, because it means it's behaving well on its own / in concert with other components, and is abstracted enough that it doesn't require changes.
Re: Ask HN: What code do you frequently read?
#29I've found that diving into a code base is a great way to learn about a new topic or language, and to get rid of the "magic".
Re: Ask HN: What code do you frequently read?
#30Golang stdlib is an excellent reference for how to write idiomatic Go code https://github.com/golang/go/tree/master/src