I work for a small wholesale company as a developer. It is just me and one other. I am way younger than him and he is considered my "senior". I put that in quotes because I soon realized what his level of coding is. I really don't want to sound condescending or rude in any way and really don't want to offend him as we've become pretty good friends out of working hours. But, I feel like his way of doing things is impacting the quality of our software in a big way.
I have 5 years of experience and consider myself knowledgeable enough to spot bad code, practices and code principles not being followed. Every time I try to point out stuff he is doing wrong I get dismissed and ridiculed by him as in "What do you know about coding? I've been doing this for X years longer" which is ridiculous. Mind you, I am trying to present the issue as non offensive or rude as possible.
"Hey man, this is running a bit slow, could we maybe try and run this
async so the UI doesn't freeze up?"
The answer I get is "Who cares", "It doesn't matter", "They can wait" and so on.
I really don't want to affect our friendship but this is really starting to impact the final product.
How can I handle this properly ?
Some of the problems and bad practices I found out are:
- Concatenating queries - no parameterized queries (big no no)
- Really bad code writing - You could see
ButtonNfor days with no real context nor connection. Only hours of digging even to find what they all do.
- No real error handling - users might get errors for typing text into numerical fields that will crash the whole app or simply display an unhandled exception
I am really not trying to be the young hotshot, just trying to follow some normal code practices and give out a polished product.
We are not selling our software. It is used as an internal development program where we try to simplify and automate as many processes in our retail chain as possible. Most of the people working with the software will be people not really digitally educated thus input errors are really a common thing. Also, image their reaction when a random error pops up on the screen if they misplace a
, or a
. and then everything crashes.
Seems like this is some critical info. I worked for this company before him. He was later employed but was considered more experienced (by people who know nothing of coding) and appointed as my senior. Which is bs. The project we are currently working on started when he got employed.
Hopefully final Edit:
I actually took the advice from down below and started documenting everything that I found(including end user feedback) and in some cases wrote test code that shows the improvement we could achieve, then asked for a team meeting and presented it. All of the data was presented in the format:
this can be improved -> why we should improve it -> how we can improve it -> benefit over the current state. This seemed to click with both my manager(especially) and co-worker. This has lessened the dismissive behavior as my co-worker has slowly been opening up to new ideas and different approaches to problems. We also both agreed to scheduled code reviews for new and already existing modules which is great! Hopefully this will continue and translate into even better practices. Thank you guys for the shared wisdom !