CommunityNews

CommunityNews

There’s No Such Thing as Clean Code

Everyone seems to be striving for ‘clean’ code at the moment. You can’t read a blog post without the author telling you how clean their approach is. Engineering teams get together and discuss which of the possible solutions is the cleanest. Other developers assure you that they practice ‘clean code’.

I’ve come to a realisation though. There’s no such thing as clean code.

Read in full here:

https://www.steveonstuff.com/2022/01/27/no-such-thing-as-clean-code

This thread was posted by one of our members via one of our news source trackers.

Most Liked

davearonson

davearonson

Not exactly “no such thing”, more like quite the opposite, “too many things”. :slight_smile: Somewhat like “quality software”, tossed around with mostly no definition, or occasionally too many definitions. (That’s why, in the spirit of XKCD 967, I’m making One Definition To Rule Them All – results so far at Codosaurus: ACRUMEN .)

dimitarvp

dimitarvp

Quite true.

I personally read “clean code” as “something I can pick up in 5 minutes if I haven’t touched the code base in a year” which is IMO a good pragmatic way of looking at it.

But too many people have been living in poverty, became programmers and skipped five social ladder steps in the upwards direction… and then super quickly became insufferable snobs that started writing bullshit like “clean code aesthete” in their biographies. :person_facepalming: (Yes, I’ve actually seen that and was flabbergasted)

The older I get the more extreme I become. Our area needs a serious cleanup. :expressionless:

davearonson

davearonson

(Sorry for the delayed reply, I’m catching up after a week of vacation!)

Yes, good clean code would be easier to pivot with… but in the time it takes for the business side to decide what to pivot to, the dev side can get started cleaning up the code a bit, plus there’s a fairly large chance that the whole codebase will get chucked and rewritten anyway, or that the biz will just go totally bust and not have a chance to pivot into anything.

As for monoliths, yes, it’s an argument for doing things the easy way. Building a monolith, whether majestic or not, is much easier and faster than deciding where to split things up into microservices, and figuring out how to make them all communicate properly. You can certainly start it as a monolith, and tear off chunks to be microservices later. Again, yes, this will be easier with good clean code… but that’s an investment that you might well not have a chance to cash in. You can also tear off chunks in just a conceptual manner, and reimplement the code differently, perhaps more cleanly this time (since it will probably last longer this time).

But that does bring up an idea… maybe a framework based around microservices in the first place? Say for instance we started with Rails but added microservices for various common things to add on, like various kinds of user management, especially authentication and profiles, maybe authorization, into microservices. Or provided a common foundation for making microservices, so if you needed to split off a service for certain kinds of PII or PHI or credit card data or anything else sensitive, or anything else that might otherwise make sense to split out, you could start that microservice from a common basis, much like how so many apps start from the basis of Rails. Think that might be useful?

Where Next?

Popular General Dev topics Top

Exadra37
As part of our continued goal of helping developers provide safer products for businesses and consumers, we here at McAfee Advanced Threa...
New
First poster: bot
SPWN is a programming language that compiles to Geometry Dash levels. What that means is that you can create levels by using not only the...
New
First poster: AstonJ
We engineered a wearable microphone jammer that is capable of disabling microphones in its user’s surroundings, including hidden micropho...
New
CommunityNews
GitHub - livekit/livekit: Scalable, high-performance WebRTC SFU. SDKs in JavaScript, React, React Native, Flutter, Swift, Kotlin, Unity/C...
New
First poster: cpgo
8 reasons to ditch Chrome and switch to Firefox. Chrome may dominate, but Firefox is a known name among browsers for a reason. Whether y...
New
CommunityNews
…or, “why make programming even harder?” Learning functional programming is an opportunity to discover a new way to represent programs, t...
New
First poster: bot
openai-python/chatml.md at main · openai/openai-python. The OpenAI Python library provides convenient access to the OpenAI API from appl...
New
First poster: gulshan212
Why Python keeps growing, explained | The GitHub Blog. A deep dive into why more people are using Python than ever, its key use cases, a...
New
CommunityNews
We’re a tiny team @deepseek-ai pushing our limits in AGI exploration. Starting this week , Feb 24, 2025 we’ll open-source 5 repos – one ...
New
First poster: dyowee
olmOCR is an open-source tool for converting PDFs to text with high accuracy, preserving reading order and supporting tables, equations, ...
New

Other popular topics Top

malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
wolf4earth
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness. https://f...
New
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
PragmaticBookshelf
“A Mystical Experience” Hero’s Journey with Paolo Perrotta @nusco Ever wonder how authoring books compares to writing articles?...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
New
PragmaticBookshelf
Author Spotlight: Sophie DeBenedetto @SophieDeBenedetto The days of the traditional request-response web application are long gone, b...
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New