My "real" advice for impatient programmers: just start programming, and every time you encounter a problem google it. Don't know how to setup node.js? Google should lead you to `npm init` or a starter. Getting some weird syntax error? Google it. Once you learn the basics, want to do X? Google it and determine a) how to do X, or b) if X can't be done / is bad practice. Just by diving head-first into whatever you're tr…
You cannot just google your way through it. There are times when you don't even know what to google. I remember as an early beginner being stuck with something that had to do with closures. I had no idea what was going on and didn't know what to google and when I asked questions on stackoverflow and reddit please started saying things about decorators and whatnot!!! It is only when I sat down and went through some ki…
JavaScript for Impatient Programmers
51–60 of 104 posts
Re: JavaScript for Impatient Programmers
#52My "real" advice for impatient programmers: just start programming, and every time you encounter a problem google it. Don't know how to setup node.js? Google should lead you to `npm init` or a starter. Getting some weird syntax error? Google it. Once you learn the basics, want to do X? Google it and determine a) how to do X, or b) if X can't be done / is bad practice. Just by diving head-first into whatever you're tr…
How much time would you say is fast enough to build a full front end and back end login/authentication system in nodeJS with any db ? I mean including throttling, pwd reset, forgot email/pwd, 2fa, confirmation email etc? Most of the tutorials are notoriously outdated and won't work bc dependencies, but I have build one such app. For someone who knows the J's basics , I mean
It would take 5 or 10 minutes (npm install taking up the majority of that time)
Re: JavaScript for Impatient Programmers
#53On topic: This is quite a list so I just clicked a random link and voila:
> 7.1.1.3 Assertions
> An assertion describes what the result of a computation is expected to look like and throws an exception if those expectations aren’t correct. For example, the following assertion states that the result of the computation 7 plus 1 must be 8:
> ...
> assert.equal(7 + 1, 8);
> There is also assert.deepEqual() that compares objects deeply.
What? Am I going crazy? Have my years of wild hedonism finally caught up with me? I don't see jest mentioned but fired up my browser's console and sure enough, there is no "assert" in my window. What am I missing here?
Re: JavaScript for Impatient Programmers
#54HN: Is today's hectic javascript making you tense and impatient? Me: Shut up and get to the point! Yeah, it's a futurama quote On topic: This is quite a list so I just clicked a random link and voila: > 7.1.1.3 Assertions > An assertion describes what the result of a computation is expected to look like and throws an exception if those expectations aren’t correct. For example, the following assertion states that the…
Re: JavaScript for Impatient Programmers
#55My "real" advice for impatient programmers: just start programming, and every time you encounter a problem google it. Don't know how to setup node.js? Google should lead you to `npm init` or a starter. Getting some weird syntax error? Google it. Once you learn the basics, want to do X? Google it and determine a) how to do X, or b) if X can't be done / is bad practice. Just by diving head-first into whatever you're tr…
In my experience, this is a terrible advice. However, many of my students follow this advice over my protests and only a handful of them actually learn anything at the end of a long masters program.
Re: JavaScript for Impatient Programmers
#56My biggest hurdle with JavaScript was getting things to happen in order. Functions can be unexpectedly colorful[0] and contortions and boilerplate is needed to deal with that. What was unintuitive to me was a lot of interactions with the DOM are asynchronous without being explicit about it. So you've got to chain a bunch of asynchronous calls together to make sure a sequence of events occur. Most other languages make…
Do you have an example of a DOM operation that is async ?
The situation is better now with promises but it was a pain in the ass just a few years ago.
Re: JavaScript for Impatient Programmers
#57My "real" advice for impatient programmers: just start programming, and every time you encounter a problem google it. Don't know how to setup node.js? Google should lead you to `npm init` or a starter. Getting some weird syntax error? Google it. Once you learn the basics, want to do X? Google it and determine a) how to do X, or b) if X can't be done / is bad practice. Just by diving head-first into whatever you're tr…
Re: JavaScript for Impatient Programmers
#58I say all this because I fucking hated JavaScript with a passion. From the time of my initial foray into programming until my later years, I hated it. It was always a joke of a language that, honestly, caused me to develop such a bias that I nearly refused to use it, for a very long time.
Several months ago I decided to put my prejudices aside and began playing around with Nodejs and React. The main motivation was trying to learn more about front end development and guess what? I really enjoy JavaScript.
JavaScript is a very enjoyable language to play with. It has come such a long way despite, literally, all odds. The ecosystem is scattered. The build system is the most hacky monstrosity you’ve ever encountered. But, that’s one of the reasons I love it. It feels like the essence of what I feel when I imagine hacking.
And not only that, it uses a unique (at least to the paradigms I’m used to) execution model that is very performant.
These are just a lot of words for me to say I love JavaScript.
Re: JavaScript for Impatient Programmers
#59I got my start in programming in the early 2000s with Perl and, shortly after, PHP. I went through school mainly with C++ and Java and got a job as a .NET developer after. I say all this because I fucking hated JavaScript with a passion. From the time of my initial foray into programming until my later years, I hated it. It was always a joke of a language that, honestly, caused me to develop such a bias that I nearly…
Re: JavaScript for Impatient Programmers
#60I really don't understand why people hate JS so much. I myself a primarily a JS dev, and now a TS dev. TS made the experience so much so much better. JS is like pretty much a programming language for average software engineer like me. Sure, JS build system is a pain. I am the go to build system guy for almost every company I've been with, I worked with Grunt, Gulp, Webpack 1,2,3,4 and etc and yes I hate it, but other…
> Async is easy as well. An off-topic question: how do modern development practices using async code avoid race conditions and intermittent heisenbugs?
Async doesn't change any of this, and is mostly syntax sugar for callbacks. However, there are of course logical race conditions so when you use async you must be aware that the entire world can have changed after an await.