Three Is It

Because two isn't enough and four is just too many

There is not a truth existing which I fear... or would wish unknown to the whole world.
Thomas Jefferson
Home Blogs Genealogy Brad's Bookshelf Subscriptions Contact Sign in
 

About the author

Brad Butts is a .NET developer and architect. He is married with children and enjoys reading, working out, and genealogy is his five minutes of spare time.
E-mail me Send mail
National Debt Clock

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

CodeMash 2009: Day 1

A little late, but here’s my post-mortem on CodeMash 2009…

The Drive

This time, my drive up experience was much more pleasant.  My friend Matt Brewer—via Twitter—learned that another CodeMasher, Justin Kohnen, was looking for a traveling companion.  So, Justin and I went there and back together.  Justin also came equipped with a nice GPS device, so we were fairly well protected from making any wrong turns in the back-country of Northern Ohio.  Humorously, during the conference, they would run a slide show which included one slide picturing a dead end road and the caption, “Google Maps and CodeMash directions don’t mix” (or something to that effect)—I certainly know what they mean.

 

PreCompiler Envy

During the days leading up to the event, I couldn’t help but feel some regret for not signing up for the Precompiler event.  I definitely would have enjoyed taking in the Ruby 101 session with Jim Weirich and Joe O’Brien.  The TDD session with Leon Gersing and Phil Japikse, the Kanban 101 session with Dave Laribee, and even the Java, Groovy, and Grails 101 session with Chris Judd and Jim Shingler all sounded intriguing, as well. 

Later, I learned that at least Jim Weirich made his self-paced Ruby session available here (the file called rubykoans.zip).  I will definitely download it and walk myself through the session.

 

Key Note Speaker: Venkat Subramaniam

World famous technologist Venkat Subramaniam gave the first keynote address.  As I would expect, Venkat was quite entertaining as he pointed out the traditional software development paradigms and how they tend to fail the majority of the time.  He emphasized repeatedly asking the question, “why?”  We shouldn’t necessarily accept a given process/requirement simply because a business has been doing it for X number of years.  He recommended the book The Fifth Discipline as a tool that would help us better understand/refactor traditional (antiquated) processes at our companies.

One hilarious analogy he used in his presentation was to equate unit testing with exercising.  He described a time in his life when he began feeling chest pains.  His doctor prescribed daily exercise—when he exercised daily, the chest pains would disappear.  When he failed to exercise, the pains would reemerge.  He likened this to unit testing: to avoid future pain, we should unit test.  Unit testing may not be enjoyable, but it will likely help us avoid pain and death later on.  Maybe next year I’ll get up there and equate unit testing with nail bending.  I did write down another book recommendation, Dreaming In Code, but I don’t remember the context in which he recommended it. 

 

Session: A Lap around the Live Framework and Mesh Services

Jeff Blankenburg presented on the Microsoft Live services, including Mesh Services.  It seems you can’t click a link anymore without encountering Cloud Computing, Azure, or some other buzz word for moving your software and services to the great tubes in the sky.  As for Microsoft’s foray into this space, they have given us Azure which includes: Live Services (Live Id, Virtual Earth, Messenger, etc.), .NET Services (support for .NET applications uploaded into Azure), SQL Services, SharePoint Services, and Dynamics/CRM Services.  The Azure platform also supports Java, Ruby, Python, and PHP applications.  Another cool feature Jeff pointed out is that, should the services you host in the Azure platform require more processing power, you can very easily add more virtual servers to your virtual farm (at an additional cost, no doubt).

Several pre-existing Live Services are already available for our use, including: Map Point, Live Mesh, Contacts, and many more.  I found Live Mesh particularly cool and useful because you can use it to sync files between computers.  Microsoft even gives us 5gb of space in the cloud on which to store files (apart from Live Spaces).  Very sweet.  Unfortunately, there’s no Live Mesh desktop client for Windows XP 64bit.  Very disappointed at that.

 

Session: Re-thinking UI - WPF DataTemplates

Carey Payette ran this presentation.  Other than some lame SilverLight 1.0 work, I’ve done no XAML at all.  It has long been my intention to dive into it, but I just haven’t found the time yet.  Hopefully, some of Carey’s hints will spare me future pain.  So, here are some “notes to self”:

IValueConverter – this interface converts data to a better UI representation.  By implementing this interface, Carey was able to convert ranking data (integers) into a stars graphic (ala Amazon.com) and even able to skew the pictures she bound to a listbox giving them a nice touch.

DataTemplateSelector – this feature of WPF lets you conditionally load a template.

DataTrigger – this feature let’s you change the template.

ItemPanelTemplate/StackPanel – my notes are sketchy here, but I believe these features let you change the flow of the listbox.

As far as getting up to speed on WPF, Carey recommended the Sams Teach Yourself WPF in 24 Hours.  It looks like Carey has made her code available on her blog over a 4 Part series: Part 1, Part 2, Part 3, and Part 4.

 

Keynote Speaker: Mads Torgersen

Microsoft’s Mads Torgersen gave the lunchtime keynote address.  Yes, as we ate our sandwiches and chips, poor Mads got to speak about the future of .NET and C#.  The .NET platform is definitely trending toward the dynamic end of the spectrum, what with the Dynamic Language Runtime (DLR) library component and the introduction of the “dynamic” keyword in C#.  Personally, I’m still interesting in hearing more of the “when” and “why” in the dynamic language argument: under what circumstances should I move from my static language comfort zone to a dynamic language and why?  Fortunately, since the CLR and DLR are suppose to live nicely together, it sounds like a single application should be able to use a mix of static and dynamic language artifacts.

 

Session: Groovy/Grails for non-Java developers

Michael Kimsal, of Groovy Magazine and Web Dev Radio, gave this talk.  Groovy is a dynamic, object-oriented language similar to Java, Python, and Ruby.  It began in 2003 and includes features like a compact syntax, closures, and easy XML processing.  Closures reminded me of anonymous functions, but this is supposedly a common mistake.  Michael used the following code to depict a closure:

[1,2,3].each{print it}    [NB Michael used Groovy Console as his editor.]

Grails is a web framework built with both Java and Groovy.  Michael used Net Beans for his Grails editor.  For cool Javascript manipulation, where Ruby on Rails incorporates Prototype and Scriptaculous, Grails incorporates Yahoo UI

 

Session: Managed Extensibility Framework

Microsoft’s Drew Robbins presented on the Microsoft Managed Extensibility Framework (MEF).  MEF is a framework that makes it easy to extend your applications.  MEF will actually ship with .NET 4.0.  Right now, you can download it from CodePlex.  Drew mentioned that there was a demo out there, Cash Maker, that demonstrated the use of MEF, WPF, and Parallel FX…but I can’t seem to find it anywhere.

At any rate, Drew had his own demo app where he exposed extension points and showed how available extensions could be discovered at runtime.  He used a feature called ObservableCollection to do some of this.

MEF has three important components:

Parts – manages import and export functionality

Contracts – fairly obvious, although he did demonstrate this notion of string contracts, which was pretty cool

Containers – containers can be used to explicitly add in extensions

Other important points:

No defaults – you must always specify at least one import and one export when using MEF. 

You can add parts to a container explicity or via a catalog.

Duck typing is supported.

A potential use for MEF could be with HttpModules (I’m still waiting for an example of how to unit test an HttpModule, though).

I did ask Drew to explain the overlap between MEF and the new System.Addin namespace.  Drew said that the two teams were talking, but was not aware of any merging of concepts.  His take was that MEF was actually more flexible.  I’ve not used System.Addin, but I’ve heard that it has a steep learning curve.  Drew hooked up MEF in only a few lines of code that made sense to me, so I might be predisposed to learn MEF before System.Addin.

 

Session: Modeling types with extension methods

I ended the day with Bill Wagner and his presentation on Extension Methods.  Bill is somewhat of a quiet and dry speaker—sorry, Bill—but his grasp of C# is legend.  I absolutely must get his More Effective C# book.

Bill ran through examples of bad intefaces in the BCL—bad BCL, bad!  The he wrote some really cool extension methods to make these interfaces more fluent.  He talked about how we need to be careful when we code collection classes—that we should be careful to not necessarily force a specific implementation: eg. PersonCol : List<Person>

He even talked about ways to exchange extension methods for enums and how that would make better sense.  This presentation was just fantastic—I certainly need to spend some more time reviewing the code and slides.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: Technology Blog
Posted by Brad on Saturday, January 24, 2009 1:35 PM
Permalink | Comments (4) | Post RSSRSS comment feed

Related posts

Comments

Busby SEO Test us

Friday, January 30, 2009 7:03 AM

Busby SEO Test

Thanks you for your post. Waiting for the next CodeMash

PadawanArt us

Monday, February 02, 2009 9:57 AM

PadawanArt

Wagner's presentation sounds super interesting, even if he can't present. Do you have any more examples, or did he give you any specific links/books/what-have-you with common extensions and/or best-practices?

Brad us

Wednesday, February 04, 2009 9:09 PM

Brad

@PadawanArt,
It's kind of hard to tell, but I did link to Bill Wagner's latest book, More Effective C#, and to his code and slide deck in the post above. One of these days, I'll pick a better theme where the hyperlinks actually stick out a little more.

Carey Payette us

Friday, February 06, 2009 12:31 PM

Carey Payette

Hi Brad Smile Thanks for blogging Codemash, it looks like it was a successful trip for you! Thanks for attending and writing up my session too, if you have any questions about developing apps with WPF feel free to contact me anytime!

Comments are closed