Live data from Hacker News

An ex-Googler’s guide to dev tools

about.sourcegraph.com

191–200 of 219 posts

Re: An ex-Googler’s guide to dev tools

#191
post #101

Earlier quoted context omitted.

Not really. The "Software Engineering at Google" book[1] has a whole chapter on it with screenshots. Gerrit, Reviewable and Phabricator are very similar, except that Critique is much more polished. Having used all three, Gerrit works best and the new UI is starting to look pretty good. Reviewable has great UX, but inherits some of the disadvantages of GitHub PRs. [1]: https://books.google.de/books/about/Software_Engi…

Your link just goes to the Google Books homepage in my browser

Same for me. I think it's https://books.googlecom/books?id=WXTTDwAAQBAJ. It has no preview of the Critique-related fragments.

Re: An ex-Googler’s guide to dev tools

#192
post #29

Sourcegraph seems interesting but the pricing seems off for me. The “Teams” plan costs $150/month for 25 people and that works out to $6/user/month. Using GitHub it’s between $4-21/user/month. So this means that insight from my source costs sometimes more than actually managing my source. I’ve never worked at Google but it seems like one benefit is that they’ve figured out how to scale the costs of this kind of funct…

Permissions for repos (which is not a necessity but has many many uses) immediately kicks you from Teams into "$Contact Us" Enterprise territory, too.

Re: An ex-Googler’s guide to dev tools

#193

Earlier quoted context omitted.

> in the range [-2, 2] for some reason [1]. This was actually pretty useful in OpenStack back in the day. The reviewers who couldn’t yet approve code could only put +1s on there (and there were a lot of low quality reviewers who slapped these everywhere) so it was very obvious when a patch still needed attention from a commit-privileged dev. Then -1 was standard review feedback of stuff that needed improving and -2 w…

Yes, that range looked odd to me at first glance. But your explanation made me realize that I actually use it all over the place. Except on a 1-5 scale. Starting with good enough at 3 (or 0 in this case): 1 = WTF? 2 = Needs Improvement 3 = Good Enough 4 = Better than Good Enough 5 = Almost Perfect Daniel Kahneman recommends a scale like this for evaluating job candidates across core competencies. It's a surprisingly…

The [-2,2] scale made immediate sense to me because it's zero-indexed:

-2 = WTF

-1 = Needs Improvement

0 = Good enough

1 = Better than Good Enough

2 = Almost Perfect

It's even intuitive, since anything above zero is 'above and beyond' and anything below zero isn't good enough yet.

Re: An ex-Googler’s guide to dev tools

#194

Earlier quoted context omitted.

An analogy, if I may share: On the one hand I agree with you, in that these liabilities you describe are much like the legacy systems I see in our local banking sector. On the other hand, these legacy systems just work. And adopting newer / more modern systems might definitely have advantages, but doing so creates a bunch of other liabilities - as I've seen take place in our new startup banks. Stuck between a rock an…

FAANG's often don't have paying customers, banks do. Its not being stuck between a rock and a hard place, you just need strong management that understands that changing whole systems is never a good idea without clear benefit, other than "technical debt" which is such a bad term for reliable software. Software doesn't age, im not sure how software engineers don't understand this, or maybe they do and want to write mo…

Software does age. Security ages, network protocols age, human related configs age (timezones, for example).

And that's besides tribal knowledge that goes away as people leave or retire.

Re: An ex-Googler’s guide to dev tools

#195

1. Why does Google develop their own tools? 2. Why doesn't Google open source them?

Many of the things that are trendy in the industry today were invented by Google years ago, and Google had to invent them because they didn't exist at that time.

Re: An ex-Googler’s guide to dev tools

#197
post #153

Earlier quoted context omitted.

> code search in combination with a monorepo and the somewhat hermetic universe which is Google's code base provides immediate access to all uses of a library. You can see what worked well and what didn't, and it enables effective refactorings. That also means when writing a client, you can quickly figure out from other client code how stuff is supposed to be used. ... If anything like this were possible for open sou…

Author of the post here. We're actively working on this at Sourcegraph. Up until recently, we've focused on working well on large private codebases, but looking forward, we have two big efforts that will make this a reality on sourcegraph.com: 1. Vastly expanding the size of our global search index to cover every public repository on github.com, gitlab.com, and bitbucket.org. 2. Enabling LSIF indexing ( https://lsif.…

Don’t get me wrong, I think this is very cool, but is there a way to opt out aside from making a repo private?

Do OSS licenses distinguish between corporate usage of repository source as code vs as data.

Re: An ex-Googler’s guide to dev tools

#198

Earlier quoted context omitted.

Another Googler here. We usually have a 3 steps process. 1st new API interface/service using the new dependency is added and runs in parallel with the existing one, 2nd we blast email to users of old one to migrate to the new one, 3rd when usage of the old one hits 0 it is removed. When a team slacks off in migrating (usually we have months between receiving the first notification and service shutdown) things escalat…

In practice it's optimized to a 2 step process, since step 3 almost never triggers.

Fair enough

Re: An ex-Googler’s guide to dev tools

#199

Earlier quoted context omitted.

Stacked reviews are the crucial thing missing from GitHub pull requests. Truly, once you get used to working wit hthose, going back is intolerable, to the point where I now have a hacked together workflow where I live in git rebase -i and have it automatically push specially named branches for each commit in a stack.

What are stacked reviews?

You have a task to build a Thing, which involves creating the basic "Thing framework" and then implementing subfeatures A, B and C of into/on top of it

Maybe you'll build the framework & subfeature A together, because you need some bit of meat in there to properly figure things out and be able to test things

On Gerrit you'd probably create two commits which get pushed as two CLs

* CL1 Create Thing framework * CL2 Implement A for Thing

They're now pushed for people to review. While they're looking at them, you continue working on, making CL3 implementing B

* CL3 Implement B for Thing

One of your coworkers points out an issue in CL1, so you fix it (by amending the commit) and repush the stack. Now your stack is

* CL1 Create Thing framework [v2] * CL2 Implement A for Thing * CL3 Implement B for Thing

CL1 & CL2 get approved so you merge them (though typically with Gerrit they're cherry picked - CLs are individual Git commits). You push up an implementation of CL4, so your stack now looks like

* CL3 Implement B for Thing * CL3 Implement C for Thing

The important point is that CLs are atomic (and are reviewed atomically) even if they depend upon each other (i.e. are a part of a stack). When you're working in Git you typically (unless for whatever reason you have multiple unrelated stacks on the go, which is relatively rare) just work off of the master branch, so all the commits between `origin/master` and `master` - i.e. the set that automatically show up in `git rebase -i` and similar tooling - are your stack. When you pull, you `git pull --rebase` (or rather set the config for your machine or repo to default to that). When you've revised something in your stack or want to add something to it, you just do "git push HEAD:origin/refs/for/master" update Gerrit with the latest version of your stack

It takes a little time to get used to (and you have to learn how to hold `git rebase -i` properly), but when you're used to it it's immensely more productive than the Github/clones PR flow (and doesn't involve manual branch juggling, etc). I can't express just how badly they deal at handling reviews of stacked PRs - either you create your stacked PR targeting master (and it gets all of the changes from the underlying PRs merged into its changes list, which makes reviewing it harder) or you target it at the branch of the underlying PR (which is non-obvious and painful and you have to manually remember to shift it across when the PR beneath it gets merged)

When I'm in this situation when dealing with something which is PR based, I tend to end up merging CL1 & CL2 (because its easier to review things when you have an example) and hang on to CL3 & CL4 on my local machine until the first one gets merged

Re: An ex-Googler’s guide to dev tools

#200

(Googler here) The article is a good description of the tools, and I was not aware of the blaze clones plz and pants. One thing that is maybe not obvious: For an API author, code search in combination with a monorepo and the somewhat hermetic universe which is Google's code base provides immediate access to all uses of a library. You can see what worked well and what didn't, and it enables effective refactorings. Tha…

> I was not aware of the blaze clones plz and pants.

At BazelCon 2020, Borja Lorente from Twitter gave a talk [0] about how they were migrating away from Pants to Bazel. Seeing as Twitter was heavily involved in the development of Pants, not sure what that means with respect to adoption and evangalism once they complete their migration.

Lately it seems that Bazel has basically won in the space of open source projects using Bazel clones as more and more companies switch over.

[0] https://youtube.com/watch?v=0l9u-FIaGrQ

Post reply on HN