HNHacker News
TopNewBestAskShowJobs

dimes

535 karma · joined April 20, 2019

submissionscomments
dimes··on How to write the perfect pull request (2015)
Using a rebase to update from master will cause conflicts for anyone else working on the PR branch. To understand why, imagine a developer branches from master at commit A, and then creates two commits on the branch B and C. In the meantime, master gets updated with commits D and E. Rebasing in this situation, results in a branch that looks like A, D, E, F, G, where F and G contain the same content as B and C, but are now tracked under different hashes. If a collaborator has this branch, git will report the local branch has two different commits (B and C) and that the remote branch has two different commits (F and G). Doing a typical “git pull” in this situation will lead to merge conflicts in everything touched by commits B and C. You can work around this specific problem by using git pull —rebase. However, git works best when the remote history is immutable. If you have a specific commit in your PR that you want someone to look at, you send them a link to it using the commit hash. Once you rebase, that commit hash will no longer point to anything. Rebasing is useful for completely changing the branch your PR branch is cut from. But once you rebase from one base branch to another, you should then continue to merge from the new base branch.
dimes··on How to write the perfect pull request (2015)
If you share a development branch with someone, then you should prefer merging over rebasing because rebasing changes rewrites the commit history, causing the locally checked out branches among collaborators to disagree. You never know when someone will need to take your branch to develop on, so generally it’s a good idea to merge over rebase. When master is merged into your PR branch, the fork point is forwarded to the last master commit, so you shouldn’t have any trouble merging back into master.
dimes··on Crystalline nets harvest water from desert air, turn CO2 into liquid fuel
I want to hear more about the bit mentioned at the end:

> At the meeting, Thomas Rayder, a graduate student at Boston College, reported building on the idea. He encapsulated a pair of enzymelike catalysts in a zirconium-based MOF to drive a series of reactions that convert gaseous CO2 to methanol, a liquid fuel.

> When they were unprotected by the MOFs, Rayder found, the two catalysts didn’t produce any methanol because they were quickly deactivated, likely by reacting with each other. But safely ensconced in the MOFs, they could make methanol at temperatures and pressures far below those used in existing methanol plants, offering a potentially cheaper and greener way to make the fuel.

dimes··on Google Cloud Is Down
I use both services heavily at work. The networking in GCP is terrible. We experience minor service degradation multiple times a month due to networking issues in GCP (elevated latency, errors talking to the DB, etc). We've even had cases where there was packet corruption at the bare metal layer, so we ended up storing a bunch of garbage data in our caches / databases. Also, the networking is less understandable on GCP compared to AWS. For instance, the external HTTP load balancer uses BGP and magic, so you aren't control of which zones your LB is deployed to. Some zones don't have any LBs deployed, so there is a constant cross-zone latency hit when using some zones. It took us months to discover this after consistent denials from Google Cloud support that something was wrong with a specific zone our service was running in.

AWS, on the other hand, has given us very few problems. When we do have an issue with an AWS service, we're able to quickly get an engineer on the phone who, thus far, has been able to explain exactly what our issue is and how to fix it.

← PreviousPage 3 of 3