Wednesday, July 09, 2008

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.

Wednesday, July 09, 2008 12:37:25 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Thursday, March 27, 2008

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)

Thursday, March 27, 2008 9:13:51 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Wednesday, February 13, 2008

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)
Wednesday, February 13, 2008 11:44:18 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

Theme design by Jelle Druyts