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:

    1. <font style="font-size: 11pt;" size="2">Modify the previously codified rules in the source code so that they meet the new requirements</font>

    2. <font style="font-size: 11pt;" size="2">Compile</font>

    3. <font style="font-size: 11pt;" size="2">Test</font>

    4. <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>

     



  •  



  •  



  • @Trinition said:

    Even the word
    “hard” has negative meanings

    I am hard right now. 



  • Pure genius. 



  • How is it that goodDriverDiscount = <FONT size=2><FONT face="Lucida Console"><FONT color=#0000ff>state</FONT>.equals(<FONT color=#008000>“CA”</FONT>)); isn't DynaCoding?</FONT></FONT>

    More to the point, how is it that the result of a boolean test isn't really a boolean and needs to be made explicitly boolean?

    I understand the joke, but who really codes like that, hard-coded or otherwise?



  • @mrprogguy said:

    How is it that goodDriverDiscount = <font size="2"><font face="Lucida Console"><font color="#0000ff">state</font>.equals(<font color="#008000">“CA”</font>)); isn't DynaCoding?</font></font>

    More to the point, how is it that the result of a boolean test isn't really a boolean and needs to be made explicitly boolean?

    I understand the joke, but who really codes like that, hard-coded or otherwise?

     

    That kind of thing is too good for hard coders and not good enough for DynaCoders. 



  • What is this mug nonsense?

     



  • @asuffield said:

    @Trinition said:

    Even the word
    “hard” has negative meanings

    I am hard right now. 

    I am DYNA right now!



  • @Morbii said:

    What is this mug nonsense?

    It's part of a joke that was unfunny several months ago when it was first posted. Now it's just people's way of saying they don't like the thread.



  • @Cap'n Steve said:

    Now it's just people's way of saying they don't like the thread.

    It's always been that. The Mug was specificially designed to this end.



  • @dhromed said:

    @Cap'n Steve said:

    Now it's just people's way of saying they don't like the thread.

    It's always been that. The Mug was specificially designed to this end.

    And I don't feel this deserves a mug.  It has a very front-page feel to it and I can tell the guy took his time writing it, maybe years.



  • @belgariontheking said:

    I can tell the guy took his time writing it, maybe years.

    And used an actual word processor, then copypasta'd the junk in here. 



  • Can I leverage synergies for win-win solutions in strategic partnerships by utilizing the power of DynaCode?



  • This DynaCode needs more XML.

    Bonus points if you can implement the DynaCode XML in DynaCode and form an infinite loop of horror. 



  • 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.



  • @dhromed said:

    And used an actual word processor, then copypasta'd the junk in here. 

    TRWTF is of course that the post looked decent. He even managed to place the different pieces of code next to each other. Considering the success I've had formatting my posts, that must literally taken years.



  • Yup. The enterprise version even has full XML support.

     

    I believe SharePoint is written using DynaCode. 



  • @belgariontheking said:

    It has a very front-page feel to it and I can tell the guy took his time writing it, maybe years.

    That's true. But SpectateSwamp has also worked for years on his "Desktop Search", and it's not good.


    The story is indeed very well written, but it didn't make me laugh or smile, and therefor it is



  • @belgariontheking said:

    And I don't feel this deserves a mug.  It has a very front-page feel to it and I can tell the guy took his time writing it, maybe years.
     

    It kind of was a front-page article.  At least similar to one, about the opposite of hard coding:

    http://thedailywtf.com/Articles/Soft_Coding.aspx 



  • @MasterPlanSoftware said:

     

    Oh, come on. I get the impression that [i]all[/i] recent threads were nominated for the mug. At least this one is funny and nicely formatted.



  • @Spectre said:

    @MasterPlanSoftware said:

     

    Oh, come on. I get the impression that all recent threads were nominated for the mug. At least this one is funny and nicely formatted.

     

    Right. Because I am the only one who felt it was mug worthy.



  • Of course all Californians are good drivers. I want to see the DynaCode™ for New Jersey though.

     



  • @MasterPlanSoftware said:

    @Spectre said:

    @MasterPlanSoftware said:

     

    Oh, come on. I get the impression that all recent threads were nominated for the mug. At least this one is funny and nicely formatted.
     

    Right. Because I am the only one who felt it was mug worthy.

    That wasn't directed specifically to you, mind you. I quoted you because you're the one who usually nominates.



  • @Spectre said:

    @MasterPlanSoftware said:

    @Spectre said:

    @MasterPlanSoftware said:

     

    Oh, come on. I get the impression that all recent threads were nominated for the mug. At least this one is funny and nicely formatted.
     

    Right. Because I am the only one who felt it was mug worthy.

    That wasn't directed specifically to you, mind you. I quoted you because you're the one who usually nominates.

     

    And yet I wasn't the first or only person to nominate...



  • @mrprogguy said:

    How is it that goodDriverDiscount = <font size="2"><font face="Lucida Console"><font color="#0000ff">state</font>.equals(<font color="#008000">“CA”</font>)); isn't DynaCoding?</font></font>

    More to the point, how is it that the result of a boolean test isn't really a boolean and needs to be made explicitly boolean?

     

    The original idiom reads more like natural English; your idiom doesn't and the fact that goodDriverDiscount is a boolean is implicit and not explicit in your code. This means that the temp hired to change the code 10 years from now is less likely to fuck up with the "extended version".

    So what does your version have going for it? Can't be performance, as this code snippet isn't likely to be in a loop and the compiler (if any) generates the  same output for both anyway. 



  • @MasterPlanSoftware said:

    And yet I wasn't the first or only person to nominate...

    That just makes it worse. You saw that insulting the OP had already been taken care of and you chose to post anyway. Have you ever thought about just keeping your complaints to yourself? The next time you feel like making a post with absolutely no content, go out and buy a stack of sticky notes. Then you can "tag" things to your heart's content.



  • Disclaimer.  I don't think this thread should be mugged. 

    @Cap'n Steve said:

    You saw that insulting the OP had already been taken care of and you chose to post anyway

    You think that one person expressing an opinion is ok but then when two people express it, you say "whoah slow down charlie" 

    @Cap'n Steve said:

    Have you ever thought about just keeping your complaints to yourself?

    This is an internet discussion forum.  It is designed to let people express themselves.


  • Discourse touched me in a no-no place

    @Cap'n Steve said:

    Have you ever thought about just keeping your complaints to yourself?
    Quoted for amusement, or perhaps irony.



  • @Cap'n Steve said:

    @MasterPlanSoftware said:
    And yet I wasn't the first or only person to nominate...

    That just makes it worse. You saw that insulting the OP had already been taken care of and you chose to post anyway. Have you ever thought about just keeping your complaints to yourself? The next time you feel like making a post with absolutely no content, go out and buy a stack of sticky notes. Then you can "tag" things to your heart's content.

     

    Aww you are cranky again. Take your own advice and keep quiet next time.



  • @PJH said:

    @Cap'n Steve said:

    Have you ever thought about just keeping your complaints to yourself?
    Quoted for amusement, or perhaps irony.

    amusony?



  • @belgariontheking said:

    Disclaimer.  I don't think this thread should be mugged. 

    @Cap'n Steve said:

    You saw that insulting the OP had already been taken care of and you chose to post anyway

    You think that one person expressing an opinion is ok but then when two people express it, you say "whoah slow down charlie" 

    @Cap'n Steve said:

    Have you ever thought about just keeping your complaints to yourself?

    This is an internet discussion forum.  It is designed to let people express themselves.

    No, the first post was stupid as well. I have no problem with complaining (obviously), but at least attempt to add something to the forum. It seems like MPS is usually the first to post in a thread and it's almost always a mug comment. If I had to guess, I'd say he has well over 100 posts that are completely blank, just so he could spam a tag. There are plenty of threads that could have been entertaining, but end up with pointless bickering because he always has to get the last word in. There's at least three copies of the Youtube 0.1 "joke" (endless quote trees that basically make the thread unreadable) thanks to him.



  • @Cap'n Steve said:

    @belgariontheking said:

    Disclaimer.  I don't think this thread should be mugged. 

    @Cap'n Steve said:

    You saw that insulting the OP had already been taken care of and you chose to post anyway

    You think that one person expressing an opinion is ok but then when two people express it, you say "whoah slow down charlie" 

    @Cap'n Steve said:

    Have you ever thought about just keeping your complaints to yourself?

    This is an internet discussion forum.  It is designed to let people express themselves.

    No, the first post was stupid as well. I have no problem with complaining (obviously), but at least attempt to add something to the forum. It seems like MPS is usually the first to post in a thread and it's almost always a mug comment. If I had to guess, I'd say he has well over 100 posts that are completely blank, just so he could spam a tag. There are plenty of threads that could have been entertaining, but end up with pointless bickering because he always has to get the last word in. There's at least three copies of the Youtube 0.1 "joke" (endless quote trees that basically make the thread unreadable) thanks to him.

    So your opinion of stupid and annoying is what matters?  I see... 



  • @Cap'n Steve said:

    No, the first post was stupid as well. I have no problem with complaining (obviously), but at least attempt to add something to the forum. It seems like MPS is usually the first to post in a thread and it's almost always a mug comment. If I had to guess, I'd say he has well over 100 posts that are completely blank, just so he could spam a tag. There are plenty of threads that could have been entertaining, but end up with pointless bickering because he always has to get the last word in. There's at least three copies of the Youtube 0.1 "joke" (endless quote trees that basically make the thread unreadable) thanks to him.
     

    Get over yourself and move on.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.