Hi everybody! I have a friend that would like to learn to code for the web, his knowledge is all about JavaScript of like 7 years ago (he's 23 now), when you had just a single file to add interactivity on a web page.
Yesterday we did a videochat following a videocourse, trying to introduce him into Angular 2, but we had a problem: he finds difficult to follow a tutorial if he isn't understanding every thing that is going on (like why he has to import all those things that he doesn't know what they do).
How could I help him to not feeling fatigued in the very beginning of discovery of all those new things that belong to Angular 2 (and TypeScript)?
Uhm, yes, he should write again in vanilla JS first. Then, maybe Aurelia would fit better, after that, he won't notice its presence yet will practice with new JS. Thank you for replying!
Don't start with a framework. They should learn ES6 first - learn what has changed in the native language.
7 years is a long time. They also need to update what they know about HTML and CSS; they need to know what a modern browser's capabilities are; and learn a basic tooling setup like using npm+gulp.
A lot of fatigue about the current state of play is that you don't write the file that ships to the browser. You write abstracted code and use tools that do linting, transpilation, bundling and so on that ultimately spits out the file(s) you ship to the browser.
If you don't know how to use the tools, you are toast trying to get any modern framework running. You'll spend hours just trying to set up the environment and no time learning to make something.
So, they should learn ES6, in a single file adding interactivity to a page. Then they should use something like Gulp to run eslint on that file. Then add Babel to produce a backwards-compatible version of that file...
Build up from the basics. You don't learn to drive in a racecar.
Build something applicable typescript html and css Build something applicable using angular 2 html css and typescript Find something applicable to your friends life, work, studies, home, hobbies etc - build it! Studying theory watching videos crash courses documentation - will become valueless boring and drive depleting without an end goal the info is hard to comprehend as purposeful without any moving parts. Get coding and skip understanding how the framework is built just pass on how all the parts of system dance together.
JavaScript of like 7 years ago [...] when you had just a single file to add interactivity on a web page
That isn't how JavaScript development looked like 7 years ago. For that matter, it was precisely in 2010 that npm and the some of the biggest frameworks still in use were released.
That aside, I think it should be enough to introduce him to ES2015 and getting him to practice. If he's really interested, he'll look into libraries/frameworks by himself. And I recommend a lighter framework; angular is way too opinionated to use as first framework.
Marco Alka
Software Engineer, Technical Consultant & Mentor
The thing is, you try to bring him up2date, however you try to enforce a specific framework and way of doing things on him. Try to take it slower and let him first get a feeling for the language itself. Vanilla, I mean - a lot changed over the course of the past seven years. A good programmer is one, who can use a framework to be productive, but is also capable enough to handle situations for which there simply is no framework or a framework would be an overkill (or performance-killer).
Once your friend feels comfortable with regular JS, introduce Angular to him. In the beginning, don't get too technical. Just a rough explanation what each part does and how the architecture looks like. Once he understands the big picture, starting to develop with the help of the stuff he caught up with is pretty easy.