5

How do you tell people in your team their code is poorly written?

I am not an amazing developer, I lack experience of real world and don't have many finished products under my belt.

But I feel/think my code is well separated into separate classes, follows DRY well and is generally considered as following good practises.

However, the main Dev in this new small team which has been put together and I have been appointed to manage sees things differently.

He writes good functional code(it completes it main purpose) however it's all in the one program.cs file, lacks good comments and is just generally untidy :(

I kinda fell into this whole management thing and it's kinda new to me..

Maybe he just needs a bit of direction? I am going to be putting in a code styling guide

Any tips on managing a Dev team would be very much appreciated.

PS. Iv been around for a while, and did previously have an account which was quite active, however I decided to delete and create this new more anonymous account :P

Comments
  • 0
    I've have yet to hold a job as a developer so this is just general advice I can give you from my own programming experience. I would personally just go over DRY principles with your team and also touch base on refactoring and commenting the code. And also touch base on polymorphism which is a big reason why you don't have to repeat yourself in inherited classes (when I was in a start up just starting out I didn't know methods existed in a parent class so I was rewriting them. Thankfully another dev noticed and pointed it out)
  • 1
    When upper management starts pressuring you to deliver things that should take a month in 2 days you'll understand, there's simply not enough time to think about refactoring, it's hard enough to get anything to work as it is sometimes, I comment and try to clean up my code but i'm considerably slower than my senior dev
  • 0
    @jonnyserra but I write semi clean code as I go. I don't write it all in one big file and then refactor it each time/end of project.

    If I was creating connections to a db and doing 5-6 operations wouldn't you create a connection factory and then a data repository? Not put 6 methods in your program.cs file?

    Time. Constraints aren't in question here. I get how things need to be done not as cleanly to deliver quicker (within reason obviously)
  • 0
    When you say untidy, what exactly about the code is untidy? @genericdev143
  • 0
    @dalastTomCruise the untidiness stems from the fact it is all in one fine... one big long file with 20 odd methods in, slightly bad on the method renaming, etc..

    We write in java/C# so the code is OOP
  • 0
    @genericdev143 and is his code SQL? Also how massive are these methods that he's writing where six of them become too much for one file? Sorry I'm hist curious now (:
  • 0
    @genericdev143 ahh I gotcha. 20 methods is quite a bit. Especially if you are not building a classes functionality. I see the issue
  • 0
    @dalastTomCruise thing there isn't an "issue" per-se.. it's just an opinion I have.

    His hard working, and the code is down my it's job. But it's not amazing. It's error handling is a little lax, the logging is non existent.(I put logging in first and then add in logger method calls to write to the logs as I'm writing my code, so we have a consistent and extensive log at the end and to aid during debugging while in development.

    I understand that people write code differently. But this is code we all have to maintain and it's being developed like he is used to, writing utility programs to aid in tasks..
  • 0
    @genericdev143 ahh see I lack the team development; mainly doing projects on my own. But i definitely see what you are talking about. He's not writing his code to be team friendly in terms of using and extending
  • 1
    Feel your pain. Told them about the issues a couple of times, but it's like they keep forgetting or they think it's nothing serious. I might come off as being arrogant or rude if I present myself more aggressively.
Add Comment