1

I recently joined a development team at a company and have found that coding standards are not adhered to and seen as unimportant. Development on this team is done primarily in Python and PEP8 and any type of linting is for the most part not paid attention to. I have spoken to my boss who is generally the leader of this team, and she has acknowledged the importance ("Yes, you're right, we probably should do that.") but doesn't seem to have any plan to do anything about it. Should anything be done about this? edit: There are no standards set by the company.

  • 7
    Does not following them cause actual problems for the team? – Tymoteusz Paul Mar 25 at 19:27
  • I'm not sure? No one explicitly acknowledges it, but it is a bit irritating that a lot of the files are named inconsistently with dashes or camelcase and functions or methods are also camelcase. As far as I know, no one has brought anything up about it. – user1394 Mar 25 at 19:30
  • 5
    Well, if not following them is not causing actual problems then why do you want to change it? Just renaming all those files would be a massive undertaking, unlikely to happen for no apparent benefit that you can demonstrate. Is this your first programming job? – Tymoteusz Paul Mar 25 at 19:31
  • Yes it is.. I see. I guess I had assumed adhering to coding standards was generally ubiquitous in the field. I'll take your word for it as you seem to be someone with considerable experience. Thank you! – user1394 Mar 25 at 19:42
  • 2
    Instigating change is hard, really hard. It takes years. It makes engineering look easy. It takes convincing everybody to believe the change is their idea. It defies logic. Seriously. Be patient. Show, don't tell. You can do it, but not by getting somebody to give orders. – O. Jones Mar 26 at 11:38
9

I recently joined a development team at a company and have found that coding standards are not adhered to and seen as unimportant.

Tread carefully when judging your new team. My advice is to go into information absorption mode when you join a company before you try to affect change. Why? There may be a method to the madness that you don't understand yet or the team doesn't think you understand yet.

I have spoken to my boss who is generally the leader of this team, and she has acknowledged the importance ("Yes, you're right, we probably should do that.") but doesn't seem to have any plan to do anything about it. Should anything be done about this?

Linting really helps improve the readability of the code by making it more consistent and you can be more productive by not having to argue over style differences. But at the end of the day, it is a change to the way the team has done things in the past. You should talk about it with your team and get buy in from your team members that this is important. Make it easy to adopt the change such as having the linters run with every build, educating the team on how to address common linting errors, and have a plan for rolling out the enforcement out.

You could even take it a step further and invest in an autoformatter (e.g. Black) instead of a linter.

3

You don't specify in your question if the coding standards are set by the company or simply generally accepted coding standards for the specific languages you mention. The distinction is important in how you should approach this.

If they are the companies standards you should follow them regardless of the actions/attitude of your team lead. While others not following them could be problematic for you, it's not ultimately up to you to enforce the standard upon others in your team.

If you're speaking of generally accepted language standards then simply use them in your code. Perhaps over time, others on the team will see the benefit of using a standard and will adopt its use.

  • You didn’t read the question completely and are answering it’s opposite. – mxyzplk - SE stop being evil Mar 25 at 19:53
  • 3
    @mxyzplk-SEstopbeingevil perhaps you should view the edit history of the question – Steve Mar 25 at 19:54
0

First, try to understand the reason behind lack of compliance. Is it difficult to follow because of auto-formatters not being good enough? Or is it forgetting to format, or disputes about what is correct, or confusion over which parts are mandatory vs personal preference, or maybe it's a common opinion that coding standards aren't worth it.

Then, depending on the results, the solution may differ.

If it's forgetfulness, then find a way to auto-format the code for developers who forget, either by setting up common IDE settings, or somewhere in the build chain if you're willing to.

If it's that coding standards aren't worth it, then perhaps the solution is to double down and move to something like Sonar, which goes way beyond formatting and does in-depth code quality analysis and metrics. maybe code style is less of an issue when you have a way to reduce the total bug count of the app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.