Code maintainability, and the joy of outsourcing

Sum­mary

Accord­ing to com­mon wis­dom, the best code is devel­oped in-house. I am begin­ning to believe this is only true when the code must be tightly cou­pled, or there are real­is­tic secu­rity con­cerns. These sce­nar­ios are less com­mon than man­agers like to believe.

For run-of-the-mill devel­op­ment projects, out­sourc­ing might have advan­tages above-and-beyond cost sav­ings. If your code effort can be out­sourced, you should try it. Not only will it be cheaper, but the final code will be eas­ier to maintain.


Back­ground

KSplice recently wrote about the best way to man­age interns. The take­home point is: “Divide tasks to be as loosely-coupled as possible.”

Recently, a com­men­ta­tor on thefunded.com asked:

I’ve been work­ing on a deal in which a larger soft­ware com­pany would give me a plat­form they devel­oped so we can build a busi­ness around it. The larger com­pany has given up on it.

The key devel­oper of the plat­form was to be included in the deal. But he’s appar­ently dis­grun­tled and, lit­er­ally, has gone postal. (There are seri­ous issues; get­ting him back isn’t really an option now.)

So we have a plat­form, with­out doc­u­men­ta­tion, and with­out the guy who built it. But it has been launched in pub­lic appli­ca­tions and is per­fectly func­tional. Basi­cally we would just be reskin­ning it and adding in a few new fea­tures when we relaunch under the new business.

My advice? Try outsourcing.


Try out­sourc­ing

Here was my advice to this person:

Your goal is to improve the main­tain­abil­ity of your code, so that you can eas­ily find new devel­op­ers to jump in on your project. Your goal is also to have the code at a point that you are no longer beholden to any devel­op­ers, and you can eas­ily fire a devel­oper with­out feel­ing like you are locked in to them.

My advice is that you find a good project man­ager to doc­u­ment the code and, more impor­tantly, refac­tor the code­base to make the com­po­nents more loosely cou­pled. This project man­ager should break the code into pieces and del­e­gate to a hand­ful of inde­pen­dent remote sub­con­trac­tors who don’t com­mu­ni­cate with each other. If inde­pen­dent remote work­ers can refac­tor and clean up the code, with­out com­mu­ni­cat­ing with each other, then it means the final code will be easy to main­tain. It then fol­lows that an in-house devel­op­ment team should be able to eas­ily jump into the code­base. Or, you could out­source fur­ther improv­ments. Your choice.

Con­sider that the approach of inde­pen­dent remote devel­op­ers with lit­tle com­mu­ni­ca­tion is the same approach taken by many open-source projects.

If the project is hard to break into pieces, this is why you need a good project man­ager. He or she will under­stand the over­all archi­tec­ture, and see along what lines it is best to cre­ate divi­sion of respon­si­bil­i­ties in the code.

You could choose a sin­gle tightly-knit dev team who are in con­stant com­mu­ni­ca­tion, but the risk is that they will under­stand aspects of the code that they don’t doc­u­ment, and that there will be com­mu­nal wis­dom passed around by oral com­mu­ni­ca­tion. In this case, you are bound to these developers.

What you want is every­thing writ­ten down and easy to pick up by the next guy. So you should force that to be the case in your refac­tor­ing process.

Although it might take inde­pen­dent remote devel­op­ers more time to refac­tor the code-base than a sin­gle tightly-knit devel­op­ment team, if you go with the inde­pen­dent remote coders then the final prod­uct will be eas­ier to main­tain in the long run. And even though the inde­pen­dent remote coders will incur two or three times as many bill­able hours as the tightly knit team, if you use for­eign pro­gram­mers then their hourly rate is four to five times less than domes­tic pro­gram­mers. So I think it’s a win in terms of cost and final results.

Even though I am a hard­core devel­oper myself, I have recently been dab­bling in sub­con­tract­ing to inde­pen­dent devel­op­ers in East­ern Europe, and have been amazed with the results. It allows me to develop much faster, and it makes my code eas­ier to main­tain, because it is impos­si­ble to sub­con­tract work unless your code has good sep­a­ra­tion of con­cerns and is loosely cou­pled. I now have built some good rela­tion­ships with sharp coders who I trust to under­stand my direc­tions and deliver clean code on time.


I sense that I am going to get push back on this by defen­sive domes­tic coders, because it goes against the com­mon wis­dom, but I think it is an option worth considering.

Would you share your expe­ri­ences, pos­i­tive and neg­a­tive, with outsourcing?

View Comments

  • Nice point about how keep­ing com­mu­ni­ca­tions writ­ten pro­motes doc­u­men­ta­tion. Would be inter­est­ing to see how the project man­ager role scales up in a more com­plex project…

  • Sounds like you’ve found some good remote tal­ent. Con­grats, my out­sourc­ing attempts have not been as successful.

    As a “domes­tic coder” I’d be silly to oppose dis­trib­uted devel­op­ment on prin­ci­ple, it’s obvi­ously a proven approach in the open source world.

    Tal­ent is the key. Too many cor­po­rate exec­u­tives man­date the use of off­shore body shops, with neg­a­tive impacts on qual­ity and main­tain­abil­ity. Find the right tal­ent, and they’ll get the job done no mat­ter where they are.

  • It’s inter­est­ing to see some­one who admits he uses out­sourc­ing also to raise is soft­ware qual­ity :-)

  • con­grats for you with your out­sourc­ing partners.

    I don’t see any rela­tion­ship between out­sourc­ing and code main­tain­abil­ity . It is really depend on who write the code and what is the domain.My out­sourc­ing parter is one of the biggest out­sourc­ing comp from India, CMMI level 5.
    And the code is worst code that i ever seen, all copy paste. And it slow like shit. 3 times crash a day :) .

    I don’t think you can draw a con­clu­sion by using your one time experience

  • In the­ory this seems like a great idea. I’m not opposed to out­source either except in terms of gen­eral con­trac­tors return­ing black boxes instead of code. My prob­lem is that the idea a project man­ager could sim­ply read the code and start break­ing it up for refac­tor­ing seems excep­tion­ally naïve. If they could do that then I sus­pect that code would already be rea­son­ably easy to main­tain already. Get­ting a high level overview of the entire code base is never easy. There are always small pieces hid­ing in the cracks that seem­ingly are not impor­tant, yet every char­ac­ter ends up being impor­tant when we’re talk­ing about code. If you have a project man­ager that can do this sort of thing please ask him to blog about how he approaches read­ing a large code base (100k+ lines) and under­stand­ing it in such a way as to send off bits over­seas or to a con­trac­tor for updates.

  • […] The real prob­lem with job hop­ping is the ini­tial expen­sive startup cost to inte­grat­ing a new employee into your orga­ni­za­tion. Job hop­ping would not really be so prob­lem­atic if busi­nesses (and new employ­ees) were set up for peo­ple to con­tribute value imme­di­ately. Per­haps employ­ers and employ­ees alike would ben­e­fit from busi­nesses restruc­tur­ing their processes to be more mod­u­lar and self-contained. This is sim­i­lar to how it seems ini­tially expen­sive to design your code so that com­po­nents are loosely cou­pled, but ulti­mately this dis­ci­pline leads to greater flex­i­bil­ity and eas­ier main­tain­abil­ity. Sim­i­larly, struc­tur­ing your orga­ni­za­tion and processes in such a way that you can eas­ily add (or remove!) tal­ent can ulti­mately lead to effi­ciency. (I make sim­i­lar com­ments about out­sourc­ing your code.) […]

  • I think that any indus­try can ben­e­fit from out­sourc­ing. Like any busi­ness strate­gies, there are down­sides as well, but I think that mak­ing wise choices can help you have a pos­i­tive expe­ri­ence with outsourcing.

  • Bol­locks!
    Yes, loosely cou­pled code should be eas­ier to main­tain and then you could “fire unruly devel­op­ers” at will.
    Never seen this work (63 years old retired soft­ware engi­neer speak­ing).
    You are only indi­rectly involved in soft­ware devel­op­ment, aren’t you?
    BTW, this whole web­site doesn’t work in an Opera browser 10.10 (pages appear blank though their con­tent is actu­ally loaded) .
    A lit­tle “soft­ware prob­lem” may be?

  • http://github.com/turian

    And your web­site doesn’t work on my browser either.

  • Huh?
    Which web­site?
    I didn’t left any though I have sev­eral, one of which is pur­pose­fully Fire­fox only (no time to waste with MicroShit).

  • The one in the suf­fix of yr email address. I’m on Fire­fox 3.6.6 now.

    I looked at this site under browsershots.org, but I don’t see an issue under Opera 10. Feel free to send me a screen­shot of the error on your end.

    BTW, I don’t have much expe­ri­ence cod­ing on big teams. My cod­ing expe­ri­ence is mainly solo. So you might be right that out­sourc­ing is inef­fec­tive for big-team style cod­ing, which I can’t really com­ment on.

  • Yes, it is an option worth con­sid­er­ing… if you don’t give a damn about the cre­ativ­ity and inno­va­tion that can be gen­er­ated when your devel­op­ers actu­ally talk with each other, bounce ideas off of each other, and col­lab­o­rate in the cre­ative process of soft­ware development.

    As for cut­ting costs by going with lower-income coders, here’s an idea I think you’ll love: adopt chil­dren from other coun­tries, lock them away in your attic, train them to be pro­gram­mers, then pay them in bread and water. Think of the profits!

    If you’re wor­ried about your code base being prop­erly doc­u­mented, then give its devel­op­ers a man­date to do so, and make that doc­u­men­ta­tion a part of their expected duties. If you want loosely cou­pled com­po­nents, then have the project man­ager set that expec­ta­tion, and con­firm that need has been met.

    Your solu­tion… cheap labor done by peo­ple who don’t talk to each other… is the sort of solu­tion that might appeal to an accoun­tant, but not to some­one who actu­ally knows some­thing about writ­ing good code… and I’ve been writ­ing code for 32 years and count­ing, so I think I know some­thing about the subject.

Post a Comment

Your email is never shared. Required fields are marked *

blog comments powered by Disqus