Using Rake to Make Your Builds Majestic

Rake is a software task management tool, written in ruby for managing ruby projects. By leveraging gems like albacore, rake can be used to automate tasks such as builds, configuration, assembly versioning, database deployments, unit testing, etc. for .NET projects as well. Nicholas Cloud talks about some of these features, and how you can use rake in your .NET environment with minimal friction and maximum synergy! Be sure to bring your hard hats folks.

So you want to be a .NET dev…

A friend of mine (we’ll call him Bernard) introduced me, via email, to a friend of his (we’ll call him Walt) who is a recent computer science graduate.  Walt is examining his career options right now, and is curious  about .NET development, so Bernard asked if I would give him an overview of technologies and maybe a little career advice, as someone who has been in the field for a while.  Here is my response (edited for fat-finger blunders).  If anyone has additional insight they would like to share with Walt, please leave a comment and I will pass it along!


Hi Walt, nice to meet you!

The first thing I would say is that if you are thinking about .NET development (or business development in general), its going to be a bit different than the programming you do in a comp-sci course, or academic programming in general.  There tends to be a lot fewer algorithms and data structures, and a lot more “big data”, system integration, and system scaling that happens in business.  So if you really enjoy the math, science, and “number crunching” aspects of programming, you might want to consider the financial and/or scientific sector(s), with languages like C, C++, Lisp, Clojure, Scheme, etc.  Or maybe even embedded systems or hardware programming.

.NET (and Java) tend to be the big “enterprise” platforms, meaning that they are used to run big line-of-business applications.  If this is interesting to you (or you don’t really care), then you can’t go wrong with either of these two platforms.  I started doing web development in PHP on Linux, but through a series of unfortunate, er, I mean, unforeseen events, became a .NET developer.  I’ve been doing .NET for about 5 years now.  One thing I can say is to steer clear of VB.NET, and focus on C#.  The syntax in C# will feel much more familiar if you are already accustomed to C/C++/Java.  And it gets the most love from Microsoft and .NET devs, has the most language features, and is generally respectable.

1. Technology

If you want to do web development on the Microsoft stack, ASP.NET MVC is Microsoft’s hottest web technology.  I use it every day.  Their legacy web technology, WebForms (commonly referred to as ASP.NET, though both WebForms and MVC are built on ASP.NET technology), is still widely used in businesses (and Microsoft still actively releases updates for it), but it is falling out of favor with developers, and most new projects embrace MVC as the future of MS web dev.  I will tell you right now: MVC is much easier to learn than WebForms.  WebForms is a beast from hell.  It is fugly, bloated, hard to test, and easy to swear at, but still worth knowing if you are serious about being a .NET developer.  So if you want to do web stuff, read up on both of these technologies but focus mostly on MVC.  Also, you will need to have a strong grasp of HTML, CSS, JavaScript, and jQuery (a JavaScript abstraction library) to be successful in web as well.

If you want to do desktop development, WPF is where its at.  Microsoft’s legacy technology, WinForms, is still supported though many new projects are WPF-based.  The differences in these technologies revolve mostly around how the user interfaces are constructed, and what capabilities they have.  It can’t hurt to learn either, or both — but if you have to make one a priority, make it WPF.

I will mention Silverlight here briefly, just to say that it is kind of the red-headed step-child of Microsoft technology right now.  It was supposed to bring desktop-like programming to the browser (this goal, incidentally, always meets with failure, e.g. Java Applets and Flash), but Microsoft has quietly sidelined much of its development in favor of standards-based web technologies like HTML5.  The good news is that Silverlight skills are similar to WPF skills, so even if you were on a project where you had to develop in Silverlight, the experience isn’t a loss.

Microsoft has several service-oriented technologies: ASMX which relies on ASP.NET and must be hosted in the IIS web server, and WCF which can be hosted in IIS or in a separate process running on the machine.  WCF is the hotness and ASMX is out-of-favor for new development, though you will still find ASMX in the wild in legacy systems.  WCF is a beast — don’t approach this until you are somewhat familiar with the .NET framework as a whole.

As far as data access technologies go, Microsoft has three (well, two-and-a-half really) that you should know.  ADO.NET is the base data access technology upon which all others are built.  Entity Framework is Microsoft’s object/relational mapper (mapping classes to database tables), and Linq2SQL is Entity Framework’s annoying little brother that no actively uses anymore (trivial projects and existing Linq2SQL maintenance are the exceptions).  You will definitely need to understand how ADO.NET and EF work to write productive .NET applications.

So these are really the application-specific technologies that you will want to learn, but there is also the framework itself and its core libraries.  This brings me to my next section:

2. Resources

If you are serious about .NET, I would highly recommend “Pro C# 2010 and the .NET 4 Platform” by Andrew Troelsen.  Do not be frightened by the size of the book — he has chapters that cover most of the .NET framework in a very digestible way (including chapters on ASP.NET MVC/WebForms and WPF/WinForms).  He begins with core types like string, int, float, byte, etc., as well as .NET application models, memory management, how the CLR runtime executes .NET code, etc.  Its very thorough, and very easy to read.  I get an updated copy of this book whenever a new version of .NET is released because I find it that helpful.  Another good book is “C# 4.0 in a Nutshell” by Joseph Albahari.  It’s not as thorough as Troelson’s book, but you can get a quicker overview of the framework, if that’s what you’re looking for.  Also, I would highly recommend browsing through the videos on TekPub’s website.  They have in-depth videos on C#, ASP.NET MVC, and WebForms that are all worth the money.  The videos are high quality and very informative.

It would also be beneficial for you to get involved in a .NET user group, wherever you happen to be located.  There are two in St. Louis: the STL .NET User Group, and the ALT.NET User Group (I run the latter).  User groups are a great way to meet people who are already knee-deep in .NET and hear detailed technical presentations.  St. Louis also hosts a .NET conference every year called St. Louis Day of .NET, and Kansas City runs a .NET conference called KCDC.  Both conferences are reasonably cheap, and you will get a lot of exposure to different .NET technologies.  If you’re not in the St. Louis area, check and see if your area has conferences or user groups available.  A quick Google search should tell you pretty quickly.

3. The Tools

This is probably going to be the sucky part for you, because while Microsoft tooling is great for .NET, it also costs a small fortune to purchase.  Microsoft’s flagship IDE, Visual Studio, can be purchased with an MSDN subscription for about $800 (professional version).  Microsoft provides “express” versions of some of its products, and while they are adequate for doing small trivial projects, or just learning C#, they are severely crippled and sometimes even do things differently than their commercial counterparts.  (For example, VS Express creates projects a bit differently than VS Pro, which can be confusing if you move from one to the other.)  Still, for getting started they are your best option, unless you can get the software through your university, which would be even better.  There is an open source implementation of .NET called Mono, and there is even an IDE for it called MonoDevelop, but it does not enjoy wide use and does not support all the framework/language features that VS does.  So the Express editions are probably better for learning.  There is also an express edition of SQL server, which is actually quite good, and unlike VS Express, it merely lacks advanced features but otherwise performs identically to full-blown SQL server, so it is a great product on which to learn.

4. Getting Work

St. Louis is big contracting town, so there are tons of staffing agencies and headhunters trying to place technical talent at companies in the area.  St. Louis is also a huge stronghold for .NET and Java, and right now the .NET market is definitely a developers’ market.  Recruiters can typically help “get you in the door” at a company, but most of the ones I have talked to are looking for experienced professionals.  This is not to say that there are no entry-level jobs–I just have no knowledge of whether there are or not.  I could send you the names of some staffing agencies here in the area, if you would like, and you could start dialogues with them to see what opportunities are available.

I would also highly recommend getting involved in .NET open source projects.  Github.com hosts a huge number of .NET open source projects, and allows you to create a free basic account so that you can participate in development.  This looks really good on a resume (there is even a website called GitHire that shows which developers in a given area are most active on Github), and you can learn a lot from reading other peoples’ code.  This will require you to become familiar with Git, an open-source version control system, but I would recommend that anyway because it is quickly becoming the version control system of choice for many .NET shops.

Ok, so I know this was a long-winded email, but I think I covered the basics.  If you have any questions (on technology or your career), feel free to ask.  Godspeed, and good luck.

Naming interfaces

Interfaces in .NET have a specific naming convention.  They begin with a capital “I”, followed by some text that indicates what the interface represents.  IEnumerable is a classic example; it means the implementing object can be enumerated.  This naming convention, however, is pretty unique to .NET.  In the Java world, interfaces do not have a special prefix to indicate that they are interfaces.  Java, unlike .NET, uses two keywords, “extends” and “implements”, to indicate whether a class is participating in an inheritance hierarchy and/or representing some behavior, respectively.  In .NET, we use a simple colon and rely on the ordinal position of the class/interface names that come after to indicate the same.

The prefix “I” used for interfaces is seen by many (myself included) as unnecessary.  It serves no useful purpose other than to provide a visual cues to developers, allowing them to identify interfaces quickly while coding.  Java IDEs typically provide these visual cues so that developers don’t have to rely on a naming convention for this purpose.

Eclipse example 1

Eclipse example 2

Visual Studio has visual aids as well, but they are not as obvious, in my opinion.

I do think a naming convention for interfaces is still a good idea, but I don’t think the prefix “I” is necessary.  Instead, I would like to propose that interfaces be named for the behavior that the represent, starting with a prefix like “Can”, or “Will”, or “Has”, followed by a description of that behavior.  For example:

  • IEnumerable becomes CanEnumerate
  • IDisposable becomes CanDispose
  • IQueryable becomes CanQuery
Not only is this naming convention more descriptive and less contrived (sometimes it is difficult to come up with an interface name like IXyzable), it forces developers to really think about the behavior they are trying to implement, and may dissuade them from creating interfaces that have nothing whatsoever to do with behavior.  (The sudden explosion of IOC mania has obscured the real purpose of interfaces, but that is another topic for another time.)
If you have thoughts on this topic, I’d be interested to hear them.

Nested classes

I’ve been programming against the .NET framework for a while, and I confess that I haven’t much used nested classes.  I’ve just never had a compelling need.  But today I was working on some unit tests, and found a nice example of how nested classes can be very helpful, and even make normal classes easier to use.

It all began with DateTime.Now.  It is very hard–no, impossible–to test objects that rely on DateTime.Now in a consistent way, because you have no direct control over the value of “Now”.  It is actually an external dependency, and like all external dependencies it is best to abstract it away for testing purposes.  So I created this rather mundane interface and a simple implementation class that I could pass to any object that needed to use the value of “Now”.

internal interface ISundial {
    DateTime Now();
    DateTime Today();
}

internal class Sundial : ISundial {
    public DateTime Now() {
        return DateTime.Now;
    }

    public DateTime Today() {
        return DateTime.Today;
    }
}

I know it smacks of over-engineering, but bear with me: this is just a preamble to real content.  Anyway, so now I have a nice ISundial interface which I can use for creating a FakeSundial object in my unit test.

internal class FakeSundial : ISundial {
    private DateTime _now;

    public FakeSundial(DateTime now) {
        _now = now;
    }

    public DateTime Now() {
        return _now;
    }

    public DateTime Today() {
        return _now.Date;
    }
}

This worked great for a number of tests. I could guarantee that “Now” would be any value that I needed it to be, and then I could perform assertions to verify the results of date calculations, for example.

Some tests failed, however, and I immediately knew what was wrong.  The Now() method, by design, never advanced with the system clock, whereas DateTime.Now does.  This caused me some headaches, so I added a few convenience methods to simulate the passage of time.

internal class FakeSundial : ISundial {
    private DateTime _now;

    public FakeSundial(DateTime now) {
        _now = now;
    }

    public DateTime Now() {
        return _now;
    }

    public DateTime Today() {
        return _now.Date;
    }

    public void FastFowardSeconds(int seconds) {
        _now = _now.AddSeconds(seconds);
    }

    public void FastForwardMinutes(int minutes) {
        _now = _now.AddMinutes(minutes);
    }

    //etc.
}

This worked great and gave me the flexibility that I needed, but I still had to implement FastForwardMilliseconds(), FastForwardHours(), FastForwardDays(), FastForwardYears(), and all the damn RewindXYZ() methods that I knew I was going to need as well.  I began to alter my design a little bit. Perhaps I could just have generic FastForward() and Rewind() methods that took an int argument and some kind of enumeration to represent the various time measurements, and then build a glorious switch statement that would call the appropriate methods on the DateTime field.  But that, too, was rather kludgy, and not at all befitting for an important class such as FakeSundial.

Then I thought: wouldn’t it be nice if I could use a kind of fluent syntax to accomplish this same thing, something like:

var fakeSundial = new FakeSundial(DateTime.Now);
fakeSundial.FastForward(60).Minutes();

Two things were immediately apparent:

  1. FastForward() and Rewind() would need to return an object other than FakeSundial (otherwise, what would calling fakeSundial.Minutes() do on its own?); and
  2. that other object would need access to the private field _now in the FakeSundial instance.

The second point was the impetus for a nested type, because in C#, a class that is declared within another class has full access to the parent class’s private and protected members (much like an instance method can access the private instance variables of its declaring class).

A corollary to point #2 is that the nested class would need to be a private class, which would prevent other objects (whether children by inheritance or external to FakeSundial), from accessing the private state data of FakeSundial.  This is a good example of Encapsulation in OOP.  I decided to call this class SundialDuration:

private class SundialDuration {
    private readonly FakeSundial _fakeSundial;
    private readonly int _incrementValue;

    public SundialDuration(FakeSundial fakeSundial, int incrementValue) {
        _fakeSundial = fakeSundial;
        _incrementValue = incrementValue;
    }

    public void Seconds() {
        _fakeSundial._now = _fakeSundial._now.AddSeconds(_incrementValue);
    }

    public void Minutes() {
        _fakeSundial._now = _fakeSundial._now.AddMinutes(_incrementValue);
    }

    public void Hours() {
        _fakeSundial._now = _fakeSundial._now.AddHours(_incrementValue);
    }

    public void Days() {
        _fakeSundial._now = _fakeSundial._now.AddDays(_incrementValue);
    }
}

The class constructor takes an instance of the FakeSundial object, as well as an increment value, and performs the appropriate increment operation when the respective increment method is called. (If the increment value is a negative number, the value of “Now” will move backwards.)

The FastForward() and Rewind() methods in FakeSundial cannot have a return type of a private nested object, so I created a public interface that defined the increment methods in SundialDuration, and made it the return type of FastForward() and Rewind().  The full class implementation looks like this:

internal class FakeSundial : ISundial {
    private DateTime _now;

    public FakeSundial(DateTime now) {
        _now = now;
    }

    public DateTime Now() {
        return _now;
    }

    public DateTime Today() {
        return _now.Date;
    }

    public ISundialDuration FastForward(int howMany) {
        return new SundialDuration(this, howMany);
    }

    public ISundialDuration Rewind(int howMany) {
        return new SundialDuration(this, -howMany);
    }

    private class SundialDuration : ISundialDuration {
        private readonly FakeSundial _fakeSundial;
        private readonly int _incrementValue;

        public SundialDuration(FakeSundial fakeSundial, int incrementValue) {
            _fakeSundial = fakeSundial;
            _incrementValue = incrementValue;
        }

        public void Seconds() {
            _fakeSundial._now = _fakeSundial._now.AddSeconds(_incrementValue);
        }

        public void Minutes() {
            _fakeSundial._now = _fakeSundial._now.AddMinutes(_incrementValue);
        }

        public void Hours() {
            _fakeSundial._now = _fakeSundial._now.AddHours(_incrementValue);
        }

        public void Days() {
            _fakeSundial._now.AddDays(_incrementValue);
        }
    }

    public interface ISundialDuration {
        void Seconds();
        void Minutes();
        void Days();
        void Hours();
    }
}

Now, my unit tests can simulate the passage of time with a few method invocations:

var sundial = new FakeSundial(DateTime.Now);
var timeSensitiveObject = new TimeSensitiveObject(sundial);
timeSensitiveObject.DoSomething();
//simulate the passage of time!
sundial.FastForward(10).Days();
//operating in the future now
Assert.AreEqual(10, timeSensitiveObject.DaysElapsed);

St. Louis Day of .NET 2010

St. Louis .NET developers had a busy weekend last Friday and Saturday — over 650 of them attended the third annual St. Louis Day of .NET.  The conference, which began in a crowded WashU meeting room three years ago, has pulled speakers, attendees, and sponsors from all over the United States, and has even gained the attention of Microsoft.  For $200 (or $125, if registrants took advantage of the early bird special), attendees were treated to over 100 sessions on .NET-oriented technologies, open discussion sessions, a great party at Ameristar’s HOME nightclub, and a special keynote by Microsoft representative Brian Goldfarb.  Secondary perks like great swag, prizes, networking, and a used bookstore (that donated all proceeds to charity) added to the legitimacy of the event.  The Midwest is often eclipsed by the big conferences on each coast, but last weekend that didn’t matter — St. Louis developers had a solid, professional, mature conference to call their own.

I attended a number of interesting sessions, a few of which I will briefly enumerate here (IEnumerable<Session>?), although my mental saturation point was nearly reached late Saturday as I struggled to retain retain retain.  For a taste of what the event offered as a whole, check out the sessions and speakers pages on the official website.

WTF# – Ken Sipe

My exposure to F# has been pretty limited, mostly due to time constraints and no immediate reason to add it to my skillset, but Ken’s talk sparked my interest and convinced me that I need to invest some time in this new functional language from Microsoft.  I enjoy Javascript and LINQ, which are not pure functional language implementations but definitely have functional flavor; and a friend who shall remain nameless but who KNOWS WHO HE IS always bugs me to try Scheme, so perhaps this is a good way to ease myself into that world of out-of-control parentheses and alpha-geeks who mock IDEs other than Emacs.  F#, a derivative of oCaml, is a strongly typed language that can leverage .NET framework libraries.  Ken demonstrated that it is more performant than C# in parallel operations, and in many cases results in a smaller IL footprint when it is compiled.  Since parallelism is the Big New Thing, and since I want the most bank for my buck from the four cores idling in my beefy development box, the magnetism of F# is is multiplied.  Off to write some lambdas bitches!

Open Discussion: Entity Framework vs. NHibernate – Jesse Phelps

The open discussions were some of my favorite sessions at #STLDODN.  This particular session was very important to me because I have strong opinions about both EF and NHibernate, and it was good to let everyone know that NHibernate is the One True ORM… I mean, discuss the pros and cons of both ORMs in the context of specific business needs.  There were knowledgeable people present who had used each and had much to contribute to the discussion.  I was even further impressed that there were DBAs present who wanted to know what all the hullabaloo was about, and had very specific questions about the performance, the quality of ORM generated SQL, and the place for things like stored procedures in a system that uses an ORM.  Jesse did a great job guiding the discussion; additionally, no fist fights broke out.

NHibernate and Friends – Lee Brandt

I have been learning the NHibernate ORM for the last couple of months, so this session was a good refresher on some of the associated libraries that work with NHibernate.  Lee covered Fluent NHibernate, a library that allows a developer to specify mapping configurations via a fluent interface (method chaining) instead of those eeeevil XML files.  Personally I think the fluent interface can become a little messy with more complicated mappings, but that downside is offset by two key benefits: a) using fluent allows the developer to refactor both entity objects and affect the mapping directly (since the fluent interface is strongly typed code), and b) there is a performance gain because XML files do not need to be parsed when the application starts.  Lee also demonstrated LINQ to NHibernate, an open source LINQ provider that allows NHibernate sessions to be queried using LINQ syntax.  My favorite quote of the conference came from this session: “We take what the Java guys do and stick an ‘N’ on the front. That’s our originality.”

Open Discussion: Silverlight vs. WebForms vs. MVC – Kevin Grossnicklaus

Like the NHibernate open discussion, this session compared and contrasted three approaches to writing applications in a web-centric environment.  Kevin is an unabashed Silverlight enthusiast, and provided compelling reasons (ease of development, rich user experience, single programming language) for using Silverlight as a platform for internal web applications.  Many there, including myself, have jumped onto the MVC wagon, and argued that web technologies should not fight the web stack, but embrace it (i.e., Javascript should be in everyone’s toolbox, ViewState is evil, and id attributes should not be hijacked).  The WebForms developers were fewer in number than I expected, and were interested in understanding *why* the MVC developers had jumped ship.  Everyone had at least some experience with Webforms, so it was much easier to compare technologies.  Nik Kalyani, co-founder of DotNetNuke was present for the discussion, and provided some observations about the challenges he experienced using WebForms as a platform for the DotNetNuke CMS.

Going Independent 101: Lessons Learned from a Decade of Independence – Michael Eaton

By far my favorite session, Michael’s highly practical and highly personal talk about working for oneself was both entertaining and inspiring.  Michael started by telling everyone about his personal path from corporate cube dweller to independent software developer, being very careful to point out his mistakes along the way so those who might follow could avoid the traps he fell into.  He covered practical topics like time management, finding clients, self-discipline, hiring an attorney and an accountant, etc.  He talked about the tools he uses to successfully run projects, including his trusty notebooks for brainstorming and tracking client time (It’s not software! Heresy!).  He stressed the point that, above all, being independent gives him the flexibility to invest in his family and personal life, often a powerful motivation factor for those who want to be self-employed.  Michael’s hard work and success definitely lit many fires in the room.

There were many more great sessions that I was unfortunately unable to attend — nearly 11 sessions running in parallel every hour.  I was forced to pick and choose, and the decisions were difficult but I was not disappointed with the quality and variety of the sessions I attended.  A big thanks to all organizers and volunteers who made STLDODN 2010 a big success!

.NET Rocks Roadtrip: Destination St. Louis

Yesterday the .NET Rocks! Roadtrip came through St. Louis and local developers were treated to a very special live broadcast of the .NET Rocks! podcast by Carl Franklin and Richard Campbell, two tech heads who are just south of sane and a whole lot of fun to hang with!  The roadtrip is a fifteen-city trek across America in a large RV, sponsored by Microsoft product teams and many .NET component, control, and tool providers.  The roadtrip team can be tracked in real-time with a feature-rich Silverlight app that integrates Bing mapping technology, live tweets featuring the hashtag #dnr_roadtrip, and Flickr image posts of the roadtrip team and RV.

During the first hour the podcast was recorded live with special guest Kate Gregory–developer, writer, professor, and computer science PhD.  The discussion began with some brief overviews of Windows 7 development features and .NET Framework 4 enhancements that leverage them.  The banter was lively and the dual of wits commenced when Kate revealed that her two favorite languages are C++ and Visual Basic. (A confession which, in a room of C# developers, is tantamount to heresy!)  She was quick to point out that Microsoft’s MFC libraries have received a hefty update in .NET 4, so people who write “trivial” applications like game engines, device drivers, and operating system libraries have finally received some love.  I had never heard Kate speak before, and it was quite an entertaining and enlightening hour.  I hope she will continue to be a guest on future .NET Rocks! podcast episodes (hint, hint).  To listen to the full 41 minute podcast, and read a more robust description of Kate Gregory’s accomplishments, check out the podcast page for show #551.

Richard took stage for the second hour and demonstrated the new load testing features in Visual Studio 2010 Ultimate Edition.  He totes a “datacenter in a bag” which consists of four mini microcomputers, a switch and a bunch of network cables.  In the mix were two Windows 2008 web servers, an SQL Server 2008 database box, and a Windows 7 client machine running Visual Studio 2010 Ultimate for load testing.  Richard started with the price tag: ~$12,000 for 2010 Ultimate, which is not a bad investment considering comparable load testing suites are typically priced in the 10k range.  And 2010 comes with an IDE as well!  (joke)  He fired up his web servers (both running a mock storefront ASP.NET web application), created a load testing project in Visual Studio, specified the testing parameters (there are many testing scenarios to choose from), connected the IDE to the target web server’s performance monitor, and let the test run for about sixty seconds.  When the test finished, Richard showed us many colorful graphs and explained that a) colorful graphs are a good way to convince your boss that you are being productive, and b) each colorful graph actually has extremely valuable data that can help pinpoint bottlenecks in hardware and software.  One thing that I was particularly impressed with is that Visual Studio also monitors the machine *performing* the load testing as well.  This is important because if the machine performing the testing can’t keep up with the rigor of the test parameters, the data might lead to wrong conclusions.  When Richard was finished I found myself wishing I had a spare 12k to drop on Ultimate, but all the loose change in my couch only amounts to about $0.70, so it will be a while.

For the third hour, Carl showed off pictures of his amazing recording studio, audio and video equipment, and the plethora of musical devices he keeps stashed away in his home.  Truly a man of many talents, Carl plays just about any instrument and sings too.  After making us wish we were all artists and not code monkeys, he showed us some hot features of Silverlight 4 and the Expression suite of tools, specifically video encoding and playback.  He demonstrated how Silverlight video had been leveraged during the Olympics to provide coverage for the duration, and how it is being used to provide an interactive experience with Sunday Night Football.  He pulled up the latest copy of Expression Encoder and demonstrated how videos can be “tagged” at certain time stamps with a piece of data (think CommandArgument in ASP.NET), and those tags could be intercepted during playback in a WPF or Silverlight application with a special event handler.  The data that each tag contains can then be used to instruct the application to respond to that moment of video playback (maybe show a slide, cause UI controls to change state, go to a URL in a browser, etc.).  For the grand finale, Carl demonstrated a Silverlight application that interacts with an attached webcam, which can identify a specific artifact that the webcam is “seeing” (in this case, it was a piece of paper with a specific symbol on it), and then replace that artifact with another image, a video, a textbox–essentially anything that could be rendered in Silverlight.  Carl held the paper up to his face and his face was instantly turned into a giant textbox that could even accept input from the keyboard.  Whenever he would move his face, the textbox would follow the plane of his head and adjust itself accordingly.  While textboxes are great fun, he mentioned that real-world applications already exist for such technology, such as on-screen annotations during a football game (the yellow highlighted line of scrimmage superimposed over the field, for example).

Once all presentations were complete, swag was distributed to lucky attendees by random draw.  The kicker was that they had to answer a trivia question before they received their prizes.  Question topics ranged from obscure facts about the .NET Rocks! podcast to identifying incorrect regular expressions for email validation.  Most people were fairly nervous at first but special “clues” were present in each question that made guessing lots of fun.

Special thanks to Carl, Richard, Kate, and the local St. Louis .NET attendees and sponsors who worked hard to make an enjoyable evening.  You guys are the best!

Red Gate releases Reflector 6

Lutz Roeder scored major points with developers the world over when he released his .NET Reflector software, a tiny package of TNT that lets the user examine compiled .NET assemblies, and even disassemble them (for debugging purposes).  I know it’s a tool I couldn’t live without.  I’ve used it countless times to examine APIs of core .NET libraries, as well as third party, ill-documented assemblies.  (What? No documentation? Perish the thought!)  In 2008, Red Gate acquired the rights to enhance and publish reflector, and so their first polished incarnation has wandered into the wild.  .NET Reflector 6 is still free, but an optional “pro” version may be purchased for a paltry $195.00.  Reflector has been upgraded to support the new .NET 4.0 framework, and both versions come with Visual Studio integration.  Reflector Pro includes the ability to decompile from within Visual Studio, and debug step-through capabilities as well.  (You know, for those times when you’re certain that Microsoft has screwed something up in their base class libraries because your own code is pristine.)  Add-ins for Reflector can be found on the Reflector Codeplex site in case the gun just isn’t big enough for you out-of-the-box.

Novell gives me hope, then dashes it to pieces

Well, not really.

I received welcome news today about Novell’s new iPhone development library, MonoTouch, which “allows developers to create C# and .NET based applications that run on the iPhone and can take advantage of the iPhone APIs as well as reusing both code and libraries that have been built for .NET as well as existing skills.”

Since I’m a .NET developer that hasn’t splurged on a Mac yet, I was nearly ready to shell out $399 for the MonoTouch Personal developer license, until I glimpsed the following caveat conveniently stashed at the bottom of the splash page:

“MonoTouch requires a Mac and Apple’s iPhone SDK to test on the emulator and deploy on the device. And you will need to be an Apple iPhone developer to deploy on the device.”

Why Novell?  Why do you hurt me so?  Why can’t I just develop an iPhone app on Windows, in Visual Studio?  It’s not really Novell’s fault though;  Apple keeps all of its technology on a tight leash.

I wonder if MonoTouch will represent a watershed in mobile device development, however.  Consider:

  1. Even though Mono typically trails the .NET framework by at least one major revision, it has the maturity of at least .NET 2.0, which is still in use by a significant number of .NET developers.
  2. The allure of C# development on the iPhone might just be the catalyst that justifies cross-platform development for many traditionally “Windows-only” developers.  The popularity of the iPhone, and the iTunes App Store, are certainly tempting prospects for freelancers who want to make some additional income.

It may be time for me to revisit my technology budget.