HNHacker News
TopNewBestAskShowJobs

powersnail

2,781 karma · joined February 21, 2019

Just a naive coder, grappling through the world. https://powersnail.com
submissionscomments
powersnail··on Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?
If I want to read through the doc, I'll just do that, and I frequently do it with all dependencies that I'm directly interacting with. As fun and informative as it is, personally I don't want to do this exercise every time I need a peek at the documentation of a class or function, in the same way I don't take a detour into the mountain every time I get out of my house, as much as I enjoy hiking.
powersnail··on MarkItDown: Python tool for converting files and office documents to Markdown
> Before that I never dreamed of meeting someone who preferred a word document _after_ opening a .md file

That's like 90% of the people I know outside of computer/engineering circle. Most of people probably have never opened a plaintext file in their life. They would have no idea what to do with a `.md` file.

In fact, some older engineers would not know what markdown is either, since it's only been around for two decades or so, but they can probably work with it anyway (the strength of plain text).

powersnail··on Tsunami Warning for Northern California
My Android did give me a tsunami warning this morning though, but no earthquake warning.
powersnail··on PR process killing morale and productivity
Sounds about right. If so many technical decisions are made by a single individual while reviewing PR, rather than having a proper standard agreed upon before hand, it's no wonder that it grows into a horrible code base.
powersnail··on PR process killing morale and productivity
I don't know the original story, but 300 hundred PR comments on a first PR (or any PR for that matter) is insane, and my guess is that somebody on the team is having an argument back-and-forth in that PR, rather than focusing on whether the code should be merged.

If that happens to me, I would kindly invite them to talk about it elsewhere and give me pass, because the fact that you guys are still debating it, means that it's not a decided thing, and you can't prosecute me with a law that hasn't passed yet. Once it's actually settled, I'll be happy to go back and refactor it, but it is illogical to make it a blocker in the present.

It also sounds like something is wrong with the on-boarding process. The first PR should not be of such a nature that would invite loads of comments. It should be something that is functionally simple, and already has an agreed-upon design.

powersnail··on How I configure my Git identities
I don't really use a lot of script that wraps git; but so far the two things I do use---lazygit and github cli---don't have problems with this approach. Github CLI can identify the correct corresponding repo on Github, and also can choose the right user account associated with this repo if there are more than one authenticated user.

I mean, it seems to me that any script that tries to do something with git remote URL, should deal with any string that git thinks is a valid remote URL. `ssh-host-name:owner/repo` is not exactly an edge case.

powersnail··on How I configure my Git identities
I do something similar, but instead of `insteadOf`, I just clone the repo with `gh-work:org/repo`, and in the git config:

    [includeIf "hasconfig:remote.*.url:gh-work:**/**"]
        path = ~/.gitconfig.d/gh-work.inc
So, any git repo cloned with the ssh identity defined under `gh-work` will take on the config of `gh-work.inc`, which includes the git identity, and also the same signing key as in the ssh config.

Essentially, the name `gh-work` becomes the distinguishing element in both my ssh identity and my git identity, and I find this easier to think about.

powersnail··on Charset="WTF-8"
As someone who really think name field should just be one field with any printable unicode characters, I do wonder what the hell would I need to do if I take customer names in this form, and then my system has to interact with some other service that requires first/last name split, and/or [a-zA-Z] validation, like a bank or postal service.

Automatic transliteration seems to be very dangerous (wrong name on bank accounts, for instance), and not always feasible (some unicode characters have more than one way of being transliterated).

Should we apologize to the user, and just ask the user twice, once correctly, and once for the bad computer systems? This seems to be the only approach that both respects their spelling, and at the same time not creating potential conflict with other systems.

powersnail··on Ask HN: What would you preserve if the internet were to go down tomorrow?
To be honest, I would expect most small open source projects to just vanish, because of the lack of discoverability. The users won't be able to test them easily, and probably won't be paying for the shipping of a tiny tool that they have not yet tried and don't know whether it's useful or not.

Large open source projects can survive, but I'd imagine it will lean much more towards being developed mainly singular organizations. Without the internet, we don't just lose contributors, but also a lot of testers. The feedback loop will probably shrink, such that the software is mainly based on the need of the organization itself, and the perhaps a selected few collaborators who are very involved.

powersnail··on Ask HN: What would you preserve if the internet were to go down tomorrow?
The entire open source ecosystem will be gone. Distribution on CD (or USB sticks) would be okay for delivering software, but not viable for frequently exchanging patches among a large group of developers in different parts of the world.
powersnail··on Show HN: I built PixSpeed to optimize website images for free
I've done a similar thing[^1] as well, but as a post-processing step after Hugo build my site, because I haven't written my own static site generator (yet).

[^1]: https://github.com/PowerSnail/PowerSnail.github.io/blob/mast...

powersnail··on How to Train Yourself to Go to Sleep Earlier
I know that this might sound too obvious to say. But I've found that, it is much easier to maintain good sleep habits when real life is not stressful. If I'm facing a big problem in life, an important deadline for example, it is unlikely that any effort I put into sleeping habits is going to help. Sometimes, I just stay up as late, but instead of working, time is spent in blaming myself for not sleeping in time, and worrying about getting up tomorrow.

The reason I think this is worth saying, is that sometimes, to break the vicious cycle of [stress -> sleep-deprivation -> more stress -> ...], you need to shift the focus to tackle the real life problem first, and don't beat yourself up for not being a good sleeper. Trying and failing to develop sleep hygiene can pile on the frustration and worsen the vicious cycle.

powersnail··on Ask HN: What do you think would happen if Google and YouTube split?
It frequently shows me videos that have nothing to do with the query, within the top 10 results. I'm not talking about being not precise; it's something that has completely no relevance.

For example, searching for recipes sometimes shows me Political News, and sometimes the news is even in a different country, and in a language that I don't speak.

Sometimes I also get a few results that are not just irrelevant, but intentionally made to have a visually repulsive thumbnail, like a zoomed-in shot of some skin pathology, which is something that I never search for or click upon. No idea what is happening there.

powersnail··on A Chopin waltz unearthed after nearly 200 years
Fritz Kreisler faked some old composers'---e.g. Vivaldi's---work, claiming to have discovered some unpublished manuscripts, but later revealed that they were his own compositions all along.

It was mostly a prank on the music industry, but nonetheless, mimicry of style was involved, and was enough to fool many people for years.

powersnail··on Reducing salt 1g daily in China could prevent ~9M cardiovascular events by 2030
Feeling like shit is stretching it; it's just being thirstier than if I'm cooking myself. I'd say if we do feel like a shit, the local culture probably wouldn't have grown so salty.

But health-wise, yeah, it would not be a good idea to eat out often. High blood pressure is a very, very salient health problem, on par with obesity in the public consciousness.

powersnail··on Reducing salt 1g daily in China could prevent ~9M cardiovascular events by 2030
In the part of China I come from, pretty much all common flavor profiles are predominantly salty. This means that people are having salty stir fries, salty stews, salty soups, etc. Sugar&vinegar exists, but a lot less common than salty ones, and even in sugar&vinegar, it's common to add at least a good pinch of salt.

This is different from eating one really salty thing, like smoke salmon, where the saltiness is very pronounced. When salt is evenly distributed in every dish and meal, it's a lot less salient that you've consumed too much of it. It's a common experience when eating out, to not feel like I have had too much salt during the meal, but be very thirsty afterwards. (It's also why I dislike eating out back home, but sometimes it's inevitable)

powersnail··on Redditors Trying to Poison Google's AI to Keep Tourists Out of Good Restaurants
That sounds like a really lively local culture! Hopefully, I'll get to experience something like this in the future.
powersnail··on Redditors Trying to Poison Google's AI to Keep Tourists Out of Good Restaurants
How do they get the words out to the locals when they move place? Or from a different perspective, how does a local learn which new restaurants are truly exceptional? Do people constantly try new ones that just pop up?

I find myself living in the same town in years without finding a single restaurant that I can call "truly exceptional". They range from "I'd rather eat cup noodle", to "the food is worth the money". I don't know if I'm just unlucky, or if I lack some sort of culinary detective skill.

powersnail··on Bitwarden SDK relicensed from proprietary to GPLv3
It's a welcome change. It still feels like they are trying to be too smart on licensing, especially how to combine GPL and proprietary licensed code, which I think is the root cause of the whole drama. The open core model works better as a hosted service, where you are not distributing the amalgamation of GPL and proprietary. Open core in client code seems a bit too rife for potential misunderstandings and confusions.

Hope it works out for them, though. It's a good product.

powersnail··on Ask HN: Alternatives to Bitwarden?
The problem with that statement is what exactly does "in a way that maintains GPL compatibility" means, especially since they plan on moving more functionalities into the proprietary code, so the two "separate" components will be increasingly coupled together.

I'm not a lawyer, but I'm quite skeptical of the outcome. Is it really going to produce a valid GPLv3 licensed client? To me, it seems like the whole thing is just going to be a combined proprietary + GPLv3 license, which will contradict itself.

But again, I'm not a lawyer, so my understanding of this might be way off.

powersnail··on Show HN: FTWA – Turn any website into an app
I had written a similar program (but very barebone compared with what you've made), with Firefox only. The way I dealt with profile, is to specify the full path of the profile, rather than a name. This way, I don't have to know where Firefox is searching for profiles, and I can keep all the additional profiles in a separate directory, so they don't mix with normal profiles and don't clog up profile manager.
powersnail··on Should we be thinking about luck differently?
Not trying to be pedantic here, but you did say, "I think you can prove Many Worlds Interpretation correct for yourself."

Anyway, my point is that, I can't see how to go from "I observed something with small probability happening to me" to the conclusion that "MWI is correct". There is no logical connection between the two statements as far as I can discern.

powersnail··on Should we be thinking about luck differently?
I'm not sure that answers my confusion. Even if I am just proving it to myself, why does the occurrence of a not probable event prove the existence of many worlds?
powersnail··on Should we be thinking about luck differently?
I'm confused as to how this proves anything. Are you suggesting that the only explanation that something with small probability has happened, is that there are many worlds in which this has not happen?
powersnail··on Terminal colours are tricky
Sadly, the state of CLI and TUI tools is that background colors _will_ be encountered soon or later, if you use a wide range of software. And I struggle quite a bit sometimes to make everything in my terminal legible.
powersnail··on Terminal colours are tricky
A big problem is that, even when you ignore 256 and true color support, and limit yourself to the 16 color palette, there’s no consensus on whether the 16 colors are backgrounds or foregrounds. Some CLI write text in foreground color over color_x, while others do it with background color.
powersnail··on It's hard to write code for computers, but it's harder to write code for humans
I’m generally okay with high level concepts talk, and don’t often find it too abstract. We are talking about documentations for libraries or frameworks after all. I’ll take a gentler approach if it’s an actual theoretical firld.

Obviously, during the first read, my understanding of those concepts would be full of holes. And I plug them as I continue reading the API references and later when I start to try it hands-on.

powersnail··on It's hard to write code for computers, but it's harder to write code for humans
People learn things differently.

I really need the "core concept" first, before diving into examples, (unless the core concept is extremely simple).

Many tutorials are like hand-holding Lego building. Here's your Lego pieces, watch me and follow me in building this toy project, and you'll know how to Lego at the end of the day.

I just don't function very well in this model. I want to know how and why decisions are made. I want to see things from the author's perspective. I want to know how the Lego pieces each feels like, and how they connect to each other, and how you arrive at certain designs in a certain way. Trying to follow tutorials before at least some high-level, conceptual discussion, feels to me like I'm trying to reverse-engineer something that I shouldn't need to.

Most of the time if I'm approaching a new library or framework, I read read the introduction texts, and skip the "Getting started" code samples. Usually, there's going to be some sort of "Advanced" section where a lot more talking and discussing of concepts happens, and that's what I'd like to dive into first. I'll go for the API references next, try to grasp what the important interfaces look like, and finally I'll get back to the basic code samples in the beginning of the tutorial.

powersnail··on Bitten by Unicode
But that would not distinguish between chars inside a string literal and chars outside of a string literal.
powersnail··on Bitten by Unicode
That would make it impossible to edit non-ascii strings, like texts in foreign languages. As far as I know, most editors/IDE don't support switching fonts for string literals. It is more feasible for a syntax highlighter to highlight non-ascii characters outside of literals.
← PreviousPage 2 of 27Next →