Archive for refactoring

Nowhere To Run: Best Of

Posted in Nowhere To Run with tags , , , on September 18, 2010 by moffdub

This week’s posting of Nowhere To Run will not occur this week.

Announcer: This is the best of Nowhere To Run. Today’s comic was originally posted on October 17, 2009. Please do not call in.

Stanley has come a long way.

<< Previous Next >>
Announcer: You’re reading the EIP web-ring.

When inheritance hierarchies lose their structural integrity

Posted in Design Issues with tags , , , , on February 17, 2010 by moffdub

Let the record show that the number of work days I missed due to inclement winter conditions is zip, zero, nada. So tell Mother Nature to take her power outages and her blizzards and suck. On. That.

Did you really think some crystalized water molecules were going to keep me from my code? Girl, you MUST be crazy.

In fact, a new episode of Nowhere To Run was forthcoming on Saturday, but I succumbed to fatigue and the call of my nice couch/bed at a paltry 9 P.M. I am so old.

Allow me to posit something to you, folks. Suppose this is your nice, beautiful code:

Continue reading

Second-class citizens above the law

Posted in Design Issues with tags , , , , , on January 13, 2010 by moffdub

It’s not too late. Almost eleven months have passed since I favored a Long Parameter List over perceived Feature Envy on the grounds of coupling with the order of the parameters:

Long Parameter Lists are also about coupling, to a lesser extent. You are coupled to the order of the parameters.

I even said in that post that Feature Envy isn’t a clear-cut issue:

Let me share something about Tell Don’t Ask that I’ve realized: the most harmful instances that require attention are those where you get some values out of an object, do something with them, and set some others back into the object.

Yes. And then I defended the readability of a Long Parameter List:

Continue reading

Nowhere To Run: 48 – Debt

Posted in Nowhere To Run with tags , , , on January 9, 2010 by moffdub

Announcer: From the EIP Sylvanian Operations Center, somewhere in south-eastern PA, it’s Nowhere To Run!

<< Previous Next >>
Announcer: You’re reading the EIP web-ring.

Manning Up to Your Model

Posted in The Industry with tags , , , on December 23, 2009 by moffdub

Announcer: From the EIP Chipotle Operations Center in East County, San Diego, it’s time for another thrilled-packed excursion into Programming Excellence on I Built His Cage!

Well, even the celebratory bliss of the 2009 AFC West Champions can’t tear me away from you, loyal reader, and a Christmas Eve Eve post.

One of my favorite programmer cartoons is Developer: Born Brave.

I suppose the main thing this cartoon gets at is that we programmers are the ones brave enough to face the horrible details of telling a complete dummy exactly how to do something, and–worse–troubleshooting and fixing when we screw it up.

This is one type of bravery. Now that I am in the midst of my second proprietary, and first since I started this blog, attempt at domain-driven design, not only am I infinitely wiser this time around, but I am noticing a second kind of bravery that is necessary if you are looking to utilize DDD beyond the set of patterns it advocates.

This sort of bravery goes beyond most small-scale refactorings like Extract Method or Move Field, and probably also the large scale ones, like Replace Conditional With Polymorphism. Rather, this sort of bravery involves re-working your design to match the problem domain, and a great deal of this involves the courage to realize that your code might work and might be beautiful, but it just isn’t quite… right.

Evans called it “Refactoring Towards Deeper Insight“. I call it “Manning Up to Your Model”.

Continue reading

Nowhere To Run: 41 – Influence

Posted in Nowhere To Run with tags , , , on October 17, 2009 by moffdub

Announcer: From the EIP Sylvanian Operations Center, somewhere in south-eastern PA, it’s Nowhere To Run!

Stanley has come a long way.

<< Previous Next >>
Announcer: You’re reading the EIP web-ring.

Nowhere To Run: Best Of

Posted in Nowhere To Run with tags , , , , , on August 24, 2009 by moffdub

OK OK, what? What is going on? More missed Helltime? Another best-of Nowhere To Run?

Well my friends, we can’t blame this lack of activity on Reina. I am to blame, me and my so-called life. You see, the four-posts-per-week alternating-Wednesday-topics schedule is known as Full Throttle mode here at the Excellence In Programming web-ring. Due to external conditions on your host, I needed to institute a scale-back to Cruise Control mode: Wednesday posts only until conditions allow.

I have added a status meter on the right-hand side of the main page to indicate where we are. So, my friends, that does mean that Wednesday will feature new opinion/snippet content. On with the show!

This week’s posting of Nowhere To Run will not occur this week.

Announcer: This is the best of Nowhere To Run. Today’s comic was originally posted on March 7, 2009. Please do not call in.

That is my kind of QuickFix.

<< Previous Next >>
Announcer: You’re reading the EIP web-ring.
Follow

Get every new post delivered to your Inbox.