This is James Manning's Typepad Profile.
Join Typepad and start following James Manning's activity
Join Now!
Already a member? Sign In
James Manning
Recent Activity
2 places I think of as having done this (at least to an extent) - jQuery (and similar) selectors/objects, where $('#foo') will return a collection even though your base js method would be getElementById. It's a good example that "finders" don't have to return a scalar that then necessitates a null check. - PowerShell pipelines, although they have the same issue as Jens mentions when you feed in a scalar that is enumerable, and on assignment will collapse to $null, scalar, collection (necessitating the workaround of wrapping with @() when you want to ensure the result is a collection) You could certainly construct programs that kept everything as enumerators/generators/etc, but how many places would go from "missing null check" to "missing empty check"? For LINQ usage, you could certainly just replace your First(OrDefault)/Single(OrDefault) usages with Take(1) and see how things went from there. :) My knee-jerk reaction is you'd end up with code that's more difficult to reason about, even if it increased brevity with removed null checks - however, given how much working code there is leveraging jQuery selectors, maybe that's either wrong, or small enough to be worth the trade off. :)
The model that I think has worked well for some products (although targeting a different demographic/userbase) is something like what Microsoft Exchange does (bear with me, here ... :) It comes with a GUI that both walks you through common tasks and helps visualize the current state of the system. However, when doing so, it lets you see how it's performing those actions (well, at least on the 'write' paths) by using the cmdlets that it comes with and showing you the 'script' that it wrote and will run. Back when I admin'd bunches of AIX machines, there was a similar UI called 'smit' (and a tty version 'smitty') which similarly gave you a UI, but let you progressively learn the underlying details by constantly showing you what it was doing. For people coming from another VCS (especially with no previous DVCS experience), I think a huge amount of clarity could be gained by just having visualization app(s) that showed you the current state of things (your local branches, remotes, etc.), especially if it could do so with 'potential changes' made (what do the various trees look like if I were to do command X?) without requiring manual use of stash and the like. :) The bigger gain will certainly be when a UI lets you choose an 'action' entry of 'revert my local changes' but tells you what it's doing (as git commands) and why. Of course, maybe the real answer is that there needs to be a new VCS created that just happens to use git as an underlying implementation detail, intentionally limiting many of the 'power' uses (at least without bypassing it and using git directly) but trying to solve an 80% target with simpler and less complex mental models. Things that use git as a storage mechanism seem like a great idea - stop trying to 'fix up' git, just make a new VCS :)
James Manning is now following The Typepad Team
Apr 26, 2012