Hacker News new | ask | show | jobs
by myspeed 971 days ago
Refactoring is OCD, you can do it infinite times. Many times a working code is rearranged to match some one's preceptive of business logic.
2 comments

Eventually you reach the limit of expression of the language you're working with.

My fizzbuzz:

https://bitbucket.org/iopq/fizzbuzz-in-rust/src/master/src/l...

there's just no more refactors I can do because of the limitations of Rust

You eventually not only reach the limits of your language, but approach the limit of having plaintext code as your single source of truth and the thing you directly work on. At this point, it's like GP says - you can keep refactoring stuff infinitely. You won't be improving anything - you'll only be moving along the surface of limits of plaintext code, only ever making some aspects of code more readable at the expense of others.
OCD is a really difficult mental health condition that millions suffer from. It destroys lives and relationships. Please don’t minimise it by likening it to arguably fun parts of a job.
I have ocd and he's right. Don't pretend you're a spokesperson for people who suffer from my condition.

The condition in reality actually lives on a gradient and it very much influences everyone to varying degrees. It's only labeled ocd once it crosses a threshold. It no doubt exists in programming. Much of refactoring is done for the same mechanisms that cause ocd and zero practical reasoning.

I have ocd but I'm able to differentiate my compulsions from rational reasoning. Thus I can see how irrational my actions are.