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
-
Root825995yWillingly making the code more complex and difficult to use? As a "best practice"? Bloody idiot.
-
I work in Big Data and had an argument during a code review with a colleague telling me to not use string interpolation because its less performant than concatenation.
-
@Root To my idiot peer defence - he was right. It is an actual best practice. But not for that specific usecase. Also, at the time - I did not know what the fuck he was on about.
In golang you can use a context to pass various util objects, and manage goroutine timeouts. And he still has no idea to this day!
¯\_(ツ)_/¯ -
@SiinaCutie it's OK. I knew not to listen to him when he started every comment with "in software engineering, we do...." like everything is done one way - the way he knows.
I've just reviewed some of his code and... FUCK ME! it's a mess -
arekxv10545y@cmarshall10450
Well if you are parsing big data (and I mean huge amount of data) those kinds of small optimizations can have a lot of impact since it all adds up on huge amount of rows of data. If you are parsing up to 1 million rows at most it wont probably make much difference, especially if the programming language optimizes the code. -
@arekxv we are using scala and apache spark with distributed computing clusters ( 6 nodes with 32-64gb memory average). My colleague can't show me any significant improvement from those kind of optimisations as the ETLs are more memory intensive than compute intensive.
-
@cmarshall10450
Now I can. And can explain where it should be used. But it should not be used everywhere blindly. -
Hazarth95025yIf I understand this correctly, its about context passing rather than arguments. In which case, yes, its a best practice once you achieve certain complexity in the function. But also comes with It's own problems since it kinda bashes local scopes and not everything needs to be everywhere all the time, might as well make it static global at that point xD
-
@Hazarth
It is. But no one in my team fully understands - including me, who took the time to learn.
The one who started with this "best practice", did not bother to teach or explain.... And went to do other things.
Related Rants
-
linuxxx32*client calls in* Me: good morning, how can I help you? Client: my ip is blocked, could you unblock it for m...
-
DRSDavidSoft28Found this in our codebase, apparently one of my co-workers had written this
-
linuxxx23*client calls* "hello, we forgot the password to our WiFi router. Could you reset that for us?" 😐😶😮...
during code review...
peer: "you should pass this variable, and extract the logger from it"
me: "why? it is a 3 line logging function. why not pass the logger instance?"
peer: "because that is our best practice. It is the way we do things"
me: "why is it a best practice?"
peer: "because it is. We use it everywhere!"
me: "No we don't. And I still don't understand why is this a best practice. can you explain?"
peer: gives ups, did not look at the mr, and was not going to.
mr stays open. probably forever.
rant
wtf
best practices
wk190