
Learn to Code by Building Projects (enlight.ml)
190 points by siimplytech on Nov 13, 2016 | hide | past | favorite | 26 comments

This is a neat idea, but I'd recommend starting on an altnerative. Pick an open source project and modify its behavior. It will serve as a code style corpus to guide the process, and it's already a polished product, so you don't have to get into the nitty gritty of the last 20%.

For a more concrete example, I learned php by creating a phpbb instance for my friends and then making addons/changing how it worked. The ratio of work done to results accomplished was high.

It's also very valuable to learn how codebases might be laid out and how to just find the parts you want.


Yes, this is spot on. I work in an industrial R&D department where engineers are expected to be fairly independent; on a recent project, an engineer whose skillset we had misestimated during the interview had a really hard time starting the codebase from scratch, architecting the software, etc. It had to be saved close to the last minute by a senior engineer (to be fair, the manager should have kept a closer eye on the project).

For that engineer's next project, we assigned her to something already established and architected, and she's been doing great. Her programming/architecture skills grew tremendously in a few months by being immersed in that codebase.

(I was the senior engineer who had to be called in for the first project, and lead on the second project. The engineer in question was great in many other areas critical for the job, just her software carpentry skills that were lacking).

It's also a skill that schools don't do a very good job of.

Right now I'm TA'ing a C++ class and the sheer stupidity of some of the questions that I get asked is ridiculous (I say stupidity, but it's really a mix of (1) some actual stupidity, (2) students not thinking for themselves, (3) students having no idea where to look and/or stuff was explained by hand-waving it away.)

One thing we've done, for instance, is require that students submit their code via GitHub and make their code compile under both GCC and Clang on Travis. On the last assignment, the professor made a mistake when duplicating the Travis config file, so Travis kept trying to run a binary that wasn't there, because the new assignment had a different name for the compiled binary.

The sheer number of emails and questions I got was absolutely ridiculous - and granted, I didn't blame the students for asking, because the entire toolchain side of things had sort of been hand-waved away from them, but the fix was literally replacing "./hw4-submission" with "./hw5-submission" in the Travis config.

The point I'm getting at, I guess - because this isn't so much a thing about codebase architecture as knowing the tools you have to use - is that too much time is spent in the traditional CS education telling students to fill in code, or giving them frameworks and saying "make your thing work with this", instead of making them design stuff ground-up.

I don't have a lot of experience with Travis - was the error message straight forward?

I wonder what a course teaching debugging from the error message backwards would look like? I was a semi-decent programmer before I started working but learning to debug took a lot more on-the-job WTFs to get the hang of.

Sadly, no. It didn't help that there were a _lot_ of problems in the Travis/C++ ecosystem that complicated the matter.

I actually have an outstanding PR into the Travis docs to update this which hasn't been merged yet for reasons unbeknownst to me https://github.com/travis-ci/docs-travis-ci-com/pull/746

I agree that OS projects are a great way to learn, but I don't think that most people would be able to _start_ coding from an open-source project.

I found it really useful to look at Ruby projects on GitHub after reading a book or two: I wouldn't even had known where to begin if I opened up a GitHub project on day one.

YMMV, though–I've always got the sense that PHP would be an easy language to jump into and begin hacking on. Same with the classic HTML/CSS/JS stack, which this project focuses on. Maybe it's a language-dependent thing?

which books did you read beforehand ?

It's been a while now, but I really liked Eloquent Ruby.

If you're looking for Rails-specific knowledge, the Hartl tutorial (I think it's just called Rails Tutorial) is fantastic. There's a print version, but the web one is free (at least when I read it) and stays updated.

I learned PHP from hacking an open-source project I wasn't quite happy with as well. Highly recommended, it's really hard to sit down at a blank screen and create something from scratch. Much easier to sit down at a code base that's 90% of what you want and hacking the rest of it to bits. At least you know what you're starting with already works.

Setting up a build, testing and development toolchain on open source projects is often a nightmare.

Added to which on large projects there's often an element of fear over changing things and breaking other things.

As an even more concrete example, all you have to do is click on the "issues" page of a project you like on github and start fixing things. Slowly work your way up the chain from adding documentation, to fixing low priority issues, to fixing high priority issues, and then to adding new features. Looks great on a resume as well and you'll likely be able to get yourself into job interviews at the very least as you continue building your skill set.

Disagree; the complexity of any mature project is usually massive, and just getting to understand what's going on where is too much for someone learning. Not to mention that usually there will be a framework involved, which have their own learning overhead.

Not to mention that 'polished' is not necessarily an adjective that one would apply to a lot of open source or closed source projects. But you could pick a small one that is actively maintained on Github, fork it, and try to improve it. Offer the improvements to the originator and see if you can help each other.

I've been coding for 6 months. What open source project can I even remotely understand?!

To the author: great work. This is impressive -- for a high school student [0], no less -- and useful. I'm always trying to think of good projects to recommend people learning to program or trying to supplement schoolwork. There are a number of lists (of lists?) on Reddit (like [1]), but they aren't as well thought out as your three right now. I hope posting this here helps with the incentive to keep this up.

[0] https://blog.shamdasani.org/no-i-do-not-know-that-language/

[1] https://www.reddit.com/r/learnprogramming/comments/2a9ygh/10...

Creator here! Thank you :) The list you suggested on reddit looks awesome - I'm gonna use some of those ideas. Working on a basic to-do application right now.

Totally agree and it is the best approach. Here in Wellington, New Zealand, we have a free workshop for everybody who would like to learn JavaScript, and we build a project together. The transcript is available online and totally free for everybody worldwide here: http://yoember.com

Perhaps I'm being pedantic, but is a clock app that requires app.js not really 'pure CSS'?

You are right. That's an error on my part. I just wanted to emphasize that the clock was designed in CSS, and that it's not some image off the internet or something.

There is also a site that reminds me of your approach with similar projects. https://www.freecodecamp.com/

How is sight like enlight.ml made?

How is it hosted, how do the pages come together, etc.

That would make a great tutorial, even if it's at a high level.

Hey, it's hosted on GitHub pages. The code can be found here: https://github.com/samayshamdasani/enlight

If you take a look at the html files, along with the CSS - you may get an idea. I plan to make a tutorial on making a personal website from scratch like how I did (no frameworks, etc.) and then making a tutorial on technologies like Jekyll, etc.

Thanks man, I appreciate it!

after sign up and clicking return to site I get sent to:


same thing happens when you click the link in the confirmation email.

Hey, I'm the author. The mailchimp list was associated with a website I built for one of my clients - I'm going to switch it back to https://enlight.ml soon (I'm just at school rn lol)

also some of your fiddles for the hex generator are in the wrong panels i.e the do not follow the instructions on the page.
