Live data from Hacker News

JavaScript for Impatient Programmers

exploringjs.com

61–70 of 104 posts

Re: JavaScript for Impatient Programmers

#61
post #50

I 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…

I don’t like JS and try to avoid it wherever possible. I have written some, but I’m not an expert by any means. My problems with JS/TS: Simple to start, but hard to program robustly and defensively. Due to the lack of typing, a lot of the codebases I’ve seen end up with extensive input validation code, which often uses fancy tricks that are hard to parse (unless you already know them). Typescript helps with this, but…

> functional indirection

Are you talking about point free programming here?

Re: JavaScript for Impatient Programmers

#62
post #50

I 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…

I don’t like JS and try to avoid it wherever possible. I have written some, but I’m not an expert by any means. My problems with JS/TS: Simple to start, but hard to program robustly and defensively. Due to the lack of typing, a lot of the codebases I’ve seen end up with extensive input validation code, which often uses fancy tricks that are hard to parse (unless you already know them). Typescript helps with this, but…

Like most languages, JavaScript has some landmines in it. The problem with JS as compared to other languages is that these landmines are plentiful in basic, frequently used operations, so it's easy to encounter all kinds of mysterious errors. If you know how to avoid them, you can mostly use it like a sane language and have a good experience. Hence "JavaScript: The Good Parts". Other languages don't really have a book like that.

A few of them are really hard to avoid, though, like the fact that JS has both "null" and "undefined", and these two values are sometimes treated as the same and sometimes treated as different.

Re: JavaScript for Impatient Programmers

#63
post #61
post #50

Earlier quoted context omitted.

I don’t like JS and try to avoid it wherever possible. I have written some, but I’m not an expert by any means. My problems with JS/TS: Simple to start, but hard to program robustly and defensively. Due to the lack of typing, a lot of the codebases I’ve seen end up with extensive input validation code, which often uses fancy tricks that are hard to parse (unless you already know them). Typescript helps with this, but…

> functional indirection Are you talking about point free programming here?

I guess that’s part of it. I don’t think the technique is necessarily a problem by itself, because it is often very easily traceable. However, it is annoying if the things being composed are not standard well-known functions, but user-defined ones.

A good example of what I mean is here (fresh on my mind because I was looking at it yesterday): https://github.com/FortAwesome/Font-Awesome/blob/master/js-p...

Somewhere this file defines an exported function called `icon`, but it took me way too long to find where and even longer to see what it was actually doing.

This might not be idiomatic JS code, but I’ve definitely seen other popular packages have similar code (especially internally).

Re: JavaScript for Impatient Programmers

#65

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…

I’m the complete opposite; I’ve yet to encounter a problem I couldn’t Google or bug someone in IRC about (and that’s the key).

Sometimes you have to engage with someone else to solve a problem, but there are hundreds of people willing to do just that at literally any given time of day.

Re: JavaScript for Impatient Programmers

#67

I 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…

I hate JS because I’ve tried Ruby. JS just feels unnecessarily verbose and noisy.

Re: JavaScript for Impatient Programmers

#68

I 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…

my background is similar to yours. I still hate JavaScript somewhat. But I can tolerate it a bit more than I could 10 years ago. Possibly because of advancements in development environments and tools.

Re: JavaScript for Impatient Programmers

#69

Earlier quoted context omitted.

I spent the last week doing exactly this after going over a decade without making a web page and having never done anything java related. The key thing for me was finding an existing website i liked that was hosted on github pages and used that as a template/example to see how things fit together. The learning curve at the very beginning was brutal, but once you get a few toeholds and can iterate things quickly start…

Most stuff getting slung around, as the parent mentions, is rooted in the kind of development that relies on NPM-adjacent tooling. The two things you mention (Java and modern Web development, especially something modelled after another thing found on GitHub Pages) tend to be miles apart in this decade. Where does Java come in to it?

He may mean JavaScript not Java. I get a lot of we newbies asking referring to Java when they mean JavaScript. Especially when in the context of web development.

For the parent: Java is completely different to JavaScript - the similarity is an accident of marketing and an original vision of the Web (in which most code was written in Java not JavaScript.)

Re: JavaScript for Impatient Programmers

#70
I will say I’ve read this book all the way through one and a half times, at which point I decided it wasn’t a good book. I’m an experienced programmer new to JavaScript, so the target market for this book. It is terrible for reading from start to end, and has lot of details and obsolete language features I just didn’t care about.

I looked around a bit and found the perfect book for me: Modern JavaScript for the Impatient by Cay S Horstmann. A terrific way to learn JavaScript.

Post reply on HN