from Hacker News

Ask HN: How Do You Deal with Perfectionism in Coding?

by OulaX on 12/1/21, 7:02 PM with 8 comments

I have reached a point where the perfectionism is hindering my ability to finish projects on time, learn new materials / technologies, and enjoy programming in general.

A good example is the recent release of Advent of Code, I decided to take up the challenge, I spent way too much time trying to figure out idiomatic / pythonic ways to solve a for loop / opening a file for example, whereas I could of easily spent solving the problem itself.

Most of the time when I don't reach a perfect solution I just leave working on the project altogether.

Am I the only one dealing with this? Do you have any recommendations to overcome such a bad habit?

P.S: I am not medically diagnosed as a person with OCD, IRL I am a simple messy guy, this habit just exists in coding.

  • by ryanchants on 12/1/21, 8:52 PM

    For Advent of Code specifically, I get it working as hacky as possible, then iterate on the solution to get it where I want
  • by afarrell on 12/1/21, 9:08 PM

    It is worth checking if you are:

    A. Falling into perfectionism.

    B. Putting unhealthy time pressure on yourself.

    C. Worrying too much that people will think of you as perfectionist.

  • by PaulHoule on 12/1/21, 7:04 PM

    Sounds like you need to get more fluent with Python.
  • by creamytaco on 12/1/21, 10:33 PM

    Python is a mess of bad design, it gives you plenty of rope to hang yourself regarding approaches to a problem. I suggest learning a language like Go, where the Python motto "There should be one-- and preferably only one --obvious way to do it" is actually true.