jordan.terrell
Just trying to make sense of things...

DNUG Talk: Follow Up

Friday, 2 October 2009 10:01 by jordan.terrell

I think last night’s talk I gave on Domain Driven Design was a success.  I received good feedback from those who attended.  We had around 50 attendees.  A good number of people had never heard of Domain Driven Design (which was surprising to me), many had heard of it but didn’t know much about it, and one or two people had read the book.  It was exactly the audience makeup I was targeting.

Domain Driven Design is not an easy topic to introduce.  It’s very broad, at times very complex and intricate, and it is a very conceptual topic – that is to say, it is more about how you think and communicate about a domain (business problem/solution space), and less about how you write software around the domain.

I outlined a number of follow up resources – frankly a LOT of follow up resources.  Domain Driven Design isn’t something that you are going to pick up in a few months; it is going to take time to absorb and apply.  There are technical concerns that often influence how you apply Domain Driven Design, and those concerns can often be addressed with other documented patterns – that’s why I provided supporting resources.

If you came to my talk, I’d appreciate any feedback you’d like to offer.  I’m giving the talk again at the Twin Cities Code Camp on October 24.  That is going to be a challenge – I only have 75 minutes at that venue, and I easily used 90 minutes last night (excluding discussion about follow up resources).

Thanks to everyone who came!

DNUG Talk: Intro to Domain Driven Design

Thursday, 1 October 2009 07:51 by jordan.terrell

I’m giving a talk today at the Twin Cities .NET User Group, sponsored by ILM and hosted at Microsoft.  I chose to give it on Domain Driven Design because it is something that I’ve been learning since 2005, but there still seems to be many people who don’t know what it’s about.  I’ve received lots of feedback from people expressing interest in the topic, so hopefully we’ll see a good turn out.

I’ll be posting the resources after the talk – stay tuned!

Customer Is Not A Party

Monday, 3 August 2009 10:59 by jordan.terrell

This is in response to this blog post and it’s comments (read it first).

I prefer the usage of the term Party because I also believe it is a more common abstract term.  I will say this though: Customer is not a Party.  It is a 'Role' that a 'Party' plays.  For instance, I would use 'Person' and 'Company' as parties, and 'Customer' and 'Supplier' as roles.

This is not my own idea.  Martin Fowler does a good job of talking about Accountability patterns, which is where he references the concept of a 'Party', but that concept goes much further than the Accountability patterns.

Archetype Patterns

There is a much greater pattern.  In fact there are two patterns - Archetype Patterns.  The first is the 'Party' Archetype Pattern, and then there is the 'Party Relationship' Archetype Pattern.  Both are closely related, as the latter builds on the former.  These two Archetype Patterns are well covered in a wonderful, if not horribly named book: Enterprise Patterns and MDA (hereafter EPM).  Many Archetype Patterns are discussed: Party, Party Relationship, Customer (which more accurately models this as a Party Role), Product, Inventory, Order, Quantity, Money, and Rule.

I would strongly recommend someone looking at Martin Fowler's Analysis Patterns for modeling ideas/concepts to also read EPM.  In my opinion EPM is, in some ways, a superset of what Analysis Patterns talks about, and EPM's patterns are more generally applicable – hence usage of the term Archetype.

One final comment - with all of these patterns there are two principles that need to be applied, as Martin Fowler pointed out (Analysis Patterns, page 13):

Principle: Patterns are a starting point, not a destination.

Principle: Models are not right or wrong, they are more or less useful.

Agile Zen

Wednesday, 10 June 2009 08:12 by jordan.terrell

Nate Kohari, of the Ninject fame, and his bride Nicole have just launched a new company and a new product, Agile Zen.  Agile Zen is a project management tool that emphasizes lean principles, drawn from the work done in the Toyota Production System.  I’ve not been able to interact with the site yet, but from the feature walkthrough it looks very clean and very powerful.  Having had a chance to look at the source code of Ninject and see the genius in its design and implementation, I can only expect the same out of Agile Zen.

I’ll be keeping an eye on this one!

Tags:   ,
Categories:   Programming | .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Unit Testing ASP.NET Using Typemock Isolator

Monday, 18 May 2009 14:03 by jordan.terrell

Advertisment for Typemock Isolator ASP.NET Bundle:

Unit Testing ASP.NET? ASP.NET unit testing has never been this easy.


Typemock is launching a new product for ASP.NET developers – the ASP.NET Bundle - and for the launch will be giving out FREE licenses to bloggers and their readers.


The ASP.NET Bundle is the ultimate ASP.NET unit testing solution, and offers both Typemock Isolator, a unit test tool and Ivonna, the Isolator add-on for ASP.NET unit testing, for a bargain price.


Typemock Isolator is a leading .NET unit testing tool (C# and VB.NET) for many ‘hard to test’ technologies such as SharePoint, ASP.NET, MVC, WCF, WPF, Silverlight and more. Note that for unit testing Silverlight there is an open source Isolator add-on called SilverUnit.


The first 60 bloggers who will blog this text in their blog and tell us about it, will get a Free Isolator ASP.NET Bundle license (Typemock Isolator + Ivonna). If you post this in an ASP.NET dedicated blog, you'll get a license automatically (even if more than 60 submit) during the first week of this announcement.


Also 8 bloggers will get an additional 2 licenses (each) to give away to their readers / friends.


Go ahead, click the following link for more information on how to get your free license.

Common/Utility Libraries: Dead?

Monday, 11 May 2009 11:51 by jordan.terrell

Ayende Rahien (of the Rhino Mocks fame) wrote a post on his blog about “burning” Common/Utility libraries.  I have to agree with his reasoning on why his Rhino Commons library should be “burned”.  As I understand from his post it is a “garbage bin” or dumping ground for any random functionality that might be reusable.  He pointed out that his library has very low cohesion, or in other words the library isn’t really focused on a fixed, finite set of responsibilities.  Again, I agree with this reasoning.

However, I’m concerned that this might also encourage the other extreme: never creating common libraries and copying/pasting code from one project to the next!  In my opinion, this is just as bad or even worse that having a common library.

Having a common library can be both useful and powerful, but it needs to be treated as its own project – or shipping product, if you will.  Versioning, backwards-compatibility, proper API design, application of common API patterns, cohesion – these are just some of the things that you need to think of when designing a library.  Designing a library requires at least one, if not more, architectural and design minded developers to really manage and ship a common library throughout its lifecycle.  One thing often overlooked is deleting/obsolescing code, as well as reorganizing (or refactoring – what ever parlance you prefer) code into different namespaces and assemblies.  Also, one must not shy away from moving library code into different Visual Studio solutions (or whatever solution/project system being used) or to different locations in your source code repository.  Reorganizing applies not just to the contents of your library code, but also to how you work with your library code.

This is even the case with .NET itself. Granted, Microsoft doesn’t always get it right, but they’ve done a decent job.  If you look at the Base Class Library shipped with .NET, there is a TON of functionality, broken into assemblies, namespaces, and types.  This I think is very important when you are designing a library or suite of libraries – organization.  How you break functionality apart, especially at the assembly level, can have a huge impact on the usability and perceived maintainability of a library.

I would argue that Common/Utility are not dead, but rather that is something that is difficult to do well and requires practice and disciple.

Categories:   .NET | Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

RFID Lock Prototype: DHCP Library v0.1

Sunday, 19 April 2009 22:11 by jordan.terrell

Update: This has been blogged about on the Makezine Blog – excellent!  Thanks to John Park for making this happen.

Well, I now have a version of the Arduino DHCP library that I feel moderately comfortable releasing to the wild. If you're interested in the background story, check out these posts.

       Download here: Arduino DHCP Library v0.1

I've tested it with an Arduino Duemilanove (ATMega168), but I'm positive that there will be bugs in the code and that for some (hopefully not many) people it will just plain not work.  If you do try to use it and find that it doesn't work, try using Wireshark to see what packets (if any) are flying across the wire.  Even if you can't figure it out, sending Wireshark capture logs to me will be helpful for me to debug.

In order to use the library, you need to drop the contents of the zip file into your "Arduino\hardware\libraries\Ethernet" folder.  There is a sample in the zip file called "WebClientWithDHCP" that is a modification of the standard Ethernet "WebClient" example.  There are the basic steps to get it working.

1) Add "#include "Dhcp.h" to the beginning of your Arduino sketch
2) Declare a variable of type Dhcp (e.g. "Dhcp dhcp;")
3) Call the beginWithDHCP() method, while providing it a MAC address

It has been a challenge writing this library, and I've just scratched the surface.  I don't have IP lease renewal, retry, cable detection, or even much error handling/reporting.  I'm just interested in getting feedback from the Arduino community to see if they find this useful and where to take the library next.

Enjoy!

I Still Work With Software

Thursday, 16 April 2009 10:51 by jordan.terrell

I wanted to take a moment to assure my handful of readers that I am still very much involved/interested in software development on the .NET platform.  I’m actively learning jQuery, ASP.NET MVC, and I’m looking forward to spending some serious time in Visual Studio 2010 (and related releases) when they make Beta 1 available (I’m not dealing with the VPCs).  I’m just a little more inclined to write about my hardware escapades because such things seem to get less coverage in the blogosphere.  However, if I do come across something novel or interesting in the software-only space, I’ll be sure to write about it.

RFID Lock Prototype: Ethernet Enabling

Sunday, 15 March 2009 09:32 by jordan.terrell

I've made a bit of progress on my RFID Lock prototype.  I've got it recognizing valid RFID tags, and rejecting invalid ones.  I've also got it recognizing all the keys on a keypad, and if the deadbolt is in the unlocked state, pressing the lock button will lock the deadbolt.

One might think that this prototype is done - ready to be installed.  Not so!  The next phase of the project is what, I think, is going to make the lock interesting.  I'm going to add Ethernet support!  The end goal is to have a secured custom web site that will let me manage the list of RFID tags that are able to unlock the deadbolt, time windows when individual tags are active, plus logging and notification.  When I use my card, I don't need to be notified, but if a family member uses their card (someone who, under normal circumstances, shouldn't be unlocking my door) I will be notified via email/SMS.  I can also imagine having the "hidden key under a rock", but have it not be active - if someone who I haven't given a key to needs to unlock my door, I can remotely activate the hidden key for a brief period of time.  In talking with John Park about this prototype at MAKE: Day, he asked if I was going to have some kind of remote unlock directly from the web site.  Probably not - I'll stick to requiring an RFID tag.

Since I've been using Arduino for my microcontroller platform (technically it is the Atmel ATMEGA168 microcontroller), much of the design heavy lifting for including Ethernet connectivity has been done for me.  There is an Ethernet hardware shield and an Ethernet software library.  It's all based around the WizNet W5100 Ethernet chip. At first, I just bought the W5100 chip from Saelig, thinking that I could build a breakout board I can use on a breadboard.  Being that it has 80 pins (73 of which can be connected to) it was going to be a rather long breakout board, but I've been having trouble with the board layout.  The PCB manufacturer that I want to use requires traces to be 8 mils (0.008 inches) wide and spaced 8 mils apart.  You might think that that is very small, but since I'm trying to route this on a board that is spaced about one (1) inch wide, it is proving difficult.  If they would allow 6 or 7 mil width/spacing on a two layer board, I would have been done already.

SchmartBoard with ATMEGA168-20AU For those familiar with Arduino and the Arduino Ethernet shield, this might seem like an unnecessary task.  My argument is that I want to learn more about the W5100 chip and how to embed it in a circuit because 1) I like understanding how things work under the covers, and 2) I'm not planning to use the Ethernet shield in my final design.  I plan on building a custom PCB.  To do that, I'm going to need to be able to program an Atmel ATMEGA168-20AU - it's the same chip that is on the Arduino Mini board.  To put the Arduino bootloader on the chip, I'm using the FTDI FT232RL BitBag approach.  I wanted the have some way of easily programming the chips without them having to be in a permanent circuit, so I bought a SchmartBoard of the appropriate size from Mouser, and using painters tape I affixed the chip to the surface (see photo).  Now I can install the bootloader on this chip without having to put In-Circuit Serial Programming (ICSP) pins on my RFID lock PCB.  I tried to use a SchmartBoard for the W5100 Ethernet chip, but the traces in the center of the board were too short.  So I ended up buying a standard Ethernet shield for now so I can work through the rest of the firmware development.

Once I have a stable build of the firmware using the Ethernet shield, I will make another post.

DSC_9621   DSC_9622

A New Testing Framework

Friday, 7 November 2008 10:23 by jordan.terrell

A new friend of mine wants to collaborate on building a new .NET based testing framework.  I know, I know, there are plenty of testing frameworks out there.  Just to name a few: NUnit, MbUnit, xUnit.NET, nSpec, etc.  Each of these has their own strengths, weaknesses, and implicit/explicit testing methodologies associated with them.  So why would I bother saturating the market further with another testing framework?

I think I have a semi-unique idea.  I say “semi”, because the underlying design idea is applied in other technology areas, but it would be unique in its application to testing.  I think it’s has enough of a fundamental difference from all of the existing testing frameworks to justify building it.  A by-product of the design would mean that it would be mostly compatible with existing testing frameworks (and in fact I would try hard to maintain that quality, but not in all scenarios), but would also open up avenues for experimenting with new ways to represent tests.

So, the reason for this post (besides encouraging a barrage of people telling me not to put yet-another-testing-framework out there) – what do you think is missing from testing frameworks today that you would like to see in the future?