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
-
boylett1627y@mmakali
<!-- <script>document.write('<!-- Everything you know is wrong! -->')</script> --> -
Comments, variable names & methods lie. Coworkers and stakeholders lie, requirements and bug reports lie, documentation and APIs lie, advertisements do nothing but lie, probes and sensors lie, blogs and news sites lie, social networks are filled with lies, sometimes even our own senses tell us lies.
We tell little lies to employers, to loved ones, even to ourselves.
Code lies all the time, because humans don't perceive single truths in anything, and code is a reflection of human nature.
We write methods within classes where they don't belong, we expose fields which should be protected, we edit state when we shouldn't. We over-engineer, we under-engineer, we abuse hacks because we're lazy or get lost in complexity because we're nitpicks.
Embrace the lies in your code. Just aim for consistent lies. -
@bittersweet Your argument can be summed up as:
//err as a function to check for errors
err => {
if (err){
res.send (err)
}
res.json({message: "Successful"});
} -
Poorly written code doesn't clearly communicate it's intent; Comments clearly indicate intent/context/that which code doesn't explain.
Code lacking comments is poor code. Don't be that guy who doesn't document their work. -
Root797707yCode can lie, too.
As working for this company had made me acutely aware. 😞😧 ugh. -
Me at 3 AM: "I'll put in some comments here so I know what this does."
Me at 9 AM: "The fuck does that even mean?"
Code doesn't lie, comments do.
random