←back to thread

159 points mpweiher | 2 comments | | HN request time: 0.001s | source
Show context
t8sr ◴[] No.43671930[source]
When I did my 20% on Go at Google, about 10 years ago, we already had a semi-formal rule that channels must not appear in exported function signatures. It turns out that using CSP in any large, complex codebase is asking for trouble, and that this is true even about projects where members of the core Go team did the CSP.

If you take enough steps back and really think about it, the only synchronization primitive that exists is a futex (and maybe atomics). Everything else is an abstraction of some kind. If you're really determined, you can build anything out of anything. That doesn't mean it's always a good idea.

Looking back, I'd say channels are far superior to condition variables as a synchronized cross-thread communication mechanism - when I use them these days, it's mostly for that. Locks (mutexes) are really performant and easy to understand and generally better for mutual exclusion. (It's in the name!)

replies(5): >>43672034 #>>43672125 #>>43672192 #>>43672501 #>>43687905 #
throwaway150 ◴[] No.43672034[source]
What is "20% on Go"? What is it 20% of?
replies(3): >>43672063 #>>43672064 #>>43672071 #
darkr ◴[] No.43672064[source]
At least historically, google engineers had 20% of their time to spend on projects not related to their core role
replies(1): >>43672293 #
kyrra ◴[] No.43672293[source]
This still exists today. For example, I am on the payments team but I have a 20% project working on protobuf. I had to get formal approval from my management chain and someone on the protobuf team. And it is tracked as part of my performance reviews. They just want to make sure I'm not building something useless that nobody wants and that I'm not just wasting the company's time.
replies(3): >>43672411 #>>43672772 #>>43675474 #
vrosas ◴[] No.43672411{3}[source]
I see why they do this, but man it almost feels like asking your boss for approval on where you go on vacation. Do people get dinged if their 20% time project doesn't pan out, or they lose interest later on?
replies(2): >>43672760 #>>43672788 #
1. kyrra ◴[] No.43672788{4}[source]
It has nothing to do with success. It's entirely for making sure some one besides the person doing the 20% agrees with the idea behind the project.
replies(1): >>43674076 #
2. hedora ◴[] No.43674076[source]
Lol. They’d be better off giving people the option to work 4 days if they also signed over right of first refusal for hobby projects.