Settings

Theme

Show HN: Awesome-code-reading - A curated list of high-quality codebases to read

github.com

54 points by lucaslee 7 years ago · 18 comments

Reader

Vetre 7 years ago

I like looking at much better code bases than my own when I am considering making something. It's weird, but it really motivates me.

Here are a handful of ones that I really like (all related to gaming):

DOOM:

http://fabiensanglard.net/doom3/index.php - A great overview of it, mentioning the third game and its variants. Their whole github is pretty great. Just worth noting that many people consider Carmack's code to be some of the best in the industry. Really worth a read.

https://github.com/fabiensanglard/Doom3-for-MacOSX-

https://github.com/id-Software/DOOM

https://github.com/id-Software/DOOM-3

Monogame:

The Open Source implementation of Microsoft's XNA game dev framework. Really well loved C# code. And they keep it very clean.

https://github.com/MonoGame/MonoGame

Battle for Wesnoth:

Famous and well loved open source 4x game

https://github.com/wesnoth/wesnoth

Rogue-Likes:

There are a bunch of rogue-likes that are open source. It's a lovely look at the evolution of the genre and old school limitations. The genre as a whole is very open source friendly.

http://rephial.org/ - Angband

https://github.com/crawl/crawl - Dungeon Crawl Stone Soup

Lastly, here is a list of open source games. I would argue a huge chunk are not that nice. But there are gems in here. https://github.com/leereilly/games

  • lucasleeOP 7 years ago

    Hi, thanks for sharing these games related projects. I noticed some of them are fairly large projects with tens of thousands lines of code, which is a major roadblock for many people to learn something from a large codebase. What do you look for in them? For example, do you just want to see how a particular component, like a rendering engine, is implemented? (just guessing, I know nothing about games)

lucasleeOP 7 years ago

Thanks for checking out my project. Here is some background information.

I contributed to a few open source projects over the years, but I only focused on solving the problem I had, either a bug I wanted to fix or a feature I wanted to add. Once my issue was resolved, I didn't really care much about the rest of the project. I found it was less of a learning opportunity.

That's why I created this project to really track down the codebases that you can read from start to finish and learn how they are designed and implemented. Currently it only lists a few codebases that I actually have read. They are mostly small-size projects. I'd like to hear advice on how to approach and learn from a large project.

  • fit2rule 7 years ago

    You need one for Lua - the Lua sources themselves.

    Also, LuaJIT.

    • lucasleeOP 7 years ago

      For sure, heard a lot of good things about the Lua source code. I just checked Lua source code quick. It looks well documented, and the size of the project is very manageable. Added to my todo list. Thanks for the recommendation.

kureikain 7 years ago

I like this idea. I run a news letter[0] and we have a sections call `Code to read`. People love it.

That's being said, your repository probably end up on my next issue :).

---

[0] https://betterdev.link

  • lucasleeOP 7 years ago

    Thank you! I just subscribed to your newsletter. I especially like the "code to read" section. Checked several past issues and props to you for the consistency there.

artpar 7 years ago

I curated a similar list of codebases from HN comments here

https://medium.com/@012parth/what-source-code-is-worth-study...

  • lucasleeOP 7 years ago

    Thanks for the link. The list is solid. I have seen them being talked about many times in various threads here. Bookmarked.

mettamage 7 years ago

How do you go about reading codebases? I once fired up a debugger to go through ExpressJS and I learned some things from it. At the same time I wonder how I can do it efficiently.

rc_hadoken 7 years ago

No Python?...seriously? I'm still learning so I don't have any clout to throw around concerning a good Python code-base. Any suggestions?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection