| Some general advice I've given multiple junior developers over the years, you probably aren't a junior but most likely applicable to the advice you are seeking. These were passed down to me by other developers. Other HN folk will have links to literature but hopefully my advice will give you a precursor. * testing - write your functions small enough to be readable, but not so small their abstractions are meaningless (because you have to test them all) * testing - don't reach into your code's modules and mock. Instead use dependency injection with non-testing defaults * code review - It shouldn't be personal, if it is are you reading it wrong or are they attacking you personally? * code review - when referencing style complaints ask for reference material. Don't get caught in cyclic-pedantic style war between lead devs. * code - your code should be environment agnostic, if you have environment/context specific things to do, pass along a environment/configuration dict or make a global config singleton. As long as your code depends on that you can write code more discretely. * code - personal preference but try to not nest your loops too deeply, when you can use itertools. * code - if you can help it, try not to mutate dicts/objects in place while in a loop. Makes testing a difficult. * code - exit early if possible, test for failures instead of nesting your entire function inside a single `if`. Helps identify the bad inputs faster as well. Above all, remember code isn't perfect. It's a tool to get to an end goal. If you aren't solving for the end goal you aren't solving the right problem. At the end of the day, you are employed to build a product and that product needs to perform it's job. (that isn't a pass to write super shitty code) edit: formatting |