My boss has been the primary and almost sole developer of a large portion of it for over 10 years, maybe 20 years in total. I am now starting to get into development of the side of the product only he's been working on, and I'm finding a lot of uglies.

I started making UML diagrams, beginning with the public API side and working my way in. When I got to one of the main interface classes, I realized a UML diagram would be pointless for most of the code.
After stripping white space and comments the header, just the class declaration was 1300 lines. 1300 lines of just variables + functions. I've started organizing it.

Other code stenches this code base has:
– Functions are regularly thousands of lines in length. There's a 5k line loop.
– Most functions don't even a have Doxygen brief on what they do. Comments are rare.
– All vectors types, which are very common, are all either raw C style arrays or double X,Y,Z.
– Descriptive variable names are rare.
– Coding style is inconsistent. kandr, snake_case and camelCase are all used.

Are these type of things common in commercial code? Or is this more of an outlier? I know open source strives for beauty.

I'm talked to my boss about how bad the code is. His response is “Well we're not paid to develop software, we're paid for the analysis.” I've told him in response that Google is an ad selling company

My boss is still writing 1k+ line functions. Due to pressure, he's starting to put some more comments in using slightly more descriptive file names. On the whole however, I don't think he's happy doing it.

This is driving me up a wall. I'm scheming a lateral move to get a different supervisor, while still working on the same projects and code base. That way I can be more forceful in keeping a readable code base.

I'm considering a job move. What kind of jobs are a good fit for a mechanical engineer with this skill set?

ترك الرد

من فضلك ادخل تعليقك
من فضلك ادخل اسمك هنا