DynaCode
Hard
coding is bad. Every IT professional knows this. Even the word
“hard” has negative meanings: difficult, unforgiving, etc. I've
worked in plenty of shops where hard coding can incur ridicule from
peers and reprimand from managers.
PHB: “So implemented the new
enhancement?”
Developer: “Yeah, I hard coded it.”
PHB:
“You what?! Hard coding is bad! Even my grandmother knows hard
coding is bad, and she's dead! Consider yourself on
super-double-top-secret probation!”
Despite these
consequences, we still hard code. Sometimes it just isn't worth it
to make something more flexible than is presently needed. Indeed,
with good design patterns, you can hard code in such a way that
introducing later flexibility has limited impact. Yet these
advantages have never received enough press to overcome the bias that
permeates the IT industry with respect to hard coding.
So how can we still
reap the benefits of hard coding without enduring the repercussions?
It is for this reason
I am introducing a concept: DynaCode. DynaCode solves the problems
of hard coding while enjoying all of the benefits of it. DynaCode,
as its name implies, leverages dynamic coding, not hard coding.
Whereas hard coding is equivalent to chiseling in stone, DynaCoding
is flexible. DynaCode has no negative imagery associated with its
name and in fact sounds quite positive.
PHB: “So did you fix your hard
coding for the new enhancement?”
Developer: “Yeah, I DynaCoded
it.”
PHB: “DynaCode? Well, that's better. In fact, that
sounds better than what was envisioned! For such foresight and hard
work, you deserve a raise... and a promotion!”
So what is DynaCode?
DynaCode is a software development practice by which the source code
contains codified within it the rules of the system. The rules are
codified in such a way as to meet the requirements.
But where DynaCode
really shines is when the requirements change. The inevitable moment
of a requirement change is what those who dislike hard coding fear
the most. Following a straight forward set of simple steps, your
DynaCoded system will easily meet the new requirements:
Modify
the previously codified rules in the source code so that they meet
the new requirements
Compile
Test
Deploy
These steps are the
key to the new paradigm of DynaCode. The profound difference may be
too subtle to recognize at first, but once recognized, the benefit is
clear. Investors, managers and everyone in between will be able to
rest assured knowing that their software has been developed not with
hard coding, but with DynaCode.
|
Hard Coded
|
DynaCoded
|
|
//
Hard-coded to save time
if(state.equals(“CA”))
{
goodDriverDiscount
= true;
}
else
{
goodDriverDiscount
= false;
}
|
//
DynaCoded for MAXIMUM flexibility
if(state.equals(“CA”))
{
goodDriverDiscount
= true;
}
else
{
goodDriverDiscount
= false;
}
|
Witness
these testimonials:
“Before
DynaCode, our systems were hard coded. I dreaded requirements
changes. I would even double estimates to discourage them! But,
now, with DynaCoding, our estimates are half of what they were and
our customers love me for it!”
-- PHB
“I
used to be a hard coder out of necessity, but it was affecting my
professional life – I nearly lost my job. Now, thanks to DynaCode,
I'm on the fast-track to success! Thanks, DynaCode!”
--
Developer
They
DynaCode... do you?