DEV Community

Discussion on: You dont believe in clean code

Collapse
 
mxldevs profile image
MxL Devs • Edited

"Why" we follow best practices is an excellent point. We should always be reflecting on whether a specific technique or process is useful for us.

I personally don't follow best practices or read up on code design principles or whatnot. I won't remember them, and most of the time I find that I already practice them even if I can't put a name on it. If you ask me what SOLID or DRY means I likely will stumble.

For example, only a few years into my coding did someone look at my code and say "hey that's some nice dependency inversion" and I had no idea what he was talking about until he explained the concept and I was like "oh, is that what people call it". To me it was just something I thought of after getting bitten by new feature requests time and time again and then it just sort of worked out even if it was rough and didn't follow "standard practice" that people might have learned from somewhere.

Most of the time I'm just coding to spec and trying to push out a prototype in matter of minutes or hours so that I can get a greenlight from the client, and any abstractions and other design considerations are based on my own experience of whether it's useful or not. Now, I sometimes do read up on patterns and best practices because I think I have enough experience to be able to say whether it's something I want to adopt.

Collapse
 
danlebrero profile image
Dan Lebrero

We should stop saying “best practices”. They are just practices, that is some contexts they are the best to get the job done. In other contexts, they are not.