For those that don't want to read the article, it is about the program Google has to post little newsletters about programming tools in their bathrooms. They hang them over the urinals too.
I was at Google for an event recently and found it interesting to read as I used the urinal. It was about an internal tool though so it didn't mean much to me.
At the University of Texas at Austin they have a "Lavatory Safety Update" that's usually posted at eye level above the urinals. It discusses lab safety related issues.
It's weird. Going for a walk doesn't make ideas pop up in my mind. Nor does sitting still on a couch bring up ideas. But sitting in the static toilet environment does.
I saw these during my 18 months at Google. They were never relevant to my work.
Working at Google you are bombarded with "nudges." The garbage cans have stop smoking signs. The plentiful candy is famously placed into jars to reduce consumption. There's signs telling you not to sit on the loo for too long. You'll get emails comparing your travel and server expenses to the average. All of this stuff is well-intentioned, but there's clearly part of the company seeking ways to manipulate its workforce.
During my ~60 months inside Google, these nuggets sometimes proved to be useful, telling about a newly available tools (e.g screenshot diffing in UI tests), common pitfalls (like mixing up dates from different systems with and without timezone), common best practices (don't use `now()` in test, instead, imitate the flow of time using...). These are just off the top of my head after several years outside Google.
Nothing mind-blowing or earth-shattering. A number of useful things to learn at these 30-60 seconds when you can't read anything more interesting, though.
Using the real-time clock makes your test impossible to reproduce. Using a mock clock leads to reproducible tests. Same with calls to PRNGs: these should be injected so your test failures can be reproduced.
You cannot test how your code behaves when midnight passes, when daylight saving time changes either way, when it's 29th of February, etc.
More importantly, you cannot reliably (let alone quickly) test how your retry and timeout handling works, especially if two threads interact, or when you do (stubbed or mocked) remote API calls. All these things are the daily bread when working with Google's services, and basically at any setup with multiple (micro)services.
The first time I implemented an "IDateTimeService" in one of our applications, I was greeted with disbelief by my colleagues.
Once I challenged them in running tests for certain edge cases, their mind shifted from "well, we cannot test that then" to "makes totally sense".
Another one is hiding the unhealthy drinks (e.g. soda) behind frosted glass in the fridge, so you can't see it. Kind of silly, in my opinion. Googlers are presumably adults, and can make their own decisions on what to consume.
Retail stores put high-margin items in key locations (next to checkout, at eye level, etc.) or companies actually pay for these spots. In a company kitchen/snack area, why not put the healthy options there? Everyone still makes their own decisions, just like anywhere else. Isn't this optimization more in the employees' interest than putting the cheapest items there (e.g. soda)?
(I'm at Google. I think these kinds of nudges are mostly good. Though it's certainly something to joke about.)
Yes, we must free ourselves from the oppression of writing unit tests and having a tool auto-indent our code! How brave to take such a noble stand on this controversial issue!
We must also throw off the shackles of our near-perfect source code revision management system, so we can gloriously adopt the incredibly slow and notoriously unusable industry standard!
I was at Google for 2 years and liked "Testing on the Toilet" plus it's spinoffs "Programming on the Potty" and "Localization on the Loo" pretty useful. Especially for someone like me who came from much smaller companies where a lot of best practices or tools they wrote don't exist.
This is the closest we're going to get on HN to a shitpost. Speaking personally: I know one developer who discovers lots of new tools on the toilet: me.
I used to work in the head-office of a well-known car dealership firm in the UK. In the bathrooms they had a quote along the lines of 'the best ideas come when we least expect them'.
I found that I ended up thinking more about that quote than coming up with ideas. Kind of counter-intuitive.
The title is "Do Developers Discover New Tools On The Toilet?" but an overbearing mod changed it because he thinks he's Etiquette Secretary of the Internet, and probably also so he can plausibly pretend this isn't a website dedicated to Alphabet's PR.
If you post in this thread, can you please check that it's about the interesting aspects of the article? Poop jokes get old pretty quickly.