Live data from Hacker News

Ask HN: Where do I find good code to read?

news.ycombinator.com

11–20 of 216 posts

Re: Ask HN: Where do I find good code to read?

#11
post #4
post #3

There was a HN thread months ago on this topic. I recall people suggesting well known github repo’s. I’m unsure which ones but you could start at github…

"Ask HN: What's the best source code you've read?" https://news.ycombinator.com/item?id=32793534

It's worth clicking for the top post.

Re: Ask HN: Where do I find good code to read?

#15
I'm sorry these are videos, but your question made me think of these.

If you're looking for programming inspiration I love these videos

Jon Bentley - Three Beautiful Quicksorts https://www.youtube.com/watch?v=aMnn0Jq0J-E

Bret Victor - Inventing on Principle https://www.youtube.com/watch?v=PUv66718DII

Re: Ask HN: Where do I find good code to read?

#17
Give up on “good code”. Its pursuit is how junior devs pesters senior devs based on a delusion that such a thing is possible.

Good code is working code, code that pays the bills. Focus instead on writing code you can throw away easily, code that you are wholly unattached to and is isolated enough that rewriting it won’t cost absurd hours.

Re: Ask HN: Where do I find good code to read?

#18
post #7

The Elixir standard library is quite readable I’d say, but it all depends on what you’re interested in? I’d recommend learning Elixir as it’s immutable and a very simple language and does concurrency better than everything else (by inheriting from Erlang/OTP on which it is based) and the packages don’t seem to exhibit the needless churn that goes on in the world of JS, for example.

I was about to say this.

To folks starting out with Elixir, I suggest reading its standard library. From my experience, there was this aha moment when I started reading `Enum` module.

Also, Elixir's documentation is one of the best out there.

Re: Ask HN: Where do I find good code to read?

#19
post #17

Give up on “good code”. Its pursuit is how junior devs pesters senior devs based on a delusion that such a thing is possible. Good code is working code, code that pays the bills. Focus instead on writing code you can throw away easily, code that you are wholly unattached to and is isolated enough that rewriting it won’t cost absurd hours.

So much this. Good code is code that delivers business value.

Re: Ask HN: Where do I find good code to read?

#20

This isn't exactly a repo to look at, but the book "Clean Code" is a fantastic read for learning how to write good code. It does have a lot of examples in it, and does a great job explaining everything. https://github.com/jnguyen095/clean-code/blob/master/Clean.C...

https://qntm.org/clean has a great discussion of all the things that are wrong with Clean Code.
Post reply on HN