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 programingprogramming?
Note that we are a small team of only 3three programmers that are at the same level and each one has his own piece of the 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 programingprogramming 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 programingprogramming is C#.
The speed of the code is not relevant here.
Code Reviewsreviews 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.