Chernobog's comments

Chernobog | 1 year ago | on: How long til we're all on Ozempic?

Not to argue for or against Ozempic, but there is a difference between what motivated individuals can achieve on their own, and what one can expect of the general population.

Chernobog | 2 years ago | on: Speeding up the JavaScript ecosystem – Polyfills gone rogue

I think your description of linting can be true, but not necessarily for every eslint configuration. I feel that I've landed on configs that feel useful to myself and the rest of the devs in the team. Even with a rule set that contains many rules that can look nit picky at first glance, no one complains since they are auto fixable, and fixing is a part of a commit hook.

There are a handful of rules that are nice to have in a TypeScript project to make sure devs don't do things that break type safety. Plus some that avoids mistakes from slipping through (even though the code is reviewed).

One thing I've found super useful is to have @typescript-eslint/ban-ts-comment enabled, but configured so that you can still use @ts-expect-error and the others as long as you provide a comment when doing so. This is so nice when doing code reviews, either someone has provided a very good reason for the exception, or it is clear that the same result could have been achieved with a better approach. Same goes for disabling eslint rules inline in a file, also allowed if commented. I feel that this is a very good compromise between being strict with linting, but also not letting linting get in the way.

Chernobog | 3 years ago | on: Wondering what to do (if anything) about hotlinking

I would just add some console.log message explaining the issue you have with hotlinking the script. This will not disrupt users, but anyone who fires up their devtools will see that the site is getting shamed. And if their devs care just a little bit, I think they will find it embarrassing enough to host the script themselves.

Correct me if I simply have missed it, but is there an official NPM package available? I have seen https://www.npmjs.com/package/sorttable and perhaps some of the sites would drop the script tag if "npm install --save-dev sorttable.js" is in the instructions and they have a build step for their JS anyway. Just thinking out loud.

Chernobog | 3 years ago | on: Free Ross Ulbricht

While there are certainly problematic aspects of dark web markets, society do get some benefits. No physical contact between sellers and buyers, which reduces violence. Reviews of sellers and products makes it significantly easier to purchase safer drugs (for some drugs, adulterants and/or unpredictable potency are a bigger risk than the drug itself). This translates to fewer visits to the ER or morgue.

Edit: My personal opinion is that we should rid ourselves of the demand for dark web markets by regulating drugs. The regulations should focus on harm reduction, both for the users and society as a whole.

Chernobog | 3 years ago | on: Teens turn to TikTok in search of a mental health diagnosis

I have ADHD and my flavor makes me look well adjusted on the outside while struggling hard. My mother completely dismissed the possibility of ADHD based on things like me getting a Master's degree. People see the decent grades, but don't see that you put in three times the effort.

Everything got much easier after getting the diagnosis and medication as a 33 year old.

Chernobog | 3 years ago | on: Tumblr and why ‘the porn-friendly era of the internet is over’

I think card companies and the related businesses have too much power. I am a board member of a BDSM club operated by a volunteer organization (we are legally a non-profit). We want to implement card payment on our website for membership and event tickets, but when applying for the service that would be the best option in our country, their payment processor rejects the application citing that they don't allow things like strip clubs, sexually oriented massage parlors, escort agencies or "any sexually-related clubs or services". I get that a BDSM club would easily get caught by this wording, but it's a social arena where our members can hook up and play, and we don't sell any sexual services.

Adding insult to injury, the company behind the service loudly markets that they support Pride every year. The payment processor has pictures on their Facebook of employees attending the Pride parade... We're not a commercial entity, our activities are legal and we also march under the same (rainbow) flag.

Oh, and there is no reasonable appeals process. We initially applied for a different product a while back and got rejected since they had run our web page through Google Translate and determined that we were involved with "public group sex". Asking the service to get is in touch with the payment processor to clear up the misunderstanding was not possible, they just said there was no way to appeal and our best bet would be to contact them ourselves through their website.

/rant.

Chernobog | 4 years ago | on: Windows 2000 Modernization Guide

Even though I’m not going to use Windows 2000 again, this was an interesting read.

On a related note: I have an old scanner that I use about once every year. Drivers max out on XP support, so I installed Windows Fundamentals for Legacy PCs in a VM, which is a stripped down Windows XP. Perhaps someone in the W2k crowd would be happy with WinFLP as an alternative.

Chernobog | 4 years ago | on: Ask HN: My lack of dating prospects is severly impacting my career. What to do?

Came here to say this myself. Do awesome stuff, and you will attract awesome people.

You don't have to be the world's best in the thing you pursue either, to get noticed. For many hobbies and interests, there is a scene. And there are so many ways to contribute to that scene, such as helping arrange events or arranging your own. This will put you on the radar among a lot of people, and shine positive light on you.

Chernobog | 4 years ago | on: The Applecare Hustle

AppleCare is such a non-issue here in Norway. We have five years of "reklamasjon" (think of it as kind of a mandatory warranty). I wonder how electronics would have been built if this was a global thing.

Chernobog | 4 years ago | on: Changing how I review code

I'm not going to dismiss your experience, or your knowledge about the environment you describe, but we are most definitively not doing small scale development. Our company has a large software stack comprised of several backends and frontends, maintained by 8+ teams.

I maintain one frontend in this stack, and the review app produced will only contain my version of the front-end, and the API calls will go to the backends in the development environment.

Review apps for backend services will also point to the development environment if this particular backend needs to communicate with other services.

When a feature touches a frontend and a backend simultaneously, we can solve that in various ways. Sometimes the backend can be finished first, but if that's not feasible we can supply URL overrides for endpoints to the review app of the frontend, so it communicates with the review app of the backend (and uses the rest of the development environment for the other calls).

This works for us and might not be feasible for all projects/stacks/companies for various reasons. YMMV I guess :)

Chernobog | 4 years ago | on: Changing how I review code

> Another common critique is that the pull requests encourage reviewers to only look at the code. They never even pull down the changes they are reviewing!

Our CI automatically deploys a "review app" when someone creates a pull request. This simplifies code review, QA and demoing!

Chernobog | 5 years ago | on: Tips for reliable web automation and scraping selectors

For e2e testing I have seen various patterns, and the article mentions data-test-id for instance. In my own tests, I have opted for something similar, that has given a bit more flexibility.

Singular elements: data-test-save-button, data-test-name-input

Elements that are a part of a list: data-test-user={user.id}, data-test-listing={listing.id}

This allows us to name our elements with data test attributes, but also provide values to them where applicable.

I have also created a testSelector function that takes id and value, and spits out either [data-test-${id}="${value}"] or [data-test-${id}].

We have also experimented with letting shared components popuplate their own data-test-* attribute automatically based on other props. Like in our modal component, which sets data-test-modal={title}. data-test-delete-user-modal vs. data-test-modal="Delete user". But in the latter case, the dev does not need to provide the data-test-* attribute manually, since the component takes care of it.

page 1