Three Is It

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

It is far easier to make war than peace.
Georges Clemenceau
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 2010: Day 2

It’s been almost a month since the CodeMash event…let’s see if I can still remember what happened on that second day.

 

Session: Oh, Crap!  I forgot (or never learned) C!

In my case, it’s kind of both: I took a single C/C++ class many, many years ago in college.

Chris Adamson led this session.  Chris is an active iPhone developer and said his primary motivation for proposing this session to CodeMash was the fact that Apple decided to create  Objective C as the development language for the iPhone.  Paraphrasing Chris, “the big-wigs at Apple must’ve gathered in a room and asked the question, ‘on what programming language can we base our development language for the iPhone?  I know!  Let’s base it on C.  Everybody knows C!’”  Unfortunately, nowadays, many people don’t know C—hence, the need for this session.

C was developed in 1972, primarily for the Unix platform.  The definitive book on the language is The C Programming Language by Kernighan and Ritchie.

LangPop.com still lists C and C++ (not to mention Java, a language inspired by C) as the most popular of development languages.  The Linux kernel and tools like SQLite and OpenGL have been written in C (according to the Free Software Directory).  Most interpreters are written in C.  Much of the iPhone is written in C.  Therefore, we should learn C!

What makes C great?  It’s portable: most OSes include a C compiler.  It’s performant and it’s minimal.

There’s no garbage collection in C, so you should be familiar with commands like malloc() and free().  The language is compiled, not interpreted, code.

C has the concept of a header file (.h extension) and the source file (.c or .cpp extension).  The header file contains functions and variable you want others to see—sounds like a contract to me.  The source file contains the actual implementation.  You use the #include syntax to include the header file in your source file.

Types in C include:

  • short, int, long, long long
  • float, double
  • char, bool
  • void

The dreaded beast of C is the pointer, but Chris addressed this pretty well in his presentation.  Overall, this was a nice refresher of concepts I learned years ago. 

 

Session: Looting Design Ideas from the World of Warcraft

Here was another instance when I was torn between two sessions: this one and one entitled RESTful Interfaces to Third-Party Websites with Python (by Kevin Dahlhausen).  There are many sites I’d like to scrape for data and the RESTful session might have been the ticket for that.  Nevertheless, I thought the Warcraft session my be informative since I have a project in mind that will probably need some good GUI design.  So, off to the Warcraft session.

I know vaguely what the WoW game is but have never played it.  Jason Follas went through several UI shots and the WoW architecture and pulled out some thoughts as to why the game is so successful—12 million subscribers at present.

The WoW interface is pretty busy with tools, meters, and other widgets; however, it appears quite customizable.  Here the key concepts Jason outlined to craft a successful interface:

  • Tool tips on the controls
  • Keyboard shortcuts
  • Customizable keyboard shortcuts
  • Add/remove widgets
  • The ability of the user to customize the UI is more important than developing the perfect layout
  • As a developer, you should deliver a simple, clean interface out-of-the-box, permit customization, and provide keybinding/shortcuts that can be customized

WoW is also extensible, with third parties offering ways to extend and alter the behavior of the game (like this one).  Extensible apps like WoW should allow the behavior of the app to be modified without requiring a recompile.  Allowing an app to be extensible give the community some “skin in the game” and can be a source of free research & development from the community.  Extensions in WoW can occur in many ways:

  • Macros – chaining multiple commands together under a single command
  • Public API – events (using the Observer pattern), methods, and UI widgets
  • Add-ons – a.k.a. “mods”
  • Scripts – via Lua, a C-based language with a small runtime

In .NET, extensibility can be achieved through the DLR (by using the ScriptRuntime class, for instance) or my using MEF.

From a data perspective, Jason talked about the importance of caching, logging (log everything), and making web services available.  Apparently, it is a popular practice for WoW players to grab the log file pertaining to a particular battle and run it through an analytics engine so that they can see which aspects of the fight they were weak in and learn to improve their play.

On the social side, Jason discussed chatting, guilds, game masters, and presence awareness.  The makers of WoW actually pay people to play the game as game masters.  As a player, you may occasionally encounter a game master who will come up to you and ask you if you need any help.

Finally, Jason talked a little about money aspects of the game.  WoW is successful, in part, because it focuses on a subscription model.  The software itself is largely free—you just have to maintain a monthly account to play the game.  Making recurring payments easy is a way to retain subscribers.

 

Lunchtime Keynote: The Mother of All Bugs

Popular author Andy Hunt gave the last keynote of the conference.  And what is the mother of all bugs?  Why our brain, of course!  We’re neither logical nor rational.  We make processing errors, we can’t predict a most outcomes (see The Black Swan), and we tend to allow contextual influences to slant our decisions.

Andy enumerated many cognitive biases that plague humanity.  These include:

  • Anchoring/arbitrary coherence
  • Fundamental attribution error
  • Need for closure
  • Confirmation bias
  • Exposure effect
  • Hawthorne effect – on average, it takes 3 weeks before a practice becomes habitual
  • Relativity
  • Free isn’t cheap

Extending upon contextual influences, Andy noted that different and competing personality traits play a factor (Myers/Briggs work has identified 32 different personalities among the masses).  Deeply held values—what you value and why—is also a strong factor.

Andy also looked at our buggy brain problems at a generational level.  He described four generational archetypes:

  • Prophet – a generation emphasizing vision and values
  • Nomad – a generation valuing liberty and survivalism
  • Hero – a generation associated with community
  • Artist – a generation focused on pluralism

Andy then overlaid these archetypes with historical generations:

I always find it interesting to see how researchers attempt to identify generational groups.  Much of the time, though, I think it’s pretty silly: everyone throughout time is unique and individualistic—shaped by the events and time in which he was born, sure, but also shaped by his geography, community, and biochemical makeup.  Or maybe that’s just the Nomad in me talking.

The final thought Andy left us with to help mitigate the bugs we create is: Trust, but verify.

 

Session: Introducing the MVVM Pattern

Again, I found myself choosing between two interesting sessions: this one and one entitled IronPython with ASP.NET (Chris Sutton).  Then I considered the fact that Microsoft appears luke-warm in their support of IronPython and thought my time would be better spent learning more about MVVM.

Brian Genisio ran this session.  So, MVVM (Model-View-ViewModel) is this variant of MVC where you have a ViewModel class sitting in between your View and your Model.  A binding relationship typically exists between the View and the ViewModel.  The View can also push actions to the ViewModel.  Data and events can be shared between the ViewModel and the Model.  You can actually have your XAML reference your ViewModel as such:

<Window.Resources>

   <ViewModels:blah x:Key=”ViewModel”>

For more details, Brian listed some of the popular opinion leaders on patterns and especially MVVM:

He also enumerated some “mini-patterns” that are relevant in this space:

  • NotifyPropertyChanged via the INotifyPropertyChanged interface
  • Command Pattern (Delegate Command)
  • Event Aggregator (Publish/Subscribe similar to the Mediator pattern)  [Brian noted that there are problems with the Observer pattern.]
  • Attached Behaviors (eg. command binding)

Brian laid out several guidelines for implementing MVVM, including:

  1. Get your code out of the code-behind
  2. Bind UI inputs/outputs to the ViewModel
  3. Implement INotifyPropertyChanged
  4. House “behavior” in the ViewModel
  5. Refrain from maintaining ViewState in the Model

Some frameworks to help you get started using MVVM include:

Testing frameworks to help you better test your MVVM components include:

 

Session: Analyze and Optimize your .NET Web Application

At last, we reach the final session of the conference: James Avery leading us down the jagged path toward ASP.NET optimization.  James geared his presentation largely around his own personal experiences optimizing web applications.  He’s found that you shouldn’t code with performance optimization on your mind but rather just code then measure afterwards: build & measure.  When you measure performance, you measure, then modify, then measure again.

In his estimation, there are three tactics for optimization:

  • Optimize the code – this is usually not the problem
  • Optimize the database and/or network
  • Cheat (by caching data)

His presentation, which was basically all coding/optimization, followed these steps:

  1. Measure the application (using Pylot)
  2. Profile the application (using ANTS Profiler)
  3. Profile the database (using SQL Profiler)
  4. Run Pylot again and look for any improvements

At one point, James dove deep into LINQ and lazy loading versus eager loading.  There are advantages to either approach, particularly concerning optimization, but I don’t remember exactly what they were.  I believe, in the demo’s case, that he wanted LINQ to do eager loading and he had to dive into the guts of it to make it work.  He also mentioned something about Plinqo.com, but don’t remember exactly what he said about that, either.

Regarding caching, James said that you basically have two options:

  1. Output caching, where you deal with caching the page
  2. Fragment caching, where you deal with caching data

For optimization purposes, fragment caching is usually the ticket.  Typically, you use HttpContext.Cache to do this.

 

That’s It

Whew.  That’s the end of my notes.  Man that was painful, but chances are, some of this might help me down the line.  As I’ve said before, CodeMash is cheap and relatively close…so it’s certainly not a bad deal, although it does place some added stress on my already tight domestic schedule.  Will I do it again next year?  Don’t really know: I’m changing roles at work which will take me almost entirely out of software development, so the conference may no longer be relevant to me this time next year.  I’ll just have to wait and see.

Be the first to rate this post

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

Tags:
Categories: Technology Blog
Posted by Brad on Wednesday, February 10, 2010 10:40 PM
Permalink | Comments (0) | Post RSSRSS comment feed

CodeMash 2010: Day 1

Well, another CodeMash is in the books and here is my write-up of the sessions I attended.

 

PreCompiler: Not to Be

Again this year I skipped the PreCompiler—it just wouldn’t have been logistically feasible.  Joe O'Brien and Jim Weirich, again, did the Ruby Koans—which, one of these days, I will step through on my own.  Jeremy Miller did a session on Advanced Presentation Patterns that would have been cool to attend.  And Jon Kruger led a session entitled Software Engineering Fundamentals Workshop: OOP, SOLID, and More that looked quite interesting.  But, alas, it was not to be.

 

Opening Keynote: Mary Poppendieck, The Five Habits of Successful Lean Development

Mary, and her husband Tom, are rockstars of the Agile/Lean community.  Agile/Lean is just something I haven’t grokked yet—I’d probably have more success understanding the process if the styles were practiced at my company (instead, we’re more of an 80s flashback to the days of RUP and Waterfall). 

Anyway, Mary’s Five Habits were: Purpose, Passion, Persistence, Pride, and Profit.  She went through several examples of companies that practiced one or more of these habits and highlighted the subsequent financial and market successes that resulted.  One funny moment was when she defined Cost Center Disease: when a company or division focuses on cost reduction to show increased profit instead delivering value.  Several heads nodded in understanding.  I also liked the quote she mentioned: “if you never fail, you’re not trying.”

Even though I don’t see Agile/Lean practices in my future, I did like what she had to say about practicing your art—whether that’s Agile/Lean mastery, vanilla software development skills, musicianship, bending nails, etc.—to the point of becoming an expert in your field.  She said that it takes 10 years or 10,000 hours of deliberate practice to gain expertise in your chosen field(s).  Deliberate practice includes the following challenges:

  • Identifying the skill that needs improving
  • Devising an exercise(s) to improve the skill
  • Practice
  • Obtaining feedback
  • Pushing your limits (like this, for instance)
  • And regular, intense practice

Elements that can facilitate your Deliberate Practice include:

  • Finding a teacher/mentor
  • Crafting new challenges
  • Getting feedback
  • And good ‘ol dedication

She talked about Improvement Katas—I always find the use of that term by technology geeks amusing because most of those folks wouldn’t survive five minutes in a real martial arts dojo.  Nevertheless, her points were right-on regarding how to become an expert in your chosen field:

  • Visualize what perfection looks like
  • Develop a first-hand grasp of your current situation
  • Define target conditions on the way to perfection (small, measurable milestones on the way to your goal)

I have a lot of goals for 2010 and I will definitely be looking back at these notes to construct an appropriate game plan to achieve each one.

 

Session: What Makes Ruby Different?

It seems like all of geekdom is buzzing—and has been buzzing for a while—about Ruby.  What gives?  Inquiring minds want to know.  So, I attended this session led by Marc Peabody, Joe O’Brien, and Leon Gersing

The format went something like this: Marc would present Java code to perform a particular operation, then Leon would present C# code to perform the same operation, and finally, Joe would step in to show how Ruby makes both technologies look stupid verbose/cumbersome since it can perform the same operations with significantly less lines of code.

The trio targeted six main areas:

  • List Iteration—you should be able to tell a list what it should do, not have to ask a list for its data and then perform operations on it.
  • File I/O—File I/O operations in Ruby are simple and to-the-point: file.open(“myFile.txt”) do …
  • Interfaces/Contracts—No interfaces or compiler-time checking in Ruby.  Duck typing is king and unit testing is critical.
  • Config Files/Annotation—Don’t remember exactly what they said about this, but since everybody now seems to hate XML config files, I’m sure it was something about the badness of that.
  • Utility Classes—Utility classes in Ruby smack of a domain specific language (DSL) which is quite cool and hip.
  • Dependency Injection—Again, my notes are scant, but I believe the three said that, while DI buys you much in our statically-type languages, it doesn’t offer much to Rubyists and most folks don’t even go there.

 

Session: Maintainable ASP.NET MVC

Chris Patterson ran this session.  I’m not exactly sure what I was hoping to get out of this one—I’ve been to a few ASP.NET MVC sessions before (including the Firestarter event back in October), so I feel like I’m at the point where it’s time to stop listening and start doing.  My notes, or lack-thereof, kind of reflect that.  One thing I could stand to learn more about are the classes and methods commonly used in the server-side script in a View.  I noted that there’s an Html class with a BeginForm method (guess that’s called a FormExtensions class/library?) and that there’s a related Ajax class with its own BeginForm method (presumably, to ajaxify the form).  The FormExtensions stuff will definitely take some getting used to.

 

Lunchtime Keynote: PHP and Other Adventures in Open Source

I am all about making the most efficient use of my time as possible.  I subscribe to over 80 different podcasts and listen to most of the shows while commuting to and from work, going for a run, mowing the lawn, or doing other sundry tasks.  I pack my lunch so I can eat at my desk and meander through Google Reader at the same time (and to save money).  So I’m quite sympathetic to why the CodeMashers would schedule key note speakers while we eat.  I just feel bad for the speakers as the rest of us clang silverware and have moderately loud table conversations.

The subject of one’s keynote also certainly has an effect on the level of attention he’ll receive.  In this one, Hank Janssen discussed PHP, Linux, Open Source, and Microsoft.  Mostly, it was about Hank and his work at Microsoft to get the company to be more open source-friendly.  Sorry, but a little bit of a yawner for me.  I do appreciate the effort, though: for instance, I am a big fan of WiX, Microsoft’s first open source project.

 

Session: PowerShell—Ten Things You Need to Know

I was quite torn between attending this session and the session Photoshop for Engineers: Going from PSD to HTML (by Joe Nuxoll).  I’m pretty bad at the UI side of development and need all the help I can get.  Photoshop is Greek to me, so I thought that the Photoshop session might be pretty enlightening.  Nevertheless, my inner voice of reason (one of them, anyway) got the better of me, saying: “you do framework development, not UI.  Whaddya gonna do with a session on laying out cool graphics on web pages?”  So, I went to the PowerShell talk.

Matt Hester and Aaron Lerch tag-teamed on this one.  I didn’t make a list of their Top 10, but here’s a list they had on why PowerShell’s important:

  • Rich scripting
  • Bulk operations
  • Interactive
  • Task Automation
  • Object-Oriented

When should one resort to PowerShell?  When you need to perform consistent, repeatable tasks.  Additionally, when you need to interact with Active Directory (just AD or any LDAP-compliant container?), the Registry, WMI, and other such repositories.

One of the attractive features of PowerShell is its consistency.  PowerShell commands are structured all in the same way: command (verb-noun) then parameters (name and argument).  For instance:

get-service –name “*net*”

The get-service portion is the command, structured in verb-noun format.  The –name “*net*” portion represents the parameters of the command, in a name/argument format.  Nice.

Let’s see…what else?  Matt and Aaron made heavy use of piping command outputs get-member.  This is a basic PowerShell technique to familiarize yourself with the members of the object(s) produced by your initiating command, but I seem to always forget that command.  Also, I must remember format-table and format-list, used to manipulate the console output produced by PowerShell commands.

They didn’t differentiate much between version 1.0 and 2.0, but a feature they noted that’s new in 2.0 is get-module and import-module.  A great many Microsoft products—BizTalk, SharePoint, Exchange Server, etc,—are beginning to ship with PowerShell modules filled with cmdlets designed to let you easily administrate the particular product through PowerShell.  In order to use these new cmdlets, you have to import their modules into your PowerShell session.

One feature they talked about which might help me with some of the work I do in the security space is the PowerShell Providers: get-psprovider.  PowerShell ships with several providers that are designed to help you navigate certain data repositories like your file system, the Registry, etc.  There’s one provider that will let you navigate the certificate store (simply by typing cd cert:).  I must investigate that further.

One of the last things they talked about was writing your own cmdlets in C#—inheriting from either PSCmdLet or CmdLet—and adding user interfaces in front of your PS script.  There’s a new feature in PS 2.0 where you can output data to a sortable grid in a dialog—very similar to LogParser.  I wonder if they’ll borrow any other features from LogParser.

Probably the biggest reason I attended this session over the Photoshop session was that Matt and Aaron promised to talk about Psake.  I had been messing with builds recently, was getting frustrated with something (don’t remember what), and wanted to explore other options besides the conventional MSBuild and Nant options.  I remembered hearing about Psake, so I downloaded it and started to play with it, but got nowhere fast—couldn’t find much help online, either, so I was looking forward to hearing Matt and Aaron talk about it.  Well, it was quite a let-down: Psake appears to be nothing more than a skeleton script where you fill in all the details about how to build your app.  I guess that makes the approach more technology-agnostic, but the lazy side of me was hoping for a turn-key solution.  Anyway, at least I have a better understanding of how to use the project going forward.

 

Session: Refactoring the Programmer

I could have sworn this was a Jeremy Miller session.  I wanted to attend at least one of his presentations.  Thought this was the one.  Guess I can’t read.  Anyway, Joe O’Brien did this one.

I usually try to avoid the touchy-feely type presentations.  The ones that target the softer skills.  I tend to think I’m pretty good at the interpersonal and communicative-type skills: if not, I’m probably not going to learn those skills from geeks, anyway.  Nevertheless, here are some of the take-aways I jotted down from this session:

Joe said, “you are responsible for your own growth: invest in yourself.”  Makes sense.  Who else would be looking out for me?  He then went into ways that he has invested in himself over the years.  He talked about his leading technical indicators.  One of his indicators is attending conferences (the realm of the alpha-geeks).  This helps him answer the question: “do I need to spend more time with [enter technology of the moment]?”  If he hears of a technology discussed more than four times, he should look it up (the Rule of 4).  If he hears of a technology discussed more that eight times, he should start playing with it (the Rule of 8).  He also tries to pay attention to the speakers at the conferences he attends.  He’ll make a judgment as to whether he should follow a given speaker via blog or twitter.  Of the folks in the industry he follows, Joe has developed an inner circle and an outer circle.  His inner circle is small—four to five individuals.  These are folks (like Neal Ford) he trusts to lead him through the technology mine field.  His outer circle is a collection of many others who sometimes give great advice but must also be viewed with a degree of skepticism.

Joe also suggested that developers should endear themselves to their communities.  They can do this in many ways: participate in an open source project, attend and participate in the local user groups, attend conferences, and even get into things like podcasting or webcasting.  [note to self: Joe also mentioned a great way to learn Ruby was to take the quiz at RubyQuiz.com]  Finally, Joe suggested three books for helping you kick your programming career into gear:

 

Session: Testing ASP.NET Applications Using Ruby

At work, one of my current pain points is testing around my component’s frequent use of HttpContext.  Were I building on .NET 3.5 SP1, I would just refactor the component to make use of HttpContextBase, an abstraction of HttpContext that can be easily mocked.  Unfortunately, other requirements prevent me from moving up to that version, so I now have to think of other ways I can isolate these web components so that I can better test my code.  Is there any way Ruby can help me? 

Ben Hall presented this session.  What was funny was that I had just gotten through listening to a .NET Rocks interview of Ben on the drive up to CodeMash.  Now, here he was, to talk more about testing in person.  Now that’s pretty cool!  [note to self: Ben did write a book called Testing ASP.NET Web Applications that I may want to check out at some point.  He also put up an accompanying website.]

Well, the short answer is, no, Ruby (or, rather, IronRuby.NET) can’t help my particular situation.  Nevertheless, it is pretty fascinating what you can do with the platform and how you can use it to unit test your .NET binaries.

At some point, Ben went into various tools he uses or had used for testing.  Here’s the list I wrote down:

Ruby is still Greek to me, but here is some code I wrote down that I found interesting:

  • Setting a reference path?  $:  << ‘../someDir/bin’
  • Setting another reference path?  $:  << ‘../lib’
  • Bringing in a .NET assembly into your IronRuby code: require ‘myAssembly.dll’
  • Instantiating a class of a .NET assembly in IronRuby:  describe MyNamespace::MyClass.new

 

Evening Entertainment: Enter the Haggis

Normally, the evening entertainment at CodeMash consists of a bunch of relatively-drunk geeks standing around talking about technology until 2am.  Personally, I don’t find that very entertaining; however, I normally mill around for a few hours before retiring for the evening.  BTW: I wish I would have made this suggestion on the CodeMash suggestion board—we need an alternative to the raffle ticket thing.  When you register, you’re given a beer ticket (ticket for one free beer at the nighttime party).  Throughout the conference, you might receive other tickets from various vendors for prize drawings at the end of the conference.  I happened to have lost all these tickets over the course of the day.  Kind of a bummer.

Anyway, this year, the guys at EdgeCase actually hired a band, Enter the Haggis, for the evening.  Although from Canada, they’re all about the Irish rock, combining bagpipes and fiddle with guitar and drums.  The music was fantastic.  I would have bought one of their CDs had I not left my money in my room.  Regardless, they did a great job and it was a nice way to close out the evening.

Be the first to rate this post

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

Tags:
Categories: Technology Blog
Posted by Brad on Monday, January 25, 2010 10:21 PM
Permalink | Comments (0) | Post RSSRSS comment feed

CodeMash 2010

Yep.  I’ll be attending yet again for another fun-filled few days of codemasherie.CodeMash2010

Be the first to rate this post

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

Tags:
Categories: Technology Blog
Posted by Brad on Monday, January 11, 2010 9:12 PM
Permalink | Comments (6) | Post RSSRSS comment feed

CodeMash 2009: Day 2

Key Note Speaker: Eric Meyer

Eric Meyer headlined the morning keynote for CodeMash 2009, day 2.  I think the title of his talk was something like, “How Javascript will Save the World.”  He talked about innovations using Javascript to play flash movies and to standardize fonts on the web and he talked about how Microsoft browsers tend to screw up the standardization effort.  He also mentioned other cool Javascript efforts like Nifty Corners and Bluff.  A problem he sees in this space, though, is that all these efforts invariably produce new Javascript libraries: why not have these libraries parse and process CSS instead?

Like the other keynoters, Eric was quite entertaining and obviously a thought leader in web UI.  I must confess that I am far out-of-the-loop on such things.  He briefly covered microformats mentioning some Yahoo group that seems to be involved in the movement.  Finally, my notes mention ObjectiveJ, 280slides.com, and Capuccino.  I suppose these are more innovative web UI platforms.  Moving on…

 

Session: IronRuby In The Real World

Michael Letterle led the talk on IronRuby in the real world; however, based on his presentation, I don’t see how it could be ready for the real world—or at least the real business world.  His demo began with a C# desktop application.  We were to pretend that the original developer left and no source code could be found (and, I guess, .NET Reflector didn’t exist either…or maybe the code was just obfuscated).  At any rate, Michael showed how you could just overlay the desktop app with an IronRuby executable to change the behavior of the desktop app and implement new business requirements.  That is pretty cool, but I just don’t see how that would be a practical approach to solving the business problem. 

Some online resources for IronRuby include Jimmy Schementi’s blog, the grand wizard himself John Lam, and Ruby itself.

 

Session: Language Oriented DDD

It seems that everywhere I turn, someone is talking about Domain Driven Design (DDD).  I guess, much like Eric Meyer’s Javascript, DDD will save the universe.  David Laribee led the only talk with DDD in the title, so I thought I’d better attend.

David kicked things off with a reference to the book The Design of Everyday Things—a book that points out examples of good and not-so-good constructions.  Later on, he launched into a discussion of various patterns:

  • Layered Architecture; eg. MVC
  • Application Services, which should not be “transactional” (as in database transaction?), vs. Domain Services, which should be small and focused
  • Model Controller; eg. that which connects a model to a queue
  • Published Language
  • Aggregate Root
  • Routing Method
  • The Repository
  • Collocated Specifications, used for entity matching requirements
  • Anti-Corruption Layer – the use of explicit interfaces

He also enumerated a few anti-patterns:

  • Anemic Model
  • Ambiguous Command – opposing the use of explicit interfaces
  • Reflective Mappers

I’m sure DDD is much more than several five dollar words, but I’ll let you know for sure when I’m done reading the book.

 

Session: A Programmers Guide to User Experience

My UI skills stink.  I know this.  However, I am desperate to eliminate my UI handicaps.  If any of you know of a good class, book, webcast, or some other medium that could help me in this effort, please let me know.  So, in my continuing quest to become a better UI guy, I attended Josh Walsh’s presentation. 

Josh is a professional UI designer-type guy for Design Interactive.  He walked through how he meets with clients to develop user interfaces that meet their needs.  For one thing, he conducts interviews: what does the project mean to you, Mr. Customer?  He defines scenarios and processes.  He builds a specification document of these scenarios and he writes out tasks and groups them accordingly.  He does a lot of hand sketching, too, on graph paper (with a Sharpie).

Next, he performs some tests with the users—without even writing code yet.  He’ll walk his documents (and sketches) in to the client and use them as they walk through different scenarios.

That’s all well and good, but can you give me any nuggets of advice that I can use immediately?

  • Use standard HTML controls…hmm.  Don’t ASP.NET and third party controls ultimately render to HTML controls, anyway?
  • Use Arial or Helvetica for body text.  These fonts are known as sans serif fonts.
  • Use Georgia for header text.  Georgia is known as a serif font.  What?  No Comic Sans?
  • Josh recommends a dark grey as a good back color.
  • Line height should be 1.5em.
  • A page should have space on either side and the middle part (with the content) should be only 40-60 characters wide.  There goes my idea of using as much real estate as possible.
  • Try blurring the page to see where your eyes focus.  This can help you determine the focal point of the page.

Books Josh would recommend: Don’t Make Me Think, Getting Real (a free ebook from 37signals.com), and, possibly, Prioritizing Web Usability

 

Session: Reverse Engineering Applications

My original plan was to attend Drew Robbins’ Modern Web Applications with .NET presentation, but Drew was sick in bed (or maybe he just stayed out a little too late the night before at the CodeMash after-hours party…hmm).  So, I went to Joe Kuemerle’s Reverse Engineering session.  The notion of reverse engineering software to see its source code is not new to me, but Joe did tackle the topic in a pretty comprehensive manner.

Popular reverse engineering tools include:

The primary way to combat disassembly of your compiled code is to obfuscate your code—Joe, as an employee of PreEmptive solutions, certainly knows this!  [Although, to his credit, Joe in no way pimped Dotfuscator.  Someone in the audience asked how you combat such reverse engineering tactics and it was only then that Joe mentioned part of what his company does.  He even went so far as to mention the Phoenix Project—a free obfuscator for .NET.  I wonder if he really meant the Babel obfuscator, built on Microsoft’s new Phoenix framework?]

Joe mentioned strong name signing of your assemblies, not to combat reverse engineering per se, but to at least offer some form of integrity or validation.  The last thing Joe mentioned was authenticode signing of .NET binaries.  I had never heard of this technique before until several months ago when someone in my company told me about problems he was having with Enterprise Library.  He was running a web app using Enterprise Library (version 4.0, I believe) on an internal web server.  The first time his app made a call to EntLib, EntLib would try to call out to Microsoft.com.  My company’s firewall rightfully blocked the call, but the process would sit for about 10 seconds until timing out and continuing with the rest of the operation.  The developer determined that this was due to the fact that EntLib was authenticode signed and was trying to do some validation of the certificate.  Don’t know how the story turned out—hopefully he found that hotfix—but this authenticode business sounds dicey…and kind of expensive.

 

Wrap Up

Well, that’s another CodeMash.  For the price and locale, you can’t really beat it.  Conferences are always a double-edged sword to me: they’re a great way to learn about new and existing technologies/methodologies and an opportunity to ask questions of the experts that normally would be tough to do otherwise.  However, they also tend to depress me more than usual.  I go away thinking that I’ve fallen so behind in knowledge and experience—I’m barely cognizant of DDD, barely practicing TDD…not to mention Agile, WPF, SilverLight 2.0, Ruby, blah, blah, blah.  Either most of these people are exaggerating their experiences, have no life and code all the time, or have great jobs that let them gain deep experience in lots of technologies and methodologies.

Well, I’m going to stop whining and do something this year to keep up.  Not sure what, but something.  Maybe I should put up one of those trite New Year’s Resolution posts.  Hmm.  Gotta think about that one. 

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 11:28 PM
Permalink | Comments (0) | Post RSSRSS comment feed

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

CodeMash 2009

CodeMash 2009

“At two o`clock we took the railroad; the travelling on which was very slow, its construction being indifferent, and the ground wet and marshy; and arrived at Sandusky in time to dine that evening. We put up at a comfortable little hotel on the brink of Lake Erie, lay there that night, and had no choice but to wait there next day, until a steamboat bound for Buffalo appeared. The town, which was sluggish and uninteresting enough, was something like the back of an English watering-place, out of the season.”

--Charles Dickens, describing his trip to Sandusky, Ohio, 1842

 

Yep.  I’ll be attending CodeMash this year for the second time.  The conference is cheap, covers a wide swath of technology, and gives me another opportunity to mix with the locals…er, regionals.  It’s also relatively close, although there are no direct highway routes from Cincinnati.  Last year, I found myself wandering the back country of northern Ohio for hours (in the dark) wishing I’d packed my banjo.  Hopefully this year, my travel experience will be better.

Be the first to rate this post

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

Tags:
Categories: Technology Blog
Posted by Brad on Sunday, January 04, 2009 12:50 PM
Permalink | Comments (3) | Post RSSRSS comment feed