Actually, I coined the term a few weeks ago as a joke in a meeting. I've been hearing it catch on around my office, so last night, I quickly penned... err... typed this in OpenOffice.org, then copy & pasted into the WYSIWIG editor for posts. So the term has been in my head for a few weeks, but the content of this post came together over about 15 minutes of writing.
Trinition
@Trinition
Best posts made by Trinition
Latest posts made by Trinition
-
RE: DynaCode
-
DynaCode
DynaCode
<font style="font-size: 11pt;" size="2">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.</font>
<font style="font-size: 11pt;" size="2">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!”</font>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.
<font style="font-size: 11pt;" size="2">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!”</font>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:
<font style="font-size: 11pt;" size="2">Modify the previously codified rules in the source code so that they meet the new requirements</font>
<font style="font-size: 11pt;" size="2">Compile</font>
<font style="font-size: 11pt;" size="2">Test</font>
<font style="font-size: 11pt;" size="2">Deploy
</font>
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.
<col width="128*"> <col width="128*"><font style="font-size: 11pt;" size="2">Hard Coded</font>
<font style="font-size: 11pt;" size="2">DynaCoded</font>
<font color="#008080"><font face="Lucida Console, monospace"><font size="2">// Hard-coded to save time</font></font></font>
<font face="Lucida Console, monospace"><font size="2"><font color="#800080">if</font>(<font color="#0000ff">state</font>.equals(<font color="#008000">“CA”</font>)) {</font></font>
<font face="Lucida Console, monospace"><font size="2"><font color="#0000ff">goodDriverDiscount</font> = true;</font></font>
<font face="Lucida Console, monospace"><font size="2">}</font></font>
<font face="Lucida Console, monospace"><font size="2"><font color="#800080">else</font> {</font></font>
<font face="Lucida Console, monospace"><font size="2"><font color="#0000ff">goodDriverDiscount</font> = false;</font></font>
<font face="Lucida Console, monospace"><font size="2">}</font></font>
<font color="#008080"><font face="Lucida Console, monospace"><font size="2">// DynaCoded for MAXIMUM flexibility</font></font></font>
<font face="Lucida Console, monospace"><font size="2"><font color="#800080">if</font>(<font color="#0000ff">state</font>.equals(<font color="#008000">“CA”</font>)) {</font></font>
<font face="Lucida Console, monospace"><font size="2"><font color="#0000ff">goodDriverDiscount</font> = true;</font></font>
<font face="Lucida Console, monospace"><font size="2">}</font></font>
<font face="Lucida Console, monospace"><font size="2"><font color="#800080">else</font> {</font></font>
<font face="Lucida Console, monospace"><font size="2"><font color="#0000ff">goodDriverDiscount</font> = false;</font></font>
<font face="Lucida Console, monospace"><font size="2">}</font></font>
<font style="font-size: 11pt;" size="2">Witness these testimonials:</font>
“<font style="font-size: 11pt;" size="2">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</font>“<font style="font-size: 11pt;" size="2">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</font><font style="font-size: 11pt;" size="2">They DynaCode... do you?</font>