@avidamoeba - eviltoast
  • 239 Posts
  • 5.97K Comments
Joined 2 years ago
cake
Cake day: July 5th, 2023

help-circle
  • Much more important than the enjoyable culture is the material aspect - how much work each developer has to do. Nice vibes help delay burnout but rarely eliminate it. Or they let it happen with a smile on the face.

    Pay the developers instead, so they can reduce hours worked elsewhere, if you can. Or contribute code, if you can. This isn’t aimed at you personally, but anyone reading. I can’t contribute code but I can pay so I do that.





  • You could absolutely do that and be fucked too. However the point of the pattern I suggested isn’t to replace the return with an assignment. That is, the point isn’t to do the exact same implementation and then do result = something before returning it. Instead it’s to use the initialized result var to directly store your result throughout the function, at every place where you manipulate it. So in this case my suggestion is to not have psize at all. Instead start with int result = -1; and return result; and do all the things you do to psize except on result. Then there’s a higher chance you will return the right value. Not a guarantee. I’m not at all implying that “if they only did this one thing, they wouldn’t have fucked up like this, so stupid” I’m merely suggesting a style that can decrease the probability of this type of error, in my experience. I’m teaching my team to write in defensive ways so they can feel some confidence in what they wrote, even if they slept 2 hours the night before, and also understand it after another bad night. Cause that ends up happening, life happens and like OpenZFS we also can’t afford serious bugs in what we do.







  • Not quite, but there has been some con action so far. Some diff between standard con are:

    • Does not deny climate change
    • Does not want to harm LGBTQ pop
    • Has read Marx and agrees with some of his analysis
    • Does not believe the free market is the best solution for every problem

    My bet is that he’s gonna go for deficit spending when shit hits the fan because unlike the standard con he understands public debt isn’t like family debt and that austerity in bad times is a bad idea. We’ll see in the fall.




  • Scary indeed.

    This one could be helped by always using this pattern whenever you write a function that returns a value, in any language, along with no early returns:

    int func(...) {
        int result = -1;
        ...
        return result;
    }
    

    I always start with writing my result default value, ideally indicating failure, and the return line. Then I implement the rest. We often don’t have the luxury of choosing the language we work with that has the features we like, but consistently enforced code style can help with a lot of problems. Anyone can make mistakes like the one in this bug regardless of experience so every little bit helps.