Oct/11

16

Refactoring is Bad or is it?

Refactoring is what we all like. We all think that refactoring is the panacea for all problems and most of the times that's true. 

Unfortunately refactoring has a Dark Side. This Dark side when exposed can kill your project, your budget and your morale.

It happens when refactoring locks horns with stability of code. 

You can have a poorly written piece of code which is really stable. Infact it's a fact of life in software engineering. 

First let's define what is poorly written code. 

 

1) Not Scalable

2) Not Reusable

3) Not Flexible

 

We'll discuss in future blogs about what all three mean but you already have a fair idea about it. 

There are a lot of reasons for this type of code which are besides bad coding practices. e.g.

1) Software acquired by a startup which built it at speed of light.

2) Revolving door - programmer attrition being very high and everyone bringing their own coding discipline or lack of it.

 

I dont know about others but I get itch the moment I see code such code. 

THIS ITCH CAN BE DISASTROUS IF NOT TAPPED PROPERLY.

How do you control it.

FORTUNATELY THERE IS A WAY AND THAT WAY IS TO MOVE FROM STABLE CODE TO STABLE CODE.

 Following are the steps in detail

1) Every change you make should be really localized and you should be extremely careful about what repercussions it can have on existing functionality.

2) Always divide your tasks in small manageable pieces. Code it and test it thoroughly before moving to the next piece. 

3) never get too excited about newer and better technology. Every new technology implementation has unintended consequences so implement it slowly.

4) Be less and less experimental as you move towards the deadline.

 

Keep in mind Client cares about what works best in given time, resource and budget constraints. 

Schedule a Demo

Schedule a Demo with us

Name *
Email *
Phone *
Company *
Details

Get in touch

you can also contact us at :
(+1) 408 988 2000
InfoObjects Inc.
2041 Mission College Boulevard, #280
Santa Clara, CA 95054
U.S.A.
Live Chat