Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I recently started at a new company, with a handful of programmers. Its a medium sized company, with around 70 employees, but IT only has 9-10, and there are 3 "programmers" beside myself. However, these guys have very limited experience and are doing a lot of stuff really terribly. For example, one of our projects is a PHP website. The majority of the code is stored in a 20,000 line PHP controller, with ~6000 lines of JavaScript embedded in the PHP.

I keep making small suggestions here and there but nobody has been listening, everyone says they are too busy to implement my suggestions. The thing is, they shouldn't be that busy, and wouldn't be if things were done right. They spend most of their time fixing things that keep breaking. If each project was built correctly, I could do it all myself.

What approach should I take to convince these guys or the manager that things need to change, and that changing things will save a bunch of time? Should I skip trying to convince my coworkers and go straight to the manager, with a business-y proposal on how the company will save a bunch of money if they start doing things correct?

share|improve this question
2  
Coach them in how to do it right. Prove yourself by being better than them. When they're stuck offer help. –  Dave Hillier Feb 11 '13 at 22:51
15  
"If each project was built correctly, I could do it all myself." Be careful of outrageous, or at least unpopular, statements. –  Greg Hewgill Feb 11 '13 at 22:55
1  
What role were you hired in? Were you hired as someone with authority in PHP, or are you just another developer? –  Tyanna Feb 11 '13 at 23:00
1  
You appear to be in position of authority. Use it. Tell them their code quality is not up to company standards and figure out a plan to bring it up to snuff. Sit down with them and figure out why they are "too busy" and prioritize accordingly. –  binarycleric Feb 11 '13 at 23:01
4  
So busy fighting aligators, there's no time to drain the swamp. –  JeffO Feb 12 '13 at 13:16
show 5 more comments

4 Answers

up vote 19 down vote accepted

I've found that the primary cause for sloppy work, outside of the programmer simply not caring, is a lack of knowledge. Unfortunately in a lot of environments, lack of knowledge is looked down on rather than openly discussed.

Some techniques that I've used with success to foster discussion, growth, and general excitement about programming are:

  • Weekly brown bag tech sessions (Have them research a topic and present).
  • Daily or weekly one on one mentoring sessions between junior and senior members.
  • Code reviews (with an emphasis on learning, not pointing out mistakes).

Learning is contagious. When you foster an environment that encourages learning you not only produce better developers, but show others on your team that they are part of something bigger than a way to get a paycheck.

share|improve this answer
    
Yeah, I think code reviews would be very beneficial. Before I can really do the first two of the things you listed, I have to get them doing weekly/daily standup meetings. –  Brandon Wamboldt Feb 11 '13 at 23:06
    
That's where you might have to flex some authoritative muscle. It's difficult to get busy programmers to see the value in something that takes them away from their current task. The idea is to, over time, promote an environment that isn't just about getting the job done. –  jeuton Feb 11 '13 at 23:12
    
And they (most) will come around. The ones that don't are often those that you wouldn't necessarily want to build a team around anyways (and in my experience are the ones who aren't going to be around for the long term). –  jeuton Feb 11 '13 at 23:15
    
+1 for "Code reviews (with an emphasis on learning, not pointing out mistakes)" –  Mahbubur R Aaman Feb 12 '13 at 9:28
add comment

Upon seeing that you were hired as the Sr. PHP dev and your job is to fix things, I suggest it's time you flex some muscle.

If I was in your place, I'd do a good survey of the code and see mistakes that are happening over and over again. Block off meeting time each week to go over these things with the team. Don't point fingers or name names, just show how to do that task properly.

Next, since you've already seen needs fixing, make a list. If it's quick and easy to do, do it. If it'll make your life easier to have it done....do it. Make a list of all the things that need to be done and make tickets for them and see when people have cycles to do them. If someone is fixing a bug in a problem area, walk them through how to fix it properly.

If it requires a large change, sit down with the team and the stake holders and discuss options.

Have an open door policy where you'll help people out. Be someone who educates and not intimidates. No, "you have to do it this way" and more "it would be better if it was done this way". Explain advantages to doing it the way you suggest and the disadvantages of the way it's been done. People will be more willing to do it the right way if they feel they have learned something instead of being told their way is wrong and to do it some other way b/c you say so.

share|improve this answer
add comment

Management's Perspective of the Problem If they have accepted the time of development in relation to the amount of defects, why would they risk it? When long-term benefits contradict short-term objectives, they usually lose. You are asking them to take a short-step back. They may think this will cause a lengthy delay. You have to convince them it won't along with the added benefits. If they don't think they have a mess, ask them to explain why it takes so long to quickly introduce new bugs with each "fix".

Code quality is contingent on many circumstances and situations. Sales, marketing, and managers will make you believe every failed deadline means the company will miss that one shot at the mega-million venture capital investor. The reality is, they don't want to break the bad news to the 1% of your clients who really didn't need the feature anyway. I'm being extreme and usually it falls somewhere in between, so developers need to learn what is an actual emergency. Then it's easier to convince them to take the time to do it right instead of needing time to do it over. You have to understand the risks.

Like a great novel, code isn't written well the first time, but unfortunately it still gets published too often. Start with something fundamental like establishing a coding standard. Everyone has one, but many like in your situation, they haven't been formalized nor are they very stringent. "Do whatever you want." is a standard that's very easy to maintain. The next step is to determine how you're going to maintain your standards.

You have a major task ahead of you. Maybe a few great programmers have developed their skills and habits to the extent they never have to compromise on the quality of their code or go into technical-debt, but wait and see what happens when that angel investor promises everyone will get rich.

share|improve this answer
add comment

Sit and write the prototype (or some module if the whole project is too big) that uses really good design as you see fit. Then present / discuss it with the team. It may be easier to convince by example.

In this process, you may also discover that some tools, libraries, approaches or the like are not that good. Always evaluate first and ask your team to use that later. Beware of cheap marketing around substandard tools.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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