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
-
Lensflare17461285d@Ranchonyx haven’t noticed the line number before you mentioned it.
But the signature is not fine.
Abbreviations are bad, especially in JS where there are no type annotations to give the names meaning. -
Ranchonyx10508285d@Lensflare I'd agree, but it's mostly context-dependent.
It's the "norm" to abbreviate request and response as "req" and "res".
Although one could confuse "res" as result...
This is why I religiously use typescript. -
MammaNeedHummus4416285d@Ranchonyx looks fine?? What's res? Does req = request? What's the purpose of this notification function?
I'm a few lines in and already don't like it -
lorentz15183285d@Ranchonyx and that's exactly why the standard is actually rep for reply, although I admit I keep fucking it up too because literally no other system calls it a HTTP reply.
-
IHateForALiving2815284d@retoor I'm currently at my office, so I have to take a wild guess. My gf is taking an entire week of sick vacation, so I would say Puff is sleeping on her.
-
typosaurus12155284d@IHateForALiving I honestly often can't believe how many devs are here and not asking about Puff. What's wrong with them?
-
kobenz868284dI'm terrified of even imagining the untold horrors lying beneath the fold. Creatures of maniac bemusing, mind warping, lurking things to drive a reader insane. Do not ever unfold it, EVER and if god forbid, thou need doing it, have a mirror, a rabbit's foot and a priest with you
-
Lensflare17461283d@jestdotty yes, i should be index and j is just the letter after i in the alphabet so it should be replaced with something meaningful.
Or even better, use foreach loops where no index value is needed.
Just because i is the "standard", doesn’t mean it’s a shitty practice. -
Lensflare17461283d@lorentz disagree
i just means nothing. It could be index, but it could be also anything else. It’s just a common name for the variable in a classic for loop.
Things shouldn’t be named after where they are used. They should be named after what they represent. -
Lensflare17461283d@lorentz you (hopefully) wouldn’t use i for a parameter in a function. And exactly for the same reason i should’t be used in a for loop.
-
Lensflare17461283d@jestdotty I meant standard as in "a lot of people do it" and not as a formal standard in some document.
I should have used another word.
I doubt that there are languages which use i as a parameter name in their standard lib. But if there are, it’s probably some clown language like JS, which obviously doesn’t count. -
Lensflare17461282d@jestdotty yeah and in the past a lot if programmers were using single letters for everything.
Do you suggest that we should go back to that? If no, then ask the question why it should be ok for for loops but not ok for everything else.
Wait, you really are suggesting to go back to single letters for everything, do you?
THE CURSED SPAWN FROM 20 GENERATIONS OF INBREEDING ALL ENDED UP IN MY FUCKING COMPANY
rant
inbreeding
incest
werecoders