Dennis Burton's Develop Using .NET

Change is optional. Survival is not required.
Tags: community | patterns | tdd | testing
I will be presenting items from the PatternsInTesting series as well as some additional content in the Test Driven is Driving me Insane talk at the Great Lakes .net User Group on 3/18/2009 and at the Northwest Ohio .net User Group on 4/21/2009. This has been a really fun talk so far and I have enjoyed the conversation it generates. Stop by if you can make it.

Tags: community | patterns | tdd | testing

I will be presenting items from the PatternsInTesting series at the Greater Lansing .net User Group Flint meeting. I was compelled to put this blog series and presentation together to address the pain many organization experience when trying to include automated testing into their development process. The content is based on the insight and lessons learned that I have picked up by experiencing the same transition in multiple organizations. Participants in this presentation will walk away with tools for writing more effective tests and how to better identify issues in tests.

Tags: community
The keynotes from PDC are always packed with information on the direction of tools from Redmond over the next couple years. If you are not going, you may be thinking, "I will download the videos when they are available." This year there is a better option. Join us at the SRT offices in Ann Arbor. After the keynotes, and realistically during, talk with developers in the local community for an even better understanding of the impact of these announcements. Microsoft will be sponsoring lunch for this event.

Remote Viewing & Discussion of the Ray Ozzie Keynotes
Monday, October 27, 11:30a-2:00p - Register
Tuesday, October 28, 11:30a-2:00p - Register
SRT Solutions
206 S. Fifth Avenue, Suite 200
Ann Arbor, Michigan 48104



Tags: community

I would like to thank Micheal Eaton for kicking off this meme. I have enjoyed many hours reading the responses. But, now I feel guilty for not having put up my response sooner.

How old were you when you started programming?
At 9 years old, my parents bought me the Intellivision computer. I spent many hours re-typing sample code and tweaking it.  This was the same timeframe as the VIC-20. I had a friend with one of these. We would trade the sample programs and have to modify them to work on a different system. This was probably more PEEKing and POKEing than a kid should have been doing.

How did you get started in programming?
The hook for me was a downhill skiing game on the commodore. Somehow, I managed to find the collision detection portion of the code. After a bit of modification, no one could touch my record time. hehe. Of course, I put the collisions back in once my time was set. Exposure to that level of ego gratification at that young age was just dangerous.

What was your first language?
BASIC

What was the first real program you wrote?
As an intern, I wrote a set of shell scripts that set up a clean AT&T System V Rel 3.2 System with all of the hardware that was attached. This included serial port extenders, terminals, and printers as well as other hardware. I was much like plug and play for Unix in '91. It shaved about 90% of the setup time on one of these systems. A few months later an AIX version was created. That was the first time I realized that even people I looked up to could be interested in my unusual approach to an existing problem.

What languages have you used since you started programming?
I'll only mention ones that have been used professionally. bsh,csh,CADOL (oh boy don't ask), C, 8086 asm, C++, VB, Java, C#, Ruby, and PowerShell.

What was your first professional gig?
I had an internship at Versyss. There I worked on the previously mentioned script, some minor enhancements and was general gopher. My first full-time gig was at EDS with GM as a client. I worked on Automotive Diagnostic software. This is still some of the coolest stuff I have done to date.

If you knew then what you know now, would you have started programming?
Absolutely. This in one of the few industries that you can really solve problems in just about any business space. If you are bored it is your own fault.

If there is one thing you learned along the way that you would tell new developers, what would it be?
Never, ever take the golden handcuffs. There is too much enjoyment in this industry to get stuck doing something you don't like because you can't leave. This really relates much more to how you handle your personal finances than what job you take. Do that right, and you have many more options available to do the things you want to do.

What's the most fun you've ever had ... programming?
There are really many to choose from. Almost all of them have been off project or black ops. There is something about solving a problem you are interested in using an approach that you enjoy. I find that things developed in this space end often end up having a lot of value.

Tags: community | powershell

At this months GLUGnet Flint meeting, I will be giving a presentation on PowerShell. What drove me to put this presentation together is all of the recent conversations I have had about PowerShell. It seems to be one of those topics that developers intend to look at but never really get to. This presentation starts from the ground up to several real world examples that have come up in my work environment. I sincerely hope that after this meeting those that have not used PowerShell yet will walk away with another tool in their arsenal.

Hope to see you there.

UPDATE: Adding files and ppt

glugnet.zip (89.02 KB)

Tags: CodeRush | community | programming | tdd

One of the things I really enjoy about the local developer groups is the sharing of ideas and usage patterns of common tools. At tonight's Ann Arbor .net Developers Group, the topic of CodeRush templates came up. I commonly use a set of templates centered around the Rhino Mocks framework As I was describing these templates Jay Wren claimed they should be posted. The irony in that is the first time I saw someone using CodeRush was in a presentation Jay was giving on IoC. As a result of that presentation, we are using Castle Windsor in our application and CodeRush as a productivity tool. 

Creating a Mock Instance

To use Rhino Mock to create a mock instance, you write something like:

MyType myType = (MyType)mocks.DynamicMock(typeof(MyType));

This is an exceptionally redundant exercise that just screams for a Template. The core part of the template takes a string from the Get string provider (named Type) for the type of the instance to create. It will also name the variable with the same name as the type with a slightly different format. Even though this variable name is a linked field, you can break the link by pressing Ctrl-Enter while the cursor is on the variable name. This is commonly required in when creating multiple mock instances in the same scope.

#MockInstance#: Base template not intended to be called directly

«Caret»«Link(«?Get(Type)»)»«BlockAnchor»«Link(«?Get(Type)»,FormatLocalName,PropertyNameFromLocal)»= («Link(«?Get(Type)»)»)mocks.DynamicMock(typeof(«Link(«?Get(Type)»)»));

mk: the type name is initialized to MyType

«?Set(Type,MyType)»«:#MockInstance#»

mk\: the type name is initialized from the Clipboard

«?Set(Type,«?Paste»)»«:#MockInstance#»

Setting up the Tests

The mock instance templates are not much use without having the MockRepository set up and test methods to call. These templates come in handy as well.

mtf: the test fixture

[TestFixture]
public class «Caret»My«BlockAnchor»Test
{
 private MockRepository mocks;

 [SetUp]
 public void Setup()
 {
  mocks = new MockRepository();
 }
 
 «Marker»
}


mt: the test

[Test]
public void «Caret»Test«BlockAnchor»()
{
 «Marker»
 mocks.ReplayAll();
}

Hopefully these templates will be found useful and maybe even kick off some ideas for new ones.

UPDATE: Yea, it would be easier if I added the export file.

CSharp_Custom.xml (12.45 KB)

Dennis Burton

View Dennis Burton's profile on LinkedIn
Follow me on twitter
Rate my presentations
Google Code repository

Community Events

Grand Rapids GiveCamp