HNHacker News
TopNewBestAskShowJobs

s4i

1,457 karma · joined May 3, 2017

submissionscomments
s4i··on Htmx and the Rule of Least Power
> suggests choosing the least powerful [computer] language suitable for a given purpose

This doesn’t work for projects that are planned to live for years and we aren’t sure of the scope of it beyond the next few months.

You may feel you completed all the current features neatly with HTMX or whatever, but what happens when later your PM or designer asks your team to implement, say, a complex multi-step form with a bunch of frontend state and validations?

People downplaying the need for tools like React and Next.js don’t usually acknowledge that these tools are used to ensure long-term flexibility of your tech stack and to maximize the talent pool to draw engineers from. It doesn’t matter if your site is slightly less broken for the few people that turn JavaScript off in their browsers.

s4i··on Motion blur all the way down (2022)
> to the point some European CRT televisions frame-doubled 50 Hz video to 100 Hz, causing objects to appear doubled in motion

Hmm, this is not accurate (or I don't understand what you mean). 100Hz CRT TVs available in the 90s/00s did not interpolate frames to get smoother motion – they only existed to reduce flicker. I think such TVs also existed in NTSC markets (120Hz)?

Anyway, ever since the late 00s, pretty much all the TVs you can buy from a store do come with an interpolation algorithm to artificially display a higher frame rate image (e.g. 100Hz/120Hz) from a lower frame rate source (e.g. 23.976/24/29.97/30/50/59.94/60 fps) – which (personal opinion) looks terrible (and can be turned off from the settings – but the default is always on). This is an interesting side tangent when it comes to motion blur, because the blur is prebaked in the input signal and cannot be easily removed. Thus, the end result always has an artificial look.

For instance, if the source material is shot in 24fps with the typical 180 degree shutter angle, each frame spans 41.6ms of which the shutter was open for 20.8ms. Then your TV interpolates that to be 96Hz or whatever. However, the individual output frames still look (or, with the added artifacts etc., mostly look) like the shutter was open for 20.8ms per frame. However, each frame now spans 10.2ms which is a shorter time than the shutter speed!

s4i··on Notes from an Interviewer
> Anything is better than a laptop mic.

This is not true if you have a fairly recent Apple MacBook. The mic quality especially on the Pro models from the last few years is actually pretty good. I often ask people to switch to that mic in our Google Meets if they are using almost any bluetooth headphones (even high end Bose or Sony ones).

s4i··on My notes on Gitlab's Postgres schema design (2022)
The v7 isn’t a silver bullet. In many cases you don’t want to leak the creation time of a resource. E.g. you want to upload a video a month before making it public to your audience without them knowing.
s4i··on My notes on Gitlab's Postgres schema design (2022)
It’s mentioned in the article. It’s more to do with business intelligence than security. A simple auto-incrementing ID will reveal how many total records you have in a table and/or their growth rate.

> If you expose the issues table primary key id then when you create an issue in your project it will not start with 1 and you can easily guess how many issues exist in the GitLab.

s4i··on UI = f(statesⁿ)
The list is missing URL query params, arguably one of the more common yet underlooked places to store global state in web apps.
s4i··on SafeTest: A novel approach to front end testing
Needing to change the application code to mock things rubs me the wrong way. I 100% do agree with the frontend testing challenges they lay out in the beginning of the post though.
s4i··on UUID v7
Thank you!
s4i··on UUID v7
Can someone ELI5 what that "UUID v7 support" actually means in the title?

I don't know how to navigate commitfest (nor would I probably understand the source code to begin with), but the reason I'm confused is that you can already use all the proposed draft UUID implementations in Postgres (as long as you generate the ID application-side). In fact, PG will happily accept any 128 bit ID to be inserted into a UUID column, as long as it's hex encoded – even the dashes are optional.

s4i··on Show HN: Startup funding simulator
history.replaceState (instead of history.pushState) is your friend.
s4i··on Four Team Types
Can one person belong to multiple teams at once though?

A person being both in a Stream-Aligned Team and an Enabling Team at once would kinda turn the latter into a ”guild” in the Spotify [1] lingo.

[1] https://www.atlassian.com/agile/agile-at-scale/spotify

s4i··on To metronome or not
I assumed they just work without any explicit tempo set in the DAW. They can mute/unmute the click tracks when recording new parts depending on if the musician needs to hear the count-ins.
s4i··on DeskHop – Fast Desktop Switching
And left and right 5 secs.
s4i··on How to unit test code that depends on time
A big blind spot in Jest (and I assume in Vitest although I have no experience) are the timezones. It’s very tricky to run the tests in other TZ’s than what Node has been started with.
s4i··on JavaScript: Double Bitwise Not (~~) (2010)
Well, surely that comparison is a bit unfair. :) In my books, using `~~` is closer to shit like abusing `[]+[]` to get an empty string, than using `&&` which is its own separate, widely used operator in the language.

You could maybe compare `~~` to something like `if (!someString)` but, again, that's a widely used and way more easily understood pattern.

s4i··on JavaScript: Double Bitwise Not (~~) (2010)
> it’s faster and takes up less characters. It’s not quite as readable though, but I’m hoping that ~~ will slowly become a very well-known technique in the JS arena, so we can all use it without fearing accusations.

Yeah, no thanks. I'll take well named functions over these kind of syntax tricks any day.

s4i··on My toddler loves planes, so I built her a radar
> But, in order to make sure she could handle the 3-hour flight, my wife and I made sure to hype up the airplane journey. So much so, that my toddler was shocked when we had to get into a cab for the airport — she expected to walk straight from our house onto a plane.

This is absolutely adorable, hilarious and understandable at the same time.

s4i··on Sqids – Generate short unique IDs from numbers
Unless we are talking about very long numbers, surely the numbers are easier for people to deal with, say over the phone, etc?
s4i··on Sqids – Generate short unique IDs from numbers
If the original numeric ID can be figured out from the sqid string, then what’s the point of the conversion?
s4i··on Sqids – Generate short unique IDs from numbers
Encoding the UUID in e.g. base 64 or Crockford’s base 32 (instead of the standard hex+dashes) saves you some space.
s4i··on Remove Half of Your Documentation
In the context of this article, I think Copilot is a big contributor in useless comments. If you have already written a block of code, and then go back and start writing a comment for it, the suggestion is almost always a naive and useless repetition of what’s happening directly before, much like the ”# create a user” example given in the article.

I wish the comment suggestions could be disabled completely in the VSCode extension but it’s currently not possible: https://github.com/orgs/community/discussions/8062

s4i··on Tell HN: Please stop sending AI-generated job applications (whoishiring threads)
It was all pretty good until "Remember".
s4i··on Glove80 Ergonomic Keyboard
For an easier learning curve, consider a regular 75% layout split in two. The only keyboard I know of that uses this is Mistel Barocco MD770, which I’ve been using for two years. I’ve swapped the keycaps to DSA ones.
s4i··on Enhance – HTML-first full stack web framework
> SSR composable HTML Custom Elements

I assume that by default all that JS runs on the server and HTML gets returned to the browser.

s4i··on Apple Vision Pro developer kit
That is not why Betamax failed. There was porn on beta. Betamax failed because the cassettes didn’t hold as much tape as VHS and JVC’s licensing model for recorders was cheaper and more straightforward than Sony’s. In the rental market, the format with slightly less friction was a bit more popular each year, which sealed the deal by the mid-80s.
s4i··on Decades-long bet on consciousness ends
> I wouldn't be surprised if consciousness ~conscience~ is just an emergent phenomenon resulting from any sufficiently powerful cognitive system

But does a system exist which we would describe as ”cognitive” but not also ”conscious”? To me this definition gets nowhere.

s4i··on Popover API
A polyfill for orher browsers seems to be available: https://github.com/oddbird/popover-polyfill
s4i··on Winamp Clone Whips the Llama's Ass on an Espressif ESP32
Seems like that's a scam? "It has been brought to my notice that my artwork has been misappropriated and used to deceive individuals into believing that they can purchase an actual physical device." [1]

[1] https://www.rickgude.nl/work/winamp

s4i··on Rails Cheat Sheet
In my last job I encountered my first Ruby/Rails codebase ever (mostly REST APIs but a few server-rendered views as well). Despite the initial chaotic impression of the codebase (it was a startup after all) with all the Rails magic on top, I really fell in love with the framework after a more experienced Rails dev introduced a few key conventions and helpful libraries to the codebase.

Out of those, I’d at least add the RuboCop [1] linter and the BetterSpecs [2] guidelines to this list. Both eliminated bikeshedding in the team and freed up brainpower to solve actual problems: the first one helps you learn intricacies of Ruby bit by bit right in the IDE and the latter one pushes you to write test in a specific style that’s easy to maintain and trust.

[1] https://github.com/rubocop/rubocop

[2] https://www.betterspecs.org/

s4i··on Trap Street
A natural spot to shout out Map Men on YouTube. [1]

[1] https://youtu.be/DeiATy-FfjI

← PreviousPage 3 of 4Next →