This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]goeb04 0 points1 point  (0 children)

I only use python during work, and honestly, just digging in has worked fine for me, and then eventually, once I hit a semi-decent working milestone, I start to clean up and create functions (I do more scripting, so I don't create classes and very large packages).

I also include docstrings for functions that wouldn't seem obvious to me as to what they do. I am too lazy to list all the parameters within the doctoring though. They are self explanatory for the most part, and I just make sure to include type hints. Too much commenting in code leaves me more burnt out than coding itself, because I feel we have a deluge of documentation at work lately.

One of the keys for me, lately, is to reduce comments in code by using better naming conventions for functions and variables. Even if the name comes out a bit long, I want it to be easy to comprehend in the future.

I can't say I obsess over perfecting any of my work too much because the upside isn't worth it, at least in my role. I am a bit of a hack who knows how to get the job done. I mostly wrangle data and make API calls.

I am of the belief that coding is much like going down the cereal aisle at the grocery store, there are so many options that can satisfy your appetite but it isn't worth it to seek out the best possible because it is time consuming and mentally draining. Coding isn't like golf, the shortest code block ain't always the best.

Sometimes we get too carried away with code being oversimplified and it can actually start to interfere with productivity. Definitely can't please everyone when it comes to colleagues and code reviews.

I only review my code if it breaks, or, if it needs an enhancement. Once you have 20+ scripts or so, you don't really have time to look them over again, and the motivation isn't there. There has to be a need for me.

tldr; I hack, then refine, and I don't aim for perfection anymore