.NET and Agile Software Design RSS 2.0
# Wednesday, July 02, 2008
When I talk about LINQ people often ask whether it’s possible to have dynamic queries with LINQ. An example of this is presenting the user with a UI that allows them to optionally filter by some criteria or other and sort by some criteria. This was straightforward if you built-up a SQL string in code.

The compiled, static nature of LINQ makes dynamic queries appear difficult at first. They are not and this video and sample application shows you how to accomplish just this.


                        Screen shot of sample application

You can download the source code here:

           Kennedy-Dynamic-Linq.zip (88.34 KB)

And you can watch the screencast video here:

          Kennedy-Dynamic-Linq.wmv (35.7 MB)

Of course, if you like this post, please kick it: kick it on DotNetKicks.com


Wednesday, July 02, 2008 1:08:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
DevelopMentor | Talks | Visual Studio
# Friday, April 04, 2008
You may have heard that the sessions for Mix 08 were posted online and you can view or download them until your heart is content.

Mix 08 is becoming an increasingly important event in the .NET space. I spent a fair amount of time watching the sessions in the evenings. I was teaching a class and couldn't attend myself.

So who wouldn't want to curl up with a cold beer, a warm laptop, and a bunch of .NET presentations? That's what I want to know. But, maybe you don't have time to go through all 89 sessions? Don't despair, I'll distill them down for you.

BTW, I'd love to link directly to them, but SilverLight and Flash are broken web metaphors (you can't link their content) so you'll have to find them at http://sessions.visitmix.com/.

Without further ado, I present to you my top 5 most important sessions from Mix 08:

  1. T22 - Developing ASP.NET Applications Using the Model View Controller Pattern
    Scott Hanselman

  2. T01 - Creating a RESTful API with Windows Communication Foundation
    Aaron Sloman and Haider Sabri

  3. UX03 - The Back of the Napkin: Solving Design Problems (and Selling Your Solutions) with Pictures
    Dan Roam

  4. T11 - What's New in Windows Presentation Foundation 3.5
    Rob Relyea

  5. T26 - Building Applicaitons and Services with.NET Framework 3.5
    Justin Smith
Of course the keynotes were great too - but they don't really belong in this category.

So get out there and learn something! :) And kick it if you like it: kick it on DotNetKicks.com

Friday, April 04, 2008 9:16:07 AM (Eastern Standard Time, UTC-05:00)  #    Comments [2] -
Talks
# Thursday, February 07, 2008

It was all going so smoothly. Jason Whittington, Mark Smith and I were teaching the big DevelopMentor event here in Los Angeles (Guerrilla.NET) when my presentation on the ThreadPool took a nose dive. It started with a great joke involving Wilson (the volleyball from Cast Away).

Wilson and I built an application to compute a multiplication table where each computation was (artificially) slow. To speed it up we threw it at the thread pool using delegate.BeginInvoke. We figured that the ThreadPool would allocate 25 or so threads and the table would display quickly. Here's the expected output - pretty much the same thing we've seen since about .NET 1.0:

    

Each color represents the thread that did that computation.

For the last 7 years, the behavior has been that as the ThreadPool was overloaded, it would steadily start up new threads at the rate of one every 500 milliseconds until it hits its upper limit (typically). Using Performance Monitor (perfmon) we can watch the thread pool adding threads. It usually looks something like this:

    

Much to our surprise we saw completely different behavior. The thread pool added the first 15 or so threads quickly (as expected) but then stalled. New threads were not created every 500ms, instead they were added at increasingly long intervals. My demo took almost twice as long to run as it had the last time I did this demo a few months ago.

Jason, Mark, and I took this code, ported it back to .NET 1.1 and ran it side-by-side with .NET 3.5 and here's what we saw (blue = 3.5, red = 1.1):

    

As of .NET 3.5 the upper limit of the ThreadPool was increased: Knew that.

But, it appears that v3.5 of the CLR changes the policy for adding threads to the thread pool. Rather than adding threads regularly when under load the thread pool uses a logarithmic backoff. My colleague Jason Whittington remarked that this behavior looked similar to the behavior of the thread pool in "Rotor" (the shared-source version of the CLR). We speculated that this backoff algorithm makes sense given the new 250-thread per CPU maximum - it would take a long time to reach that if the runtime waits longer and longer to start a new thread. The 250-thread limits makes it less likely that your application will deadlock the thread pool, and the exponential backoff algorithm keeps the thread pool from creating too many threads too quickly.

Why should you care? Usually you won't, but it could have dramatic impact if you count on that behavior. For example, in our contrived case, .NET 1.1 ran about twice as fast as .NET 3.5 ( ! ):

    

Here's the program and source code (trimmed down to run in both .NET 1.1 and 3.5).

    Math.zip (6.38 KB)

Needless to say, Wilson and I felt kinda stood up.

      kick it on DotNetKicks.com

Please see the follow up post on Breaking changes and now there is screencast, movie version as well.


Thursday, February 07, 2008 12:33:32 AM (Eastern Standard Time, UTC-05:00)  #    Comments [4] -
DevelopMentor | Talks | Visual Studio
# Thursday, October 19, 2006

I'll be speaking tonight at The Central New Jersey .NET User Group (http://www.njdotnet.net) on one of my favorite topics: Five Fundamental Object Oriented Design Principles for Agile Development.

Thanks to Jason Beres (http://www.geekswithblogs.net/jberes) for inviting me to speak at his user group and welcoming me to New Jersey.

Once you've attended the talk, you might be interested in downloading the slides and sample code:

    http://www.MichaelCKennedy.net/Talks/Downloads/NJdotNet/AgileDesign.zip

You also might want to look into some of the tools I was using in Visual Studio. See an older post on my tricked out Visual Studio.

Thursday, October 19, 2006 8:42:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Talks
# Wednesday, May 10, 2006
Thanks to Reza Madani and Mike Vincent for having me speak at the combined meeting of OC VBUG and OC C# last night. It was a packed house which was wonderful, but I felt bad for folks who had to stand in the back for 2 hours.

The audience participation was great. Thanks to everyone who asked questions or had comments.

You can download the slides and samples from my website here:

http://www.michaelckennedy.net/Talks/Downloads/OCVBandCSharp/AgileDesign.zip

Many attendees also noticed the tricked-out Visual Studio I was using during the presentation. That was from CodeRush and Refactor! both highly recommended. You can check those out here:

http://www.devexpress.com/Products/NET/CodeRush/
http://www.devexpress.com/Products/NET/Refactor/

and DevExpress has some very interesting screen-casts demos here:

http://www.devexpress.com/Products/NET/CodeRush/Training.xml

Also I was using the new Vista programming font Consolas, which you can download here:

Consolas Font Pack for Microsoft Visual Studio 2005


Wednesday, May 10, 2006 7:31:51 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Talks
# Tuesday, May 02, 2006
Thanks to David McCater for hosting my Agile Object Oriented Design talk at San Diego .NET Developers Group on May 2nd. I met some great guys and thoroughly enjoyed talking about agile and OOD topics with everyone.

You can download the slides at:

http://www.michaelckennedy.net/talks/downloads/sddotnetdev/agiledesign.zip

Tuesday, May 02, 2006 7:28:23 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1] -
Talks
# Monday, April 10, 2006

Dave, over at extremeplanner.com, wrote a nice summary of the talk I gave at XPSD. I completely agree with him that "a review of these fundamentals [is] refreshing." As you can see, I'm doing my part to spread the word:

Many pundits and authors in the software industry are busy promoting the next big product/feature/etc that they seem to forget that these things only provide second order benefits as compared to the more "fundamental" ideas such as good object oriented design. For example, looking through some of the user groups' upcoming meetings you'll find topics like:
  • Looking at some Cool New Features of ASP.NET 2.0: Managing Membership and Role Management
  • Leveraging the New Windows Mobile APIs
  • Visual Studio Team System
  • Closer to the Data: Using Managed Code in the Database with SQL Server 2005

Lots of neat, whiz-bang features, but I would contend that 90% of the audience would be much better off if they had heard a good talk about solid OOD or TDD or this list goes on. It's been my experience that much of these old (5-15 years), tried and true fundamentals are unfamiliar to most developers.

So here is my call to action:

If you are a speaker or author, reach for something big for your next topic. Yes it's easier to write/talk about the details of the next version of feature X. But you'll do your audience a service if you reach higher, think bigger, and go for something "fundamental."

If you are attending user groups and code camps, ask for and expect something more than a talk on the of latest version of product X.

Monday, April 10, 2006 10:06:40 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Talks
# Wednesday, April 05, 2006

I am tenatively scheduled to speak in San Diego, CA at the “San Diego .NET Developers Group” (http://sddotnetdg.org/). We haven’t arranged a date yet, but I think it will be around late spring / early summer.

This time I will again be presenting a talk on object oriented design and agile development, probably a slight variation on the general topics from my other talks.

I’ll provide more details as they become available.

Wednesday, April 05, 2006 1:39:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Talks
# Monday, April 03, 2006

I’m very pleased to announce that I’ll be speaking in Orange County, CA on May 9th from 6pm onward.

I’ll will be presenting a talk on object oriented design and agile development at a joint meeting of the “Orange Country C# Developers Group” (http://sddotnetdg.org/) and the “Orange County VB.NET User Group” (http://www.ocvbug.org/).

I encourage anyone in the Anaheim / L.A. area interested in the interplay between object oriented design and agile software development to attend.

Monday, April 03, 2006 1:02:33 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Talks
# Sunday, April 02, 2006

[NOTE: This recent post refers to a much older (March 3, 2006) event.]

I want thank Carlton Nettleton and June Clarke for inviting me to present my “Five Fundamental Object Oriented Design Principles for Agile Development” talk at XPSD this past March. The audience participation was great and I really learned a lot myself!

You can download the slides and code samples here:

http://michaelckennedy.net/Talks/Downloads/XPSD/AgileDesign.zip

 

Sunday, April 02, 2006 12:45:57 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Talks

[NOTE: This recent post refers to a much older (Jan 21, 2006) event.]

I want to thank everyone who attended my talk at the first Southern California Code Camp. I really enjoyed speaking there and I got the sense that many of you got something from the talk. In case you weren’t there and are interested, here’s the abstract:

Five Fundamental Object Oriented Design Principles for Agile Development

This session will present five object oriented design principles that facilitate agile software development. These general design principles promote the creation of testable, maintainable, and reusable software. The principles include the Open Closed Principle and the Liskov Substitution Principle. The interaction between Agile Development and these principles will be demonstrated using several code samples.

 You can download the slides and code samples here:

http://michaelckennedy.net/Talks/Downloads/SoCalCodeCamp/AgileDesign.zip

 

Sunday, April 02, 2006 12:40:58 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Talks
Archive
<August 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456
About the author/Disclaimer

Disclaimer
These postings are provided "AS IS" with no warranties, and confer no rights.

© Copyright 2008
Michael C. Kennedy
Sign In
Statistics
Total Posts: 29
This Year: 14
This Month: 1
This Week: 1
Comments: 28
Themes
Pick a theme:
All Content © 2008, Michael C. Kennedy
DasBlog theme 'Business' created by Christoph De Baene (delarou)