Advantages of writing own code while using tutorials

Lori 2 Lori * rocks


I've made another discovery while learning React.js from Build Web Apps with React JS and Flux course on Udemy. My code is on GitHub.

Learning from internet courses is tempting and may seem easy when following instructor step by step. I've discovered an exciting way how to learn the most from each course:

First, I write in CoffeScript instead of plain JavaScript. It's more simple and in my opinion more efficient, braces and commas are barely needed.

Second, I create my own build system. I take my old build system and try to make it better each time and of course adjust to actual needs.

Third, I create components as soon as I get an idea what do I want to make, before instructor show how to od it. I also play with different options that can be used in the future.

Advantages of learning programming this way:

Here is some simple example:

In tutorial code looks like that:

render: function() {
  return <ul>
renderList: function() {
  if(this.props.items && Object.keys(this.props.items).length === 0)
    return <h4>
      Add a todo to get started.

And my code:

render: ->
  { if @props.items is null
        Add a todo to get started.