Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What are some projects on GitHub that I can learn how to program from?
21 points by bnb on Feb 9, 2015 | hide | past | favorite | 8 comments
I've been trying for a while to learn how to program. Following the cannon of Why Learning to Code is So Hard (http://www.vikingcodeschool.com/posts/why-learning-to-code-is-so-damn-hard), I've been stuck early in the early stages of the Cliff of Confusion for a while.

But, I've heard many times that learning to program by copying (reading and then re-implementing) is a good way to go about it. So, I'd like to know if there are any GitHub projects you can point me toward that I can look at, re-implement, and learn from.

Ideally they would use core functionality of whatever language/platform they're built on, as I've found that most of the projects I am looking at use a ton of outside libraries that I don't know. I'm mainly looking for code that will show me how to use functionality of programming languages to create solutions to questions that the ideas behind the code are based on.

Just FYI: The stack I'm trying to learn is all JavaScript (Node/Express/React), but I'm completely open to examples that I can learn from in any language/platform/framework.

Thanks a ton,

bnb




What about Express itself?

Honestly, JavaScript is a very confusing language to start with. It's also hard to debug (easy-to-miss scoping issues, silent failures, silent logic errors, etc.) You'll write code that you think will work, and it just won't, and you won't know where to even start.

Go is a decent language for a beginner because it's very explicit (there's very little magic).

Check out this site, which I just discovered on HN: http://howistart.org


Actually, starting with a hard to debug language may be helpful. When I first learned a general programming language,it was C, which is also fairly hard to reason about. It taught me useful debugging skills, and to understand my code, not just trust my IDE/the language to tell me what is wrong.

Javascript also has the benefit of allowing you to see results immediately in the browser.

Anyway I recently read this annotated code in javascript, which I felt was interesting to read, and may be helpful.

http://annotated-code.maryrosecook.com/circles-bouncing-off-...


Ok, I read the article and the Cliff of Confusion is what I thought it was.

Besides coding, coding, coding your own projects (which I'd prioritize), you might also try answering questions on StackOverflow for your chosen stack.

Don't be surprised if you're unable to do so at first, especially in burgeoning technologies with many developers competing to establish their reputations, but this (often) forces you to dig into the source code, spelunking your way through and--hopefully--learning good style and architectural practices while coding smaller solutions with a shorter path to completion versus monolithic projects.

See the Node standard library, for example. (Also the recipe-type books focus on specific, more practical solutions, instead of long-form tutorials.)

If that doesn't suit you, keep trying other things--there are many sort of "katas" you can do.

P.S.: I thought asdfppp's (now dead) comment was helpful.


You could try implementing some of the methods in underscore/lodash - http://underscorejs.org/? Each of those are pretty simple and can build off each other - you'll learn how to deal with arrays, objects, functions, arguments, apply/call, this, etc. You could write your own tests or use their unit tests as well to get some practice with testing. I was planning on doing this myself at some point haha.

There's an annotated source for underscore: http://underscorejs.org/docs/underscore.html.

There's also just implementing data structures/algs: https://github.com/felipernb/algorithms.js


Check out exercism.io. Its effectively a series of unit tests where you fill in the implementation. Peers are there to help/comment on yiur specific implementation. As you work through the tasks they increase in scope and complexity.


PairColumbus has forkable web development challenges that you can work and then submit for code review.

https://github.com/paircolumbus/Welcome


Work through this book - http://eloquentjavascript.net/ it starts from the basics and the examples are pretty neat.


Wow. This looks like great stuff. And I love the interactive examples. Definitely want to tackle this myself now.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: