Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Hazarth9129109dI'm pretty sure the idea behind "readable code" is
a) adhering to common language patterns and naming schemes
b) Proper variable and function naming
c) Avoiding god functions that do everything all the time
d) comment whatever cannot be easily understood otherwise, mostly useful for optimization magic and parallelism patterns where the flow is no longer easily understandable
I don't think these are "subjective"... Clearly you can name a function something else than I would, but as long as you name it correctly, and it's short enough so that it's easy to understand, it's going to be readable by me even if your choice of words is difference.
ditto with language patterns. If everyone is using camelCase, don't randomly write with snake case. My eyes will be searching for specific patterns that are common for the language world wide, don't be *that one person* who likes his way better because that's how he does it in TyPEsCrIPt or something.
and so on -
kiki37285109dai is very good at writing comments and helping you make sense of what the code does
-
CoreFusionX3450109d
-
devux-bookmark115108d@Demolishun The quoted blog post contains an example of a class that should not be there because it always returns false. Its confusing name: AlwaysNotAvailableAvailability to me it looks like someone wrote that to avoid the "magic number" trap of simply using false in the first place. A comment could have been more "readable", but then again there are software architects strictly against any kind of comment anywhere because proper naming should make the code self-explanatory in theory.
Related Rants
readable just means "write it in the way I typically write / understand it in"
which makes it a confusing moving target of whatever the local consensus is... and I don't think these people are self-aware of this fact then just get mad at others for not "getting it" automatically, bah
random
cleancode
readable