

Ask HN: What are some projects on GitHub that I can learn how to program from? - bnb

I&#x27;ve been trying for a while to learn how to program. Following the cannon of Why Learning to Code is So Hard (http:&#x2F;&#x2F;www.vikingcodeschool.com&#x2F;posts&#x2F;why-learning-to-code-is-so-damn-hard), I&#x27;ve been stuck early in the early stages of the Cliff of Confusion for a while.<p>But, I&#x27;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&#x27;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.<p>Ideally they would use core functionality of whatever language&#x2F;platform they&#x27;re built on, as I&#x27;ve found that most of the projects I am looking at use a ton of outside libraries that I don&#x27;t know. I&#x27;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.<p>Just FYI: The stack I&#x27;m trying to learn is all JavaScript (Node&#x2F;Express&#x2F;React), but I&#x27;m completely open to examples that I can learn from in any language&#x2F;platform&#x2F;framework.<p>Thanks a ton,<p>bnb
======
smt88
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](http://howistart.org)

~~~
lsiebert
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-...](http://annotated-code.maryrosecook.com/circles-bouncing-off-
lines/docs/circles-bouncing-off-lines.html)

------
percept
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.

------
eltaco
You could try implementing some of the methods in underscore/lodash -
[http://underscorejs.org/](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](http://underscorejs.org/docs/underscore.html).

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

------
donavanm
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.

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

[https://github.com/paircolumbus/Welcome](https://github.com/paircolumbus/Welcome)

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

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

