HNHacker News
TopNewBestAskShowJobs

__blockcipher__

2,266 karma · joined November 6, 2017

submissionscomments
__blockcipher__··on Idiot Proof Git
That's nonsense. Git is the best version control history of all time. It has some regrettable UX difficulties, but as far as the system itself, there is no better decentralized development tool.

There's a reason git came into existence for linux kernel development. The linux kernel is a project so massive and so decentralized that it needed a fitting tool to be able to tame the chaos. And git did that perfectly.

Out of curiosity though, what to you is a better source control system?

__blockcipher__··on Idiot Proof Git
If you squash into a single commit upon merge, ignoring for the moment the fact that as a blanket rule that's a bad pattern, you've now eliminated one of the core arguments against rebasing. The merge commit adds no value if the branch itself is a single commit. Just rebase your squashed-into-one-commit branch ontop of latest master and push that to master instead. Now you have one commit representing your whole PR, with no pointless merge commit.

I really discourage the squashing upon merge approach entirely though, because that's just a bandaid for lazy and/or misinformed developers to cover up the fact that their whole git workflow is completely borked.

__blockcipher__··on Idiot Proof Git
> Since moving to this workflow I’ve had zero issues losing data due to a confusing git situation.

Nobody who understands git will ever lose data, because once committed you can never lose it (it's in the reflog). Indeed, even just adding a file means you will never lose it, although it's not as convenient as having an actual commit.

So yeah, you kind of revealed the anti-rebase case quite tellingly there. It's for people that understand git so poorly that they regularly shoot themselves in the foot and lose work or make other similar mistakes.

> Most of the arguments in favor of rebase are by people fanatical about having a git history organized just so. It’s not worth the headache and effort. PRs are a better unit of work than commits in practice.

PRs and good git commit history are not mutually exclusive. But there are many drawbacks of trying to make PRs themselves your source of truth. A big one being that it's not actually stored in git, so if you ever migrate from github to gitlab or some other system, that context is gone.

> Configure GitHub or whatever you use to squash merge only and you’ll be good.

See, now this becomes even more absurd. What's your fear of rebasing if you're going to do the equivalent of a `git rebase -i` upon every merge anyway?

This is a very confusing and nonsensical ideology.

For those who want to improve their grasp of git, I highly recommend https://git-scm.com/book/en/v2. That book changed the game for me, because I finally understood how to visualize git history in terms of the DAG, and furthermore learned about how git actually works under the hood (blobs and the like) which made me confident I would never lose anything I've ever added/committed ever again.

__blockcipher__··on Idiot Proof Git
Using interactive rebase in that way is a great tool, but we're talking about people that are against rebasing in general, so it's not the most relevant point IMO.

i.e. the anti-rebase people are usually of the "never rebase" flavor. Because they're also the "history is sacred even though I never look at history because if I did I would get dizzy and throw up" crowd :P

__blockcipher__··on Idiot Proof Git
Because then you're going to merge in the ugly commits and make everyone who needs to look at the history in the future have to work that much harder to understand what's going on.
__blockcipher__··on Idiot Proof Git
It's ironic that the "history is sacred" crowd contains the people least likely to actually look at and use the git history to aid their contextual understanding of the codebase. Why do I say that? Well, because once you've come across a useless typo commit for the 12th time, you start to very quickly see how such commits needlessly bloat the history and make it far harder to understand (and make things like git blame much more unwieldy), while not actually offering any benefit.

It doesn't matter to me at all 3 months later to know that you initially had a typo in your first commit and then fixed it the subsequent commit. That should just be a single commit.

There are some very rare edge cases where having the whole messy history can offer some insight of how a certain mistake ended up being made, but IMO in 999/1000 cases that's not the case.

__blockcipher__··on Idiot Proof Git
> As a really simple example, one of the most frequent things I see from juniors using git GUIs is adding files to a commit that they didn't intend to (say stuff that's not in the .gitignore, but doesn't belong in the commit). In the CLI, they probably don't know about -a, so they would be forced to add files/directories individually and think about what to include. Most GUIs I've seen include a "Stage All" button front-and-center, which is very tempting for a new user to click (or, worse, they make staging an opt-out thing). I do not know if this specific example is the case in GitHub Desktop, it's something that I see regularly.

I agree with your general point, but on this specific point I'd be remiss if I didn't mention that I see an insane amount of people regularly use `git add .` to add every file, because they don't realize they actually want `git add -u` (only add already-tracked files) 99% of the time.

But as a counterpoint, since your example is about giving devs a limited set of commands, you naturally wouldn't be giving them `git add .`. But it's definitely something that frequently comes up in crappy git tutorials.

__blockcipher__··on Idiot Proof Git
Yes, you're missing out. Rebasing isn't about reducing the number of items in history, although it can do that too. It's about having a sane, readable history.

If you write two commits in your local feature branch, then pull master in and generate an ugly merge commit, and then stack two more commits on top to your local feature branch, and then finally get all that mess merged to master, you have a difficult to read history because of the merge commit randomly in the middle. Whereas if you instead rebase onto origin/master (after fetching of course), you get a nice history where your feature branch commits are cleanly on top of origin/master, so there's no crazy merge commits in the middle.

Most people just use git as a fancy save button, and therefore never actually use the git log / git blame to answer questions about why some part of the codebase is the way it is, and therefore they never realize why their merge commit insanity is so destructive to the usability of the git log.

__blockcipher__··on Idiot Proof Git
I am deeply suspicious of people who claim to have never rebased. I've never met such a person who didn't have absolutely disgusting commits: either (1) no commit body to explain the context of why a chance was made, for patches that clearly needed one, (2) random merge commits in the middle of the actual commits because they don't know any workflow besides merging master into their ongoing dev branch, or (3) massive pull requests (if using a pull request workflow) that touch 30 files and implement way more than just the feature the branch was supposed to be for.

It's also a big sign to me that the person probably rarely if ever actually spelunks through the git log to understand why a certain change was made. Because if one does, they very quickly discover why a workflow involving sane rebasing onto origin/master produces such a better history.

There's times when merge commits are appropriate, but they are few and far between compared to the endless abuses of merge commits by people who don't understand git in the slightest (my definition of "don't understand git" is someone who can't visualize the DAG)

__blockcipher__··on Idiot Proof Git
Not if it's the remote for your own dev branch. It only matters if the remote branch is being (actively) used by other people.

Unfortunately I've met far too many who have your "remote" superstition. I remember arguing this exact point in my last gig, when someone was mad at me for force pushing my own remote branch that nobody else was using nor should have been.

__blockcipher__··on After chess, cheating rows rock poker and fishing
> How could cheating help her when he still had a reasonable chance of pulling either a straight flush, flush, or a pair in the river?

Because her call was +EV. Not knowing Garrett's cards, it was an insanely stupid call that threw away money. But if one knew Garrett's cards, they'd know it was a healthily +EV call.

The fact that Garrett had outs is very irrelevant here. You seem to think that one would only cheat by knowing that the opponent is drawing completely dead. But that's nonsense. You just need to know if your call is +EV or not.

__blockcipher__··on After chess, cheating rows rock poker and fishing
She specifically said she put him on ace high at one point, at which point Garrett retorts that (paraphrased, despite the quotes) "if she thought he had ace high why would she call with jack high?"
__blockcipher__··on After chess, cheating rows rock poker and fishing
> She had the losing hand at the time she called by a few percentage points.

This tells me you don't understand the basics of poker. Which is fine, but you might want to be clear about that before opining :P

While the expected percent change of her winning the hand was slightly worse than a coinflip, her pot odds made her call +EV. In other words by calling that allin, she stood to profit. Your comment was implicitly assuming that she can only win as much money as she puts in with the final bet.

So yeah, 53% of the time she's going to lose the hand, but her actual expected value of making the call is positive.

> I haven't played running it twice but it looked like there was still importance to secrecy before the second river was flipped given the way they were acting.

I'm a bit confused by this, could you explain this in another way? If you're saying that there was maybe a reason to maintain secrecy (as far as what hand she had) after the first run, that's not true because she already won a hand therefore she will have to show her hand regardless of how the second river goes.

__blockcipher__··on GPU mining no longer profitable after Ethereum merge
Just to give context to others, it sounds like you're talking about https://en.wikipedia.org/wiki/Quantitative_easing
__blockcipher__··on 2022 Amish Population Profile
Dopamine is the neurotransmitter associated with prediction of reward (aka desire/craving/addiction). Serotonin is very complex (in humans) but more about social-emotional processing.

Dopamine is the neurotransmitter you’re thinking of. And also glutamate since glutamatergic firing in brain reward pathways are heavy associated with addiction

__blockcipher__··on Apple ends consulting agreement with Jony Ive
I loved the feel of the keyboard (contrary to some) but durability and redundancy were god-awful.
__blockcipher__··on Covid-19 vaccine doses, once in high demand, now thrown away
> I heard that the flu vaccine is also around 30% effective.

The flu vaccine is so ineffective that if we actually applied evidence-based medicine standards to it / actually looked at a real cost:benefit analysis, we would never be pushing the flu vaccine.

https://www.cochrane.org/CD001269/ARI_vaccines-prevent-influ...

> Injected influenza vaccines probably have a small protective effect against influenza and ILI (moderate-certainty evidence), as 71 people would need to be vaccinated to avoid one influenza case, and 29 would need to be vaccinated to avoid one case of ILI. Vaccination may have little or no appreciable effect on hospitalisations (low-certainty evidence) or number of working days lost.

So: a miniscule reduction in actual flu cases (granted, a slightly-better-but-still-weak reduction in general ILI), with no appreciable difference on hospitalizations or working days lost, meaning that the economic benefit of giving the flu vaccine is basically zero.

It's pretty great that the first world (at least America) has been so heavily socialized to accept the flu vaccine as effective and necessary, because it makes arguing for the effectiveness of the COVID vaccine much easier, since the bar is so incredibly low.

__blockcipher__··on Covid-19 vaccine doses, once in high demand, now thrown away
I'll take this one. The vast majority of COVID risk is stratified in the very elderly and/or those with diseases of modernity / metabolic syndrome type conditions. Both of those categories (age & diseases of modernity) are much more present in wealthy, fat first-world countries than they are 2nd and 3rd world countries. Thus the utility of reducing COVID mortality is much, much lower in those less "advanced" countries.

I'd also add that even if the absolute death weren't lower in the 3rd world, the relative death would. Being able to be freaked out about an average of .3% chance of dying of COVID if infected is a luxury that those countries struggling with malaria, rampant malnutrition, and insufficient non-COVID vaccination don't really have.

__blockcipher__··on Absurd Trolley Problems
> Supporting abortion rights doesn't mean killing babies.

There is something very revealing about the GP's attitude though. They literally interpret someone wanting to avoid killing a baby as being the exact same thing as opposing abortion. So in their worldview abortion really is all about killing babies.

__blockcipher__··on Absurd Trolley Problems
I think a common utilitarian way of thinking is years of life left. A baby has a far greater expected value of remaining years and thus is often assigned higher moral value by people. For me it was a no-brainer to kill the old people, although I was imagining them as very old such that they each only had ~5 years left on average.
__blockcipher__··on My Body, My Data Act Tackles Online Privacy in Wake of Roe vs. Wade Decision
So should the same bill also make vaccine requirements federally illegal?

“Bodily autonomy” is a vague and nebulous concept. And it’s also another way to show one’s bias because to a pro-life person abortion is a violation of the unborn child’s bodily autonomy.

You wouldn’t talk about being able to commit murder as an exercise of bodily autonomy on the part of the murderer. And again to someone pro-life that’s going to be directly analogous to how they view abortion.

__blockcipher__··on Why do cats love catnip?
But it might be that they get a buzz as an evolutionary strategy, similar to why humans find sugar so appealing (it signifies caloric density). So the cats certainly get a high but maybe they get the high because of the insect repellent action of iridoids (per the article; I don't have any special knowledge of this).
__blockcipher__··on Ask HN: How should we design anti-shrinkflation laws?
It's also a tempting but dangerous idea to think that it's just a problem of "education". Not nearly as many issues are solvable by "education" as people think, IMO.
__blockcipher__··on 'Old white guy' can move forward with workplace bias suit against AT&T
> It's too bad you see it that way when in a lot of cases it's explicitly about giving equal consideration to everyone rather than giving anyone more favorable treatment. Not every case, obviously, but that shouldn't invalidate attempting to level the playing field.

It's a lot more than just "not every case" though. Every place I've ever worked, we have explicitly hired inferior candidates due to their racial/gender/etc characteristics. I know this not just from intuition but also because of the many times that "adding diversity" has been given as a justification for extending an offer to person X who was clearly not qualified.

I will agree that DEI initiatives are not all bad all the time. The ones that are based around improving communication, and not in the "fire this person because they used the wrong pronoun" sense but the "actually put down a set of principles for what effective communication looks like" sense, have been pretty positive IME. Also at my current company there was some drama several months back where blatant power plays by one of the execs (they fired someone who was beloved by the department presumably so that they could climb the ladder more) got reamed by the head of DEI (happily, for entirely non-racial/etc reasons). So it is nice when the ring is held by someone who's on your side ;)

__blockcipher__··on Inbound container volumes to the US are reverting to pre-pandemic levels
> Personally, I think this slow moving inflation disaster is the result of the US government's inability to raise taxes

I'd argue the opposite. We print absolutely insane amounts of money, which is an indirect tax via inflation (and a regressive one at that, since the rich own more inflation-resistant asset classes than the poor, who don't really own any assets). Higher taxes and less money printing would make that hidden tax less hidden, which is good, but the core problem is spending/printing too much, not taxing insufficiently.

__blockcipher__··on Inbound container volumes to the US are reverting to pre-pandemic levels
The "economic impact payments" in the US, clearly
__blockcipher__··on Many researchers were not compliant with their published data sharing statement
> it's hard to preserve things and the code is usually pretty crappy and the data is often unintelligible without a lot of help from whoever was processing it

Which is a huge part of why the replication crisis is such a thing (besides the outright fraud and the publication bias). The very fact that the datasets and codebases are so disgusting is precisely why the results coming from that data can't be trusted.

__blockcipher__··on 'Old white guy' can move forward with workplace bias suit against AT&T
> You can call it the paradox of the old white guy: Employees who have historically been entrenched in the majority are also entitled to protection under laws that were intended to assure equal treatment for women and racial minorities.

These laws are still protecting the equal treatment, since the whole "diversity and inclusion" thing is explicitly about giving unequal (more favorable) treatment to people who aren't white/male/cis. (The classic counterargument here is that because of historical marginalization equal treatment is actually unequal and therefore we must pursue "equity".)

__blockcipher__··on Mental illness, mass shootings, and the politics of American firearms (2015)
I live in California, where it's illegal to have a magazine that can hold more than 10 bullets (a standard Glock 17 holds 15+1). It's also de-facto illegal to own an AR-15, since you have to neuter the gun in all sorts of crazy ways for it to be "California legal". You also can't buy any recent (recent meaning, in the last several YEARS) handguns due to the also-obviously-illegal-yet-still-a-thing CA handgun roster.

You're right that nobody is seriously talking about rewriting the constitution; rather, states and other actors are just outright passing laws that blatantly disregard the second amendment. So it's actually worse than that. It'd be better if they were honestly just trying to remove the second amendment from the constitution rather than just de-facto abolish it through ridiculous measures.

__blockcipher__··on Netflix lays off about 150 employees
Okay, may have been my bad but it sounded like you thought that the same manager who fired the IC also was the one to offer to re-hire or something. Although your clarification about a firing theoretically needing approval from higher up sheds some light on that.

To your point, in general if you leave a place due to a bad manager (or get fired) and some kind of reform happens and you get invited back, usually the best move is not to come back. The organization already showed it was willing to toss you away at least once. That being said Netflix is probably a bit of an exception because it’s explicitly where you go to work if you want to work with people who are all insanely competent and hardworking and where performance is actually a core focus.

Also I still don’t quite understand the sociopathy element. It doesn’t seem sociopathic to say “hey we got rid of the toxic manager, want your old job back?” although like I said it’s still generally a bad idea to actually take the job back

← PreviousPage 3 of 32Next →