FCHouse A blog about our lives, our passions, our photos

Fear of Refactoring?

I have noticed that lately this blog hadn’t covered one of the issues this blog was born for: Analysis, Design and Development. This is what I do every day!

In the latest weeks I have been working hard on a project that was underrate to support all the stuff I needed, so two words come into my mind: Redesign and Refactoring. Scary?

Not at all!

If redesigning is a word that speaks for itself, Refactoring isn’t, is it? Refactoring is one of the words that scares a lot of Developers (or worst… Coders) and it is easily explained:

Refactoring is the process of rewriting a computer program or other material to improve its structure or readability, while explicitly preserving its meaning or behavior.

Well, try to immagine a house, where you are the builder. Immagine that this house is quite good, but that one day you see that the walls are faulty, or simply they are not what you really need. What can you do? Nothing. In programming this is not true, because you can restructure all the code in order to obtain what you want (or what you really need). The main issue does not change, wouldn’t you be scared?

The answer is: Yes, someone can be scared about it. Putting your hand in a “working code” with the risk of messing everything up is scary, but small people doesn’t see other than small things!

Obviously you cannot tear down the walls of your house, this is why development is very flexible! A good Refactoring refreshes the code, speed up the processes, clean up bugs and allow your application to be expandable!

Refactoring fear you should not!Master Yoda would have said “Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering.

Refactoring means learning every day, applying new practices to old ideas.


3 Comments

i think it could be scary when “developers” or people involved in a software project, don’t know how to do it, how to apply new standars, new techniques, maybe that situation scare them and put them agains the wall.

but why to be scared? programming is fun, i mean, if you are a programmer is because you enjoy what you do, like any other profession, obviously you can be a little afraid of implementing new stuff, but if you never try then you will never find out what it feels like.

so no fear, no pain no gain :-)

Posted by frank on 27 October 2006 @ 1pm

Hola Hombre!
Well, why scary?
First of all because you have to get your hand in an “already working” piece of code. Most of the Coders I know don’t want to mess up with something already working…
It’s working… not perfectly, but if I touch it it will not work, or it will take at least some days to fix it… and probably I will generate some new bugs!

Scary thoughts N.1

Then, as Marco (our ex colleague) remembered me, a Refactoring without unit-testing is like a bungee-jump without rubber strap!
Obviously Refactoring has to be done with immediate unit-testing, in order to avoid “and probably I will generate some new bugs!” things

Scary thoughts N.2

If I have to be honest, I feel that too many Coders (not to be mix up with Developers) don’t enjoy the job 100% and run for the fastest solution!

Cheers

Carlo

Posted by Carlo on 27 October 2006 @ 1pm

Mmmmh. That’s the smell of Anti-pattern !
‘Lava flow’, I suppose !

Some recall from my ‘developer’ past is coming back right now.

I learned to perform ‘Code’ Refactoring.
‘Design’ Refactoring is far bigger and far complex than this, so I think only experienced Designer can do it with big effort and support of the whole team. And this is a thing that ‘big money and share’ managers aren’t willing to afford because they thinks it’s expensive and is not worthwile.

And now a ‘localized’ joke :
—————————————————
“Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering.”

“Master, can you give me another definition for the ‘Dark Side’ to have a better understanding ?”

“Yes : ‘Temporary contract in Italy’. You can mess everything up without fear because the next month you are not there …”
—————————————————

Posted by Stefano Grei on 31 October 2006 @ 1pm

Leave a Comment

Harry Potter filming location? Importing/Exporting data with SQL Server 2005 Express Edition