24

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.

Comments
  • 8
    Lol. Hate those fuckers who cant explain shit
  • 5
    Willingly making the code more complex and difficult to use? As a "best practice"? Bloody idiot.
  • 2
    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.
  • 1
    @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!
    ¯\_(ツ)_/¯
  • 0
    @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
  • 1
    @magicMirror can you explain why it's a best practice better than him?
  • 0
    @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.
  • 1
    @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.
  • 0
    @cmarshall10450
    Now I can. And can explain where it should be used. But it should not be used everywhere blindly.
  • 1
    If 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
  • 2
    @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.
Add Comment