If only I were

Building Great Software

Archive for the ‘Learning’ Category

New Dynamics CRM book

leave a comment »

Some friends of mine Dave and Julie Yack put together a very good book targeting techies ramping up to develop for Dynamics CRM 4.0. Dave wrote the content and Julie did the editing. I had the privilege of tech reviewing several chapters as well, so that was pretty cool.

If you are starting out with Dynamics or you want to increase your knowledge, then definitely go to the CRM book site and pick up the book. It’s well worth the money. There is 645 pages of good content that hit every major aspect of the Dynamics framework.

Written by Chris Sutton

August 18, 2008 at 7:22 pm

Posted in Learning, Technology

TDD Mentoring

with one comment

Yesterday morning I mentored two people for about 3 hours on how to think about and how to do TDD (Test Driven Development). I was a bit nervous beforehand as it was the first time I’ve formally explained and demonstrated TDD.

We started by talking about how TDD gives you a set of test cases that can help you validate the function of your libraries at a low level (now and in the future). Even more, how it encourages you to think through the design of your classes and methods because it forces you the be the first consumer of your code.

We started with what many people would consider a dangerous beginning, but it turned out really well. We began by writing test cases for existing methods and retrofitting the tests.

One method we tested just generated a random string that was then used by a CAPTCHA component. The length of the string was determined by an Integer parameter on the method. Our first step was to write a test that expected an exception if you put in a negative number. We pretty quickly decided that any length <=0 was an error condition, so we did a bit of refactoring to support that change in the method.

Next we verified that if you passed in the numbers 5, 10, 15 etc; that the length of the string actually matched. No problems there.

We were running out of interesting tests pretty quickly when Shirley stated the obvious that Carl and I had overlooked. We needed to validate that the numbers were actually random. So we put in a test that passed in the number 7 four times and sure enough the Random implementation wasn’t being seeded properly.

So in a short time, we were able to significantly improve the design of a preexisting component using TDD. There were three of us coding and discussing it, so it was very interactive and tied to real code they were using. TDD really is primarily a design technique first and a testing technique second.

We found that even though the methods were already implemented, we were able build up a great set of test cases that will keep those methods from being messed up in the future even if their implementation is updated later on. Better yet, we were able to fix the design in some significant cases. Who wants a random string generator with non-random output?

Best of all, when we were done Shirley walked away with a smile and said “this is really cool.”

Written by Chris Sutton

August 12, 2008 at 3:19 pm

Function-centric to Data-centric to Model-centric

with 2 comments

I picked up book called The Waite Group’s Object-Oriented Programming in Turbo C++ recently to look at what Robert Lafore was saying about OOP 17 years ago. The book was published in 1991. I’ve just read chapter one at this point, but it was rather interesting.

Before we look at Lafore’s views, lets talk about where we are now.

A fairly common complaint we hear in 2008 is that people write their programs in a very data-centric way. They write objects for the sole purpose of CRUD but the life of the application in is the database. They might throw in bit of inheritance to make their objects feel more OO, but end of the day they are making glorified data containers that map directly to the database tables.

I was recently in an interview where one person admitted that it was easiest to start with the database and work out from there. So their “business objects” were just in-memory data containers for performing CRUD with a few useful utility methods hanging off the objects.

If you talk with people working with NHiberate, people doing DDD, an Alt.Netter or Rocky Lhotka (I realize there are very diverse view in these groups), you’ll get the view that your domain objects or your business objects should be the core of your application. I buy into this view by the way; the database is a good place to persist your data, but it shouldn’t be where you start in application design.

So what was Robert Lafore’s concern with procedural programming? Remember that in 1991 OO wasn’t mainstream. Here is a direct quote from a section called Data Undervalued in Chapter 1:

What [functions] do may be more complex or abstract, but the emphasis is still on the action.

What happens to data in this paradigm? Data is, after all, the reason for a programs existence. The important part of an inventory program isn’t a function that displays the data, or a function that checks for correct input; it’s the inventory data itself. Yet data is given a second-class status in the organization of procedural languages.

He goes on to explain that functions/methods/procedures don’t let you model the world very well. How do you model a windowing system with dropdown menus with just methods? And he is right, there needs to be more than verbs in our programming languages, we needed first-class nouns (beyond local variables) to be able to model the world better.

17 years ago coding was too action centric but Robert claims it should have been more data-centric. Now that OO is fairly mainstream coding is too data-centric, and the claim is that we need to be more model-centric.

None of these views stand on there own. If you took away functions we wouldn’t have programming; if we didn’t have data we wouldn’t have a reason to program. But I think that building out a good model that is object based and is independent of the database is just as important for application design.

What do you think about this progression? Where are we going from here?

kick it on DotNetKicks.com

Written by Chris Sutton

August 9, 2008 at 11:01 am

Posted in Learning, Technology, Thoughts

Tagged with , , ,

Vocabulary and Context

with 2 comments

I remember learning vocabulary words in middle school and getting tired of making so many practice sentences for the new words. Now I’m working on my vocabulary 15-20 years later and I’m really understanding how valuable those practice sentences were.

Raw memorization of words and definitions don’t stick well in my mind. I process so much information each day that I have to work quite hard to make vocabulary words memorable.

But if I can craft a well-phrased sentence around the word it helps me remember much longer because it gives the word some context. Also, the sentence takes you through the process of using the word well, which helps it stick.

It’s sometimes hard to see how valuable context is because it is so intermingled in what we do, think and say. Context is like the air you breath, you rarely think about it but it is essential.

Here are some words for the you:

profligate – adj – excessively wasteful

execrate – v – to abhor or loathe

perspicacious – adj – acutely perceptive or keenly aware

inveigle – v – to obtain by deception or flattery

You can write sentences for for these words in comments below.

Written by Chris Sutton

August 7, 2008 at 8:10 am

Posted in Language, Learning, Thoughts

How did you get started in software development?

leave a comment »

Javier tagged me awhile back asking how I got started with programming. So here it goes.

How old were you when you started programming?

I was 16 years old in 10th grade. Harold Fenske was a fantastic teacher and I think he is still teaching at my old school. I googled and found a picture of him (he is second from the left).

What was your first programming language?

Pascal on a Macintosh was where I started out.

What was the first real program you wrote?

I think the first exercise we had was to program the American flag in loops and print statements. Doesn’t seem that hard now, but I didn’t really know what a loop was up until that point. Whoever could write it in the least number of lines won and I think I tied a girl for fewest number of lines.

Later that semester I built a graphing calculator that could plot x, 2x, etc. Nothing complex, but I was getting the hang of it by that point.

If you knew then what you know know would you have started programming?

Sure, it was fun then and it’s still fun now.

If there is one thing you learned along the way that you would tell new developers, what would it be?

Program because you love it, not for the money. Money is nice to have, but it wouldn’t be worth it if programming weren’t fun or interesting.

What’s the most fun you’ve ever had … programming?

In college I stayed up all night writing an algorithm to walk through a cube and … well I don’t exactly remember what the exercise was, but I remember figuring out the core of it at 3:30am and being pretty happy.

I’d like to hear from:

Tim Barcz

Arian Kulp

Written by Chris Sutton

July 9, 2008 at 9:04 pm

Posted in Learning, Technology

PowerShell and \\live.sysinternals.com\tools

with 2 comments

This is still a bit rough, but it works. The point of this script is to get updated versions of the sysinternals tools by running a single script.

cls

$targetdir = "c:\Utils\"

$tools = @{autoruns="autoruns.exe"; procexp="procexp.exe";
zoomit="zoomit.exe"; whois="whois.exe"; adexplorer="ADExplorer.exe"}

foreach($tool in $tools.Keys)
{    Stop-Process -Name $tool -ErrorAction SilentlyContinue    }

foreach($tool in $tools.Values)
{    copy -Path "\\live.sysinternals.com\tools\$tool"  -Destination $targetdir -Force    }

procexp /t

if ($error.count -gt 0)
{
    foreach($e in $error)
    {    Write-Host "error: " + $e }
}
else
{    Write-Host "completed successfully"    }

If you know ways to make it better, please post them in the contents.

Written by Chris Sutton

July 1, 2008 at 10:43 pm

Posted in Learning, Technology

MCT TechEd 08 Interview

leave a comment »

If you are interested in becoming an MCT (Microsoft Certified Trainer) and want to hear from an experienced MCT then watch Ken Rosen’s interview (Titled “MCT – It’s not just for breakfast anymore!”) with Matthew Roche from the TechEd 2008 Developer week.

Matthew points out that good MCTs, hopefully the ones that stick around the program, are technically solid and are passionate about telling others about the technologies they work with.

A key point he made was that being an MCT is not an ego trip. Some people may like to get up in front of people and have the class be about them. Being an MCT makes the class about the students and the conversation during the course. I’ve been an MCT for 2 1/2 years and I tell students at the beginning of the class that I’m not up in front of the class to hear myself talk but to help them learn and grow. Students feel much more free to participate as a result. That being said the trainer definitely leads the class and keeps it on track, but the course is not about the MCT.

I think the funniest part is where Matthew describes MCTs as “vocal”. That might be a slight understatement.

There are benefits that come along with being an MCT such as getting access to all of the current and beta courseware for free and getting access to some tools that otherwise cost a lot of money. From a business and billing perspective it can be very beneficial because if people like you in the classroom that could turn into some good consulting.

But the most valuable part of the program is the existing community of MCTs. You get access to a large, experienced community that you can run ideas by and who can give you feedback on courses they have already taught. This is invaluable.

Written by Chris Sutton

June 16, 2008 at 2:02 pm

Dime Casts is live

leave a comment »

Derik Whittaker has been building up a site called Dime Casts that is a series of well done videos demonstrating a variety of development techniques and skills. Currently there are 4 screencasts related to getting started with nUnit, but there are many more topics to come. Check this great learning resource.

Written by Chris Sutton

May 27, 2008 at 8:16 am

Iowa Code Camp – ahhh

leave a comment »

Our first code camp happened last Saturday and it was a smashing success.

Updated: Cindy’s pictures are uploaded here.

~120 people attended 25 sessions in 5 tracks over the course of the day. We aren’t that big of a market compared to many places that get 200-300 attendees. The vibe of the event was upbeat, the flow was excellent and the speakers were all quality.

Many people and organizations contributed to make this happen. I’d like to thank ITS at the University of Iowa for hosting us, providing the facility and so much more. Ed Hill and Mike Noel went far out of their way to make sure we had what we needed to pull this off.

There were 6 of us that primarily took responsibility for this code camp. Bryan Sampica did much of the marketing and emailed countless people getting the word out. He also arranged though his company to have 50 attendee and 25 leader/volunteer t-shirts made. They were excellent quality and really added to the event.

Javier Lozano brought in a great group of contributors who made all of this financially possible. His work in the sponsor area helped us bring in a great set of prizes for everyone in the closing session. He also did some good things like let us use his company’s conference calling for planning our meetings. We probably wouldn’t have talked much as a group without it (Skype kept failing us).

Greg Sohl handled countless details (the kind I would have overlooked) that really made the flow and experience excellent at the actual event. Without his effort the experience would have been greatly diminished.

Greg Wilson kept the schedule full of high quality speakers and when there was some churn toward the end he stepped up and filled the slots last minute and even filled out the 5th track/room late in the game.

Last but not least, Tom Burns was our liaison for the conference center facility and he coordinated many of the logistical issues with Greg Sohl to make this event run smoothly. He did cool things like coordinate our code camp dinner at The Mill and he got a great Ethiopian blend of coffee(my favorite, thanks).

All of the leaders did much more beyond what I’ve mentioned above, but it would take too long to cover it all in one post. Also, thanks to all of the volunteers who did everything from registering people to setting up the food.

This may seem like excessive thanks, but trust me it is not. An event that runs as well as this only happens because many skilled, conscientious people invest a lot of their own time to make it happen. No one on the planning end of this event got paid a dime for their effort.

I’m looking forward to Iowa Code Camp – Des Moines this November.

Written by Chris Sutton

May 6, 2008 at 8:47 pm

Iowa Code Camp is here

leave a comment »

We just had our final code camp planning session at the Coral Ridge Mall tonight. Javier Lozano, Bryan Sampica, Greg Sohl, Greg Wilson, Cindy Nemmers and myself sat and chatted and planned a few last details. Tom Burns has played a big part of this event, but wasn’t able to make it tonight.

There are 150 people signed up. I’ll do a follow up post after the event too give an update on how the event went.

Written by Chris Sutton

May 2, 2008 at 7:43 pm