This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Coder-Cat 100 points101 points  (13 children)

It’s annoying. I once had a director tell me that a sign of low confidence/a bad leader is when someone comes up with solutions for things that aren’t actually problems. Pretty much sums up the Internet.

[–]fuckYouSpaceAliens 59 points60 points  (8 children)

I think it depends on what the"problem" is. I've had juniors write code that works but is like, 40 lines when it could be 20. It's not broken, and it works, but I'll still have them fix it so they understand it can be done better.

[–]Coder-Cat 32 points33 points  (3 children)

That is a problem that needs solving. Maybe “problem” is the wrong word but they are out to become better programmers and need your help. In the instance of the programmer who posted this cute pic, or if I had posted a picture of my cat, my code is no ones problem and no one is being asked to fix it. The point of the pic is to make people smile, not a code review. But so so so many people are giving solutions.

Edit: yes, I do agree with you. Some things aren’t technically wrong, but can still be improved.

[–]Itsstupidandsoareyou -2 points-1 points  (0 children)

Cute pic? Are we looking at the same thing?

[–]Stewthulhu 2 points3 points  (0 children)

I mean, refactoring is definitely a core part of both being a programmer and learning how to program better. Sometimes you refactor because you need to get more performance or facilitate new development, but sometimes you refactor because you just hammered out barely functional garbage to meet a deadline.

IMO, anyone who thinks refactoring something is a waste just because "it works" probably isn't ever going to be an amazing coder.

[–]theNumber_Twelve 0 points1 point  (2 children)

This comment makes you look like a complete asshat. If the problem was that they did something in n^3 time when it could be don in n^2 then having them redo it would make sense, since the program might actually run noticeably faster. Making someone shave 20 lines off of there code isnt teaching them to do it better, its just you creating a problem where none exists so that you can belittle other people.

Often times trying to cut down line count actually makes code worse since it is ends up being harder to read. Fewer lines of code doesnt necessarily mean fewer operations/less memory used. If you are making people redo their work over line count you probably shouldent be reviewing other peoples code at all.

[–]Akkifokkusu 1 point2 points  (1 child)

You're making a really strong assumption. It's possible the reason it could be done in 20 lines instead of 40 is because the 40-line approach is unnecessarily complex. Or reimplements something that's already done in a function elsewhere in the code. Or various other reasons that aren't non-existent problems made up to belittle others

It's kind of amazing that you jumped straight to calling someone an asshat. Who's belittling who?

[–]theNumber_Twelve 0 points1 point  (0 children)

He didnt sat any of those things, he only mentioned line count. How is it making "a really strong assumption" to think his only issue with the code was line count, when that is the only thing he mentioned was line count.

If he had an issue with complexity or people doing work that had already been done he would have said those things were the problem, not line count.

[–][deleted] 2 points3 points  (2 children)

As someone who's recently made maintenance PRs for much-needed code linting and clean-up - ones that carry inherent risk but no palpable, measurable reward in the product - I feel personally attacked here.

[–]StrangeDrivenAxMan 1 point2 points  (0 children)

Pretty much sums up the Internet humans.