How should I react when a co-worker says his 3000 line method is optimized. Should I report it to my boss?
I have a co-worker who said his 3000 line method is the most optimized possible. How do I react professionally to that?
Should I communicate this to the boss, who does not know anything about programing?
Note that we are a small team of only 3 programmers that are at the same level and each one has his own piece of project that we manage and code ourselves as we want, while that piece of code do what the boss wants it to do.
EDIT:
- My biggest concern here is that my co-worker might end the relationship with the company at some point and I will have to take care of that piece of the project he was working on. How the hell do I read a 3000 line method?
My first thought will be to start all over again from zero and as I already did that with my current piece of project, having in mind that "the boss" doesn't understand anything about programing and he only cares that the program works and the time it takes us to make it work. I am pretty sure he will get at least a little mad.
- I had seen the method, it does a lot of things (a lot) and it has a conditionals block (big ones) meaning that if he calls the method with parameter A = 1 the first block is executed and the others ignored and so on... I have told him that he could split those blocks on different methods so it will be easy to read and understand hopping that he would see the benefits of that and would do it with the rest of the gigantic method but I don't think he sees the benefits. He just said that he did "something" like that because every conditional block is inside a C# region.
NOTES FROM COMMENTS:
As my co-worker said it is a critical method because it does every single calculations of a particular part of the program
The language used to programing is C#.
The speed of the code is not relevant here.
Code Reviews do not exist here. As I said, each one of us works on his own and so long as everything works, no one cares about the how it works.
Assume that every single line of those 3000 lines are from actual code not from spaces or comments.
pair-programming
New contributor
add a comment |
I have a co-worker who said his 3000 line method is the most optimized possible. How do I react professionally to that?
Should I communicate this to the boss, who does not know anything about programing?
Note that we are a small team of only 3 programmers that are at the same level and each one has his own piece of project that we manage and code ourselves as we want, while that piece of code do what the boss wants it to do.
EDIT:
- My biggest concern here is that my co-worker might end the relationship with the company at some point and I will have to take care of that piece of the project he was working on. How the hell do I read a 3000 line method?
My first thought will be to start all over again from zero and as I already did that with my current piece of project, having in mind that "the boss" doesn't understand anything about programing and he only cares that the program works and the time it takes us to make it work. I am pretty sure he will get at least a little mad.
- I had seen the method, it does a lot of things (a lot) and it has a conditionals block (big ones) meaning that if he calls the method with parameter A = 1 the first block is executed and the others ignored and so on... I have told him that he could split those blocks on different methods so it will be easy to read and understand hopping that he would see the benefits of that and would do it with the rest of the gigantic method but I don't think he sees the benefits. He just said that he did "something" like that because every conditional block is inside a C# region.
NOTES FROM COMMENTS:
As my co-worker said it is a critical method because it does every single calculations of a particular part of the program
The language used to programing is C#.
The speed of the code is not relevant here.
Code Reviews do not exist here. As I said, each one of us works on his own and so long as everything works, no one cares about the how it works.
Assume that every single line of those 3000 lines are from actual code not from spaces or comments.
pair-programming
New contributor
55
Optimised and "follows best practices" are different things, semantically he might be correct.
– Jay Gould
14 hours ago
7
How specifically can you demonstrate that it's not optimized?
– Johns-305
14 hours ago
Comments are not for extended discussion; this conversation has been moved to chat.
– Jane S♦
2 hours ago
add a comment |
I have a co-worker who said his 3000 line method is the most optimized possible. How do I react professionally to that?
Should I communicate this to the boss, who does not know anything about programing?
Note that we are a small team of only 3 programmers that are at the same level and each one has his own piece of project that we manage and code ourselves as we want, while that piece of code do what the boss wants it to do.
EDIT:
- My biggest concern here is that my co-worker might end the relationship with the company at some point and I will have to take care of that piece of the project he was working on. How the hell do I read a 3000 line method?
My first thought will be to start all over again from zero and as I already did that with my current piece of project, having in mind that "the boss" doesn't understand anything about programing and he only cares that the program works and the time it takes us to make it work. I am pretty sure he will get at least a little mad.
- I had seen the method, it does a lot of things (a lot) and it has a conditionals block (big ones) meaning that if he calls the method with parameter A = 1 the first block is executed and the others ignored and so on... I have told him that he could split those blocks on different methods so it will be easy to read and understand hopping that he would see the benefits of that and would do it with the rest of the gigantic method but I don't think he sees the benefits. He just said that he did "something" like that because every conditional block is inside a C# region.
NOTES FROM COMMENTS:
As my co-worker said it is a critical method because it does every single calculations of a particular part of the program
The language used to programing is C#.
The speed of the code is not relevant here.
Code Reviews do not exist here. As I said, each one of us works on his own and so long as everything works, no one cares about the how it works.
Assume that every single line of those 3000 lines are from actual code not from spaces or comments.
pair-programming
New contributor
I have a co-worker who said his 3000 line method is the most optimized possible. How do I react professionally to that?
Should I communicate this to the boss, who does not know anything about programing?
Note that we are a small team of only 3 programmers that are at the same level and each one has his own piece of project that we manage and code ourselves as we want, while that piece of code do what the boss wants it to do.
EDIT:
- My biggest concern here is that my co-worker might end the relationship with the company at some point and I will have to take care of that piece of the project he was working on. How the hell do I read a 3000 line method?
My first thought will be to start all over again from zero and as I already did that with my current piece of project, having in mind that "the boss" doesn't understand anything about programing and he only cares that the program works and the time it takes us to make it work. I am pretty sure he will get at least a little mad.
- I had seen the method, it does a lot of things (a lot) and it has a conditionals block (big ones) meaning that if he calls the method with parameter A = 1 the first block is executed and the others ignored and so on... I have told him that he could split those blocks on different methods so it will be easy to read and understand hopping that he would see the benefits of that and would do it with the rest of the gigantic method but I don't think he sees the benefits. He just said that he did "something" like that because every conditional block is inside a C# region.
NOTES FROM COMMENTS:
As my co-worker said it is a critical method because it does every single calculations of a particular part of the program
The language used to programing is C#.
The speed of the code is not relevant here.
Code Reviews do not exist here. As I said, each one of us works on his own and so long as everything works, no one cares about the how it works.
Assume that every single line of those 3000 lines are from actual code not from spaces or comments.
pair-programming
pair-programming
New contributor
New contributor
edited 11 hours ago
IconDaemon
1273
1273
New contributor
asked 15 hours ago
angel humbertoangel humberto
12917
12917
New contributor
New contributor
55
Optimised and "follows best practices" are different things, semantically he might be correct.
– Jay Gould
14 hours ago
7
How specifically can you demonstrate that it's not optimized?
– Johns-305
14 hours ago
Comments are not for extended discussion; this conversation has been moved to chat.
– Jane S♦
2 hours ago
add a comment |
55
Optimised and "follows best practices" are different things, semantically he might be correct.
– Jay Gould
14 hours ago
7
How specifically can you demonstrate that it's not optimized?
– Johns-305
14 hours ago
Comments are not for extended discussion; this conversation has been moved to chat.
– Jane S♦
2 hours ago
55
55
Optimised and "follows best practices" are different things, semantically he might be correct.
– Jay Gould
14 hours ago
Optimised and "follows best practices" are different things, semantically he might be correct.
– Jay Gould
14 hours ago
7
7
How specifically can you demonstrate that it's not optimized?
– Johns-305
14 hours ago
How specifically can you demonstrate that it's not optimized?
– Johns-305
14 hours ago
Comments are not for extended discussion; this conversation has been moved to chat.
– Jane S♦
2 hours ago
Comments are not for extended discussion; this conversation has been moved to chat.
– Jane S♦
2 hours ago
add a comment |
16 Answers
16
active
oldest
votes
If you're concerned about it you should actually read the code and offer suggestions (sounds like a great time to push for code review!). It may be 3000 lines out of need. Deciding that just because there are 3000 lines means it's wrong or bad is arbitrary.
[Edited based on updates]
You say that the code's speed is not relevant. At this point it sounds like it's just ugly code. The best course of action since you've already given them suggestions (since you're not their supervisor, etc.) would probably be to simply accept it and move on. If you ever need to work on their code it sounds like it's divided up enough that it could be easily broken into multiple functions, but as-is it works and you may never need to touch it.
Work on what your bosses want you to work on and make suggestions and improvements where you can fit them. If you try to fix everything wrong you see all at once you'll stress yourself out for no good reason.
7
What could a valid reason for such a function?
– FooBar
14 hours ago
3
@FooBar If nothing else it could just be how that programmer is best able to understand things. If their job role is really split so definitively across the parts of the process and speed is not an issue then "It works and I can update it easily" is understandable. Not great, but an understandable excuse.
– Ethan The Brave
13 hours ago
4
@angelhumberto Except that your coworker claims they can maintain it this way, and you have not given any evidence that they are wrong. You cannot maintain it as it is currently written (and I sympathize, as I too am skeptical of you coworker's claim). That you fear you maybe someday might need to re-write it if your coworker leaves isn't a persuasive argument that your coworker needs to redo the work, in a way that (allegedly) would make them less productive, right now in a way that suits your preferences. What if the coworker did that and then you left the company?
– Upper_Case
12 hours ago
7
@simbabque It's not 1980 any more, compilers manage to inline methods on their own these days. Also a 3000 line method by definition can't be a single hot spot, inlining gets big advantages in hot loops but that's it (matter of fact lots of perf problems in Java these days come from HotSpot inlining too much and blowing right past the icache). And again, compilers have figured out that method inlining is useful a loooong time ago - worst case you have to help them a bit to inline it, but manually pasting code is not the way to go.
– Voo
11 hours ago
11
@simbabque You're using an interpreted language and are so worried about speed that you manually inline functions? That seems, let's say the wrong thing to focus on if speed is of importance ("yay we managed to make the code 3% faster! Now it's only several orders of magnitude minus 3% slower than if written in C")
– Voo
11 hours ago
|
show 12 more comments
I'd focus on the maintainability issue.
Depending on circumstances, a 1,000 line function that does one thing and is well-documented can be more readable and maintainable than a 20 line function that defers every decision to a ten calls deep stack of utility functions that each had special cases grafted on over time as requirements changed (oddly specific rant, I know).
The checklist for having big functions:
Remove the need for users of the function to understand it completely: there should be documentation that treats the function as a black box and only describes its behaviour. User code does not get to rely on anything that isn't documented in this specification, which needs to be an explicit point in code reviews for caller functions.
Automate verification of the function. All current use cases should exist as unit tests, so if it ever becomes necessary to modify that function, you can do so quickly with the confidence that nothing else breaks as a result.
Length of a function often correlates with how easy it is to understand, but that is not a hard and fast rule.
18
I really disagree that any 1,000 line function is going to be clearer and more readable than the equivalent broken up into smaller functions. I find it really, really unlikely that a 1,000 function doesn't have duplicated blocks of code that could be pulled out into functions. I really don't want to read 1,000 lines to figure out what a function does.
– DaveG
12 hours ago
9
There's no way a 1k line function does one thing.
– ajacian81
9 hours ago
3
@DaveG Sounds like you haven't yet encountered the 10-levels-deep indirection spread across 50 files alternative. Sometimes a readable, well-named 1000-line function can evoke a sigh of relief that it didn't go heavy on indirection. This is especially true when it's implementing a complex, multi-step workflow. (That's not to say that careful abstraction wouldn't have been a somewhat better alternative.)
– Roy Tinker
7 hours ago
4
I think that's something of a false dichotomy. Refactoring a 1000+ line function does not necessitate vast levels of indirection. Also, there really is no way a 1000+ line function could not be sensibly broken up into at least a handful of smaller functions that encapsulate coherent sections of the larger.
– Dancrumb
7 hours ago
4
@Dancrumb It entirely depends on the function. If it's spaghetti code, sure. But if it's a state machine, then please do make it one 1000-line function, especially if you've got diagrams for it too. We can all read that, and maintain it. My horror is the CS design-pattern "expert" fresh from uni who wants to split that into a dozen interconnected files and functors and god knows what, just because hey, design patterns. No. No, no, no. No. Nope. Hell no.
– Graham
7 hours ago
|
show 4 more comments
I deleted my previous answer because it was irrelevant after the latest edits.
Let's see what we have:
- Your boss is not programming-literate.
- Your colleague might leave soon and you'll inherit the project.
- Your boss wants results yesterday.
- Your new project is going to be a big, steaming pile of unmentionables.
Cool. Let's start with the boss. He doesn't understand programming, but he understands time and money. He also wants things Cheap, or you'd have more resources, and Fast. You must explain to him what he's getting himself into:
You've already said he doesn't care about quality - which is fine. It's his decision to make. What he doesn't understand is that bad quality prohibits fast work. Eventually you hit a brick wall, the technical debt catches up with you, you just can't write any more code that doesn't break existing stuff. This is where burnout and updated CVs are found. He must understand that software development is a marathon, not a sprint race.
At this point you can mention that feature you rolled out last month, which was rolled out pretty quickly but you're still fixing bugs about it.
3
Exactly, you've used the key phrase. All that is being done here is building "code debt" or "technical debt". The person with the "3000 line routine" is a complete fool, a nobody. That is a non-issue. But if our OP even asks if that is acceptable, that is disturbing for our OP.
– Fattie
13 hours ago
So... Are u saying that I should bring my concern to my boss and exposed my co-worker? Note that the co-worker has been working on it from 2 months by now and he was beeing push to finish it FAST. It "works" now the problem as u mention is the future of that code
– angel humberto
12 hours ago
5
@angelhumberto You don't have to make the other guy look bad explicitly. You can just say that, in its current state, the project will be very difficult to extend in the future, and this is a direct result of the push to do it fast. Focus on the problem, not the person.
– rath
11 hours ago
@rath I don't disagree with you but I can imagine the boss saying that he doesn't care about future extensibility (he's probably wondering what that even is)... he just wants it done. Makes maintenance harder? We'll figure that out later... and the list goes on.
– JeffC
10 hours ago
@Fattie A person who passes judgement of someone's abilities solely on the basis of second-hand incomplete description of their work, made from a self-evidently biased point of view, is also a fool IMO.
– alephzero
6 hours ago
|
show 3 more comments
How do I react professional to that?
"Great, thanks!"
Now, if you feel the code is sub-optimal, regardless of the number of lines, you can test it on the side to see if it meets any performance requirements. This gives you meaningful, actionable information.
If you think the code follows poor practices, you can bring this up in code-review.
Code Reviews does not exist
– angel humberto
13 hours ago
3
@angelhumberto Then you now have a reason start them.
– Johns-305
13 hours ago
I don't think it will work as I said we are a small team of only 3 developer who work on their on projects. What I want to know is what to do knowing that the co-worker y doing things like that
– angel humberto
12 hours ago
2
@angelhumberto Right, but please read the Answers. One common theme is that 3000 lines is not in itself a problem. You have to identify an actual problem before doing anything.
– Johns-305
12 hours ago
The question is done in the descrip. I know the problem what should I do about it? Should I tell my boss?
– angel humberto
12 hours ago
add a comment |
I have worked on legacy code before where the entire website is handled in a single file that is approximately 100,000 lines of code. That's right. Everything about the site is done in a single file, single function. It got to a point where adding or modifying something meant you scrolled all the way to the bottom and simply modified the output buffer to change things. Like if someone said they wanted to change a sentence, we do a regex to search the sentence and simply replaced it with the new sentence.
We eventually got to the point where it became so bloated only a few people were "experts" at modifying the output buffer. It was ultimately decided to simply toss the file, and redo the entire site with a modern approach.
I think that is what will happen here. Maintain the 3k function, and if he goes, simply toss the code. That's what I would do, rather than waste time trying to convince someone something is better. It works, is what the argument is and that might be true. Without a boss who knows code or having a good soft-skill, you probably won't get far with trying to convince your equal co-worker to change.
This is all true and this is a great answer. However you CAN explain it to the boss simply, in a few words. I have stated how in my answer.
– Fattie
10 hours ago
Yeah true. I mean it comes down to soft skills really in explaining money expenses to a non-programmer. Not to sound offensive, but based on the problem OP described, I don't think he has it. It's common in the developer world though that many developers lack soft skills needed to explain things from a programmer to non programmer and back to a programmer. Myself included.
– Dan
10 hours ago
It sounds by his explanation that the function is organized into large conditional blocks. So I imagine it would be quite possible to refactor that 3000 line method.
– Džuris
8 hours ago
While your suggestion might work I am not okey working like that. The fact that I have to spend a day just looking that función to fix a small problem or to add another bug called "feature" would make my eyes bleed. Thanks for the answer
– angel humberto
6 hours ago
add a comment |
Preventing problems is cheaper than waiting for them to happen and then solving them. Your boss likes cheap.
Ask your boss if he expects your code to be used for a long time and if changes are likely if customers pay for them.
In the likely event that you get a yes for both then suggest that you would like to have new code you write reviewed by your peers. It won't take them long and the extra time will be paid tenfold because errors are way cheaper to fix the earlier they are detected. An error found in code which is fresh in the mind is easier to fix than one found by the client with the usual less than helpful error reports from clients. Assure him that you won't be asking for much code review, maybe once each pair of weeks. If he asks if you are unsure about the quality of your code assure him that such is not the case at all. But 6 eyes have a wider view than 2 and code review is a standard industry practice because its benefits far outweigh the minimal costs.
If he goes with it, when your pals find errors in your code be sure to mention it to your boss. Mention how much more time would you have had to spend debugging the issue if the code had gone into production. Or the loss of client confidence. Mention how much this team work improves the product even if you work on different projects.
If he goes for this step he will easily make himself the next one: having everyone's code reviewed.
If he is not willing to accept someone volunteering to have his code reviewed then there is no chance you'd get him to let you review your pal's code.
Nice answered thanks for the time I will take in consideration when taking the final decision
– angel humberto
6 hours ago
add a comment |
You've said on one hand that each developer is responsible for their own code, and yet you wish to report one of your colleagues to your manager for not working to your standards.
If the code works as expected, there's nothing that needs to be said about it until there's a time when it's a problem or there's a time when coding standards are set for the team as a whole.
Please read my first edit to understand why I am concerned about if I should or shouldn't report it
– angel humberto
14 hours ago
add a comment |
A long method is definitely a code smell, but it does not conclusively indicate that something is wrong. In fact, I would argue that you shouldn't break a method apart purely on length, that is arbitrary. For example, I've seen some long methods for distinct ETL (Extract/Transform/Load) tasks where the length is really driven by the amount of data.
Don't report it to the boss at this point. Find a tangible reason why the method can be improved, then communicate that to the developer in a constructive way.
New contributor
In this case i can bet that the code can be split in simpler function that would be easy to read and to modified
– angel humberto
6 hours ago
add a comment |
From what you are describing, you have a mountain to climb and a team to drag up it.
I don't think I would specifically talk about the 1k line method, I would start by bringing up best practices with your boss in a 1:1. Ask him if the team has any coding guidelines or best practices that they follow. Assuming the answer is no, gather some links to some articles on best practices for whatever programming language you are using. I try to stay with coding guides from big companies... companies everyone will have heard of like google, Microsoft, etc. and start with their coding guides.
Bring those to your boss along with some articles about how implementing best practices helps... what are the benefits, etc. Don't bring your message, you are the messenger. You bring glad tidings of ways to be more efficient, save money, have fewer defects, and the list goes on...
I'm thinking your boss would react better to that approach. Then once you get him hooked (hopefully), you have a team discussion about them and let's start following them. (I would throw in some procedural best practices like code reviews and the like also, not just coding guidelines.) Then if you can get them to buy in this far, then you start applying those guidelines and reviewing new code (and old code as you run into it).
"Hey, I found this large method that according to best practice ABC, we should split up into smaller methods that have a single responsibility, etc." and go from there.
To be honest, I doubt you will get far with any of this but this is how I would approach it.
I like your answer and I do agree with you when you said I had a mountain to climb but it is a mountain with 90°, no equipment and if that wasn't enough I would said the mountain is frozen and ward by gigantic dragon's xD
– angel humberto
6 hours ago
Thank for taking the time to answer
– angel humberto
6 hours ago
add a comment |
You have two points here:
In your current position, it's not your problem, you said that your boss ask this coworker to finish the code fast, so he did, leaving behind those 3000 lines with a lot of technical debt, you can mention this to your boss (he doesn't understand programming, but the concept of debt is something that everyone knows) just explain that while the code works, if something breaks or the coworker who write it leaves the company it will take time to understand what he did, he might understand but probably even if he understand that, he will say that is not a problem now, because it's not a problem, at least not yours, what bring us to the next point.
So, the coworker leave the company and now is your problem (you mention that there are 3 developers, so even in this case could not be your problem), well, (I can talk from my experience) do not touch it unless is necessary, talk to your boss again, remember him that first talk, but don't start refactoring that code until your boss approves or the s#!t hits the fan, because if you start to refactor that code, it might be easy but there is a high probability that it will take you time that your boss expect to focus on something else.
A few things to take in consideration, even if its a small company with a boss that don't understand how software development works:
- As other answer mention, while your boss don't know about development, he know about business (I hope so) so the best way to get him understand why code reviews, unit testing and other practices are necessary is to tell him that these are investments, less bugs, less production downtime, etc.
- I don't know who is the senior in your team, if is the one with the 3000 lines, you might have a hard time convincing your boss that what he is doing is not the best approach. This applies to if you are the one with less experience.
- You might want to talk with your coworker, and try to understand why he did that, he mention that is optimized this could mean that the code works, as you says, and that is fast (you might not take speed relevant but for business sometimes it's a huge deal) but he knows that it has technical debt and he plans to fix that, he just follow your boss command to finish that fast.
I like you answer. Thanks for the reply
– angel humberto
6 hours ago
add a comment |
I think the getting hit by a bus example might be the best.
I would go to your boss, and say "I have concerns about the codes maintainability, if the employee gets hit by a bus or otherwise unavailable it will take me ## weeks to figure it out. Are you ok with me being unavailable to work on other project for ## weeks if this project ever need maintenance if other person is not available.?"
Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?
For all we know the boss could be yay, the customer will have to pay us 2x as much because if they want the modifications done they will have to pay for it.
This means that the most important thing to the boss is what will the client pay for.
If my boss didn't understand programming, I doubt I would tell them that essentially "My coworker gets his job done just fine, and he could probably take over my project relatively easily. However, I would struggle a lot if I had to do his job."
– that other guy
7 hours ago
I like the part where you said "Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?". Overall good answer thanks for the time
– angel humberto
6 hours ago
add a comment |
If the boss doesn't know anything about programming then I wouldn't bother telling him. By the sounds of it, your co-worker will do that for himself, especially since he's bragging to you.
The code needs to work, that's all your boss cares about. Of course, size and speed are important factors if it's a large project but if it's small or medium sized, working is good enough.
Ask your co-worker to either show you the code running or for the code itself so you can check it.
Please read my first edit in order to understand why I am concerned of the 3000 lines method
– angel humberto
14 hours ago
add a comment |
Don't worry about it. It's not your problem (right now). It's this guys responsibility to maintain the code, not yours. Don't touch it. If your boss asks you to touch it, whether now or later, tell them why you won't.
If your colleague leaves, you buy a book about refactoring. That's the point where you tell your boss this function isn't maintainable.
Not sure about this, you are basically knowing when and how you are going to die and no doing anything to prevent it
– angel humberto
6 hours ago
add a comment |
What is the function trying to do? How complex is that task? What optimisation category did they aim for (speed, accuracy, usability)? Without any of that information it will be hard to make a judgement. You can always take a look at the code. If there are inefficiencies, point them out like 'The code is good! Quickie [timesaver/performance booster/whatever], you can always do X to avoid [bottleneck]'
add a comment |
I try to use a static analyzer to do this. Feedback from a computer can't be wrong, and that way you don't have to personally confront coworkers. You just have to agree on code rules or take a basic set of existing rules.
New contributor
4
Feedback from a computer can't be wrong Uhhh... sure it can.
– EJoshuaS
9 hours ago
add a comment |
Answer to the ACTUAL QUESTION:
As the OP has correctly pointed out,
"The question is being completely ignored. I know the method is completely ugly and imposible to maintain. What I want to know is ..."
the actual question is clear:
"What I want to know is what to do about it, should I tell to my boss the problem or ..."
The answer is very simple, "it's not high school". Simply speak out clearly and directly.
"Boss and Steve. Regarding this code Steve has written. While it does barely work, it is absolutely, totally, unprofessional. It does not rise to the most basic software standards. It is totally unmaintainable. Boss, you may ask what this means. While it "just barely works" for now, it will cost a fortune maintaining this going forward. Steve, you don't have even basic programming skills, so I'm suggesting Boss Steve should be fired or perhaps moved to another department. Regarding this code, Boss it's up to you to either use this rubbish for now, and we'll "pay for that later", or I can get to work doing the job properly, or perhaps hire someone else (a programmer) to do the job."
(I've highlighted the few words - which is all you need - where you explain the situatio to Boss.)
This is how ordinary, normal working professionals talk in business.
It's not high school, there is absolutely no concern about "hurting someone's feelings" - or, whatever reason it was you did not speak your mind.
Simply be
totally dispassionate. as if you and everyone involved is a robot
absolutely brief. be spectacularly brief
factual
It's that simple.
The answer to your question is go right ahead and immediately clearly speak your mind, to all parties. It's not high school.
OP, make this a fantastic learning experience about simply speaking out clearly in a professional setting.
"It's not high school."
Simply directly, in front of all other parties including the person responsible, clearly and dispassionately state loudly to everyone, the problem you have identified.
2
I want to see a junior tell this about a senior work in front of both
– Omar Martinez
10 hours ago
2
How do you know it just barely works?
– NotMe
10 hours ago
4
This is how ordinary, normal working professionals talk in business.
Not ones who want to keep their jobs... no. I don't disagree that this is what I might think in my head but going to anyone and saying this out loud is not going to solve anything nor educate anyone. The problem is that they clearly have a team that doesn't know and probably doesn't care about best practices. That's where you start... and then see how that goes.
– JeffC
10 hours ago
4
@Fattie I agree that speaking up when there's an issue is professional but the phrasing that you are suggesting is no where near professional by any sane person's standards.
– JeffC
10 hours ago
2
@Fattie I don't understand how you consider this advise to be professionalism. What you're suggesting is outright confrontational and i can't see any good coming of telling your manager that your peer should be removed (permanently or otherwise)
– Rich
10 hours ago
|
show 2 more comments
protected by Jane S♦ 2 hours ago
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
16 Answers
16
active
oldest
votes
16 Answers
16
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you're concerned about it you should actually read the code and offer suggestions (sounds like a great time to push for code review!). It may be 3000 lines out of need. Deciding that just because there are 3000 lines means it's wrong or bad is arbitrary.
[Edited based on updates]
You say that the code's speed is not relevant. At this point it sounds like it's just ugly code. The best course of action since you've already given them suggestions (since you're not their supervisor, etc.) would probably be to simply accept it and move on. If you ever need to work on their code it sounds like it's divided up enough that it could be easily broken into multiple functions, but as-is it works and you may never need to touch it.
Work on what your bosses want you to work on and make suggestions and improvements where you can fit them. If you try to fix everything wrong you see all at once you'll stress yourself out for no good reason.
7
What could a valid reason for such a function?
– FooBar
14 hours ago
3
@FooBar If nothing else it could just be how that programmer is best able to understand things. If their job role is really split so definitively across the parts of the process and speed is not an issue then "It works and I can update it easily" is understandable. Not great, but an understandable excuse.
– Ethan The Brave
13 hours ago
4
@angelhumberto Except that your coworker claims they can maintain it this way, and you have not given any evidence that they are wrong. You cannot maintain it as it is currently written (and I sympathize, as I too am skeptical of you coworker's claim). That you fear you maybe someday might need to re-write it if your coworker leaves isn't a persuasive argument that your coworker needs to redo the work, in a way that (allegedly) would make them less productive, right now in a way that suits your preferences. What if the coworker did that and then you left the company?
– Upper_Case
12 hours ago
7
@simbabque It's not 1980 any more, compilers manage to inline methods on their own these days. Also a 3000 line method by definition can't be a single hot spot, inlining gets big advantages in hot loops but that's it (matter of fact lots of perf problems in Java these days come from HotSpot inlining too much and blowing right past the icache). And again, compilers have figured out that method inlining is useful a loooong time ago - worst case you have to help them a bit to inline it, but manually pasting code is not the way to go.
– Voo
11 hours ago
11
@simbabque You're using an interpreted language and are so worried about speed that you manually inline functions? That seems, let's say the wrong thing to focus on if speed is of importance ("yay we managed to make the code 3% faster! Now it's only several orders of magnitude minus 3% slower than if written in C")
– Voo
11 hours ago
|
show 12 more comments
If you're concerned about it you should actually read the code and offer suggestions (sounds like a great time to push for code review!). It may be 3000 lines out of need. Deciding that just because there are 3000 lines means it's wrong or bad is arbitrary.
[Edited based on updates]
You say that the code's speed is not relevant. At this point it sounds like it's just ugly code. The best course of action since you've already given them suggestions (since you're not their supervisor, etc.) would probably be to simply accept it and move on. If you ever need to work on their code it sounds like it's divided up enough that it could be easily broken into multiple functions, but as-is it works and you may never need to touch it.
Work on what your bosses want you to work on and make suggestions and improvements where you can fit them. If you try to fix everything wrong you see all at once you'll stress yourself out for no good reason.
7
What could a valid reason for such a function?
– FooBar
14 hours ago
3
@FooBar If nothing else it could just be how that programmer is best able to understand things. If their job role is really split so definitively across the parts of the process and speed is not an issue then "It works and I can update it easily" is understandable. Not great, but an understandable excuse.
– Ethan The Brave
13 hours ago
4
@angelhumberto Except that your coworker claims they can maintain it this way, and you have not given any evidence that they are wrong. You cannot maintain it as it is currently written (and I sympathize, as I too am skeptical of you coworker's claim). That you fear you maybe someday might need to re-write it if your coworker leaves isn't a persuasive argument that your coworker needs to redo the work, in a way that (allegedly) would make them less productive, right now in a way that suits your preferences. What if the coworker did that and then you left the company?
– Upper_Case
12 hours ago
7
@simbabque It's not 1980 any more, compilers manage to inline methods on their own these days. Also a 3000 line method by definition can't be a single hot spot, inlining gets big advantages in hot loops but that's it (matter of fact lots of perf problems in Java these days come from HotSpot inlining too much and blowing right past the icache). And again, compilers have figured out that method inlining is useful a loooong time ago - worst case you have to help them a bit to inline it, but manually pasting code is not the way to go.
– Voo
11 hours ago
11
@simbabque You're using an interpreted language and are so worried about speed that you manually inline functions? That seems, let's say the wrong thing to focus on if speed is of importance ("yay we managed to make the code 3% faster! Now it's only several orders of magnitude minus 3% slower than if written in C")
– Voo
11 hours ago
|
show 12 more comments
If you're concerned about it you should actually read the code and offer suggestions (sounds like a great time to push for code review!). It may be 3000 lines out of need. Deciding that just because there are 3000 lines means it's wrong or bad is arbitrary.
[Edited based on updates]
You say that the code's speed is not relevant. At this point it sounds like it's just ugly code. The best course of action since you've already given them suggestions (since you're not their supervisor, etc.) would probably be to simply accept it and move on. If you ever need to work on their code it sounds like it's divided up enough that it could be easily broken into multiple functions, but as-is it works and you may never need to touch it.
Work on what your bosses want you to work on and make suggestions and improvements where you can fit them. If you try to fix everything wrong you see all at once you'll stress yourself out for no good reason.
If you're concerned about it you should actually read the code and offer suggestions (sounds like a great time to push for code review!). It may be 3000 lines out of need. Deciding that just because there are 3000 lines means it's wrong or bad is arbitrary.
[Edited based on updates]
You say that the code's speed is not relevant. At this point it sounds like it's just ugly code. The best course of action since you've already given them suggestions (since you're not their supervisor, etc.) would probably be to simply accept it and move on. If you ever need to work on their code it sounds like it's divided up enough that it could be easily broken into multiple functions, but as-is it works and you may never need to touch it.
Work on what your bosses want you to work on and make suggestions and improvements where you can fit them. If you try to fix everything wrong you see all at once you'll stress yourself out for no good reason.
edited 13 hours ago
answered 14 hours ago
Ethan The BraveEthan The Brave
1,947917
1,947917
7
What could a valid reason for such a function?
– FooBar
14 hours ago
3
@FooBar If nothing else it could just be how that programmer is best able to understand things. If their job role is really split so definitively across the parts of the process and speed is not an issue then "It works and I can update it easily" is understandable. Not great, but an understandable excuse.
– Ethan The Brave
13 hours ago
4
@angelhumberto Except that your coworker claims they can maintain it this way, and you have not given any evidence that they are wrong. You cannot maintain it as it is currently written (and I sympathize, as I too am skeptical of you coworker's claim). That you fear you maybe someday might need to re-write it if your coworker leaves isn't a persuasive argument that your coworker needs to redo the work, in a way that (allegedly) would make them less productive, right now in a way that suits your preferences. What if the coworker did that and then you left the company?
– Upper_Case
12 hours ago
7
@simbabque It's not 1980 any more, compilers manage to inline methods on their own these days. Also a 3000 line method by definition can't be a single hot spot, inlining gets big advantages in hot loops but that's it (matter of fact lots of perf problems in Java these days come from HotSpot inlining too much and blowing right past the icache). And again, compilers have figured out that method inlining is useful a loooong time ago - worst case you have to help them a bit to inline it, but manually pasting code is not the way to go.
– Voo
11 hours ago
11
@simbabque You're using an interpreted language and are so worried about speed that you manually inline functions? That seems, let's say the wrong thing to focus on if speed is of importance ("yay we managed to make the code 3% faster! Now it's only several orders of magnitude minus 3% slower than if written in C")
– Voo
11 hours ago
|
show 12 more comments
7
What could a valid reason for such a function?
– FooBar
14 hours ago
3
@FooBar If nothing else it could just be how that programmer is best able to understand things. If their job role is really split so definitively across the parts of the process and speed is not an issue then "It works and I can update it easily" is understandable. Not great, but an understandable excuse.
– Ethan The Brave
13 hours ago
4
@angelhumberto Except that your coworker claims they can maintain it this way, and you have not given any evidence that they are wrong. You cannot maintain it as it is currently written (and I sympathize, as I too am skeptical of you coworker's claim). That you fear you maybe someday might need to re-write it if your coworker leaves isn't a persuasive argument that your coworker needs to redo the work, in a way that (allegedly) would make them less productive, right now in a way that suits your preferences. What if the coworker did that and then you left the company?
– Upper_Case
12 hours ago
7
@simbabque It's not 1980 any more, compilers manage to inline methods on their own these days. Also a 3000 line method by definition can't be a single hot spot, inlining gets big advantages in hot loops but that's it (matter of fact lots of perf problems in Java these days come from HotSpot inlining too much and blowing right past the icache). And again, compilers have figured out that method inlining is useful a loooong time ago - worst case you have to help them a bit to inline it, but manually pasting code is not the way to go.
– Voo
11 hours ago
11
@simbabque You're using an interpreted language and are so worried about speed that you manually inline functions? That seems, let's say the wrong thing to focus on if speed is of importance ("yay we managed to make the code 3% faster! Now it's only several orders of magnitude minus 3% slower than if written in C")
– Voo
11 hours ago
7
7
What could a valid reason for such a function?
– FooBar
14 hours ago
What could a valid reason for such a function?
– FooBar
14 hours ago
3
3
@FooBar If nothing else it could just be how that programmer is best able to understand things. If their job role is really split so definitively across the parts of the process and speed is not an issue then "It works and I can update it easily" is understandable. Not great, but an understandable excuse.
– Ethan The Brave
13 hours ago
@FooBar If nothing else it could just be how that programmer is best able to understand things. If their job role is really split so definitively across the parts of the process and speed is not an issue then "It works and I can update it easily" is understandable. Not great, but an understandable excuse.
– Ethan The Brave
13 hours ago
4
4
@angelhumberto Except that your coworker claims they can maintain it this way, and you have not given any evidence that they are wrong. You cannot maintain it as it is currently written (and I sympathize, as I too am skeptical of you coworker's claim). That you fear you maybe someday might need to re-write it if your coworker leaves isn't a persuasive argument that your coworker needs to redo the work, in a way that (allegedly) would make them less productive, right now in a way that suits your preferences. What if the coworker did that and then you left the company?
– Upper_Case
12 hours ago
@angelhumberto Except that your coworker claims they can maintain it this way, and you have not given any evidence that they are wrong. You cannot maintain it as it is currently written (and I sympathize, as I too am skeptical of you coworker's claim). That you fear you maybe someday might need to re-write it if your coworker leaves isn't a persuasive argument that your coworker needs to redo the work, in a way that (allegedly) would make them less productive, right now in a way that suits your preferences. What if the coworker did that and then you left the company?
– Upper_Case
12 hours ago
7
7
@simbabque It's not 1980 any more, compilers manage to inline methods on their own these days. Also a 3000 line method by definition can't be a single hot spot, inlining gets big advantages in hot loops but that's it (matter of fact lots of perf problems in Java these days come from HotSpot inlining too much and blowing right past the icache). And again, compilers have figured out that method inlining is useful a loooong time ago - worst case you have to help them a bit to inline it, but manually pasting code is not the way to go.
– Voo
11 hours ago
@simbabque It's not 1980 any more, compilers manage to inline methods on their own these days. Also a 3000 line method by definition can't be a single hot spot, inlining gets big advantages in hot loops but that's it (matter of fact lots of perf problems in Java these days come from HotSpot inlining too much and blowing right past the icache). And again, compilers have figured out that method inlining is useful a loooong time ago - worst case you have to help them a bit to inline it, but manually pasting code is not the way to go.
– Voo
11 hours ago
11
11
@simbabque You're using an interpreted language and are so worried about speed that you manually inline functions? That seems, let's say the wrong thing to focus on if speed is of importance ("yay we managed to make the code 3% faster! Now it's only several orders of magnitude minus 3% slower than if written in C")
– Voo
11 hours ago
@simbabque You're using an interpreted language and are so worried about speed that you manually inline functions? That seems, let's say the wrong thing to focus on if speed is of importance ("yay we managed to make the code 3% faster! Now it's only several orders of magnitude minus 3% slower than if written in C")
– Voo
11 hours ago
|
show 12 more comments
I'd focus on the maintainability issue.
Depending on circumstances, a 1,000 line function that does one thing and is well-documented can be more readable and maintainable than a 20 line function that defers every decision to a ten calls deep stack of utility functions that each had special cases grafted on over time as requirements changed (oddly specific rant, I know).
The checklist for having big functions:
Remove the need for users of the function to understand it completely: there should be documentation that treats the function as a black box and only describes its behaviour. User code does not get to rely on anything that isn't documented in this specification, which needs to be an explicit point in code reviews for caller functions.
Automate verification of the function. All current use cases should exist as unit tests, so if it ever becomes necessary to modify that function, you can do so quickly with the confidence that nothing else breaks as a result.
Length of a function often correlates with how easy it is to understand, but that is not a hard and fast rule.
18
I really disagree that any 1,000 line function is going to be clearer and more readable than the equivalent broken up into smaller functions. I find it really, really unlikely that a 1,000 function doesn't have duplicated blocks of code that could be pulled out into functions. I really don't want to read 1,000 lines to figure out what a function does.
– DaveG
12 hours ago
9
There's no way a 1k line function does one thing.
– ajacian81
9 hours ago
3
@DaveG Sounds like you haven't yet encountered the 10-levels-deep indirection spread across 50 files alternative. Sometimes a readable, well-named 1000-line function can evoke a sigh of relief that it didn't go heavy on indirection. This is especially true when it's implementing a complex, multi-step workflow. (That's not to say that careful abstraction wouldn't have been a somewhat better alternative.)
– Roy Tinker
7 hours ago
4
I think that's something of a false dichotomy. Refactoring a 1000+ line function does not necessitate vast levels of indirection. Also, there really is no way a 1000+ line function could not be sensibly broken up into at least a handful of smaller functions that encapsulate coherent sections of the larger.
– Dancrumb
7 hours ago
4
@Dancrumb It entirely depends on the function. If it's spaghetti code, sure. But if it's a state machine, then please do make it one 1000-line function, especially if you've got diagrams for it too. We can all read that, and maintain it. My horror is the CS design-pattern "expert" fresh from uni who wants to split that into a dozen interconnected files and functors and god knows what, just because hey, design patterns. No. No, no, no. No. Nope. Hell no.
– Graham
7 hours ago
|
show 4 more comments
I'd focus on the maintainability issue.
Depending on circumstances, a 1,000 line function that does one thing and is well-documented can be more readable and maintainable than a 20 line function that defers every decision to a ten calls deep stack of utility functions that each had special cases grafted on over time as requirements changed (oddly specific rant, I know).
The checklist for having big functions:
Remove the need for users of the function to understand it completely: there should be documentation that treats the function as a black box and only describes its behaviour. User code does not get to rely on anything that isn't documented in this specification, which needs to be an explicit point in code reviews for caller functions.
Automate verification of the function. All current use cases should exist as unit tests, so if it ever becomes necessary to modify that function, you can do so quickly with the confidence that nothing else breaks as a result.
Length of a function often correlates with how easy it is to understand, but that is not a hard and fast rule.
18
I really disagree that any 1,000 line function is going to be clearer and more readable than the equivalent broken up into smaller functions. I find it really, really unlikely that a 1,000 function doesn't have duplicated blocks of code that could be pulled out into functions. I really don't want to read 1,000 lines to figure out what a function does.
– DaveG
12 hours ago
9
There's no way a 1k line function does one thing.
– ajacian81
9 hours ago
3
@DaveG Sounds like you haven't yet encountered the 10-levels-deep indirection spread across 50 files alternative. Sometimes a readable, well-named 1000-line function can evoke a sigh of relief that it didn't go heavy on indirection. This is especially true when it's implementing a complex, multi-step workflow. (That's not to say that careful abstraction wouldn't have been a somewhat better alternative.)
– Roy Tinker
7 hours ago
4
I think that's something of a false dichotomy. Refactoring a 1000+ line function does not necessitate vast levels of indirection. Also, there really is no way a 1000+ line function could not be sensibly broken up into at least a handful of smaller functions that encapsulate coherent sections of the larger.
– Dancrumb
7 hours ago
4
@Dancrumb It entirely depends on the function. If it's spaghetti code, sure. But if it's a state machine, then please do make it one 1000-line function, especially if you've got diagrams for it too. We can all read that, and maintain it. My horror is the CS design-pattern "expert" fresh from uni who wants to split that into a dozen interconnected files and functors and god knows what, just because hey, design patterns. No. No, no, no. No. Nope. Hell no.
– Graham
7 hours ago
|
show 4 more comments
I'd focus on the maintainability issue.
Depending on circumstances, a 1,000 line function that does one thing and is well-documented can be more readable and maintainable than a 20 line function that defers every decision to a ten calls deep stack of utility functions that each had special cases grafted on over time as requirements changed (oddly specific rant, I know).
The checklist for having big functions:
Remove the need for users of the function to understand it completely: there should be documentation that treats the function as a black box and only describes its behaviour. User code does not get to rely on anything that isn't documented in this specification, which needs to be an explicit point in code reviews for caller functions.
Automate verification of the function. All current use cases should exist as unit tests, so if it ever becomes necessary to modify that function, you can do so quickly with the confidence that nothing else breaks as a result.
Length of a function often correlates with how easy it is to understand, but that is not a hard and fast rule.
I'd focus on the maintainability issue.
Depending on circumstances, a 1,000 line function that does one thing and is well-documented can be more readable and maintainable than a 20 line function that defers every decision to a ten calls deep stack of utility functions that each had special cases grafted on over time as requirements changed (oddly specific rant, I know).
The checklist for having big functions:
Remove the need for users of the function to understand it completely: there should be documentation that treats the function as a black box and only describes its behaviour. User code does not get to rely on anything that isn't documented in this specification, which needs to be an explicit point in code reviews for caller functions.
Automate verification of the function. All current use cases should exist as unit tests, so if it ever becomes necessary to modify that function, you can do so quickly with the confidence that nothing else breaks as a result.
Length of a function often correlates with how easy it is to understand, but that is not a hard and fast rule.
answered 14 hours ago
Simon RichterSimon Richter
1,42077
1,42077
18
I really disagree that any 1,000 line function is going to be clearer and more readable than the equivalent broken up into smaller functions. I find it really, really unlikely that a 1,000 function doesn't have duplicated blocks of code that could be pulled out into functions. I really don't want to read 1,000 lines to figure out what a function does.
– DaveG
12 hours ago
9
There's no way a 1k line function does one thing.
– ajacian81
9 hours ago
3
@DaveG Sounds like you haven't yet encountered the 10-levels-deep indirection spread across 50 files alternative. Sometimes a readable, well-named 1000-line function can evoke a sigh of relief that it didn't go heavy on indirection. This is especially true when it's implementing a complex, multi-step workflow. (That's not to say that careful abstraction wouldn't have been a somewhat better alternative.)
– Roy Tinker
7 hours ago
4
I think that's something of a false dichotomy. Refactoring a 1000+ line function does not necessitate vast levels of indirection. Also, there really is no way a 1000+ line function could not be sensibly broken up into at least a handful of smaller functions that encapsulate coherent sections of the larger.
– Dancrumb
7 hours ago
4
@Dancrumb It entirely depends on the function. If it's spaghetti code, sure. But if it's a state machine, then please do make it one 1000-line function, especially if you've got diagrams for it too. We can all read that, and maintain it. My horror is the CS design-pattern "expert" fresh from uni who wants to split that into a dozen interconnected files and functors and god knows what, just because hey, design patterns. No. No, no, no. No. Nope. Hell no.
– Graham
7 hours ago
|
show 4 more comments
18
I really disagree that any 1,000 line function is going to be clearer and more readable than the equivalent broken up into smaller functions. I find it really, really unlikely that a 1,000 function doesn't have duplicated blocks of code that could be pulled out into functions. I really don't want to read 1,000 lines to figure out what a function does.
– DaveG
12 hours ago
9
There's no way a 1k line function does one thing.
– ajacian81
9 hours ago
3
@DaveG Sounds like you haven't yet encountered the 10-levels-deep indirection spread across 50 files alternative. Sometimes a readable, well-named 1000-line function can evoke a sigh of relief that it didn't go heavy on indirection. This is especially true when it's implementing a complex, multi-step workflow. (That's not to say that careful abstraction wouldn't have been a somewhat better alternative.)
– Roy Tinker
7 hours ago
4
I think that's something of a false dichotomy. Refactoring a 1000+ line function does not necessitate vast levels of indirection. Also, there really is no way a 1000+ line function could not be sensibly broken up into at least a handful of smaller functions that encapsulate coherent sections of the larger.
– Dancrumb
7 hours ago
4
@Dancrumb It entirely depends on the function. If it's spaghetti code, sure. But if it's a state machine, then please do make it one 1000-line function, especially if you've got diagrams for it too. We can all read that, and maintain it. My horror is the CS design-pattern "expert" fresh from uni who wants to split that into a dozen interconnected files and functors and god knows what, just because hey, design patterns. No. No, no, no. No. Nope. Hell no.
– Graham
7 hours ago
18
18
I really disagree that any 1,000 line function is going to be clearer and more readable than the equivalent broken up into smaller functions. I find it really, really unlikely that a 1,000 function doesn't have duplicated blocks of code that could be pulled out into functions. I really don't want to read 1,000 lines to figure out what a function does.
– DaveG
12 hours ago
I really disagree that any 1,000 line function is going to be clearer and more readable than the equivalent broken up into smaller functions. I find it really, really unlikely that a 1,000 function doesn't have duplicated blocks of code that could be pulled out into functions. I really don't want to read 1,000 lines to figure out what a function does.
– DaveG
12 hours ago
9
9
There's no way a 1k line function does one thing.
– ajacian81
9 hours ago
There's no way a 1k line function does one thing.
– ajacian81
9 hours ago
3
3
@DaveG Sounds like you haven't yet encountered the 10-levels-deep indirection spread across 50 files alternative. Sometimes a readable, well-named 1000-line function can evoke a sigh of relief that it didn't go heavy on indirection. This is especially true when it's implementing a complex, multi-step workflow. (That's not to say that careful abstraction wouldn't have been a somewhat better alternative.)
– Roy Tinker
7 hours ago
@DaveG Sounds like you haven't yet encountered the 10-levels-deep indirection spread across 50 files alternative. Sometimes a readable, well-named 1000-line function can evoke a sigh of relief that it didn't go heavy on indirection. This is especially true when it's implementing a complex, multi-step workflow. (That's not to say that careful abstraction wouldn't have been a somewhat better alternative.)
– Roy Tinker
7 hours ago
4
4
I think that's something of a false dichotomy. Refactoring a 1000+ line function does not necessitate vast levels of indirection. Also, there really is no way a 1000+ line function could not be sensibly broken up into at least a handful of smaller functions that encapsulate coherent sections of the larger.
– Dancrumb
7 hours ago
I think that's something of a false dichotomy. Refactoring a 1000+ line function does not necessitate vast levels of indirection. Also, there really is no way a 1000+ line function could not be sensibly broken up into at least a handful of smaller functions that encapsulate coherent sections of the larger.
– Dancrumb
7 hours ago
4
4
@Dancrumb It entirely depends on the function. If it's spaghetti code, sure. But if it's a state machine, then please do make it one 1000-line function, especially if you've got diagrams for it too. We can all read that, and maintain it. My horror is the CS design-pattern "expert" fresh from uni who wants to split that into a dozen interconnected files and functors and god knows what, just because hey, design patterns. No. No, no, no. No. Nope. Hell no.
– Graham
7 hours ago
@Dancrumb It entirely depends on the function. If it's spaghetti code, sure. But if it's a state machine, then please do make it one 1000-line function, especially if you've got diagrams for it too. We can all read that, and maintain it. My horror is the CS design-pattern "expert" fresh from uni who wants to split that into a dozen interconnected files and functors and god knows what, just because hey, design patterns. No. No, no, no. No. Nope. Hell no.
– Graham
7 hours ago
|
show 4 more comments
I deleted my previous answer because it was irrelevant after the latest edits.
Let's see what we have:
- Your boss is not programming-literate.
- Your colleague might leave soon and you'll inherit the project.
- Your boss wants results yesterday.
- Your new project is going to be a big, steaming pile of unmentionables.
Cool. Let's start with the boss. He doesn't understand programming, but he understands time and money. He also wants things Cheap, or you'd have more resources, and Fast. You must explain to him what he's getting himself into:
You've already said he doesn't care about quality - which is fine. It's his decision to make. What he doesn't understand is that bad quality prohibits fast work. Eventually you hit a brick wall, the technical debt catches up with you, you just can't write any more code that doesn't break existing stuff. This is where burnout and updated CVs are found. He must understand that software development is a marathon, not a sprint race.
At this point you can mention that feature you rolled out last month, which was rolled out pretty quickly but you're still fixing bugs about it.
3
Exactly, you've used the key phrase. All that is being done here is building "code debt" or "technical debt". The person with the "3000 line routine" is a complete fool, a nobody. That is a non-issue. But if our OP even asks if that is acceptable, that is disturbing for our OP.
– Fattie
13 hours ago
So... Are u saying that I should bring my concern to my boss and exposed my co-worker? Note that the co-worker has been working on it from 2 months by now and he was beeing push to finish it FAST. It "works" now the problem as u mention is the future of that code
– angel humberto
12 hours ago
5
@angelhumberto You don't have to make the other guy look bad explicitly. You can just say that, in its current state, the project will be very difficult to extend in the future, and this is a direct result of the push to do it fast. Focus on the problem, not the person.
– rath
11 hours ago
@rath I don't disagree with you but I can imagine the boss saying that he doesn't care about future extensibility (he's probably wondering what that even is)... he just wants it done. Makes maintenance harder? We'll figure that out later... and the list goes on.
– JeffC
10 hours ago
@Fattie A person who passes judgement of someone's abilities solely on the basis of second-hand incomplete description of their work, made from a self-evidently biased point of view, is also a fool IMO.
– alephzero
6 hours ago
|
show 3 more comments
I deleted my previous answer because it was irrelevant after the latest edits.
Let's see what we have:
- Your boss is not programming-literate.
- Your colleague might leave soon and you'll inherit the project.
- Your boss wants results yesterday.
- Your new project is going to be a big, steaming pile of unmentionables.
Cool. Let's start with the boss. He doesn't understand programming, but he understands time and money. He also wants things Cheap, or you'd have more resources, and Fast. You must explain to him what he's getting himself into:
You've already said he doesn't care about quality - which is fine. It's his decision to make. What he doesn't understand is that bad quality prohibits fast work. Eventually you hit a brick wall, the technical debt catches up with you, you just can't write any more code that doesn't break existing stuff. This is where burnout and updated CVs are found. He must understand that software development is a marathon, not a sprint race.
At this point you can mention that feature you rolled out last month, which was rolled out pretty quickly but you're still fixing bugs about it.
3
Exactly, you've used the key phrase. All that is being done here is building "code debt" or "technical debt". The person with the "3000 line routine" is a complete fool, a nobody. That is a non-issue. But if our OP even asks if that is acceptable, that is disturbing for our OP.
– Fattie
13 hours ago
So... Are u saying that I should bring my concern to my boss and exposed my co-worker? Note that the co-worker has been working on it from 2 months by now and he was beeing push to finish it FAST. It "works" now the problem as u mention is the future of that code
– angel humberto
12 hours ago
5
@angelhumberto You don't have to make the other guy look bad explicitly. You can just say that, in its current state, the project will be very difficult to extend in the future, and this is a direct result of the push to do it fast. Focus on the problem, not the person.
– rath
11 hours ago
@rath I don't disagree with you but I can imagine the boss saying that he doesn't care about future extensibility (he's probably wondering what that even is)... he just wants it done. Makes maintenance harder? We'll figure that out later... and the list goes on.
– JeffC
10 hours ago
@Fattie A person who passes judgement of someone's abilities solely on the basis of second-hand incomplete description of their work, made from a self-evidently biased point of view, is also a fool IMO.
– alephzero
6 hours ago
|
show 3 more comments
I deleted my previous answer because it was irrelevant after the latest edits.
Let's see what we have:
- Your boss is not programming-literate.
- Your colleague might leave soon and you'll inherit the project.
- Your boss wants results yesterday.
- Your new project is going to be a big, steaming pile of unmentionables.
Cool. Let's start with the boss. He doesn't understand programming, but he understands time and money. He also wants things Cheap, or you'd have more resources, and Fast. You must explain to him what he's getting himself into:
You've already said he doesn't care about quality - which is fine. It's his decision to make. What he doesn't understand is that bad quality prohibits fast work. Eventually you hit a brick wall, the technical debt catches up with you, you just can't write any more code that doesn't break existing stuff. This is where burnout and updated CVs are found. He must understand that software development is a marathon, not a sprint race.
At this point you can mention that feature you rolled out last month, which was rolled out pretty quickly but you're still fixing bugs about it.
I deleted my previous answer because it was irrelevant after the latest edits.
Let's see what we have:
- Your boss is not programming-literate.
- Your colleague might leave soon and you'll inherit the project.
- Your boss wants results yesterday.
- Your new project is going to be a big, steaming pile of unmentionables.
Cool. Let's start with the boss. He doesn't understand programming, but he understands time and money. He also wants things Cheap, or you'd have more resources, and Fast. You must explain to him what he's getting himself into:
You've already said he doesn't care about quality - which is fine. It's his decision to make. What he doesn't understand is that bad quality prohibits fast work. Eventually you hit a brick wall, the technical debt catches up with you, you just can't write any more code that doesn't break existing stuff. This is where burnout and updated CVs are found. He must understand that software development is a marathon, not a sprint race.
At this point you can mention that feature you rolled out last month, which was rolled out pretty quickly but you're still fixing bugs about it.
answered 13 hours ago
rathrath
19.3k145995
19.3k145995
3
Exactly, you've used the key phrase. All that is being done here is building "code debt" or "technical debt". The person with the "3000 line routine" is a complete fool, a nobody. That is a non-issue. But if our OP even asks if that is acceptable, that is disturbing for our OP.
– Fattie
13 hours ago
So... Are u saying that I should bring my concern to my boss and exposed my co-worker? Note that the co-worker has been working on it from 2 months by now and he was beeing push to finish it FAST. It "works" now the problem as u mention is the future of that code
– angel humberto
12 hours ago
5
@angelhumberto You don't have to make the other guy look bad explicitly. You can just say that, in its current state, the project will be very difficult to extend in the future, and this is a direct result of the push to do it fast. Focus on the problem, not the person.
– rath
11 hours ago
@rath I don't disagree with you but I can imagine the boss saying that he doesn't care about future extensibility (he's probably wondering what that even is)... he just wants it done. Makes maintenance harder? We'll figure that out later... and the list goes on.
– JeffC
10 hours ago
@Fattie A person who passes judgement of someone's abilities solely on the basis of second-hand incomplete description of their work, made from a self-evidently biased point of view, is also a fool IMO.
– alephzero
6 hours ago
|
show 3 more comments
3
Exactly, you've used the key phrase. All that is being done here is building "code debt" or "technical debt". The person with the "3000 line routine" is a complete fool, a nobody. That is a non-issue. But if our OP even asks if that is acceptable, that is disturbing for our OP.
– Fattie
13 hours ago
So... Are u saying that I should bring my concern to my boss and exposed my co-worker? Note that the co-worker has been working on it from 2 months by now and he was beeing push to finish it FAST. It "works" now the problem as u mention is the future of that code
– angel humberto
12 hours ago
5
@angelhumberto You don't have to make the other guy look bad explicitly. You can just say that, in its current state, the project will be very difficult to extend in the future, and this is a direct result of the push to do it fast. Focus on the problem, not the person.
– rath
11 hours ago
@rath I don't disagree with you but I can imagine the boss saying that he doesn't care about future extensibility (he's probably wondering what that even is)... he just wants it done. Makes maintenance harder? We'll figure that out later... and the list goes on.
– JeffC
10 hours ago
@Fattie A person who passes judgement of someone's abilities solely on the basis of second-hand incomplete description of their work, made from a self-evidently biased point of view, is also a fool IMO.
– alephzero
6 hours ago
3
3
Exactly, you've used the key phrase. All that is being done here is building "code debt" or "technical debt". The person with the "3000 line routine" is a complete fool, a nobody. That is a non-issue. But if our OP even asks if that is acceptable, that is disturbing for our OP.
– Fattie
13 hours ago
Exactly, you've used the key phrase. All that is being done here is building "code debt" or "technical debt". The person with the "3000 line routine" is a complete fool, a nobody. That is a non-issue. But if our OP even asks if that is acceptable, that is disturbing for our OP.
– Fattie
13 hours ago
So... Are u saying that I should bring my concern to my boss and exposed my co-worker? Note that the co-worker has been working on it from 2 months by now and he was beeing push to finish it FAST. It "works" now the problem as u mention is the future of that code
– angel humberto
12 hours ago
So... Are u saying that I should bring my concern to my boss and exposed my co-worker? Note that the co-worker has been working on it from 2 months by now and he was beeing push to finish it FAST. It "works" now the problem as u mention is the future of that code
– angel humberto
12 hours ago
5
5
@angelhumberto You don't have to make the other guy look bad explicitly. You can just say that, in its current state, the project will be very difficult to extend in the future, and this is a direct result of the push to do it fast. Focus on the problem, not the person.
– rath
11 hours ago
@angelhumberto You don't have to make the other guy look bad explicitly. You can just say that, in its current state, the project will be very difficult to extend in the future, and this is a direct result of the push to do it fast. Focus on the problem, not the person.
– rath
11 hours ago
@rath I don't disagree with you but I can imagine the boss saying that he doesn't care about future extensibility (he's probably wondering what that even is)... he just wants it done. Makes maintenance harder? We'll figure that out later... and the list goes on.
– JeffC
10 hours ago
@rath I don't disagree with you but I can imagine the boss saying that he doesn't care about future extensibility (he's probably wondering what that even is)... he just wants it done. Makes maintenance harder? We'll figure that out later... and the list goes on.
– JeffC
10 hours ago
@Fattie A person who passes judgement of someone's abilities solely on the basis of second-hand incomplete description of their work, made from a self-evidently biased point of view, is also a fool IMO.
– alephzero
6 hours ago
@Fattie A person who passes judgement of someone's abilities solely on the basis of second-hand incomplete description of their work, made from a self-evidently biased point of view, is also a fool IMO.
– alephzero
6 hours ago
|
show 3 more comments
How do I react professional to that?
"Great, thanks!"
Now, if you feel the code is sub-optimal, regardless of the number of lines, you can test it on the side to see if it meets any performance requirements. This gives you meaningful, actionable information.
If you think the code follows poor practices, you can bring this up in code-review.
Code Reviews does not exist
– angel humberto
13 hours ago
3
@angelhumberto Then you now have a reason start them.
– Johns-305
13 hours ago
I don't think it will work as I said we are a small team of only 3 developer who work on their on projects. What I want to know is what to do knowing that the co-worker y doing things like that
– angel humberto
12 hours ago
2
@angelhumberto Right, but please read the Answers. One common theme is that 3000 lines is not in itself a problem. You have to identify an actual problem before doing anything.
– Johns-305
12 hours ago
The question is done in the descrip. I know the problem what should I do about it? Should I tell my boss?
– angel humberto
12 hours ago
add a comment |
How do I react professional to that?
"Great, thanks!"
Now, if you feel the code is sub-optimal, regardless of the number of lines, you can test it on the side to see if it meets any performance requirements. This gives you meaningful, actionable information.
If you think the code follows poor practices, you can bring this up in code-review.
Code Reviews does not exist
– angel humberto
13 hours ago
3
@angelhumberto Then you now have a reason start them.
– Johns-305
13 hours ago
I don't think it will work as I said we are a small team of only 3 developer who work on their on projects. What I want to know is what to do knowing that the co-worker y doing things like that
– angel humberto
12 hours ago
2
@angelhumberto Right, but please read the Answers. One common theme is that 3000 lines is not in itself a problem. You have to identify an actual problem before doing anything.
– Johns-305
12 hours ago
The question is done in the descrip. I know the problem what should I do about it? Should I tell my boss?
– angel humberto
12 hours ago
add a comment |
How do I react professional to that?
"Great, thanks!"
Now, if you feel the code is sub-optimal, regardless of the number of lines, you can test it on the side to see if it meets any performance requirements. This gives you meaningful, actionable information.
If you think the code follows poor practices, you can bring this up in code-review.
How do I react professional to that?
"Great, thanks!"
Now, if you feel the code is sub-optimal, regardless of the number of lines, you can test it on the side to see if it meets any performance requirements. This gives you meaningful, actionable information.
If you think the code follows poor practices, you can bring this up in code-review.
answered 14 hours ago
Johns-305Johns-305
2,6771714
2,6771714
Code Reviews does not exist
– angel humberto
13 hours ago
3
@angelhumberto Then you now have a reason start them.
– Johns-305
13 hours ago
I don't think it will work as I said we are a small team of only 3 developer who work on their on projects. What I want to know is what to do knowing that the co-worker y doing things like that
– angel humberto
12 hours ago
2
@angelhumberto Right, but please read the Answers. One common theme is that 3000 lines is not in itself a problem. You have to identify an actual problem before doing anything.
– Johns-305
12 hours ago
The question is done in the descrip. I know the problem what should I do about it? Should I tell my boss?
– angel humberto
12 hours ago
add a comment |
Code Reviews does not exist
– angel humberto
13 hours ago
3
@angelhumberto Then you now have a reason start them.
– Johns-305
13 hours ago
I don't think it will work as I said we are a small team of only 3 developer who work on their on projects. What I want to know is what to do knowing that the co-worker y doing things like that
– angel humberto
12 hours ago
2
@angelhumberto Right, but please read the Answers. One common theme is that 3000 lines is not in itself a problem. You have to identify an actual problem before doing anything.
– Johns-305
12 hours ago
The question is done in the descrip. I know the problem what should I do about it? Should I tell my boss?
– angel humberto
12 hours ago
Code Reviews does not exist
– angel humberto
13 hours ago
Code Reviews does not exist
– angel humberto
13 hours ago
3
3
@angelhumberto Then you now have a reason start them.
– Johns-305
13 hours ago
@angelhumberto Then you now have a reason start them.
– Johns-305
13 hours ago
I don't think it will work as I said we are a small team of only 3 developer who work on their on projects. What I want to know is what to do knowing that the co-worker y doing things like that
– angel humberto
12 hours ago
I don't think it will work as I said we are a small team of only 3 developer who work on their on projects. What I want to know is what to do knowing that the co-worker y doing things like that
– angel humberto
12 hours ago
2
2
@angelhumberto Right, but please read the Answers. One common theme is that 3000 lines is not in itself a problem. You have to identify an actual problem before doing anything.
– Johns-305
12 hours ago
@angelhumberto Right, but please read the Answers. One common theme is that 3000 lines is not in itself a problem. You have to identify an actual problem before doing anything.
– Johns-305
12 hours ago
The question is done in the descrip. I know the problem what should I do about it? Should I tell my boss?
– angel humberto
12 hours ago
The question is done in the descrip. I know the problem what should I do about it? Should I tell my boss?
– angel humberto
12 hours ago
add a comment |
I have worked on legacy code before where the entire website is handled in a single file that is approximately 100,000 lines of code. That's right. Everything about the site is done in a single file, single function. It got to a point where adding or modifying something meant you scrolled all the way to the bottom and simply modified the output buffer to change things. Like if someone said they wanted to change a sentence, we do a regex to search the sentence and simply replaced it with the new sentence.
We eventually got to the point where it became so bloated only a few people were "experts" at modifying the output buffer. It was ultimately decided to simply toss the file, and redo the entire site with a modern approach.
I think that is what will happen here. Maintain the 3k function, and if he goes, simply toss the code. That's what I would do, rather than waste time trying to convince someone something is better. It works, is what the argument is and that might be true. Without a boss who knows code or having a good soft-skill, you probably won't get far with trying to convince your equal co-worker to change.
This is all true and this is a great answer. However you CAN explain it to the boss simply, in a few words. I have stated how in my answer.
– Fattie
10 hours ago
Yeah true. I mean it comes down to soft skills really in explaining money expenses to a non-programmer. Not to sound offensive, but based on the problem OP described, I don't think he has it. It's common in the developer world though that many developers lack soft skills needed to explain things from a programmer to non programmer and back to a programmer. Myself included.
– Dan
10 hours ago
It sounds by his explanation that the function is organized into large conditional blocks. So I imagine it would be quite possible to refactor that 3000 line method.
– Džuris
8 hours ago
While your suggestion might work I am not okey working like that. The fact that I have to spend a day just looking that función to fix a small problem or to add another bug called "feature" would make my eyes bleed. Thanks for the answer
– angel humberto
6 hours ago
add a comment |
I have worked on legacy code before where the entire website is handled in a single file that is approximately 100,000 lines of code. That's right. Everything about the site is done in a single file, single function. It got to a point where adding or modifying something meant you scrolled all the way to the bottom and simply modified the output buffer to change things. Like if someone said they wanted to change a sentence, we do a regex to search the sentence and simply replaced it with the new sentence.
We eventually got to the point where it became so bloated only a few people were "experts" at modifying the output buffer. It was ultimately decided to simply toss the file, and redo the entire site with a modern approach.
I think that is what will happen here. Maintain the 3k function, and if he goes, simply toss the code. That's what I would do, rather than waste time trying to convince someone something is better. It works, is what the argument is and that might be true. Without a boss who knows code or having a good soft-skill, you probably won't get far with trying to convince your equal co-worker to change.
This is all true and this is a great answer. However you CAN explain it to the boss simply, in a few words. I have stated how in my answer.
– Fattie
10 hours ago
Yeah true. I mean it comes down to soft skills really in explaining money expenses to a non-programmer. Not to sound offensive, but based on the problem OP described, I don't think he has it. It's common in the developer world though that many developers lack soft skills needed to explain things from a programmer to non programmer and back to a programmer. Myself included.
– Dan
10 hours ago
It sounds by his explanation that the function is organized into large conditional blocks. So I imagine it would be quite possible to refactor that 3000 line method.
– Džuris
8 hours ago
While your suggestion might work I am not okey working like that. The fact that I have to spend a day just looking that función to fix a small problem or to add another bug called "feature" would make my eyes bleed. Thanks for the answer
– angel humberto
6 hours ago
add a comment |
I have worked on legacy code before where the entire website is handled in a single file that is approximately 100,000 lines of code. That's right. Everything about the site is done in a single file, single function. It got to a point where adding or modifying something meant you scrolled all the way to the bottom and simply modified the output buffer to change things. Like if someone said they wanted to change a sentence, we do a regex to search the sentence and simply replaced it with the new sentence.
We eventually got to the point where it became so bloated only a few people were "experts" at modifying the output buffer. It was ultimately decided to simply toss the file, and redo the entire site with a modern approach.
I think that is what will happen here. Maintain the 3k function, and if he goes, simply toss the code. That's what I would do, rather than waste time trying to convince someone something is better. It works, is what the argument is and that might be true. Without a boss who knows code or having a good soft-skill, you probably won't get far with trying to convince your equal co-worker to change.
I have worked on legacy code before where the entire website is handled in a single file that is approximately 100,000 lines of code. That's right. Everything about the site is done in a single file, single function. It got to a point where adding or modifying something meant you scrolled all the way to the bottom and simply modified the output buffer to change things. Like if someone said they wanted to change a sentence, we do a regex to search the sentence and simply replaced it with the new sentence.
We eventually got to the point where it became so bloated only a few people were "experts" at modifying the output buffer. It was ultimately decided to simply toss the file, and redo the entire site with a modern approach.
I think that is what will happen here. Maintain the 3k function, and if he goes, simply toss the code. That's what I would do, rather than waste time trying to convince someone something is better. It works, is what the argument is and that might be true. Without a boss who knows code or having a good soft-skill, you probably won't get far with trying to convince your equal co-worker to change.
answered 11 hours ago
DanDan
8,59231529
8,59231529
This is all true and this is a great answer. However you CAN explain it to the boss simply, in a few words. I have stated how in my answer.
– Fattie
10 hours ago
Yeah true. I mean it comes down to soft skills really in explaining money expenses to a non-programmer. Not to sound offensive, but based on the problem OP described, I don't think he has it. It's common in the developer world though that many developers lack soft skills needed to explain things from a programmer to non programmer and back to a programmer. Myself included.
– Dan
10 hours ago
It sounds by his explanation that the function is organized into large conditional blocks. So I imagine it would be quite possible to refactor that 3000 line method.
– Džuris
8 hours ago
While your suggestion might work I am not okey working like that. The fact that I have to spend a day just looking that función to fix a small problem or to add another bug called "feature" would make my eyes bleed. Thanks for the answer
– angel humberto
6 hours ago
add a comment |
This is all true and this is a great answer. However you CAN explain it to the boss simply, in a few words. I have stated how in my answer.
– Fattie
10 hours ago
Yeah true. I mean it comes down to soft skills really in explaining money expenses to a non-programmer. Not to sound offensive, but based on the problem OP described, I don't think he has it. It's common in the developer world though that many developers lack soft skills needed to explain things from a programmer to non programmer and back to a programmer. Myself included.
– Dan
10 hours ago
It sounds by his explanation that the function is organized into large conditional blocks. So I imagine it would be quite possible to refactor that 3000 line method.
– Džuris
8 hours ago
While your suggestion might work I am not okey working like that. The fact that I have to spend a day just looking that función to fix a small problem or to add another bug called "feature" would make my eyes bleed. Thanks for the answer
– angel humberto
6 hours ago
This is all true and this is a great answer. However you CAN explain it to the boss simply, in a few words. I have stated how in my answer.
– Fattie
10 hours ago
This is all true and this is a great answer. However you CAN explain it to the boss simply, in a few words. I have stated how in my answer.
– Fattie
10 hours ago
Yeah true. I mean it comes down to soft skills really in explaining money expenses to a non-programmer. Not to sound offensive, but based on the problem OP described, I don't think he has it. It's common in the developer world though that many developers lack soft skills needed to explain things from a programmer to non programmer and back to a programmer. Myself included.
– Dan
10 hours ago
Yeah true. I mean it comes down to soft skills really in explaining money expenses to a non-programmer. Not to sound offensive, but based on the problem OP described, I don't think he has it. It's common in the developer world though that many developers lack soft skills needed to explain things from a programmer to non programmer and back to a programmer. Myself included.
– Dan
10 hours ago
It sounds by his explanation that the function is organized into large conditional blocks. So I imagine it would be quite possible to refactor that 3000 line method.
– Džuris
8 hours ago
It sounds by his explanation that the function is organized into large conditional blocks. So I imagine it would be quite possible to refactor that 3000 line method.
– Džuris
8 hours ago
While your suggestion might work I am not okey working like that. The fact that I have to spend a day just looking that función to fix a small problem or to add another bug called "feature" would make my eyes bleed. Thanks for the answer
– angel humberto
6 hours ago
While your suggestion might work I am not okey working like that. The fact that I have to spend a day just looking that función to fix a small problem or to add another bug called "feature" would make my eyes bleed. Thanks for the answer
– angel humberto
6 hours ago
add a comment |
Preventing problems is cheaper than waiting for them to happen and then solving them. Your boss likes cheap.
Ask your boss if he expects your code to be used for a long time and if changes are likely if customers pay for them.
In the likely event that you get a yes for both then suggest that you would like to have new code you write reviewed by your peers. It won't take them long and the extra time will be paid tenfold because errors are way cheaper to fix the earlier they are detected. An error found in code which is fresh in the mind is easier to fix than one found by the client with the usual less than helpful error reports from clients. Assure him that you won't be asking for much code review, maybe once each pair of weeks. If he asks if you are unsure about the quality of your code assure him that such is not the case at all. But 6 eyes have a wider view than 2 and code review is a standard industry practice because its benefits far outweigh the minimal costs.
If he goes with it, when your pals find errors in your code be sure to mention it to your boss. Mention how much more time would you have had to spend debugging the issue if the code had gone into production. Or the loss of client confidence. Mention how much this team work improves the product even if you work on different projects.
If he goes for this step he will easily make himself the next one: having everyone's code reviewed.
If he is not willing to accept someone volunteering to have his code reviewed then there is no chance you'd get him to let you review your pal's code.
Nice answered thanks for the time I will take in consideration when taking the final decision
– angel humberto
6 hours ago
add a comment |
Preventing problems is cheaper than waiting for them to happen and then solving them. Your boss likes cheap.
Ask your boss if he expects your code to be used for a long time and if changes are likely if customers pay for them.
In the likely event that you get a yes for both then suggest that you would like to have new code you write reviewed by your peers. It won't take them long and the extra time will be paid tenfold because errors are way cheaper to fix the earlier they are detected. An error found in code which is fresh in the mind is easier to fix than one found by the client with the usual less than helpful error reports from clients. Assure him that you won't be asking for much code review, maybe once each pair of weeks. If he asks if you are unsure about the quality of your code assure him that such is not the case at all. But 6 eyes have a wider view than 2 and code review is a standard industry practice because its benefits far outweigh the minimal costs.
If he goes with it, when your pals find errors in your code be sure to mention it to your boss. Mention how much more time would you have had to spend debugging the issue if the code had gone into production. Or the loss of client confidence. Mention how much this team work improves the product even if you work on different projects.
If he goes for this step he will easily make himself the next one: having everyone's code reviewed.
If he is not willing to accept someone volunteering to have his code reviewed then there is no chance you'd get him to let you review your pal's code.
Nice answered thanks for the time I will take in consideration when taking the final decision
– angel humberto
6 hours ago
add a comment |
Preventing problems is cheaper than waiting for them to happen and then solving them. Your boss likes cheap.
Ask your boss if he expects your code to be used for a long time and if changes are likely if customers pay for them.
In the likely event that you get a yes for both then suggest that you would like to have new code you write reviewed by your peers. It won't take them long and the extra time will be paid tenfold because errors are way cheaper to fix the earlier they are detected. An error found in code which is fresh in the mind is easier to fix than one found by the client with the usual less than helpful error reports from clients. Assure him that you won't be asking for much code review, maybe once each pair of weeks. If he asks if you are unsure about the quality of your code assure him that such is not the case at all. But 6 eyes have a wider view than 2 and code review is a standard industry practice because its benefits far outweigh the minimal costs.
If he goes with it, when your pals find errors in your code be sure to mention it to your boss. Mention how much more time would you have had to spend debugging the issue if the code had gone into production. Or the loss of client confidence. Mention how much this team work improves the product even if you work on different projects.
If he goes for this step he will easily make himself the next one: having everyone's code reviewed.
If he is not willing to accept someone volunteering to have his code reviewed then there is no chance you'd get him to let you review your pal's code.
Preventing problems is cheaper than waiting for them to happen and then solving them. Your boss likes cheap.
Ask your boss if he expects your code to be used for a long time and if changes are likely if customers pay for them.
In the likely event that you get a yes for both then suggest that you would like to have new code you write reviewed by your peers. It won't take them long and the extra time will be paid tenfold because errors are way cheaper to fix the earlier they are detected. An error found in code which is fresh in the mind is easier to fix than one found by the client with the usual less than helpful error reports from clients. Assure him that you won't be asking for much code review, maybe once each pair of weeks. If he asks if you are unsure about the quality of your code assure him that such is not the case at all. But 6 eyes have a wider view than 2 and code review is a standard industry practice because its benefits far outweigh the minimal costs.
If he goes with it, when your pals find errors in your code be sure to mention it to your boss. Mention how much more time would you have had to spend debugging the issue if the code had gone into production. Or the loss of client confidence. Mention how much this team work improves the product even if you work on different projects.
If he goes for this step he will easily make himself the next one: having everyone's code reviewed.
If he is not willing to accept someone volunteering to have his code reviewed then there is no chance you'd get him to let you review your pal's code.
answered 10 hours ago
Jose Antonio Dura OlmosJose Antonio Dura Olmos
40927
40927
Nice answered thanks for the time I will take in consideration when taking the final decision
– angel humberto
6 hours ago
add a comment |
Nice answered thanks for the time I will take in consideration when taking the final decision
– angel humberto
6 hours ago
Nice answered thanks for the time I will take in consideration when taking the final decision
– angel humberto
6 hours ago
Nice answered thanks for the time I will take in consideration when taking the final decision
– angel humberto
6 hours ago
add a comment |
You've said on one hand that each developer is responsible for their own code, and yet you wish to report one of your colleagues to your manager for not working to your standards.
If the code works as expected, there's nothing that needs to be said about it until there's a time when it's a problem or there's a time when coding standards are set for the team as a whole.
Please read my first edit to understand why I am concerned about if I should or shouldn't report it
– angel humberto
14 hours ago
add a comment |
You've said on one hand that each developer is responsible for their own code, and yet you wish to report one of your colleagues to your manager for not working to your standards.
If the code works as expected, there's nothing that needs to be said about it until there's a time when it's a problem or there's a time when coding standards are set for the team as a whole.
Please read my first edit to understand why I am concerned about if I should or shouldn't report it
– angel humberto
14 hours ago
add a comment |
You've said on one hand that each developer is responsible for their own code, and yet you wish to report one of your colleagues to your manager for not working to your standards.
If the code works as expected, there's nothing that needs to be said about it until there's a time when it's a problem or there's a time when coding standards are set for the team as a whole.
You've said on one hand that each developer is responsible for their own code, and yet you wish to report one of your colleagues to your manager for not working to your standards.
If the code works as expected, there's nothing that needs to be said about it until there's a time when it's a problem or there's a time when coding standards are set for the team as a whole.
answered 14 hours ago
Snow♦Snow
61.2k51199245
61.2k51199245
Please read my first edit to understand why I am concerned about if I should or shouldn't report it
– angel humberto
14 hours ago
add a comment |
Please read my first edit to understand why I am concerned about if I should or shouldn't report it
– angel humberto
14 hours ago
Please read my first edit to understand why I am concerned about if I should or shouldn't report it
– angel humberto
14 hours ago
Please read my first edit to understand why I am concerned about if I should or shouldn't report it
– angel humberto
14 hours ago
add a comment |
A long method is definitely a code smell, but it does not conclusively indicate that something is wrong. In fact, I would argue that you shouldn't break a method apart purely on length, that is arbitrary. For example, I've seen some long methods for distinct ETL (Extract/Transform/Load) tasks where the length is really driven by the amount of data.
Don't report it to the boss at this point. Find a tangible reason why the method can be improved, then communicate that to the developer in a constructive way.
New contributor
In this case i can bet that the code can be split in simpler function that would be easy to read and to modified
– angel humberto
6 hours ago
add a comment |
A long method is definitely a code smell, but it does not conclusively indicate that something is wrong. In fact, I would argue that you shouldn't break a method apart purely on length, that is arbitrary. For example, I've seen some long methods for distinct ETL (Extract/Transform/Load) tasks where the length is really driven by the amount of data.
Don't report it to the boss at this point. Find a tangible reason why the method can be improved, then communicate that to the developer in a constructive way.
New contributor
In this case i can bet that the code can be split in simpler function that would be easy to read and to modified
– angel humberto
6 hours ago
add a comment |
A long method is definitely a code smell, but it does not conclusively indicate that something is wrong. In fact, I would argue that you shouldn't break a method apart purely on length, that is arbitrary. For example, I've seen some long methods for distinct ETL (Extract/Transform/Load) tasks where the length is really driven by the amount of data.
Don't report it to the boss at this point. Find a tangible reason why the method can be improved, then communicate that to the developer in a constructive way.
New contributor
A long method is definitely a code smell, but it does not conclusively indicate that something is wrong. In fact, I would argue that you shouldn't break a method apart purely on length, that is arbitrary. For example, I've seen some long methods for distinct ETL (Extract/Transform/Load) tasks where the length is really driven by the amount of data.
Don't report it to the boss at this point. Find a tangible reason why the method can be improved, then communicate that to the developer in a constructive way.
New contributor
New contributor
answered 8 hours ago
The Gilbert Arenas DaggerThe Gilbert Arenas Dagger
1411
1411
New contributor
New contributor
In this case i can bet that the code can be split in simpler function that would be easy to read and to modified
– angel humberto
6 hours ago
add a comment |
In this case i can bet that the code can be split in simpler function that would be easy to read and to modified
– angel humberto
6 hours ago
In this case i can bet that the code can be split in simpler function that would be easy to read and to modified
– angel humberto
6 hours ago
In this case i can bet that the code can be split in simpler function that would be easy to read and to modified
– angel humberto
6 hours ago
add a comment |
From what you are describing, you have a mountain to climb and a team to drag up it.
I don't think I would specifically talk about the 1k line method, I would start by bringing up best practices with your boss in a 1:1. Ask him if the team has any coding guidelines or best practices that they follow. Assuming the answer is no, gather some links to some articles on best practices for whatever programming language you are using. I try to stay with coding guides from big companies... companies everyone will have heard of like google, Microsoft, etc. and start with their coding guides.
Bring those to your boss along with some articles about how implementing best practices helps... what are the benefits, etc. Don't bring your message, you are the messenger. You bring glad tidings of ways to be more efficient, save money, have fewer defects, and the list goes on...
I'm thinking your boss would react better to that approach. Then once you get him hooked (hopefully), you have a team discussion about them and let's start following them. (I would throw in some procedural best practices like code reviews and the like also, not just coding guidelines.) Then if you can get them to buy in this far, then you start applying those guidelines and reviewing new code (and old code as you run into it).
"Hey, I found this large method that according to best practice ABC, we should split up into smaller methods that have a single responsibility, etc." and go from there.
To be honest, I doubt you will get far with any of this but this is how I would approach it.
I like your answer and I do agree with you when you said I had a mountain to climb but it is a mountain with 90°, no equipment and if that wasn't enough I would said the mountain is frozen and ward by gigantic dragon's xD
– angel humberto
6 hours ago
Thank for taking the time to answer
– angel humberto
6 hours ago
add a comment |
From what you are describing, you have a mountain to climb and a team to drag up it.
I don't think I would specifically talk about the 1k line method, I would start by bringing up best practices with your boss in a 1:1. Ask him if the team has any coding guidelines or best practices that they follow. Assuming the answer is no, gather some links to some articles on best practices for whatever programming language you are using. I try to stay with coding guides from big companies... companies everyone will have heard of like google, Microsoft, etc. and start with their coding guides.
Bring those to your boss along with some articles about how implementing best practices helps... what are the benefits, etc. Don't bring your message, you are the messenger. You bring glad tidings of ways to be more efficient, save money, have fewer defects, and the list goes on...
I'm thinking your boss would react better to that approach. Then once you get him hooked (hopefully), you have a team discussion about them and let's start following them. (I would throw in some procedural best practices like code reviews and the like also, not just coding guidelines.) Then if you can get them to buy in this far, then you start applying those guidelines and reviewing new code (and old code as you run into it).
"Hey, I found this large method that according to best practice ABC, we should split up into smaller methods that have a single responsibility, etc." and go from there.
To be honest, I doubt you will get far with any of this but this is how I would approach it.
I like your answer and I do agree with you when you said I had a mountain to climb but it is a mountain with 90°, no equipment and if that wasn't enough I would said the mountain is frozen and ward by gigantic dragon's xD
– angel humberto
6 hours ago
Thank for taking the time to answer
– angel humberto
6 hours ago
add a comment |
From what you are describing, you have a mountain to climb and a team to drag up it.
I don't think I would specifically talk about the 1k line method, I would start by bringing up best practices with your boss in a 1:1. Ask him if the team has any coding guidelines or best practices that they follow. Assuming the answer is no, gather some links to some articles on best practices for whatever programming language you are using. I try to stay with coding guides from big companies... companies everyone will have heard of like google, Microsoft, etc. and start with their coding guides.
Bring those to your boss along with some articles about how implementing best practices helps... what are the benefits, etc. Don't bring your message, you are the messenger. You bring glad tidings of ways to be more efficient, save money, have fewer defects, and the list goes on...
I'm thinking your boss would react better to that approach. Then once you get him hooked (hopefully), you have a team discussion about them and let's start following them. (I would throw in some procedural best practices like code reviews and the like also, not just coding guidelines.) Then if you can get them to buy in this far, then you start applying those guidelines and reviewing new code (and old code as you run into it).
"Hey, I found this large method that according to best practice ABC, we should split up into smaller methods that have a single responsibility, etc." and go from there.
To be honest, I doubt you will get far with any of this but this is how I would approach it.
From what you are describing, you have a mountain to climb and a team to drag up it.
I don't think I would specifically talk about the 1k line method, I would start by bringing up best practices with your boss in a 1:1. Ask him if the team has any coding guidelines or best practices that they follow. Assuming the answer is no, gather some links to some articles on best practices for whatever programming language you are using. I try to stay with coding guides from big companies... companies everyone will have heard of like google, Microsoft, etc. and start with their coding guides.
Bring those to your boss along with some articles about how implementing best practices helps... what are the benefits, etc. Don't bring your message, you are the messenger. You bring glad tidings of ways to be more efficient, save money, have fewer defects, and the list goes on...
I'm thinking your boss would react better to that approach. Then once you get him hooked (hopefully), you have a team discussion about them and let's start following them. (I would throw in some procedural best practices like code reviews and the like also, not just coding guidelines.) Then if you can get them to buy in this far, then you start applying those guidelines and reviewing new code (and old code as you run into it).
"Hey, I found this large method that according to best practice ABC, we should split up into smaller methods that have a single responsibility, etc." and go from there.
To be honest, I doubt you will get far with any of this but this is how I would approach it.
answered 10 hours ago
JeffCJeffC
99349
99349
I like your answer and I do agree with you when you said I had a mountain to climb but it is a mountain with 90°, no equipment and if that wasn't enough I would said the mountain is frozen and ward by gigantic dragon's xD
– angel humberto
6 hours ago
Thank for taking the time to answer
– angel humberto
6 hours ago
add a comment |
I like your answer and I do agree with you when you said I had a mountain to climb but it is a mountain with 90°, no equipment and if that wasn't enough I would said the mountain is frozen and ward by gigantic dragon's xD
– angel humberto
6 hours ago
Thank for taking the time to answer
– angel humberto
6 hours ago
I like your answer and I do agree with you when you said I had a mountain to climb but it is a mountain with 90°, no equipment and if that wasn't enough I would said the mountain is frozen and ward by gigantic dragon's xD
– angel humberto
6 hours ago
I like your answer and I do agree with you when you said I had a mountain to climb but it is a mountain with 90°, no equipment and if that wasn't enough I would said the mountain is frozen and ward by gigantic dragon's xD
– angel humberto
6 hours ago
Thank for taking the time to answer
– angel humberto
6 hours ago
Thank for taking the time to answer
– angel humberto
6 hours ago
add a comment |
You have two points here:
In your current position, it's not your problem, you said that your boss ask this coworker to finish the code fast, so he did, leaving behind those 3000 lines with a lot of technical debt, you can mention this to your boss (he doesn't understand programming, but the concept of debt is something that everyone knows) just explain that while the code works, if something breaks or the coworker who write it leaves the company it will take time to understand what he did, he might understand but probably even if he understand that, he will say that is not a problem now, because it's not a problem, at least not yours, what bring us to the next point.
So, the coworker leave the company and now is your problem (you mention that there are 3 developers, so even in this case could not be your problem), well, (I can talk from my experience) do not touch it unless is necessary, talk to your boss again, remember him that first talk, but don't start refactoring that code until your boss approves or the s#!t hits the fan, because if you start to refactor that code, it might be easy but there is a high probability that it will take you time that your boss expect to focus on something else.
A few things to take in consideration, even if its a small company with a boss that don't understand how software development works:
- As other answer mention, while your boss don't know about development, he know about business (I hope so) so the best way to get him understand why code reviews, unit testing and other practices are necessary is to tell him that these are investments, less bugs, less production downtime, etc.
- I don't know who is the senior in your team, if is the one with the 3000 lines, you might have a hard time convincing your boss that what he is doing is not the best approach. This applies to if you are the one with less experience.
- You might want to talk with your coworker, and try to understand why he did that, he mention that is optimized this could mean that the code works, as you says, and that is fast (you might not take speed relevant but for business sometimes it's a huge deal) but he knows that it has technical debt and he plans to fix that, he just follow your boss command to finish that fast.
I like you answer. Thanks for the reply
– angel humberto
6 hours ago
add a comment |
You have two points here:
In your current position, it's not your problem, you said that your boss ask this coworker to finish the code fast, so he did, leaving behind those 3000 lines with a lot of technical debt, you can mention this to your boss (he doesn't understand programming, but the concept of debt is something that everyone knows) just explain that while the code works, if something breaks or the coworker who write it leaves the company it will take time to understand what he did, he might understand but probably even if he understand that, he will say that is not a problem now, because it's not a problem, at least not yours, what bring us to the next point.
So, the coworker leave the company and now is your problem (you mention that there are 3 developers, so even in this case could not be your problem), well, (I can talk from my experience) do not touch it unless is necessary, talk to your boss again, remember him that first talk, but don't start refactoring that code until your boss approves or the s#!t hits the fan, because if you start to refactor that code, it might be easy but there is a high probability that it will take you time that your boss expect to focus on something else.
A few things to take in consideration, even if its a small company with a boss that don't understand how software development works:
- As other answer mention, while your boss don't know about development, he know about business (I hope so) so the best way to get him understand why code reviews, unit testing and other practices are necessary is to tell him that these are investments, less bugs, less production downtime, etc.
- I don't know who is the senior in your team, if is the one with the 3000 lines, you might have a hard time convincing your boss that what he is doing is not the best approach. This applies to if you are the one with less experience.
- You might want to talk with your coworker, and try to understand why he did that, he mention that is optimized this could mean that the code works, as you says, and that is fast (you might not take speed relevant but for business sometimes it's a huge deal) but he knows that it has technical debt and he plans to fix that, he just follow your boss command to finish that fast.
I like you answer. Thanks for the reply
– angel humberto
6 hours ago
add a comment |
You have two points here:
In your current position, it's not your problem, you said that your boss ask this coworker to finish the code fast, so he did, leaving behind those 3000 lines with a lot of technical debt, you can mention this to your boss (he doesn't understand programming, but the concept of debt is something that everyone knows) just explain that while the code works, if something breaks or the coworker who write it leaves the company it will take time to understand what he did, he might understand but probably even if he understand that, he will say that is not a problem now, because it's not a problem, at least not yours, what bring us to the next point.
So, the coworker leave the company and now is your problem (you mention that there are 3 developers, so even in this case could not be your problem), well, (I can talk from my experience) do not touch it unless is necessary, talk to your boss again, remember him that first talk, but don't start refactoring that code until your boss approves or the s#!t hits the fan, because if you start to refactor that code, it might be easy but there is a high probability that it will take you time that your boss expect to focus on something else.
A few things to take in consideration, even if its a small company with a boss that don't understand how software development works:
- As other answer mention, while your boss don't know about development, he know about business (I hope so) so the best way to get him understand why code reviews, unit testing and other practices are necessary is to tell him that these are investments, less bugs, less production downtime, etc.
- I don't know who is the senior in your team, if is the one with the 3000 lines, you might have a hard time convincing your boss that what he is doing is not the best approach. This applies to if you are the one with less experience.
- You might want to talk with your coworker, and try to understand why he did that, he mention that is optimized this could mean that the code works, as you says, and that is fast (you might not take speed relevant but for business sometimes it's a huge deal) but he knows that it has technical debt and he plans to fix that, he just follow your boss command to finish that fast.
You have two points here:
In your current position, it's not your problem, you said that your boss ask this coworker to finish the code fast, so he did, leaving behind those 3000 lines with a lot of technical debt, you can mention this to your boss (he doesn't understand programming, but the concept of debt is something that everyone knows) just explain that while the code works, if something breaks or the coworker who write it leaves the company it will take time to understand what he did, he might understand but probably even if he understand that, he will say that is not a problem now, because it's not a problem, at least not yours, what bring us to the next point.
So, the coworker leave the company and now is your problem (you mention that there are 3 developers, so even in this case could not be your problem), well, (I can talk from my experience) do not touch it unless is necessary, talk to your boss again, remember him that first talk, but don't start refactoring that code until your boss approves or the s#!t hits the fan, because if you start to refactor that code, it might be easy but there is a high probability that it will take you time that your boss expect to focus on something else.
A few things to take in consideration, even if its a small company with a boss that don't understand how software development works:
- As other answer mention, while your boss don't know about development, he know about business (I hope so) so the best way to get him understand why code reviews, unit testing and other practices are necessary is to tell him that these are investments, less bugs, less production downtime, etc.
- I don't know who is the senior in your team, if is the one with the 3000 lines, you might have a hard time convincing your boss that what he is doing is not the best approach. This applies to if you are the one with less experience.
- You might want to talk with your coworker, and try to understand why he did that, he mention that is optimized this could mean that the code works, as you says, and that is fast (you might not take speed relevant but for business sometimes it's a huge deal) but he knows that it has technical debt and he plans to fix that, he just follow your boss command to finish that fast.
answered 10 hours ago
Omar MartinezOmar Martinez
1695
1695
I like you answer. Thanks for the reply
– angel humberto
6 hours ago
add a comment |
I like you answer. Thanks for the reply
– angel humberto
6 hours ago
I like you answer. Thanks for the reply
– angel humberto
6 hours ago
I like you answer. Thanks for the reply
– angel humberto
6 hours ago
add a comment |
I think the getting hit by a bus example might be the best.
I would go to your boss, and say "I have concerns about the codes maintainability, if the employee gets hit by a bus or otherwise unavailable it will take me ## weeks to figure it out. Are you ok with me being unavailable to work on other project for ## weeks if this project ever need maintenance if other person is not available.?"
Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?
For all we know the boss could be yay, the customer will have to pay us 2x as much because if they want the modifications done they will have to pay for it.
This means that the most important thing to the boss is what will the client pay for.
If my boss didn't understand programming, I doubt I would tell them that essentially "My coworker gets his job done just fine, and he could probably take over my project relatively easily. However, I would struggle a lot if I had to do his job."
– that other guy
7 hours ago
I like the part where you said "Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?". Overall good answer thanks for the time
– angel humberto
6 hours ago
add a comment |
I think the getting hit by a bus example might be the best.
I would go to your boss, and say "I have concerns about the codes maintainability, if the employee gets hit by a bus or otherwise unavailable it will take me ## weeks to figure it out. Are you ok with me being unavailable to work on other project for ## weeks if this project ever need maintenance if other person is not available.?"
Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?
For all we know the boss could be yay, the customer will have to pay us 2x as much because if they want the modifications done they will have to pay for it.
This means that the most important thing to the boss is what will the client pay for.
If my boss didn't understand programming, I doubt I would tell them that essentially "My coworker gets his job done just fine, and he could probably take over my project relatively easily. However, I would struggle a lot if I had to do his job."
– that other guy
7 hours ago
I like the part where you said "Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?". Overall good answer thanks for the time
– angel humberto
6 hours ago
add a comment |
I think the getting hit by a bus example might be the best.
I would go to your boss, and say "I have concerns about the codes maintainability, if the employee gets hit by a bus or otherwise unavailable it will take me ## weeks to figure it out. Are you ok with me being unavailable to work on other project for ## weeks if this project ever need maintenance if other person is not available.?"
Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?
For all we know the boss could be yay, the customer will have to pay us 2x as much because if they want the modifications done they will have to pay for it.
This means that the most important thing to the boss is what will the client pay for.
I think the getting hit by a bus example might be the best.
I would go to your boss, and say "I have concerns about the codes maintainability, if the employee gets hit by a bus or otherwise unavailable it will take me ## weeks to figure it out. Are you ok with me being unavailable to work on other project for ## weeks if this project ever need maintenance if other person is not available.?"
Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?
For all we know the boss could be yay, the customer will have to pay us 2x as much because if they want the modifications done they will have to pay for it.
This means that the most important thing to the boss is what will the client pay for.
answered 7 hours ago
cybernardcybernard
53427
53427
If my boss didn't understand programming, I doubt I would tell them that essentially "My coworker gets his job done just fine, and he could probably take over my project relatively easily. However, I would struggle a lot if I had to do his job."
– that other guy
7 hours ago
I like the part where you said "Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?". Overall good answer thanks for the time
– angel humberto
6 hours ago
add a comment |
If my boss didn't understand programming, I doubt I would tell them that essentially "My coworker gets his job done just fine, and he could probably take over my project relatively easily. However, I would struggle a lot if I had to do his job."
– that other guy
7 hours ago
I like the part where you said "Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?". Overall good answer thanks for the time
– angel humberto
6 hours ago
If my boss didn't understand programming, I doubt I would tell them that essentially "My coworker gets his job done just fine, and he could probably take over my project relatively easily. However, I would struggle a lot if I had to do his job."
– that other guy
7 hours ago
If my boss didn't understand programming, I doubt I would tell them that essentially "My coworker gets his job done just fine, and he could probably take over my project relatively easily. However, I would struggle a lot if I had to do his job."
– that other guy
7 hours ago
I like the part where you said "Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?". Overall good answer thanks for the time
– angel humberto
6 hours ago
I like the part where you said "Let your boss make the final decision on which is more important for this project "it s done" or "its maintainable"?". Overall good answer thanks for the time
– angel humberto
6 hours ago
add a comment |
If the boss doesn't know anything about programming then I wouldn't bother telling him. By the sounds of it, your co-worker will do that for himself, especially since he's bragging to you.
The code needs to work, that's all your boss cares about. Of course, size and speed are important factors if it's a large project but if it's small or medium sized, working is good enough.
Ask your co-worker to either show you the code running or for the code itself so you can check it.
Please read my first edit in order to understand why I am concerned of the 3000 lines method
– angel humberto
14 hours ago
add a comment |
If the boss doesn't know anything about programming then I wouldn't bother telling him. By the sounds of it, your co-worker will do that for himself, especially since he's bragging to you.
The code needs to work, that's all your boss cares about. Of course, size and speed are important factors if it's a large project but if it's small or medium sized, working is good enough.
Ask your co-worker to either show you the code running or for the code itself so you can check it.
Please read my first edit in order to understand why I am concerned of the 3000 lines method
– angel humberto
14 hours ago
add a comment |
If the boss doesn't know anything about programming then I wouldn't bother telling him. By the sounds of it, your co-worker will do that for himself, especially since he's bragging to you.
The code needs to work, that's all your boss cares about. Of course, size and speed are important factors if it's a large project but if it's small or medium sized, working is good enough.
Ask your co-worker to either show you the code running or for the code itself so you can check it.
If the boss doesn't know anything about programming then I wouldn't bother telling him. By the sounds of it, your co-worker will do that for himself, especially since he's bragging to you.
The code needs to work, that's all your boss cares about. Of course, size and speed are important factors if it's a large project but if it's small or medium sized, working is good enough.
Ask your co-worker to either show you the code running or for the code itself so you can check it.
answered 14 hours ago
StephenStephen
2,409612
2,409612
Please read my first edit in order to understand why I am concerned of the 3000 lines method
– angel humberto
14 hours ago
add a comment |
Please read my first edit in order to understand why I am concerned of the 3000 lines method
– angel humberto
14 hours ago
Please read my first edit in order to understand why I am concerned of the 3000 lines method
– angel humberto
14 hours ago
Please read my first edit in order to understand why I am concerned of the 3000 lines method
– angel humberto
14 hours ago
add a comment |
Don't worry about it. It's not your problem (right now). It's this guys responsibility to maintain the code, not yours. Don't touch it. If your boss asks you to touch it, whether now or later, tell them why you won't.
If your colleague leaves, you buy a book about refactoring. That's the point where you tell your boss this function isn't maintainable.
Not sure about this, you are basically knowing when and how you are going to die and no doing anything to prevent it
– angel humberto
6 hours ago
add a comment |
Don't worry about it. It's not your problem (right now). It's this guys responsibility to maintain the code, not yours. Don't touch it. If your boss asks you to touch it, whether now or later, tell them why you won't.
If your colleague leaves, you buy a book about refactoring. That's the point where you tell your boss this function isn't maintainable.
Not sure about this, you are basically knowing when and how you are going to die and no doing anything to prevent it
– angel humberto
6 hours ago
add a comment |
Don't worry about it. It's not your problem (right now). It's this guys responsibility to maintain the code, not yours. Don't touch it. If your boss asks you to touch it, whether now or later, tell them why you won't.
If your colleague leaves, you buy a book about refactoring. That's the point where you tell your boss this function isn't maintainable.
Don't worry about it. It's not your problem (right now). It's this guys responsibility to maintain the code, not yours. Don't touch it. If your boss asks you to touch it, whether now or later, tell them why you won't.
If your colleague leaves, you buy a book about refactoring. That's the point where you tell your boss this function isn't maintainable.
edited 2 hours ago
George M
728113
728113
answered 11 hours ago
gnasher729gnasher729
86.7k39152275
86.7k39152275
Not sure about this, you are basically knowing when and how you are going to die and no doing anything to prevent it
– angel humberto
6 hours ago
add a comment |
Not sure about this, you are basically knowing when and how you are going to die and no doing anything to prevent it
– angel humberto
6 hours ago
Not sure about this, you are basically knowing when and how you are going to die and no doing anything to prevent it
– angel humberto
6 hours ago
Not sure about this, you are basically knowing when and how you are going to die and no doing anything to prevent it
– angel humberto
6 hours ago
add a comment |
What is the function trying to do? How complex is that task? What optimisation category did they aim for (speed, accuracy, usability)? Without any of that information it will be hard to make a judgement. You can always take a look at the code. If there are inefficiencies, point them out like 'The code is good! Quickie [timesaver/performance booster/whatever], you can always do X to avoid [bottleneck]'
add a comment |
What is the function trying to do? How complex is that task? What optimisation category did they aim for (speed, accuracy, usability)? Without any of that information it will be hard to make a judgement. You can always take a look at the code. If there are inefficiencies, point them out like 'The code is good! Quickie [timesaver/performance booster/whatever], you can always do X to avoid [bottleneck]'
add a comment |
What is the function trying to do? How complex is that task? What optimisation category did they aim for (speed, accuracy, usability)? Without any of that information it will be hard to make a judgement. You can always take a look at the code. If there are inefficiencies, point them out like 'The code is good! Quickie [timesaver/performance booster/whatever], you can always do X to avoid [bottleneck]'
What is the function trying to do? How complex is that task? What optimisation category did they aim for (speed, accuracy, usability)? Without any of that information it will be hard to make a judgement. You can always take a look at the code. If there are inefficiencies, point them out like 'The code is good! Quickie [timesaver/performance booster/whatever], you can always do X to avoid [bottleneck]'
answered 14 hours ago
520520
3,398622
3,398622
add a comment |
add a comment |
I try to use a static analyzer to do this. Feedback from a computer can't be wrong, and that way you don't have to personally confront coworkers. You just have to agree on code rules or take a basic set of existing rules.
New contributor
4
Feedback from a computer can't be wrong Uhhh... sure it can.
– EJoshuaS
9 hours ago
add a comment |
I try to use a static analyzer to do this. Feedback from a computer can't be wrong, and that way you don't have to personally confront coworkers. You just have to agree on code rules or take a basic set of existing rules.
New contributor
4
Feedback from a computer can't be wrong Uhhh... sure it can.
– EJoshuaS
9 hours ago
add a comment |
I try to use a static analyzer to do this. Feedback from a computer can't be wrong, and that way you don't have to personally confront coworkers. You just have to agree on code rules or take a basic set of existing rules.
New contributor
I try to use a static analyzer to do this. Feedback from a computer can't be wrong, and that way you don't have to personally confront coworkers. You just have to agree on code rules or take a basic set of existing rules.
New contributor
edited 2 hours ago
EJoshuaS
407213
407213
New contributor
answered 10 hours ago
SamjongenelenSamjongenelen
1011
1011
New contributor
New contributor
4
Feedback from a computer can't be wrong Uhhh... sure it can.
– EJoshuaS
9 hours ago
add a comment |
4
Feedback from a computer can't be wrong Uhhh... sure it can.
– EJoshuaS
9 hours ago
4
4
Feedback from a computer can't be wrong Uhhh... sure it can.
– EJoshuaS
9 hours ago
Feedback from a computer can't be wrong Uhhh... sure it can.
– EJoshuaS
9 hours ago
add a comment |
Answer to the ACTUAL QUESTION:
As the OP has correctly pointed out,
"The question is being completely ignored. I know the method is completely ugly and imposible to maintain. What I want to know is ..."
the actual question is clear:
"What I want to know is what to do about it, should I tell to my boss the problem or ..."
The answer is very simple, "it's not high school". Simply speak out clearly and directly.
"Boss and Steve. Regarding this code Steve has written. While it does barely work, it is absolutely, totally, unprofessional. It does not rise to the most basic software standards. It is totally unmaintainable. Boss, you may ask what this means. While it "just barely works" for now, it will cost a fortune maintaining this going forward. Steve, you don't have even basic programming skills, so I'm suggesting Boss Steve should be fired or perhaps moved to another department. Regarding this code, Boss it's up to you to either use this rubbish for now, and we'll "pay for that later", or I can get to work doing the job properly, or perhaps hire someone else (a programmer) to do the job."
(I've highlighted the few words - which is all you need - where you explain the situatio to Boss.)
This is how ordinary, normal working professionals talk in business.
It's not high school, there is absolutely no concern about "hurting someone's feelings" - or, whatever reason it was you did not speak your mind.
Simply be
totally dispassionate. as if you and everyone involved is a robot
absolutely brief. be spectacularly brief
factual
It's that simple.
The answer to your question is go right ahead and immediately clearly speak your mind, to all parties. It's not high school.
OP, make this a fantastic learning experience about simply speaking out clearly in a professional setting.
"It's not high school."
Simply directly, in front of all other parties including the person responsible, clearly and dispassionately state loudly to everyone, the problem you have identified.
2
I want to see a junior tell this about a senior work in front of both
– Omar Martinez
10 hours ago
2
How do you know it just barely works?
– NotMe
10 hours ago
4
This is how ordinary, normal working professionals talk in business.
Not ones who want to keep their jobs... no. I don't disagree that this is what I might think in my head but going to anyone and saying this out loud is not going to solve anything nor educate anyone. The problem is that they clearly have a team that doesn't know and probably doesn't care about best practices. That's where you start... and then see how that goes.
– JeffC
10 hours ago
4
@Fattie I agree that speaking up when there's an issue is professional but the phrasing that you are suggesting is no where near professional by any sane person's standards.
– JeffC
10 hours ago
2
@Fattie I don't understand how you consider this advise to be professionalism. What you're suggesting is outright confrontational and i can't see any good coming of telling your manager that your peer should be removed (permanently or otherwise)
– Rich
10 hours ago
|
show 2 more comments
Answer to the ACTUAL QUESTION:
As the OP has correctly pointed out,
"The question is being completely ignored. I know the method is completely ugly and imposible to maintain. What I want to know is ..."
the actual question is clear:
"What I want to know is what to do about it, should I tell to my boss the problem or ..."
The answer is very simple, "it's not high school". Simply speak out clearly and directly.
"Boss and Steve. Regarding this code Steve has written. While it does barely work, it is absolutely, totally, unprofessional. It does not rise to the most basic software standards. It is totally unmaintainable. Boss, you may ask what this means. While it "just barely works" for now, it will cost a fortune maintaining this going forward. Steve, you don't have even basic programming skills, so I'm suggesting Boss Steve should be fired or perhaps moved to another department. Regarding this code, Boss it's up to you to either use this rubbish for now, and we'll "pay for that later", or I can get to work doing the job properly, or perhaps hire someone else (a programmer) to do the job."
(I've highlighted the few words - which is all you need - where you explain the situatio to Boss.)
This is how ordinary, normal working professionals talk in business.
It's not high school, there is absolutely no concern about "hurting someone's feelings" - or, whatever reason it was you did not speak your mind.
Simply be
totally dispassionate. as if you and everyone involved is a robot
absolutely brief. be spectacularly brief
factual
It's that simple.
The answer to your question is go right ahead and immediately clearly speak your mind, to all parties. It's not high school.
OP, make this a fantastic learning experience about simply speaking out clearly in a professional setting.
"It's not high school."
Simply directly, in front of all other parties including the person responsible, clearly and dispassionately state loudly to everyone, the problem you have identified.
2
I want to see a junior tell this about a senior work in front of both
– Omar Martinez
10 hours ago
2
How do you know it just barely works?
– NotMe
10 hours ago
4
This is how ordinary, normal working professionals talk in business.
Not ones who want to keep their jobs... no. I don't disagree that this is what I might think in my head but going to anyone and saying this out loud is not going to solve anything nor educate anyone. The problem is that they clearly have a team that doesn't know and probably doesn't care about best practices. That's where you start... and then see how that goes.
– JeffC
10 hours ago
4
@Fattie I agree that speaking up when there's an issue is professional but the phrasing that you are suggesting is no where near professional by any sane person's standards.
– JeffC
10 hours ago
2
@Fattie I don't understand how you consider this advise to be professionalism. What you're suggesting is outright confrontational and i can't see any good coming of telling your manager that your peer should be removed (permanently or otherwise)
– Rich
10 hours ago
|
show 2 more comments
Answer to the ACTUAL QUESTION:
As the OP has correctly pointed out,
"The question is being completely ignored. I know the method is completely ugly and imposible to maintain. What I want to know is ..."
the actual question is clear:
"What I want to know is what to do about it, should I tell to my boss the problem or ..."
The answer is very simple, "it's not high school". Simply speak out clearly and directly.
"Boss and Steve. Regarding this code Steve has written. While it does barely work, it is absolutely, totally, unprofessional. It does not rise to the most basic software standards. It is totally unmaintainable. Boss, you may ask what this means. While it "just barely works" for now, it will cost a fortune maintaining this going forward. Steve, you don't have even basic programming skills, so I'm suggesting Boss Steve should be fired or perhaps moved to another department. Regarding this code, Boss it's up to you to either use this rubbish for now, and we'll "pay for that later", or I can get to work doing the job properly, or perhaps hire someone else (a programmer) to do the job."
(I've highlighted the few words - which is all you need - where you explain the situatio to Boss.)
This is how ordinary, normal working professionals talk in business.
It's not high school, there is absolutely no concern about "hurting someone's feelings" - or, whatever reason it was you did not speak your mind.
Simply be
totally dispassionate. as if you and everyone involved is a robot
absolutely brief. be spectacularly brief
factual
It's that simple.
The answer to your question is go right ahead and immediately clearly speak your mind, to all parties. It's not high school.
OP, make this a fantastic learning experience about simply speaking out clearly in a professional setting.
"It's not high school."
Simply directly, in front of all other parties including the person responsible, clearly and dispassionately state loudly to everyone, the problem you have identified.
Answer to the ACTUAL QUESTION:
As the OP has correctly pointed out,
"The question is being completely ignored. I know the method is completely ugly and imposible to maintain. What I want to know is ..."
the actual question is clear:
"What I want to know is what to do about it, should I tell to my boss the problem or ..."
The answer is very simple, "it's not high school". Simply speak out clearly and directly.
"Boss and Steve. Regarding this code Steve has written. While it does barely work, it is absolutely, totally, unprofessional. It does not rise to the most basic software standards. It is totally unmaintainable. Boss, you may ask what this means. While it "just barely works" for now, it will cost a fortune maintaining this going forward. Steve, you don't have even basic programming skills, so I'm suggesting Boss Steve should be fired or perhaps moved to another department. Regarding this code, Boss it's up to you to either use this rubbish for now, and we'll "pay for that later", or I can get to work doing the job properly, or perhaps hire someone else (a programmer) to do the job."
(I've highlighted the few words - which is all you need - where you explain the situatio to Boss.)
This is how ordinary, normal working professionals talk in business.
It's not high school, there is absolutely no concern about "hurting someone's feelings" - or, whatever reason it was you did not speak your mind.
Simply be
totally dispassionate. as if you and everyone involved is a robot
absolutely brief. be spectacularly brief
factual
It's that simple.
The answer to your question is go right ahead and immediately clearly speak your mind, to all parties. It's not high school.
OP, make this a fantastic learning experience about simply speaking out clearly in a professional setting.
"It's not high school."
Simply directly, in front of all other parties including the person responsible, clearly and dispassionately state loudly to everyone, the problem you have identified.
edited 10 hours ago
answered 10 hours ago
FattieFattie
10.7k51934
10.7k51934
2
I want to see a junior tell this about a senior work in front of both
– Omar Martinez
10 hours ago
2
How do you know it just barely works?
– NotMe
10 hours ago
4
This is how ordinary, normal working professionals talk in business.
Not ones who want to keep their jobs... no. I don't disagree that this is what I might think in my head but going to anyone and saying this out loud is not going to solve anything nor educate anyone. The problem is that they clearly have a team that doesn't know and probably doesn't care about best practices. That's where you start... and then see how that goes.
– JeffC
10 hours ago
4
@Fattie I agree that speaking up when there's an issue is professional but the phrasing that you are suggesting is no where near professional by any sane person's standards.
– JeffC
10 hours ago
2
@Fattie I don't understand how you consider this advise to be professionalism. What you're suggesting is outright confrontational and i can't see any good coming of telling your manager that your peer should be removed (permanently or otherwise)
– Rich
10 hours ago
|
show 2 more comments
2
I want to see a junior tell this about a senior work in front of both
– Omar Martinez
10 hours ago
2
How do you know it just barely works?
– NotMe
10 hours ago
4
This is how ordinary, normal working professionals talk in business.
Not ones who want to keep their jobs... no. I don't disagree that this is what I might think in my head but going to anyone and saying this out loud is not going to solve anything nor educate anyone. The problem is that they clearly have a team that doesn't know and probably doesn't care about best practices. That's where you start... and then see how that goes.
– JeffC
10 hours ago
4
@Fattie I agree that speaking up when there's an issue is professional but the phrasing that you are suggesting is no where near professional by any sane person's standards.
– JeffC
10 hours ago
2
@Fattie I don't understand how you consider this advise to be professionalism. What you're suggesting is outright confrontational and i can't see any good coming of telling your manager that your peer should be removed (permanently or otherwise)
– Rich
10 hours ago
2
2
I want to see a junior tell this about a senior work in front of both
– Omar Martinez
10 hours ago
I want to see a junior tell this about a senior work in front of both
– Omar Martinez
10 hours ago
2
2
How do you know it just barely works?
– NotMe
10 hours ago
How do you know it just barely works?
– NotMe
10 hours ago
4
4
This is how ordinary, normal working professionals talk in business.
Not ones who want to keep their jobs... no. I don't disagree that this is what I might think in my head but going to anyone and saying this out loud is not going to solve anything nor educate anyone. The problem is that they clearly have a team that doesn't know and probably doesn't care about best practices. That's where you start... and then see how that goes.– JeffC
10 hours ago
This is how ordinary, normal working professionals talk in business.
Not ones who want to keep their jobs... no. I don't disagree that this is what I might think in my head but going to anyone and saying this out loud is not going to solve anything nor educate anyone. The problem is that they clearly have a team that doesn't know and probably doesn't care about best practices. That's where you start... and then see how that goes.– JeffC
10 hours ago
4
4
@Fattie I agree that speaking up when there's an issue is professional but the phrasing that you are suggesting is no where near professional by any sane person's standards.
– JeffC
10 hours ago
@Fattie I agree that speaking up when there's an issue is professional but the phrasing that you are suggesting is no where near professional by any sane person's standards.
– JeffC
10 hours ago
2
2
@Fattie I don't understand how you consider this advise to be professionalism. What you're suggesting is outright confrontational and i can't see any good coming of telling your manager that your peer should be removed (permanently or otherwise)
– Rich
10 hours ago
@Fattie I don't understand how you consider this advise to be professionalism. What you're suggesting is outright confrontational and i can't see any good coming of telling your manager that your peer should be removed (permanently or otherwise)
– Rich
10 hours ago
|
show 2 more comments
protected by Jane S♦ 2 hours ago
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
55
Optimised and "follows best practices" are different things, semantically he might be correct.
– Jay Gould
14 hours ago
7
How specifically can you demonstrate that it's not optimized?
– Johns-305
14 hours ago
Comments are not for extended discussion; this conversation has been moved to chat.
– Jane S♦
2 hours ago