Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ht85
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
181.
▲
by
ht85
7y ago
I think there's an important distinction between company and interaction. I hate interaction in the workplace, especially when it's spontaneous. Being remote allows me to be in the zone probably more than half of my week, which ha
182.
▲
by
ht85
7y ago
What about this [1] ? It is from "respected" WaPo, and this is one of the most mind blowing examples. You might not want to go through the 1h30 rant from Richard Lewis, so feel free to skip to 31:00 and 34:30 for the content of th
183.
▲
by
ht85
7y ago
For the 5+5+5+1 example, there is a fairly easy way to accomplish that: Append n dummy items to your list, where n is the maximum number of items you expect on a single line. They should have a height of 0, and the same width / margin
184.
▲
by
ht85
7y ago
It depends what you want. Your current code performs the search synchronously, in which case useEffect would not be useful. You would use useEffect if the search was done asynchronously, typically in a web worker. I would do it in a single
185.
▲
by
ht85
7y ago
Here's a quick review. I see two obvious issues: - you memoized the instantiation of Fuse (which is cheap), but `searcher.search()` (which is expensive) is performed on every call, even if none of the parameters change. - the imperativ
186.
▲
by
ht85
7y ago
After going through every pattern this is also my favorite one. While it can add some perceivable latency if you have many levels of depth, it is usually a lot lighter on CPU and memory than one big query. The reason I really like it is bec
187.
▲
by
ht85
7y ago
Sheeping is hard
188.
▲
by
ht85
7y ago
It works because `undefined + number -> NaN`, and NaN is a number.
189.
▲
by
ht85
7y ago
Maybe the bug is wishful thinking. Legitimizing things we view as positive even though rationally you can see why they would never happen. It's a nice bug. If enough people were guilty of having that mindset, maybe those nice things co
190.
▲
by
ht85
7y ago
I have a hard time understanding how a stablecoin could be backed by crypto. Traditional currencies are mostly backed by things that are very unlikely to crash like real estate, profit share in companies and other ressources with value besi
191.
▲
by
ht85
7y ago
Generally a good strategy for dropping columns or tables is to rename them instead (e.g. `table_deprecated`). If things look stable after whatever time you deem necessary, you can write a second migration to actually drop them. If you run i
192.
▲
by
ht85
7y ago
Crazy? What's crazy to me is that a compiler can statically guarantee type soundness AND memory safety around asynchronous code.
193.
▲
by
ht85
7y ago
I see many developers stressing immensely over optimizations that amount to rounding errors. if (list[i].type === SomeType && list[i].valid) Refactored to avoid two array accesses: item = list[i] if (item.type ==
194.
▲
by
ht85
7y ago
Quick, register the "Me" trademark and sell it back to them.
195.
▲
by
ht85
7y ago
Tangential, but does anyone else find techcrunch UX absolutely dreadful on desktop?
196.
▲
by
ht85
7y ago
To be fair, there are different levels of detection [1], the demo is probably using the weakest one. [1] https://github.com/microsoft/presidio/blob/74ea983cc50ff76d7...
197.
▲
by
ht85
7y ago
Could you give an example of the kind of problem you're talking about?
198.
▲
by
ht85
7y ago
Comparing it to a full time job is not really fair. From my experience, doing sysadmin for a single server only takes time initially. You might spend a couple weeks full time to get everything going, but 6 months in it's probably only
199.
▲
by
ht85
7y ago
Does all the hate have to do with sexiness? To many people, backend and infrastructure work is sexy. They would happily get their hands dirty and spend insane amounts of time debugging mind-boggling issues as long as they happen server-side
200.
▲
by
ht85
7y ago
Small nitpick: loading state should be a counter incremented / decremented on each request / response, not a boolean. This looks very nice though, avoids almost all the repetitions you usually have to write when setting up reducer
201.
▲
by
ht85
7y ago
Probably because this is a victimless crime... What he did would be more akin to someone entering your property, having their lunch in your garden and cleaning up before leaving.
202.
▲
by
ht85
7y ago
I can totally see myself type a bunch of "9", then copy paste them a bunch of times in a moment of CSS layout induced rage :)
203.
▲
by
ht85
7y ago
My experience was on an XPS 9570, not sure if there's a large gap in driver / support. Out of the box synaptics was pretty bad, but after tuning the palm detection zone size and a couple timings (long press, etc) it feels amazing.
204.
▲
by
ht85
7y ago
Slightly off-topic, but is anyone here using Wayland with a touchpad? The last time I tried libinput, the behavior was horrendous compared to a synaptics. 2 finger scrolling had a ~2mm threshold before it activated and wouldn't compens
205.
▲
by
ht85
7y ago
This is fine-ish... In case of network issues affecting their proxy, being able to change your configuration to allow direct traffic would be really nice.
206.
▲
by
ht85
7y ago
Not necessarily, you can have the user input the old password when setting up the new one, check it against the old hash and if it matches, do whatever comparisons you need between old and new.
207.
▲
by
ht85
7y ago
One use is that you can point to any commit, but npm will only have versions that were explicitly released to it. Another reason would be having a few private packages and not wanting to manage an entire npm account for them.
208.
▲
by
ht85
7y ago
Packages are different. For npm, you might publish your source 1:1 if you have a very vanilla setup, but a typical package in npm contains a built version of the code while the repo contains source, documentation, tooling, etc. Package vers
209.
▲
by
ht85
7y ago
Putting it here because it isn't well known and bit me once. NOTIFY payloads are deduped over the course of a transaction, with a O(n^2) algorithm if all payloads are different. If you do a NOTIFY on delete or update and hit a few mill
210.
▲
by
ht85
8y ago
Even though only 1 / 10 counters would be locked, you'd still have to read all 10 to get the count, which would be blocked until the concurrent transaction ended.
More ›