HN user

ncann

1,834 karma
Posts1
Comments335
View on HN

I had email address X (gmail) that I hadn't logged into for a long time. One day I tried to log in to it. Correct password, but Google, for some reason, simply decided there's something suspicious about my login and blocked it. X had Y as the "recovery email", and I had access to Y, and I indeed received an email from Google sent to Y that it blocked a suspicious login to X. However, THERE WAS NO WAY TO USE Y TO GAIN ACCESS TO X. Google simply did not offer that option for X, and I had no idea why.

Git-Annex 11 months ago

I am looking into using Git for my photos/videos backup external HDDs and the reasoning is simple. It's not about keeping track of changes within the files themselves since like you said, they (almost) never change. Rather, it's about keeping track of changes in _folders_. That is, I want to keep track of when I last copied images from my phones, cameras, etc. to my HDDs, which folders did I touch, if I reorganized existing files into a different folder structure then what are the changes, etc. Also it acts as a rollback mechanism if I ever fat finger and delete something accidentally. I wonder if there's a better tool for this though

Debounce 12 months ago

I needed an implementation of debounce in Java recently and was surprised to find out that there's no existing decent solution - there's none from the standard library, nor popular utilities libraries like Guava or Apache Commons. There are some implementations floating around like on Stackoverflow but I found them lacking, either there's no thread safety or there's no flexibility in supporting the execution of the task at the leading edge or trailing edge or both. Anyone has a good recommendation on a good implementation?

Here's a naive, faulty implementation

For this first implementation, I don't see anything ever added to the queue. Am I missing something? New task is added to the queue if the queue is not empty only, but when the queue is empty the task is executed and the queue remains empty so in the end the queue is always empty?

The non-buggy sleep (S3) isn't even supported in the BIOS in many new laptops now (in the Dell I'm using for example). So MS probably decided to kill that option off for everyone. To be honest it's a very confusing situation since there are so many hardware configurations under Windows and if you search online I think some people are still able to disable S0 on their new laptop/latest Windows, but some (myself) definitely cannot.

Troubleshooting sleep is an exercise wrapped in pain.

Figuring out which program prevents sleeping is the easy part - there are tools that show that, and you can also usually just brute force it by killing programs one by one.

Then comes figuring out why a system claims to be sleeping but isn't (e.g. the fan is still spinning). Usually this is because of the Modern Standby/S0 crap and in many cases there isn't a solution because the BIOS removed support for S3.

The other class of issue is after sleeping the system won't wake up, or wake up randomly, or wake up with random glitchy graphics/sounds/etc.

Sleep is easily Windows's most bug-ridden area.

Hyperspace 1 year ago

Somewhat unrelated but I believe the dupe issue with node_modules is the main reason to use pnpn instead of npm - pnpm just uses a single global package repo on your machine and creates links inside node_modules as needed.

With how much trouble I had with trying (and failing) to make my brand new Dell laptop sleep properly and not the "Modern Standby" crap, plus my desktop randomly breaking GPU hardware acceleration in browser after waking up, I would say it's around O(n4) now. Or maybe even O(n!).

Robyn: To give YouTube a sense of motion, we created a dynamic red-to-magenta gradient. For the second color, orange and yellow were strong contenders, but magenta felt like the most natural pairing with our new red. Interestingly, magenta doesn't often appear in the natural world, so it symbolizes the imagination and evolution that YouTube embodies. We also placed the gradient at a 45-degree angle with magenta on the right, signifying forward movement.

Kinda reminds me of this quote

https://www.usenix.org/system/files/1311_05-08_mickens.pdf

There will be rich debates about the socioeconomic implications of Helvetica Light, and at some point, you will have to decide whether serifs are daring statements of modernity, or tools of hegemonic oppression that implicitly support feudalism and illiteracy.

Doctor hygiene and seatbelt and the like are mandatory because they save lives, and can be very easily proven using basic tests and statistics.

On the other hand, there is no way to measure the "effectiveness" of TDD as compared to not using it.

I'm sorry that you feel that strongly about it but that certainly seems like zealotry to me.

The only thing that should be said about TDD is that it's incredibly polarizing, one of the most polarizing things in software development in fact. It's incredibly personal, some swear by it, some loathe it. Thus, every TDD introduction should have a big disclaimer up front that hey, maybe this isn't for you and that's totally fine. Just don't be a zealot about it.

React 19 2 years ago

What is considered "modern state management" these days?

Yeah, and because the "common" way of pronouncing these words/letters have become so entrenched in our minds, it often feels pretentious to hear people actively try to pronounce words in a way that they feel is "correct", for example trying to emphasize the "strength" of the tr/s/gi sounds as opposed to ch/x/d.

That's not quite true. There are many letters that sounds mostly/exactly the same, especially in everyday pronunciation. For example, "gia đình" vs "da đình", or "lý trí" vs "lí trí", or "xổ số" vs "sổ số", etc. If you don't know the word beforehand you wouldn't be able to write it down after hearing it.

Could it be that RDBMS is just inherently very complex? Reminds me of this classic comment about Oracle Database:

https://news.ycombinator.com/item?id=18442941

To quote part of it

Oracle Database 12.2.

It is close to 25 million lines of C code.

What an unimaginable horror! You can't change a single line of code in the product without breaking 1000s of existing tests. Generations of programmers have worked on that code under difficult deadlines and filled the code with all kinds of crap.

Very complex pieces of logic, memory management, context switching, etc. are all held together with thousands of flags. The whole code is ridden with mysterious macros that one cannot decipher without picking a notebook and expanding relevant pats of the macros by hand. It can take a day to two days to really understand what a macro does.

Sometimes one needs to understand the values and the effects of 20 different flag to predict how the code would behave in different situations. Sometimes 100s too! I am not exaggerating.

The only reason why this product is still surviving and still works is due to literally millions of tests!

It always strikes me as odd that we have housing crisis everywhere but these cheap 3D printed houses or ready-to-assemble houses from Amazon never took off. Does people find it off-putting to live in these? Or is it more of a regulation issue? Or land acquisition issue?

The practical answer is that, if 99.9% of people out there has system that mitigates these issues, no one will bother using these exploits in the wild and you can turn off these mitigations to get the perf benefit and be reasonably sure that you won't get exploited. Unless you're targeted of course.

Yeah, I'm not saying the author is wrong, but if all his job search was in 2023 this may very well be the case. When in a tough job market employers can cite a million different things to not hire you, and you start to double doubt yourself as to what's wrong with you.