8

When McDonald's janitors are writing code...

Dev1: *creates a MR*
Code: for each HTTP request do

// stuff
Executors.newFixedThreadPool(validators.size()); // effectively meaning will start 7 new threads for each incoming request
// other stuff

Dev2: ^^ ??? Fix that shit. This will cause performance problems.

Dev1: *updates the code*
Code:

// stuff
int THREAD_NUMBER = 10;
Executors.newFixedThreadPool(THREAD_NUMBER);
// other stuff

Everyone: 🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️

Can I BE facepalming any more?

Comments
  • 1
    Nope.
    You need a Workerpool with 10 threads to come over, and do that for you.
    Also - why the fuck do you allow idiots near the Workerpool class?
  • 8
    “Fix that shit. This will cause performance issues” is kind of a terrible code review comment.

    Does the author of the code you’re reviewing understand why it may cause performance issues? Probably not, or they would have coded it differently. The tone of the review comment is confrontational and judgmental, which would also make the original author defensive and less likely to ask for clarification.

    Just sayin’.
  • 1
    @AmyShackles That was a rephrased comment, with some salt added from myself. The original comment was worded correctly.
  • 0
    @netikras MC Donalds janitors are better than this...
Add Comment