Hacker News new | ask | show | jobs
by game_the0ry 1198 days ago
As a swe that works with typescript / javascript, I find this post exhausting.

Am I the only one? Am I a shit swe?

Edit - comments seem to suggest I was asking this question seriously. I was not, I was just (sort of) joking.

That being said, front end engineering is rapidly changing all the time, so the confidence I have in knowing I will always have work to do (read that to mean: a job) is satisfying.

6 comments

It’s exhausting because: _____

If you find yourself struggling to articulate it, seriously and honestly consider whether you’re simply choosing to be stressed about it.

I’m speaking from experience here.

I don't find it exhausting. There's some stuff I already use, some I'll remember, some I'll forget, and one day I'll probably google for one of these features, but until then it's not going to weigh on me.
Yeah I'm the same. I try not to worry and learn everything, but I try and at least read on new changes just so I'm familiar with them.

Then when I see it in the code, I'll know what it does or I'll be like "Oh wait, that new feature I read about, maybe that could be of use here".

I'm never going to remember everything and I'm okay with that :)

I don't think it's that bad but I wish they'd focus more on improving the terrible JS web API rather than adding language features.

I mean they are adding features like static initialisation blocks when we only just got String.replaceAll(), and they somehow managed to fuck that API up despite it being explicitly a replacement for an existing bad API!

Where are all the containers? Sorted sets/maps? Why can't I even map an iterator?

> focus more on improving the terrible JS web API

That's W3C’s job, not ECMA’s.

> Where are all the containers?

?

> Sorted sets/maps?

Sets and Maps are sorted (by insertion order)

> Why can't I even map an iterator?

It's coming, but someone will likely be exhausted by that addition. https://github.com/tc39/proposal-iterator-helpers

By sorted sets/maps, I think they are referring to a binary-search-tree-backed implementation that is efficient for operations like find all keys between x and y, e.g. something like Java's SortedSet[1].

[1] https://docs.oracle.com/javase/7/docs/api/java/util/SortedSe...

> Sets and Maps are sorted (by insertion order)

That's not what a "sorted set" is. C++ and Rust provide sets (and maps) that sort based on an arbitrary comparison operator.

> ?

?

> but someone will likely be exhausted by that addition

I suppose. I guess it's one of those things that they really should have got right the first time. Like String.replaceAll(). I guess they will never add String.replaceAllSafe() - well just have to rely on linters to tell us that the API is terrible forever.

I think one can both learn about the new features without feeling the need to use them all or refactor old code.

My biggest learning while writing this was just how much is possible in JavaScript and TypeScript now, but I also realize that a lot of this I will not use myself or only use to understand some really specific code.

It's understandable of you haven't touched JS for a few years. But if you work with JS/TS a lot and are not aware of/already using many of the features listed here, you need to ask yourself (or maybe your company) if that's ok. A lot of these are very nice features that are used daily -- they help code to be cleaner and more concise, and you can work more productively.
Not to mention -- most of these features have been in other languages for years. So in this case, JS/TS have been behind and are just catching up to what you'd find everywhere else.
You're certainly not the only shit SWE if you are one. I used to be a good all-rounder, but I've stagnated badly for years everywhere but the database. I should probably have shuffled to management (I understand more than I can do!) but I hate the very idea.