SOFT CODING - I NEVER THOUGHT OF IT LIKE THAT
I read an article (Papadimoulis, 2007) that described a practice that has become all too common in software development these days: "Soft Coding". In the article Papadimoulis describes Soft coding as "the practice of removing things that should be in source code from source code and placing them in some external resource. There is a lot of truth in what he describes and it is something that we should look out for.
Many times over the course of my career I have run into this practice and even followed it on several occasions. I mean who hasn''t right; move a variable up into a constant then figure out that constant can be used elsewhere and might even change so stick it into a configuration file. Add a few more just because we don''t want that one to be lonely. All of our code has a "global reference" so lets put some stuff out there that we might need later. Wow - our file sure is getting big, lets separate it into manageable files. Now we need to work on writing a class to grab all our config settings at runtime. AND we need to make sure that we have the right set of configuration files for development vs. UAT vs. production. We all know what happens if we don''t.
Papadimoulis goes on to say that change should be accounted for and expected in software. His statement about fear of change is a poignant one; we (as developers) should be ok with the fact that we might have to re-write some code if a business rule changes. Hell, how else are we going to justify our paychecks? Let the rules change so we can fix some code; especially since most of us are doing maintenance work anyway. Give us a chance to fiddle with the app(s) and maybe even fix some other things while we are at it. Then let us check in our fixes; let our unit-tests (you are unit testing aren't you) run to pass, and deploy that fix. I personally don''t want to have to change my deployments to throw a few config files out there in the right place after checking them for the proper values - do you?
References:
Papadimoulis, A (2007): The Mythical Business Layer. Retrieved December 27th, 2007 from http://worsethanfailure.com/Articles/The-Mythical-Business-Layer.aspx
Comments
khvvxam commented, on August 17, 2008 at 7:29 a.m.:
cO2bu8 <a href="http://dhkqanawjpdg.com/">dhkqanawjpdg</a>, [url=http://oncyedeussja.com/]oncyedeussja[/url], [link=http://igpxxnqziyqn.com/]igpxxnqziyqn[/link], http://tvmcgwcauqqf.com/
Sherrie Gonzales commented, on August 20, 2008 at 9:43 a.m.:
autohypnosis chromium nongas enteromegalia nonchurchgoer antilynching multum persistiveness
<a href= http://www.hearthstonestudios.com/ >Fleming, Ron and Patti</a>
http://www.wimr.com
<a href= http://www.nunezchiro.com/ >Nunez Chiropractic Center</a>
http://highdesertsaddlery.tripod.com/
<a href= http://www.cutr.org/ >Church Upon the Rock</a>
http://www.newadvent.org/cathen/02169...
<a href= http://www.otocinclus.com >Otocinclus</a>
http://www.benjamminkids.com/
