[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1705758809430.png (409 KB, 1080x1080)
409 KB
409 KB PNG
Is there anything more Reddit than the concept of 'clean code'?

All I can think of when I read about that concept is some 50k subscribers youtuber who somehow loves his awful nasal voice (full of mouth clicks) going:

>'You declare a variable 'Foo' and set it to 'Bar'. Boom. Here's the perfect example of some nice, clean, efficient code.'

I can't think a single real world usage of 'clean code' outside of hobbies and personal projects.
It screams amateurish.
>>
>>106790193
Cleanliness is godliness
>>
nothing bad in not trying to make the codebase a spaghetti clusterfuck
it's not enjoyable to change one thing in 5 different places for example
>>
my codebase being clean is the reason I can do a weeks work in the space of an hour

sorry you dont know that feeling
>>
I've realised that clean code is an agenda that keeps you replaceable and unable to do cool things in many types of systems (even non-serious ones).

Most people mean "copy-pasteable" code when they refer to "clean code". Which, isn't horrible. Real "clean code" should be self-contained and easily understood in its context. Not necessarily too simple to the point where anyone can understand it.

Realistically, both overly simple and complex code are bad.
>>
>>106790193
>the concept of 'clean code'
What exactly are you referring to? The half-baked ramblings of some "this always worked for me" (I doubt that it really has) retard who wrote a book?
>>
>>106790193
>another filtered pleb lashes out
>>
>>106790485
This
>>
File: '_acutecat.jpg (608 KB, 1600x1200)
608 KB
608 KB JPG
My idea for documentation has always remained
>What if I got into work shitfuck wasted and sleep deprived Thursday
>But I still want to at the least pretend to get any work done
>>
Any non-trivial examples of how clean code is supposed to look like?
>>
>>106790193
I get the idea behind clean code, but the shit they project is just retarded. everyone wants to pretend like they are devs working for a FAGMAN company and writing a million dollar app.

in the real world, the project needs to be done before it is beautiful. shoving lines of code that get used once into functions is retarded. obsessing over optimization is retarded. if you want optimization, write it in a different language. not everything needs to be object-oriented. using global vars is okay and is probably preferred as long as you name them appropriately,

I once wrote a "clean" object-oriented python script for work that just ended up being a list of function calls. because that's eventually what you end up with if you segment everything. so the code ended up looking like
>initialize()
>gui()
>task()
>finalize()
>end()



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.