Things we wish we knew when we were learning to code

Cliffs:

  1. You’re already a developer
  2. Work on things you like
  3. It’s easier than you think — just don’t give up
  4. Build your network
  5. Don’t always try to produce elegant and efficient code
  6. Learn Git sooner than later
  7. Work closely with other developers
  8. Learn patterns, not tools
  9. You’re always going to be learning

Via https://medium.com/code-school/things-we-wish-we-knew-when-we-were-learning-to-code-bd83067ac509

Progress #3

Was doing some studying with JavaScript via http://www.learn-js.org/en/Loops.

I was testing this code:

var i = 99;
while (i > 0)
{
    console.log(i + " bottles of beer on the wall");
    i -= 1;
}

It worked fine in Chrome Developer tools, Console menu.
It displays from 1 to 99 bottles of beer on the wall in a loop.

Crazy me, I switched – sign to a + sign without thinking. DO NOT ATTEMPT THIS!!

var i = 99;
while (i > 0)
{
    console.log(i + " bottles of beer on the wall");
    i += 1;
}

Guess what happened? My Chrome crashed, It will go from 99 and beyond space. In an infinite loop…I couldn’t close the tab. Silly me, should read the code carefully before executing it.

Solution:

In Chrome: Either Shift+ESC or Menu → More Tools → Task Manager.
Find the tab and click End process. It will stop the tab from running.