220 karma · joined February 4, 2014
There's also Object.groupBy() now which was another thing I always missed from the standard library.
Proposals tend to get adopted at a snail's place but it's neat to see what's coming down the pike: https://github.com/tc39/proposals
I often felt like they were describing me to myself as I was reading... Highly recommend if you deal with perpetual dissatisfaction with your performance or achievements and would like to learn how to accept yourself for who you are and live a "lighter" existence.
The reason we have type checking is same reason we have other tooling in our editors to do static analysis like highlighting syntax errors and linting: catching bugs during development is better than finding them in production.
> [1, 2, 10, 3].sort()
[ 1, 10, 2, 3 ]
> And yes, I agree that throwing an error here for no argument would be better here (a linter WILL enforce this), but this is hardly a critical shortcoming of JS's standard libraryI suppose "critical" is debatable but this seems very fundamental and very unexpected to me.
> you DEFINITELY do not need a utility library just to use the language (especially for your examples)
I hadn't actually considered using a linter to avoid these types of standard library footguns... that's actually a pretty great idea!
Could you please explain what this means? Googling didn't reveal much.
As a full-stack developer who started off more frontend and leans more backend these days, JS is one of the languages I know best, for better or for worse, and knowing it has paid off for every job I've had so far. Understanding about the prototype chain has been useful for monkey-patching abandoned 3rd party library plugins that I've had to use in a pinch because there was no alternative aside from writing and maintaining my own. Knowing about variable hoisting has gotten me out of a jam when working with legacy code. Also, saying "the flaws of JS don't matter since they're going away" isn't really true since there's still a lot of old, crappy JS out there in the wild that you may be forced to interact with and browsers still have to support; things like there existing null _and_ undefined in JS aren't going away, so you need to know about them and have a plan for dealing with them. As it turns out, knowing one of the most used languages and all of its baggage is useful.
- HTML and CSS (facility with selectors)
- JS syntax and semantics, common patterns and idioms, gotchas
- Web APIs
- CORS
- Frontend data persistence mechanisms (cookies, local storage, etc.)
- Critical rendering path
- Service workers (how and when to use)
- Accessibility (ARIA)In terms of what to _do_ about it as a software developer, I'm still trying to figure that one out. I currently work at a BCorp which tends to make me feel better about the work I'm doing which at a minimum isn't doing harm to the world. You could try looking for a meaningful job at https://techjobsforgood.com/
Honestly, for me I think I just need to move my body through space and talk to people to be happy. I'm probably more gregarious than your average developer, but definitely still an introvert and talking to people all day would be exhausting. Still, I need some social interaction. I feel like WFH was in some sense easier (could sleep in later, for example) but I just felt like I was withering away. I was craving some sort of variety, some stimulation, seeing different things and people. Being surprised by things! I missed all of that. Video calls are a poor facsimile of human interaction and the whole pandemic period felt dehumanizing.
Yes, there's certainly truth to this. However, I write a lot of TypeScript and it provides an _exquisite_ on ramp in that you can add types gradually and telling the compiler not to worry about it can be super useful, especially if you're dealing with poorly behaved third party stubs that may have diverged from the actual implementation. The fact that you can use TypeScript as a super-duper linter _or_ try to maximally leverage its powerful type system is a huge strength. It's also very helpful for adoption. As frustrated as I get sometimes with TypeScript's unsoundness and the lack of pattern matching, the fact that I get to use it instead of JavaScript (and have also got half the company using it!) is a huge win.