CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeremy D. Miller -- The Shade Tree Developer

Under the hood and working with .Net, TDD, Software Design, and Agile Stuff


Published by

Comments

Brendan Tompkins said:

Welcome aboard Jeremy! We're all very glad you're here!
# July 18, 2005 8:50 AM

breichelt said:

Welcome Jeremy!
# July 18, 2005 9:20 AM

David said:

welcome, I look forward to your posts on SCRUM and agile processes
# July 18, 2005 9:46 AM

pvanooijen said:

Welcome aboard from another part of the world. We have a place called Amerika over here but it does look a little different as most inhabitants emigrated to the US long time ago. And are now working in the shade of a tree.
# July 18, 2005 12:36 PM

rsakalley said:

Welcome Jeremy, would love to read about Scrum from you.
# July 18, 2005 1:54 PM

Carlton said:

I had to read that stupid "Fish" book, too. Who thinks up that crap?

There was also some other wierd book about pyramids or something - who knows what it was about anymore. When I told my boss I did not get much out of it, it was not long before I was eventually shown the door.
# July 19, 2005 8:59 AM

Jeremy D. Miller said:

Carlton, that doesn't sound like a place you'd miss much. We were *supposed* to read the Fish book. We were even supposed to carry around those silly fish stickers on our badges. I played hide and go seek quite successfully with the fellow who was in charge of insuring that everybody read the book.
# July 19, 2005 2:47 PM

shebert said:

Hi Jeremy,

Welcome, it's great to see you are blogging here! I've been following your blog for some time - now it's time to go update RssBandit.

-Steve
# July 20, 2005 9:04 AM

Raymond Lewallen said:

Code with lots of Debug.WriteLines probably have cyclomatic complexities into the 20s, and instead of recognizing the need to refactor so its easier to debug, they stink up the code.
# July 20, 2005 12:21 PM

Sahil Malik [MVP C#] said:

Jeremy Miller, the latest codebetter addition, blogged about an Amazing code smell - in which he basically...
# July 20, 2005 9:28 PM

Sahil Malik [MVP C#] said:

Jeremy Miller, the latest codebetter addition, blogged about an Amazing code smell - in which he basically...
# July 20, 2005 9:30 PM

Jeffrey Palermo said:

Great post! TDD is very straight-forward with class libraries, but I'm having a hard time right now because I'm writing web controls. I need to be able to test my web control in an HttpContext without running an entire web page.
# July 21, 2005 6:09 AM

Jeffrey Palermo said:

Awesome points. I see a lot of "unit" test code that is really just big, ugly automated tests. This test code touches all kinds of dependencies, and that's very hard to keep false negatives from happening. Keeping tests to one component at a time is much better. Atomic is the word. If a component needs outside data, mock it.
# July 21, 2005 6:12 AM

Jeremy D. Miller said:

Jeffrey, it might be an unpleasant experience, but I *know* that it is possible to create an HttpContext and make it current in a unit test. I've seen it done, I just didn't go look much at how they did it. You'll have to fire up Reflector to pull it off I'd imagine.

Let's talk about it at the Agile lunch today. I'm coming up on my first ASP.NET development in 2 years pretty soon.
# July 21, 2005 6:51 AM

Steve Hebert's Development Blog said:

I was reading Jeremy Miller's post on Code Smells
and another classic .Net code smell occurred to me. ...
# July 21, 2005 7:42 AM

Steve Hebert's Development Blog said:

I was reading Jeremy Miller's post on Code Smells
and another classic .Net code smell occurred to me. ...
# July 21, 2005 7:53 AM

Steve Hebert's Development Blog said:

I was reading Jeremy Miller's post on Code Smells
and another classic .Net code smell occurred to me. ...
# July 21, 2005 8:10 AM

Jeremy D. Miller -- The Shade Tree Developer said:

Here's a handful of articles on designing with or for TDD I had originally posted on my...
# July 21, 2005 1:05 PM

Jeremy D. Miller -- The Shade Tree Developer said:

Here's a handful of articles on designing with or for TDD I had originally posted on my...
# July 21, 2005 1:05 PM

Jeremy D. Miller -- The Shade Tree Developer said:

Here's a handful of articles on designing with or for TDD I had originally posted on my...
# July 21, 2005 1:05 PM

Jeremy D. Miller -- The Shade Tree Developer said:

Here's a handful of articles on designing with or for TDD I had originally posted on my...
# July 21, 2005 1:05 PM

Jeremy D. Miller -- The Shade Tree Developer said:

Here's a handful of articles on designing with or for TDD I had originally posted on my...
# July 21, 2005 1:05 PM

Josh Pollard said:

# July 21, 2005 1:41 PM

James Shaw said:

"Sometimes it is absolutely necessary to maintain state between method calls or across threads and static *methods* are a logical choice"

Don't you mean static *members*? Static methods have nothing to do with state..
# July 21, 2005 2:37 PM

Scott Banwart's Blog said:

Jeremy D. Miller has posted a series of articles on things you should know before working with test-driven development.
# July 22, 2005 7:36 AM

Raymond Lewallen said:

Won't be my first tattoo, but I'm going to get one that says "Atomic Methods : Atomic Unit Tests"
# July 22, 2005 10:23 AM

Liang said:

That is so exciting. Really looking forward to it.
# July 22, 2005 1:27 PM

Jeffrey Palermo said:

These are some great tips. I use them at work all the time.
# July 25, 2005 6:42 PM

Christopher Steen - Learning .NET said:

Ajax.NET for Microsoft ASP.NET 2.0 (beta)
BackgroundWorker and Web Services
Data Source Controls...
# July 25, 2005 8:57 PM

Christopher Steen - Learning .NET said:

Ajax.NET for Microsoft ASP.NET 2.0 (beta)
BackgroundWorker and Web Services
Data Source Controls...
# July 25, 2005 9:00 PM

Christopher Steen - Learning .NET said:

Ajax.NET for Microsoft ASP.NET 2.0 (beta)
BackgroundWorker and Web Services
Data Source Controls...
# July 25, 2005 9:00 PM

rsakalley said:

While I am not a full fledged follower of Agile, (Emergent Design being one of the major reasons for that) especially for long term projects, I feel Emergent design is like letting a horse run within the circular wooden boundary. If you fail to define these, I think more things would break than make. So defining the boundaries is a must, and then let the developers loose, for the micro level emergent design, which actually comes out of TDD and Refactoring, nothing more nothing less. This may keep improving your macro level design, or may not.
# July 25, 2005 10:59 PM

Jeffrey Palermo said:

Emergent design. All the developers have to be very skilled for that to happen. So many programmers get things working and are content with crap that works. Agile assumes that the team consists of motivated, capable people. To do Agile development, you have to have the people first.
# July 26, 2005 5:59 AM

Jeremy D. Miller said:

Ranjan, I really only meant to avoid the extreme of "emergent" design. I would never support a BDUF approach. I prefer Jim Shore's description of "Continuous Design" (http://www.martinfowler.com/ieeeSoftware/continuousDesign.pdf). The key in my mind is to be thinking about the design and trying to improve every single day. Our development practice is still much closer to XP than something like RUP, and it works for us. I just think the zealot, purist approach to XP can be stupid. Design philosophy is a full range of approaches, not a binary switch, and there are plenty of folks out there doing XP and Agile well.

Regardless of approach, you're gonna want skilled developers that are working responsibly. NO process or design technique will ever change that fact. To Jeffrey's point, you really want the full team to be responsible for design or at least participate. If your developers need to be "coralled" you're already screwed out of the gate.
# July 26, 2005 6:58 AM

idior said:

the view how to tiger the _presenter.Close();
# July 27, 2005 6:12 AM

Brendan Tompkins said:

Outstanding!
# July 27, 2005 6:35 AM

Darrell said:

>> but I'm pretty sure you're not supposed to be sending raw exception messages to users. <<

Not to mention a security issue.
# July 27, 2005 11:28 AM

Jeffrey Palermo said:

Yeah, Jeremy. You are bigger than a lot of people. A corn-fed Texas boy!
# July 27, 2005 1:10 PM

Colin Kershaw said:

I think Bill had a great post that addresses the all too often overlooked focus on People:

http://www.williamcaputo.com/archives/000069.html

"In short," as he says, "... non-agile ... views process as having a larger impact on a project's success than its people...".
# July 27, 2005 3:04 PM

Harris said:

My thoughts...if you please...
# July 27, 2005 3:23 PM

Jeremy D. Miller said:

Thanks for the link Colin. Good to hear from you.
# July 28, 2005 3:10 PM

David Hayden said:

I second that. Excellent post, Jeremy.

Well written and a lot of great information. Welcome to CodeBetter!
# July 28, 2005 7:06 PM

Carlton Nettleton said:

Here's a question about namespaces in Dot.Net - everytime you make a new folder, you are essentially creting a new namespace. Just recently, I reorganized some DTO's (data transfer objects) into their own folder and needed to add that namespace to all my code (thank God for the compiler and my tests). Is this the type of thing you were referring to with this post? Or would the better course have been to keep the original namespace AND move into the new folder?
# July 29, 2005 1:48 PM

Rob Caron's Blog - A Team System Nexus said:

Cleaning-out my “To Blog” file again…
Architects

Handling data in service oriented systemsEdward...
# August 1, 2005 2:58 AM

Rob Caron's Blog - A Team System Nexus said:

Cleaning-out my “To Blog” file again…
Architects

Handling data in service oriented systemsEdward...
# August 1, 2005 2:58 AM

Rob Caron's Blog - A Team System Nexus said:

Cleaning-out my “To Blog” file again…
Architects

Handling data in service oriented systemsEdward...
# August 1, 2005 2:58 AM

Rob Caron's Blog - A Team System Nexus said:

Cleaning-out my “To Blog” file again…
Architects

Handling data in service oriented systemsEdward...
# August 1, 2005 2:58 AM

Rob Caron's Blog - A Team System Nexus said:

Cleaning-out my “To Blog” file again…
Architects

Handling data in service oriented systemsEdward...
# August 1, 2005 2:58 AM

Griffin Caprio said:

Interesting read. I originally proposed something similar in a unit testing article I wrote for CODE Magazine.

http://blog.griffincaprio.com/blog/PermaLink.aspx?guid=19de0d91-41a9-4b38-85af-5a3aae9c2108
# August 1, 2005 12:09 PM

Raymond Lewallen said:

MECHWARRIOR!!! Didn't like the Atlas mech much.. I was a Daishi guy.
# August 1, 2005 4:34 PM

TSHAK said:

Jeremy Miller recently made a great post on designing with TDD. The following is a great analogy on TDD's...
# August 1, 2005 5:12 PM

Ben said:

I hope you don't meen a 'mech... I'd have voted for the Atlas rocket. It launched the Mercury capsule and John Glenn into space, making him the first American in space.
# August 1, 2005 6:40 PM

Jeremy D. Miller said:

Shamefully I was thinking MechWarrior. I'll accept the Mercury program too though.

Correction though, Glenn was the first American to orbit space in the Freedom 7. Alan Shepard was the first American in space. In "The Right Stuff", the other Mercury astronauts thought he was an obnoxious publicity hound, so they voted Alan Shepard to go into space first. Don't know if that is based on reality though.
# August 1, 2005 7:15 PM

Sergey Zhikharev said:

Very interesting articles. Thank you. I would also add that mentor role for the pair programming is really important. From my own experience I can say, that pair programming is more effective for relatively young developers.
# August 4, 2005 6:43 AM

Colin Kershaw said:

This reminded me of a post Bill Caputo had that covered error management, though it was about simple classes:

http://www.williamcaputo.com/archives/000125.html
# August 4, 2005 1:45 PM

Jeremy D. Miller -- The Shade Tree Developer said:

My little team is taking over development for one of our other&amp;nbsp;products.&amp;nbsp; Today is the first...
# August 4, 2005 2:57 PM

Jeremy D. Miller -- The Shade Tree Developer said:

My little team is taking over development for one of our other&amp;nbsp;products.&amp;nbsp; Today is the first...
# August 4, 2005 3:01 PM

Scott Allen said:

Actually - that kind of double check locking in GetInstance can have threading issues :) The first check of _instance == null is looking at a "work in progress" in shared memory without taking a lock. It might see _instance become non-null before all the ctor writes are finished. One recommended solution is to use the volatile keyword with the _instance field declaration ....


... but I agree, this doesn't sound like the best place for a singleton.
# August 4, 2005 5:11 PM

Jeremy D. Miller said:

Thanks Scott.

If I do a singleton these days I just go for the "private static instance = new Singleton();" approach and do it upfront.
# August 4, 2005 6:34 PM

Gary Williams said:

Actually, the singleton in question was used to wrap the static M/S SQL*Helper class. It was a very early part of the implementation on a team that was just beginning to learn TDD.

Was it a mistake? Possibly. The architecture was completely refactored part way through the project and the original rationale for the singleton was largely lost. It's an item that is a candidate for a refactor, certainly...but there are always lots of those.
# August 4, 2005 8:53 PM

Christopher Steen - Learning .NET said:

101 Samples for Visual Studio 2005 [Via: Paul Ballard@nospam.com ]
A DataSet is not a Database - Don't...
# August 4, 2005 10:58 PM

Christopher Steen said:

101 Samples for Visual Studio 2005
[Via: Paul
Ballard@nospam.com ]
A DataSet is not a Database...
# August 4, 2005 10:59 PM

Rob said:

Especially on classes that work in a service environment, locking is a necessary evil, but one that shouldn't be done carelessly. Locking isn't just a problem for singleton classes, as even instance classes can be accessed by multiple threads. Having said that, not locking in the *right* places is bad, and locking too much can be equally as bad. However, one problem that should be addressed here is try *not* to lock on types. That's generally a Bad Thing (tm), even though a lot of older MSDN samples showed it being done. It's best to use a specfic object instance as a lock, not a type.
# August 5, 2005 11:32 AM

Jeremy D. Miller said:

Thanks Rob, the original code did lock on an object instance in their singleton, I introduced the lock on the type in my sample. I get your point though.

# August 5, 2005 12:03 PM

Ed Chapel said:

I agree that "design patterns should be a basic skill" of developers. I am not surprised that it isn't for most.

I have unknowingly used several Design Patterns in past efforts, often with slight variations. I can also understand when someone "speaks" in Patterns. Yet, I have only begun to "speak" in patterns. This is my slow climb of the learning curve.

Prior to understanding patterns, I feel my OOP was done with tunnel vision. I understood relationships amongst differnet objects, but it was hard to get an entire object graph in my head or on paper. Using Design Patterns, I feel I can genericize the actual objects into a series of roles and relationships common to an existing pattern.

I recently began working with an Agile consulting company. I now fully realize the benefit of Design Patterns in discussing architecture and implementation. How liberating!

I was a late adopter of unit testing (not to mention TDD). Once enlightened, I wondered how anyone could work without it. Two years on, I have come to the same conclusion about patterns.
# August 10, 2005 7:51 PM

Brendan Tompkins said:

I agree, they should be basic knowledge. Now, that said, I'm still learning them, and I've been developing software for a few years now. So, what's the trouble?

I suspect that part of the problem is that they are genuinely difficult concepts to grasp. Concrete vs. abstract objects + concrete and abstract creational objects can create a mix that will make your head spin. And that's just factories. Point is, it's not really easy stuff.

I also suspect that the GOF book was part of the problem. It was meant for architects, and is wonderful, but very esoteric, long and not an easy read.

Now, I think that the Head First book will really help. It's really amazing, and I think will help bring much of this all down to earth for all of us.

I also think that someone needs to draw a big fat line in the sand about where SOA and OO/Patterns are in relation to each other.

SOA between software boundries, OO inside them, or something to that effect. I'm not sure if I understand it all well enough to do that post, but it should be done by someone at some point...

Good post!
# August 10, 2005 8:11 PM

Jason Haley said:

# August 10, 2005 8:56 PM

Maruis Marais said:

I think Refactoring can help a lot to educate people on patterns. I’ve just finished Martin Fowlers book on refactoring and now find Patterns like template method, state, strategy and composite, makes a lot more sense. I do agree that the GoF book is a bit of a struggle to read. Probably it would help to update the code samples to a more widely used modern language.

In Erich Gamma interview with Bill Venners he said:”You have to feel the pain of a design which has some problem and then it is an eye opener to realize that oh, actually this pattern, factory or strategy, is a solution to my problem. I guess you only appreciate a pattern once you have felt this design pain.”

It is like Ed Chapel said in his comment. Sometimes you find yourself the lone voice in a development company advocating the use of Patterns or Test-Driven Development. This can be extremely hard and most of the time you rather leave your existing company to join another agile development company to get more exposure on these techniques. I’ve also gone though this process…

You also have a lot Development Manager who’s grown up in the VB6 environment and they don’t keep up with the community’s movement towards OO concepts, and this causes friction.

You get questions like: “Why don’t you just pass in an array by reference and then use it to populate this list view?”

I’ve also seen some horrible code with twenty parameters on one method, all passed in by reference, populated in the method and then used in setting a views control values….lol

This is what I like to call the culture of VB!!
# August 10, 2005 10:31 PM

Jeffrey Palermo said:

I would argue that along with design patterns, OOP isn't common knowledge. I think it should be, but I think the two go hand in hand. I see many people writing procedural code with a OO language. In fact, I don't remember the last time I saw an MSDN demo or sample that actually demonstrated an object-oriented concept. The examples are a procedural code snippet or a series of draggy droppies in the IDE. I've also seen just snippets of declarative markup, so the training that Microsoft has been putting out is not targeted toward OOP.
# August 10, 2005 11:05 PM

Ayende Rahien said:

I read the GoF book and I don't have any problem in understanding them, I fully agree that this should be part of every developer education.
I consider understanding of design patterns about as basic as understanding inheritance and OOD.
After all, design patterns are really just clever uses of OOD principals.

That said, there are quite a bit of patterns that are simply not used very often.
The most used patterns, I think are:
* Command
* Strategy
* Singelton

Most of the others are usually implemented by the frameworks (for instance, I extended XmlWriter to add attribute-pre-line output - which was a case of using decorator).
# August 11, 2005 12:30 AM

fregas said:

I'm afraid your experience is fairly common. I'll readily admit I'm no pattern expert, but I'm getting better. Basic OOP concepts I do have down, but alas those skills are rare too. My last job attempted to hire only OOP experts, but yet all the code on the site was procedural, not to mention repetive, bloated and extremely hard to read. Most of the business logic was in stored procedures, and any "objects" in the application were merely data access code that returned datatables and readers.

The site was all in VB.NET. There was an 11 year programmer (5 years my senior) who didn't know how to use an interface or abstract class. Most of the other developers did not know how or when to use inheritance or composition.
# August 11, 2005 10:25 AM

Eric Newton said:

Just like Maruis posted, Its a VB culture thing...

I'm not saying its "WRONG" but the RAD tools foster not understanding the system, but just building on it.

This is an important difference from "classic" frameworks of yesterday where it seemed you had to read the "framework's bible" to understand how to get "Hello World" to display.
# August 11, 2005 10:32 AM

Gary Williams said:

Actually, I think to understand patterns properly, especially for most developers, they have to actually code them. Most developers appear to be experiential as opposed to visual learners, at least with code. This is the whole point of a Spike in Agile...to give you a trance to take the concept out for a spin.

Most developers, in my experince (mostly IT), do not often have the chance to code from a green field start. They have an existing system that they are modifying that has the "patterns" already in place.
# August 11, 2005 10:42 AM

shebert said:

I think the reason so few people adopt has to do with the fact that pattern usage goes through four phases before you become proficient in patterns.

1 - Acknowledge the existance of patterns.
2 - Apply patterns in code.
3 - Understand tools available and how to blend multiple patterns in code.
4 - Speaking in patterns.

Some people stick with it, while most don't.
I think this plays to Gary's point that typical IT developers get short-changed in developing these skills because they don't have the ability to apply patterns across an entire application.

# August 11, 2005 11:44 AM

Jiho Han said:

Jeremy D. Miller brings up a point that I have been mulling over for many months now.
I am working in...
# August 11, 2005 12:50 PM

shebert said:

I think the most important tool I learned early on with the GoF book was the Design Pattern Relationships page at the back of the book.
# August 11, 2005 1:55 PM

Bob said:

My 2 cents: I've looked into the design patterns, spent several hours reading and downloading what I could find. Tried to find a concrete use, or even an example use and then hit the wall.

These sites do a great job of explaining the pattern in a environment of patterns. Unfortunately, most developers are developing in the real world, and a lot of us learn by example, whether we can admit that or not. Without concrete examples for me to see, all that pattern "stuff" is just that, stuff.
# August 11, 2005 3:12 PM

Jeremy D. Miller -- The Shade Tree Developer said:

If you've never heard the term &quot;Technical Debt,&quot; check out&amp;nbsp;Martin Fowler's definition&amp;nbsp;and Ward...
# August 12, 2005 11:17 AM

darrell said:

Unless the controller classes have their own project (package in UML terms), they aren't really layer supertypes. It sounds like you added an abstract base class to the controller hierarchy.
# August 12, 2005 1:25 PM

darrell said:

I do agree with the rest of your post. :)
# August 12, 2005 1:27 PM

darrell said:

I'd like to add the caveat to your recommendation of Enterprise Integration Patterns:

If you are doing any sort of *message-based* SOA or EAI, then grab the EIP book.

Message-based is sort of implied by SOA and certainly by BizTalk, but not by EAI.

I don't like the fact that they called the book Enterprise Integration Patterns, since it's about messaging patterns and you don't always have to use messages for EAI. I firmly believe we should call a spade a spade. :)
# August 12, 2005 1:32 PM

Jeremy D. Miller said:

Darrell,

We did have an abstract class and namespace for the controllers. There was an ApplicationController that managed the handoff between one and the other. The interaction between page level controllers and the uber-controller was standardized.

I'd interpret this as a Layer SuperType pattern (or any other pattern) by usage and intent, not so much by physical implementation.
# August 12, 2005 2:18 PM

Sam said:

Awesome post!
# August 13, 2005 12:57 AM

Christopher Steen said:

[MAJOR RELEASE] WSCF 0.51 [Via:
Christian Weyer ]
Awesome security content for ASP.NET 2.0 -- a bunch...
# August 13, 2005 11:52 PM

Christopher Steen - Learning .NET said:

[MAJOR RELEASE] WSCF 0.51 [Via: Christian Weyer ]
Awesome security content for ASP.NET 2.0 -- a bunch...
# August 13, 2005 11:53 PM

Matthias Cavigelli said:

> The methods in the .NET framework for
> dialogs are all static, and static
> methods cannot be mocked.

A solution I was thinking about for this, never used though, is to pass in the delegate of MessageBox.Show. The form would invoke the delegate. This delegate could be mocked out for tests. Not a nice solution, but I guess if you just have one static methods to mock out, the delegate solution is shorter. You don't have to create IMessageBoxCreator and its implementation. Did you ever consider anything like that?

Many developers often start with the GUI (Win / Web) designer. Then I double click on a button and quick the handler for the event is generated and I start implementing it.
I imagine a good way to seperate the code could be never opening the form in code view.
The proposed Interface (IView) could be implemented in the inherited class so that I never would touch the generated class.

Hope I wasn't confusing enough:-)
# August 15, 2005 4:53 PM

Maruis said:

Your post has a lot of good advice. It is true, it doesn't matter how much pressure and stress there is on a project, if the CI or some development or release process needs improvement. Then it would be best to first solve these problems. Any case, thanx for the thoughts. Made for good reading...
# August 17, 2005 6:41 PM

Joe Chung said:

Examples > patterns. Every time.
# August 18, 2005 2:45 AM

Darrell said:

Good post!

Test small before big works for projects that are built for testability, but sometimes all you have is a group of known "correct" results that are integration tests. I've used those to refactor code to make it more testable in places while ensuring the app still works according to the known integration tests. Yep, it's a pain, but better that than stopping the users.

For build times, if you setup objects correctly and factor out database calls, network calls, etc., then your tests will almost always run fast. If they don't, your code is not performant and it's not really the tests' fault. :) And by setting up objects correctly that includes lazy instantiation where necessary so that tests on 1 method that don't require an expensive creation process don't call it, for example.

For Non-Coding Architect, it depends on the type of architect. I don't think Rich Turner does much coding, but I damn sure want to work with him as an "Architect"! :)
http://blogs.msdn.com/richardt/
# August 18, 2005 9:20 AM

Darrell said:

It was Mike Clark that said the Train Wreck comment, not Andy Hunt. Mike Clark's weblog is at: http://www.clarkware.com/cgi/blosxom
# August 18, 2005 10:32 AM

Joshua Flanagan said:

"migrate code changes over to a Virtual PC image via an MSI package (don't ask, I don't want to talk about it) and take several manual steps to cleanse the test environment"

Maybe this is what you were referring to, but maybe you aren't aware of it: Microsoft
Virtual Server exposes a complete COM object model for doing this exact sort of thing (automatically wiping environments, etc). Virtual Server images are compatible with Virtual PC images too.
# August 18, 2005 10:40 AM

Jeremy D. Miller said:

Darrell - You know you're my best editor;-)

Josh, thanks for the tip.
# August 18, 2005 11:29 AM

Chris Cobb said:

As a self-taught OO programmer with nearly ten years of "green field" OO projects, the biggest issue, for me, with GoF is the extra level of abstraction.

With OO it is difficult for many to visualize appropriate levels of abstracting a process or a file or a concept or a 'whatever' into one or more objects. That can often be overcome with dedication and persistence in learning basic OO concepts.

But when the "business logic" is no longer encapsulated WITHIN an object or set of objects and now becomes a function of the interactions BETWEEN objects, it becomes harder for many to grasp, myself included.

This is why I so enjoyed the EIP book. The patterns described there were so much more visual and concrete (no pun intended). I realized that it would be easier to discuss the concepts with coworkers, even those without an OO background. Also, the use of simple icons that work well in a "plumbing" metaphor, definitely helped ground abstract concepts in a very tangible way. I look forward to the possibliity of implementing some of these in the near future.

So why aren't design patterns common knowledge? In my organization it's mainly because we aren't rewarded for the effort that it takes to get there. I hope that this is finally starting to change.
# August 18, 2005 1:38 PM

pwstevens said:

This topic is a pet peave of mine; I'm constantly battling with developers to not do this; however there are cases that I can't see how to eliminate the database business logic. Have you found a way around this scenario (note: this is a trivial example since a simple foreign key could solve this problem... but conceptually the problem exists in other areas where a FK wouldn't work):
Rule:
A Customer can't be deleted if he has any orders.

Possible business flow:
1. Object checks to see if any orders exist, none do.
2. Someone else enters order
3. Customer is deleted

Putting the business check in the SPROC would then put the rule in a context of a transaction.

Any way to avoid this (note: see note abou FK above).

Thank you.
# August 18, 2005 9:12 PM

Jeffrey Palermo said:

I agree about non-coding architects. Somehow the UML diagrams just don't match up with what the software should really look like. Also, How many UML diagrams that you've seen call for dependency injection for external dependencies (like the database)? I've seen domain libraries _designed_ to reference a particular data access layer. That's a good way to kill logic portability.
# August 19, 2005 8:44 AM

Jeremy D. Miller -- The Shade Tree Developer said:

Have you ever had to do a re-write of an existing application?&amp;nbsp; If you have, you'll know exactly...
# August 19, 2005 11:57 AM

Jeremy D. Miller -- The Shade Tree Developer said:

Have you ever had to do a re-write of an existing application?&amp;nbsp; If you have, you'll know exactly...
# August 19, 2005 11:57 AM

Jeremy D. Miller -- The Shade Tree Developer said:

Have you ever had to do a re-write of an existing application?&amp;nbsp; If you have, you'll know exactly...
# August 19, 2005 9:36 PM

Jeremy D. Miller -- The Shade Tree Developer said:

Have you ever had to do a re-write of an existing application?&amp;nbsp; If you have, you'll know exactly...
# August 19, 2005 9:36 PM

Jeremy D. Miller -- The Shade Tree Developer said:

James Shore has been running a series of somewhat controversial posts about continuous integration.&amp;nbsp;...
# August 22, 2005 12:23 PM

Jason Haley said:

# August 22, 2005 6:44 PM

Maruis said:

The book "Refactoring to Patterns" by Joshua Kerievsky and the Refactoring book by Martin Fowler has helped me a lot in my knowledge of patterns. I recommend these books to anyone who wants to become a better OO and Agile developer. And like any TDD developer knows, it helps with the third mantra of Test - First Development...
What's also nice about Joshua's book is that he uses real world examples.
# August 22, 2005 10:49 PM

BlackTigerX said:

I have re-written several old Foxpro/DMAC applications, in Delphi, now, that's fun!!
# August 23, 2005 12:09 PM