
Why Senior Devs Write Dumb Code and How to Spot a Junior from a Mile Away - wheresvic1
https://hackernoon.com/why-senior-devs-write-dumb-code-and-how-to-spot-a-junior-from-a-mile-away-27fa263b101a
======
pmontra
I refactored some Python junior developer code recently.

Non standard style (there is a PEP for that) and not consistently non
standard.

Obfuscated variable names.

A for loop over a list with ifs on most of the indices.

A sequential scan with remote API calls instead of a binary search.

My favorite is a get_info function returning an object of class Info with a
couple of string attributes. Digging into it, the function looked for the CSRF
token in a HTML page. I renamed it get_csrf_token, made it return one string,
deleted the class.

However the code did work and I'm sure I did those things or worse when I was
young.

