Ask HN: How to transition from academic programming to software engineering?
Some general advice I&#x27;ve given multiple junior developers over the years, you probably aren&#x27;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.<p>* testing - write your functions small enough to be readable, but not so small their abstractions are meaningless (because you have to test them all)<p>* testing - don&#x27;t reach into your code&#x27;s modules and mock.  Instead use dependency injection with non-testing defaults<p>* code review - It shouldn&#x27;t be personal, if it is are you reading it wrong or are they attacking you personally?<p>* code review - when referencing style complaints ask for reference material.  Don&#x27;t get caught in cyclic-pedantic style war between lead devs.<p>* code - your code should be environment agnostic, if you have environment&#x2F;context specific things to do, pass along a environment&#x2F;configuration dict or make a global config singleton.  As long as your code depends on that you can write code more discretely.<p>* code - personal preference but try to not nest your loops too deeply, when you can use itertools.<p>* code - if you can help it, try not to mutate dicts&#x2F;objects in place while in a loop.  Makes testing a difficult.<p>* 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.<p>Above all, remember code isn&#x27;t perfect.  It&#x27;s a tool to get to an end goal.  If you aren&#x27;t solving for the end goal you aren&#x27;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&#x27;s job.  (that isn&#x27;t a pass to write super shitty code)<p>edit: formatting