HN user

stank345

220 karma
Posts5
Comments60
View on HN

Yeah, those were two big sticking points.

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 went through a similar thing where I had some trouble sleeping due to external stressors and then started to get freaked out that I was having trouble sleeping, having always been a great sleeper. I developed a lot of anxiety around it and it was pretty awful, though I'm mostly over it now. To me, the key was accepting that I might sleep poorly and being okay with that. That true acceptance allowed me to relax. (The larger context for me fwiw is trying to overcome my perfectionism.)

Bugs are inevitable but we should strive to have as few as possible. Your program not working right is obviously bad UX (as we've all experienced using buggy software).

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.

I think it depends on population density as well. I grew up in a rural area in the US and now live in Philadelphia on a tiny side street barely two cars wide. Every single car on our street has scratches/small dents on the bumper and fender from others parallel parking. If you live here you have to accept that "bumpers are for bumping"!

I agree and am very pro vanilla JS FWIW. I just find myself reaching for something like lodash's `intersection`/`difference` functions when working with sets, `sortBy` to get more normal (and not in-place) sorting behavior, and `groupBy` to do group by.

I hear what you're saying, but it still seems pretty bonkers to me that if you try to sort an array of numbers it will cast them to strings and sort alphabetically (!):

  > [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 library

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

What you're saying makes sense, but sentiment like this makes me long for a post-capitalist conception of work where everything's not purely transactional and we can do meaningful work that we feel proud of. I think artisans or craftspeople had that historically and it's something we require to feel fulfilled.

I'm not a seasoned Haskell dev by any means, having only played around with it for parsing and then more recently for Advent of Code, but tooling has come a long way in the past 6 months. I was able to use ghcup to very easily install and manage versions of GHC, cabal, and HLS (Haskell Language Server), the LSP server that the community has thrown all of its energy into. All I had to do then was configure the LSP client for my editor and everything just worked. I had function signatures/docs on hover, go to definition, and symbol renaming working in about a half hour.

I just talked to a recruiter today from a company I'm beginning the hiring process with. When they asked about compensation I asked about their range for the position, which ended up being about $15k higher than what I would have asked for. Now I'm looking at a 50% raise if they end up making me an offer :D

Ignoring your extreme snark and least charitable interpretation of what I've written, I'm not saying any of these things are insurmountable or even necessarily hard to learn, but they are _things to know_. I don't think you should completely dismiss all of the frontend "domain" knowledge with a wave of your hand.

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.

Things a frontend dev would know that a backend may not:

    - 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)

I know how you feel. You might be interested in the 80,000 hours podcast as a way to gain a better understanding of the problems humanity faces: https://80000hours.org/podcast/

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/

I also enjoy lifting weights and I recently started doing high-frequency, low/moderate intensity training throughout my workday. I'll just choose an exercise for that day and do it many times per day. It's always around 50-70% effort so pretty easy (eg. if I can do 10 pullups I'll only ever do a set of 5 max). That way I have perfect technique for each rep and set and I never get close to failure. I always feel refreshed and never beaten down and I don't have to set aside specific time to lift (I'm currently trying to just maintain while I do technique work). Yesterday I did it with front squats for 10x3 of very high quality reps. I plan to increase the reps/weight slightly once it gets super easy and repeat.

Yeah, my office isn't really like that. It's quite quiet (more so than I would like if I'm being honest). The culture is engineering-biased and not bro-y. It's also a B Corp, so for profit but with a mission. I think that helps create a positive work environment since coworkers self-select as people who want to have a positive social/civic/environmental impact and generally are thoughtful and respectful people.

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.

Getting back to working from the office last week has done wonders for my mental health. I went from being locked up for a year WFH with my wife and kids in a small row home working out of my goddamn basement to actually being able to concentrate in a beautiful, still-mostly-dead office with a view. There's an exercise room on my floor that no one uses so it's basically my private gym. I can chat a bit with the few coworkers who are in the office regularly. It's been amazing. I feel like an actual adult human again instead of a parent/employee trying to hold on to various threads to keep everything from becoming undone.

FWIW I'm definitely an introvert and I can't wait to get back in the office. I don't want to have to talk to people all day but I really want some actual meatspace interaction. Being locked up for a year with two small children and only my wife as the other adult to talk to has not been good for my mental health.

defaulting to dynamic and making static opt-in undermines a lot of the potential benefit of static typing. I don't think that it works the other way around

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.