Matthew Podwysocki's Blog

Architect, Develop, Inspire...

  • ALT.NET Thinking From The Outside

    As I've noted before, Dave Laribee was recently interviewed by Scott Hanselman on Episode 104 of Hanselminutes.  The reaction that I've seen has been pretty positive from what I've seen.  It's great to see the ALT.NET message being spread outside the core believers group.  Many people can be turned off after a few discussions on the altdotnet mailing list and not get the real gist of what the group is about.

    Dave did a great job explaining the core principles of ALT.NET which are:

    • Use the right tool for the right job
    • Look outside the .NET community for new and different ways of solving problems
    • Get involved with the community through teaching and teaching
    • A good emphasis on agile methodologies
    • Design patterns and principles
    Scott Hanselman, during the interview, brought up the canonical  person of someone who is out in the field and maybe not at the cutting edge, the Chief Architect at the Nebraska Department of Forestry.  How would he explain ALT.NET to them?  Dave had a great answer on this, but as it is, the ALT.NET community is meant to be divisive.  Not in a bad way, but more in the way of that what ALT.NET is, is not for everyone.  If you're a person who just drags and drops controls onto a page and happy with the status quo and not doing anything to learn anything new, well, then ALT.NET is not probably for you.  Those who come to the table wanting to learn new things, well, that's what we're here for.  When I started the DC ALT.NET group, these are some of the things I had in mind.  We want to reach out to the Washington DC .NET developer community to spread the message, but to also show there are like-minded people who have that passion for bettering themselves.

    But, how do we convey that message to the development community as a whole.  That was a part of the conversation that was interesting.  And to me, I think we should have that "street kit" which includes such bare essentials as a manifesto (that we'll probably get to in Seattle), frameworks, design patterns, ways of spreading the message, etc.

    Christopher Bennage had a good wrapup of the show as well here.  I'd tend to agree that ALT.NET isn't about convincing, it's about conversing, having that conversation about what pains them and working through on a solution.  It's about spreading the community.  But, a direct command to learn Ruby, meh...  I think Scala has a few more things to offer right now which is why I'm chomping at the bit to get to more of it.

    A post by Leon on community though caught my eye recently.  What he says is pretty accurate.  I tend to think that what ALT.NET is preaching is what many communities such as the Ruby on Rails and Java communities have been doing for years with regards to design patterns, TDD and so on.  A lot of the innovation such as TDD frameworks, design patterns and such just hasn't come from the .NET community.  Many people wait on Microsoft to provide these things such as TDD frameworks (MSTest), Logging (Enterprise Library), O/RM (Entity Framework) and won't pay attention to the OSS world which I find an utter shame.  Instead, what I'd like people to do is take those frameworks and look what's available from the community as a whole and compare them, much as I have with Unity and some other IoC containers.  Yes, many people worry about licensing issues and that's something for your legal team to work out. 

    But, to his point, I'm glad he's learned Ruby on Rails and is happy.  In fact, I think it's great that he is expanding his horizons outside of C# which I think most developers ought to know a few languages and not just C#, VB.NET or Java.  For example, this past year I spent time learning Ruby and F#.  I plan on taking up Scala soon as well and maybe a couple of other languages.  In the past I was a Java, PHP and C++ programmer, so I've run the gamut.  You can take some of these practices back to your other languages and learn from the successes and the failures of each community.  It only makes you a better developer over time.  I think many of the innovations that happen in the .NET space should come from the outside, and not just from Microsoft. 

    Do I think it's having an effect?  Absolutely!  If you look at such frameworks as Unity, there is a lot of feedback being provided, the ASP.NET MVC framework, same way.  This willingness on both sides to engage is a wonderful thing and maybe to the point where "ALT" isn't the alternative anymore and instead the de facto standard.

    kick it on DotNetKicks.com

  • ASP.NET MVC Source Code Now Available

    As of yesterday, the ASP.NET MVC Release 2 source code has been made available on CodePlexScottGu made the source drop announcement earlier this morning.  Congrats to Phil Haack and the ASP.NET MVC Team for shipping the source code.  It's worth noting, it's not Open Source in the way that it's just a zip file and no outside patches are to be accepted, unlike IronRuby.  The plan going forward is to make incremental drops of the source code going forward.   

    As always, check out Jeffrey Palermo's MVCContrib project for contributions to the code base, which is open source.

    kick it on DotNetKicks.com

  • DC ALT.NET March Meeting Wrapup

    Another month and another highly successful DC ALT.NET meeting.  I want to thank Kevin Hegg for hosting the event as he was a very gracious host.  We had a better than expected turnout which was very cool.  It's good to associate names to faces after chatting, emailing and whatnot.  I also want to thank Phil McMillan for stepping up to the plate at the last moment to backfill for the lack of the scheduled speaker.  It's even more refreshing to not have any Death By PowerPoint (DBPPT) (TM).  I appreciate Phil's talk even more due to the fact that he had a laptop meltdown the night before, so we talked about concepts and implementations without showing any real code.

    What Did We Talk About?

    Our format that we follow is that we have one hour for our scheduled topic and the rest is Open Spaces.  Bring a topic and talk about it.  So, for the first hour, Phil led the discussion around interception facilities in Castle Windsor in regards to handling a Unit of Work pattern for a custom written WPF application.  There is a lot of headache that comes with undo logic in WPF controls, so using interception and the unit of work pattern can get around this, although not the cleanest code written to man.  Also, we talked about the headaches of registration inside IoC containers whether it be in code or in XML.  We talked about Binsor and whether that was an answer to the registration headaches caused by massive XML config files.  Craig Andera just loves bringing up Lisp and Lisp macros as they solve all programming problems ever invented by man. 

    The second hour was an open spaces discussion where we had pretty lively debate about:

    • Dynamic Language Runtime (DLR) and its uses and extensibility model
    • Design by Contract
    • Functional Programming with Lisp/Scheme, Functional Javascript, Erlang, and F# and the value proposition it has
    • Finding the right developer for your organization
    • TDD/Test First Development
    • ALT.NET Open Spaces, Seattle topics
    How We're Different

    Like I said before, we tend to be different than most user groups in the Washington DC area due to the fact that we're an Open Spaces event, for at least half of it.  We don't really do PowerPoint presentations, instead a more intimate environment where everyone participates.  I don't think anyone stayed silent during the meeting.  Instead of being lectured to, you're part of the conversation.  We want passionate developers to attend, those who are looking for a better way.  It's even effective when not looking at code, nor slides for any given product.  I feel we can augment any discussion from any user group in the DC area, and not here to compete, instead compliment them with a more intimate and passionate discussion.

    Where We Go From Here

    After the March meeting, we're looking to hold the next meeting the week after ALT.NET Open Spaces, Seattle.  That should bring some lively discussion and wrapup from the event.  We also look forward to having Jay Flowers make it to the event to discuss Continuous Integration and CI Factory.  Stay tuned for details on our next meeting.  April is going to be a busy month for at least me with the CMAP Code Camp on April 12th, speaking at RockNUG and ALT.NET Open Spaces, Seattle as well as our own DC ALT.NET Meeting.

    Wrapping It Up

    If you're interested in a better way, to discuss .NET or related topics and you're in the ALT.NET mindset, then come and join the conversation.  We're always looking for passionate individuals to come and join and be a part.  Join our mailing list and find out more here.

    kick it on DotNetKicks.com

  • Adventures in F# - FringeDC User Group

    During my Adventures in F# series that I've been posting, I've always wondered where the interest in these languages come from.  Sure, we have a lot of user groups in the Washington DC area, just to name a few that I've been to or belong to:

    But, what I was noticing is lack of where the true language geeks hang out.  Craig Andera pointed me in the last DC ALT.NET Meeting to a group that does just that while he was looking at Lisp and Scheme in the past year.  This group is called FringeDC which is not interested in the mainstream languages such as C#, C++, Java, Ruby and so on.  Instead they focus on fringe languages such as Lisp, Scheme, Haskell, Erlang, Prolog, OCaml, Squeak and so on.  I'm sure we could pile F# and Scala on that bandwagon as they both are fringe-ish and not mainstream just yet.  If you're in the Washington, DC area, go ahead and check them out.  I'll be sure to attend some of these when time permits.  And if they're interested in some F# stuff, I'm sure I could deliver.

    kick it on DotNetKicks.com

  • Looking at DSLs in .NET

    As I've mentioned in recent posts such as here, here and here, I've been very interested in Domain Specific Languages (DSLs), especially with regards to F# and the DLR as well.  I recently re-listened to Software Engineering Radio Episode 52 with Obie Fernandez discussing DSLs in Ruby.   One of the things that attracted me to Ruby for this was the flexibility of the syntax for closures, mixins, etc.  Anyhow, it's a good listen and if you're new to the subject, you should give it a go.  Also, there is a slide deck of DSLs in Ruby which accompanies this episode which can be found here

    So, of course this gets me excited about the possibilities of seeing such things in IronRuby.  After seeing John Lam's presentations at MIX08 and listening to him on various podcasts, I'm excited that they are making such progress and hopefully get it into our hands soon.

    But, before we get too deep into things, I just want to take a step back and look quickly at what DSLs are.

    Internal and External DSLs?

    So, what are DSLs?  Well, to put it succinctly, it's a small language that's used for a very narrow task.  You can think of these as languages specific to a domain such as medical claims processing, stock trading and so on that only have meaning there.  These languages mean very little outside their problem domain and probably wouldn't make sense to anyone outside.  I'm very well aware of such things as I've worked in the medical claims processing industry and their terms, calculations and so on are very specific and to solve the problem well, it's best to suit the language best for expressing solutions.

    Martin Fowler wrote an article entitled "Language Workbenches: The Killer-App For Domain Specific Languages?" in which he talks about the history of DSLs especially in the Lisp world, but until now really haven't caught on.  Martin argues that XML structures such as configuration files, and so on qualify for that status, due to the fact that it is readable by a human and probably a domain expert as well.  But Lisp is well know for the Lex/Yacc parsing and expression trees and so on.

    Now the real interesting part comes in when we talk about internal versus external DSLs...

    External DSLs, quite simply, are those languages that are not in the same language as the main application itself.  This means that I could be free to write any free-form code I wish in order to suit my domain specific need.  This means that you need to write parsers and then ultimately would need to have a translation boundary between your DSL and your application.  This is where I think something like the Dynamic Language Runtime (DLR) could come into play.  What I mean by that is that if you write your language parser for the DLR, and I'll get into that shortly.  There is a bit of overhead with this of course, plus a good debugger and IDE, but with time and patience things like this can be overcome.  Extending such things as #Develop to encompass those pieces is feasible.

    Internal DSLs, on the other hand, are the little languages you can create inside your current language of choice.  Now languages such as Lisp, Ruby, Scala, Boo, and F# seem a bit more suited for these than the mainstream languages of C++, C# and Java.  Of course one of the bigger obstacles is the pesky curly brace which Ruby allows you to discard.  F# doesn't have a concept of this either, and instead the indentation scopes the values and functions and so on.  Martin has an interesting DSL written in Java that's interesting and could be better applied in different languages. 

    Thinking About The DLR

    As I said before, I'm pretty excited about the DLR and the flexibility it can give me as a software engineer looking for new and better ways to solve my customer's problems.  Not only that, but I'm a language geek at heart, what can I say?  I've posted several items on building on the DLR in the context of external DSLs as well as writing custom compilers for .NET.  Projects such as Irony also appeal to me in that way. 

    If you want to play around with the DLR, you can get it in one of two places, the IronPython download on CodePlex or on RubyForge with the IronRuby project.

    Martin Maly, a member of the DLR team has continued his posts about Building on the DLR.  He took some time off to work on some DLR related issues and now is back with some more posts. Let's continue where we left off last time:

    So, as you can see, the DLR has progressed quite a bit, and maybe creating that DSL using the DLR isn't so far off after all.  That is of course if you understand expression trees and so on.  But, the great part about the DLR is that they ship the ToyScript source code with this for you to play with and learn from when you download it.

    DSLs In Boo?

    Oren Eini, aka Ayende, has been working on a book about DSLs called "Building Domain Specific Languages in Boo".  Recently, he posted about some sample chapters now available online with the source code.  I highly recommend that you at least give it a look.  You now have access to the Early Access Edition, and of course you can buy it online.  It'll be interesting to see Ayende at ALT.NET Open Spaces, Seattle to see if he wants to cover more of this stuff. 

    If you're not familiar with Boo, it's one of Ayende's preferred languages.  Such tools as Binsor (The DSL for Windsor) were written in Boo.  If you're not familiar with the language, it has very similar syntax to Python and formats very nicely.  This easily fits Martin Fowler's category as an external DSL.  #Develop has some support for Boo to make it a first class language in the .NET family.  It also ships as part of the Castle Project.  Anyways, a quick sample of Binsor makes it look like a nice DSL for type registration in Castle Windsor in Boo Script:

      import Rhino.Commons
      logger = Component("console_logger", ILogger, ConsoleLogger)

    Check out the first chapter of Ayende's book which is available free online and explore it yourself for DSLs.

    DSLs in F#?

    Another part that had me intrigued was the possibilities of not only Boo to do this, but F# as well.  Robert Pickering covers this in his book, Foundations of F#.  If you pay attention to Chapter 11, he covers DSLs in F# and gives a few examples of how you can do so.  To me, it's pretty powerful because you have a lot of the built-in features of a functional programming language such as lists, pattern matching and so on.  Such examples as given are such things as the arguments parser in F# that is described in the Arg class in Microsoft.FSharp.Compatibility.OCaml namespace.  This allows you to parse well known data structures as first class citizens.  Martin Fowler also gave such an example from the article I quoted from above.  F# lends itself quite well to DSLs in regard to support for lambda expressions. 

    Don Syme also covers these topics in his book Expert F# in Chapter 9.  This covers more language oriented programming techniques, but you can scan some information about building DSLs in F#.  Some interesting parts of this come down to Active Patterns which I covered partially yesterday.  In the coming weeks, I hope to post some of my forays into this, taking some samples from the Ruby community and applying some of the same functionality in F#.

    Conclusion

    There is still much yet to be covered in this topic of DSLs in .NET languages.  We can go on and on with regards to internal and external DSLs and argue about which language is suited for each.   But in the coming weeks, I hope to take some samples and show how they can apply cleanly in F#, and probably run into some language problems where it might not be the best fit.  But, that's the fun part about it.

    kick it on DotNetKicks.com

  • Reminder - DC ALT.NET Meeting March 19th

    Just a reminder, we will be holding it tomorrow, March 19th from 7-9PM.  The meeting this month will bring ALT.NET to Arlington, Virginia.  I want to thank Kevin Hegg for hosting this event.  Unfortunately, Jay Flowers will not be able to attend, so instead we will have myself and Phil McMillan presenting IoC containers and Interception with Castle Windsor.

    At our last meeting, Stelligent hosted our event in which we discussed a lot of great topics.  You can read a wrapup of our last meeting here.  Our format is as follows, the first hour or so is the topic at hand and then the second hour or whenever the talk is done is for Open Spaces.

    Looking for Sponsors

    As always, we're looking for sponsors for our events.  We bring a lot of passionate developers to your site and we feel we can bring a lot.  Sponsorship opportunities are always appreciated!

    Who We Are

    Are you a developer who always keeps an eye out for a better way? Do you look outside the mainstream to adopt the best practices of any development community, including Open Source, Agile, Java, and Ruby communities? Are you always looking for more elegant, more simple, more maintainable solutions? If so, then you might be an ALT.NET practitioner!
     
    This group follows the Open Space Technology model.  In Open Space, a facilitator explains the process and then participants are invited to co-create the agenda and host their own discussion groups.  So, we'll take a vote and present the topics.  We're in the pub-club mind occasionally, so it's not surprising to find us geeking out a bar...
     
    This model follows the four basic principles:

    • Whoever comes are the right people
    • Whatever happens is the only thing that could have
    • Whenever it starts is the right time
    • When it's over, it's over
    Time and Location:
    Tuesday, Marh 19th 7:00 PM

    Arlington, VA.  See thread for details.

    Come, participate, and make your voice heard!  Come meet passionate developers like yourself in the active discussion.  Hoping for a great turnout...   If you haven't signed up for our list, go ahead and do that here.

    kick it on DotNetKicks.com

  • CMAP Code Camp April 2008 Registration Open

    As mentioned in my previous post about my speaking schedule, I am helping organize the ALT.NET track at the CMAP Code Camp.  I plan to be speaking on a few topics and will get that posted when the schedule is finalized.  Either way, it should be a great time and bringing ALT.NET ideas to a new audience is always a good thing.  I feel there is a lot of momentum around the movement right now with the help of the "What is ALT.NET?" MSDN Magazine article by Jeremy Miller and Dave Laribee on Hanselminutes.

    Anyhow, back to the topic at hand.  Registration is now open for the CMAP April 2008 Code Camp. Space is limited for this FREE event, so register soon. Click here to register.

    Central Maryland Association of .NET Professionals (CMAP) will holding its Code Camp 2008 Spring Edition on April 12, 2008.  The Code Camp will be held at the Loyola College Graduate Center in Columbia, MD from 9am - 5pm.

    Great source of information for FREE, with a FREE lunch, and chances to win great giveaway items, what a great way to spend a Saturday...

    http://www.cmap-online.org
    http://www.cmapcodecamp.org

    kick it on DotNetKicks.com