Achiel, my team lead at Mendix, showed me Python and it quickly became my go-to language. I got frustrated with the different coding styles, whitespac

[TSTIL] Autopullpep8 and the Facebook adventure

submited by
Style Pass
2024-06-11 09:30:16

Achiel, my team lead at Mendix, showed me Python and it quickly became my go-to language. I got frustrated with the different coding styles, whitespace errors, and learned about pep8, flake, etc. Nowadays we use `black` but back then there was only `autopep8`. A tool that reformatted python code to the pep8 standard.

Learning about GitHub, its API and autopep8 I got a brilliant idea. What if I created a script to clone the top 100 most starred python projects, applied autopep8 and submitted a Pull Request. All completely automated. This was simple. I was nice enough to check the diffs before sending the PR. Autopep8 got a lot wrong and made some things really ugly. I spent 20 hours cleaning up code and then submitting PRs. I got my (small) contributions into a handful of top python projects. Pretty cool! Now more people figured out this trick and it is frowned upon in the open source community, but I think I did more good than harm.

I will never know for sure, but I suspect getting patches into top python libraries triggered some recruitment algorithm in Silicon Valley. In mid 2013 I got a message from a recruiter at Facebook for a position in their Production Engineering team. I actually really disliked Facebook and had deleted my account a few months prior. On the other hand the job was super cool and I loved California. I thought I had 0 chance of making the interview but it might be a great learning exercise. So, the process started. Over a period of 2 months I had 5 late night calls with the US West Coast that I had to keep secret from my bosses. I didn't prepare much and had the feeling that I passed every interview by the skin of my teeth. 

Leave a Comment