Live data from Hacker News

Don't Roll Your Own

susam.net

11–20 of 128 posts

Re: Don't Roll Your Own

#11
> Among software developers, and especially among those who work on security-sensitive systems, there is a well-known maxim: Don't roll your own crypto. This does not mean that nobody is allowed to write cryptographic code. Someone has to. It means that, for ordinary production software that protects sensitive data of users, we should not rely on a private, unreviewed implementation that has not been vetted by the wider software development community. We should use established, vetted software packages or tools wherever possible.

The great things about all these crypto libraries are:

- Minimal to no dependencies

- Coded by security conscious people

- Often externally audited

I wish more libs/deps are crafted like them. Until then the risk of rolling your own vs using a dep isn’t as different as it could be.

Re: Don't Roll Your Own

#12

I find that most datepickers are better than the browser's default. It's a shame that they can't be styled more

Yes, but having worked on the date picker at Airbnb I can assure you almost every custom implementation (probably ours too!) messes up date picking in some region in an important way

Re: Don't Roll Your Own

#13
"Don't roll your own" is perfectly sane advice...

For those not trying to implement the dark patterns that enshittify the web.

If you don't roll your own back button behavior, you've missed the opportunity to show a few more ads.

If you don't make your window full screen on my shitty old tablet browser (yes, I'm looking at you, BBC), then it's far too easy for me to close your window. (Joke's on you, though -- my old Samsung tablet has a physical back button.)

Re: Don't Roll Your Own

#14
post #5

Totally agree. What do engineers or designers think they're trying to accomplish when they mess with the scroll bar? Or the password field? "We are so sophisticated, the built in behavior is simply not good enough for us!" Congratulations, now your website is a shitty experience for your users. Well done.

In my experience, it's never the engineers nor the designers who makes those decisions. Stuff like that always comes from higher up the ladder, some middle management figure who thinks he is smarter than he is, mandates such abominations and refuses to hear reason from the engineers and the designers. The engineers and designers then proceed to do as they're told because they like that nice fat paycheck at the end of…

I don't know. Someone above mentioned that don't like their browser's date picker. Maybe they are a "middle management figure", but probably not.

Re: Don't Roll Your Own

#15
If you don’t “roll your own,” you must choose from what other people have created. And in this space, there are a bewildering array of options, each of which carries some new pile of abstractions that make some things easy and other things hard.

Many eyes are supposed to make bugs shallow. In the webdev space, many eyes on something like React lead to numerous opinionated alternatives, each successful enough to warrant consideration. This doesn’t seem to be slowing down, either.

Meanwhile, vanilla HTML and DOM capabilities have never been stronger.

Re: Don't Roll Your Own

#16

I find that most datepickers are better than the browser's default. It's a shame that they can't be styled more

Yes, but having worked on the date picker at Airbnb I can assure you almost every custom implementation (probably ours too!) messes up date picking in some region in an important way

Except...?

Re: Don't Roll Your Own

#18
> Of all the things I mentioned above, the one that bothers me the most is custom scroll behaviour on websites.

While I don't necessarily agree with the entire premise of the article - in particular, a well-designed range date picker is superior to two separate browser-native date pickers - I completely agree that custom scroll behavior needs to disappear.

Re: Don't Roll Your Own

#19
post #16

Earlier quoted context omitted.

Yes, but having worked on the date picker at Airbnb I can assure you almost every custom implementation (probably ours too!) messes up date picking in some region in an important way

Except...?

There’s no except. They all suck in some specific way.

Re: Don't Roll Your Own

#20
> Don't roll your own page scrolling.

browser should not even let the page see this action

> Don't roll your own link navigation.

browser should not even let the page see this action

> Don't roll your own text selection.

browser should not even let the page see this action

> Don't roll your own copy and paste.

browser should not even let the page see this action

I'm serious. WHY javascript code is even allowed to see all these actions of the user? We already loaded the page and rendered it - we users must already be free to do with the content as we please

Post reply on HN