Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

Casey Charlton - Insane World

Hang the code, and hang the rules. They're more like guidelines anyway
  • Where Did filterContext.ActionMethod Go?

    Awww cmon Microsoft, play nice with us. I want to do something that should be pretty simple, I just need to know what action is being wrapped by my custom filter in ASP.NET MVC

    After a surreal amount of Googling I finally found a blog post that showed where this little bit of information hides, in filterContext.ActionMethod. But I could have sworn I went over that 100x with Intellisense and never saw anything like that. Oh yes, indeed I did, Preview 5 removed this convenient method.

    So after a bit of swearing, and a small (140 chars or less) rant on Twitter ... Sidar came up with the answer buried in the ASP.NET forums.

    So what is the new location ... would you believe it is now an entry in the dictionary in RouteData??? No, nor would I have believed it. What kind of crazy world is this, when a strongly typed method is replaced by a magic string key to the RouteData dictionary :S

    So for now, this fixes it, but I hope MS can make this all nice and strongly typed again, it is a fairly minor thing, but I like my Intellisense, and I hate magic strings:

    public override void OnActionExecuting(
                     ActionExecutingContext filterContext)
    {
       var methodName = (string)filterContext.RouteData.Values["action"];
    

    p.s. Hmmm this Twitter thing may be the future ...

     

  • 8am and The Managed Extensibility Framework

    Brad Abrams can always be relied upon for a great post - and the latest whizzy thing to come from Microsoft is the Managed Extensibility Framework. I know this is a good thing, because Ayende and Sidar blogged and told me it was.

    In his simple step by step run through, Brad shows some of the benefits of MEF to those kind of applciations you have to plug together ... but for the life of me I cannot understand a word of it ... I'm pretty sure it isn't Brad, and I'm pretty sure it is me ... 8am really isn't a good time to approach this stuff. It isn't helped by MS calling it the "Managed Extensibility Framework", but Brad referring to it as the "Managed Extensions Framework"

    On a similarly related note, I decided to sign up to Twitter last night to see if anything interesting happens there (I left my mouse in work, and couldn't be bothered to use my laptop glide pad, so I was playing on my iPhone, and Twitter came up in a search, and ... well you know how this goes). Anyway ... the main reason this is related is that one of my first comments to Twitter was "6am sucks" ... well 8am hasn't got any better ... and I strongly suspect the day is going downhill from a bad start. Ever have a feeling it was going to be "one of those days" ?

     

  • Development is Hard

    Oren, as he often does, hits the nail bang on with his latest post Cuddling is consider harmful.

    Development is hard, and getting harder all the time. For every new framework that comes out to simplifying the complexity of the code we write, another two technologies hit the market. For every practice and principle we get to grips with, two other will evolve. The better we make software, the more users expect.

    Not only is development itself hard, but you have to be constantly learning and adapting to stay in the game - it is an endless race.

    As Oren says:

    Development requires a lot of skill, it requires quite a lot of knowledge and at least some measure of affinity. It takes time and effort to be a good developer. You won't be a good developer if you seek the "X in 24 Hours" or "Y in 21 days". Those things only barely scratch the surface, and that is not going to help at all for real problems.

    The rewards can be high, but the tradeoff is that you must work for your money, both in terms of producing real results, in keeping yourself educated, and in being aware of what is happening in the wider field, and that requires time and effort.

    And yes, a lot of the people who call themselves developers should put down their keyboards and go home.

    I cannot help but agree. If you aren't willing to put in the time and effort, then you probably should be in an easier profession.

    This isn't an elitist rant on my part, nor I am sure on Oren's - it is merely an observation that things don't come for free, and hard work and dedication can pay off. We all have to start somewhere, and for those people I would offer every encouragement and helping hand, but in return you must put the effort in, and strive to be better.

     

  • ASP.NET MVC, JQuery and Cross-View Javascript Events

    I wrote a nice little charting component for our site recently, and needed to call a Javascript function in one View (the one that was the main page for charting), from another View (one that went off to the server using Ajax to load up a list of feeds that could be charted).

    This would have been traditionally done by putting a function on one View and calling it from another, but this is just a little bit "messy" and prone to breaking. Luckily I decided fairly early on to use JQuery on this site (mostly as I hate writing Javascript and JQuery makes it a doddle). With JQuery I can define a Javascript event across the two views, thereby providing me with a loosely coupled way of achieving my objective.

    On my main index page I have:

    $('#graphFeeds').bind("add", function(e, feedId, description){
            for(i=0;i<graphedFeeds.length;i++){
                if(feedId==graphedFeeds[i].feedId) return null; }
            var theFeed = new feed(feedId, description, "Green", "Line", 0, 1);
            $('#graphFeeds #table tbody').append(createFeedTableRow(theFeed));
            graphedFeeds.push(theFeed);
       });

    And on the view that contains the list of feeds I have:

    function addFeed(feedId, description) {
       $('#graphFeeds').trigger('add', [feedId, description]);}

    Now by calling the addFeed() function on my list of feeds (I have a little "add to chart" link to the right of each feed), the Javascript event will be fired for the #graphFeeds div ... and the listening handler defined on the index view will go off on it's merry way and add the selected feed into the chart.

    Much as I hate Javascript, I love JQuery 

     

  • Don't Tell Me "How", Tell me "What"

    During a discussion with our project manager earlier today, I used the phrase "Don't tell me how you want it to work, tell me what you want it to do"

    We were discussing user stories, and I was trying to get across what I wanted to see on a story card, and what I didn't want to see. He had put a story card on the wall that read:

    On the login screen:
    Should be a username box
    Should be a password box
    Should be a change password link
    Should be a remember me link
    Should be a register link

    As user stories go, this pretty much sucks as badly as it could. He was trying to tell me how to write a login page, as he saw it, but he wasn't describing what functionality he wanted the accounts system to have.

    Don't Tell Me "How", Tell me "What"

    My user stories for a similar scenario would be more like:

    • As a registered user I want to be able to use my existing account details to sign in to the site to allow me to access restricted content
    • As a registered user I want the site to offer to remember me when I sign in so I don't have to enter my details every visit
    • As a registered user I want to be able to get a password reminder so that I can login even when I have forgotten my password
    • As a registered user I want to be able to change my password so that my account is more secure
    • As a new user I want to be able to register on the site and receive a username and password

    None of these say how the user achieves the objectives, but they do encapsulate what functionality is actually required. The first card would have had a developer acting as a parrot and likely producing something that missed the goals widely. The second version allows the developer to see how all these functions will interact, and to make a page that best reflects the requirements ... it also happens that the second set of cards neatly becomes a directly applicable UAT script.

    Now we can easily adapt the functionality to new requirements, for example these stories encourage a separation of the view from the actual functionality, so it is more likely we can put a login box on every page, or provide a register by email option instead of filling out a form.

    What Format Should Stories Be In?

    Traditionally I have tended to go for a simple format:

    As a [insert role or type of user here]
    I want to [insert required fucntionality here]
    So that [insert business benefit, or desired outcome here]

    There is a pretty good write up of this on Dan North's site, so to save me repeating it, check his page out, he also steps into BDD style stories too, and how they reflect various scenarios.

     

     

  • The Tao of Domain Driven Design

    Tao is often referred to as 'the nameless', because neither it nor its principles can ever be adequately expressed in words. It is conceived, for example, with neither shape nor form, as simultaneously perfectly still and constantly moving, as both larger than the largest thing and smaller than the smallest, because the words that describe shape, movement, size, or other qualities always create dichotomies that are only parts of Tao. (wikipedia)

    Domain Driven Design is the latest  software fad, and DDD is already becoming a buzzword recruiters are looking for on CVs. Every developer wants to be doing it, and many think they are doing it.

    But most of these developers see DDD as a series of software patterns and development guidance, and miss what really underpins DDD - The Tao of DDD

    Domain Driven Design certainly includes software patterns, and certainly includes coding guidance, but what the book is really about is a different way of thinking, a different way of solving problems, a different way of communicating.

    In DDD the principles of Repositories, Entities, and Anti Corruption Layers merely mask the more important message, that software developers need to become part of their business users domains, developers need to stop thinking in technical terms and constructs, and need to immerse themselves in the world their business users inhabit.

    DDD is more about how we as developers remove the artifical boundaries that exist between IT and the businesses we are there to support.

    If you read DDD as a software development "cookbook", or you pick and choose patterns you like from the book, you will miss the whole point:

    There is technically nothing new or revolutionary in DDD, there is only a guide to a better way of thinking.

    While the Tao cannot be expressed, Taoism holds that it can be known, and its principles can be followed.   (wikipedia)

  • ASP.NET MVC Problems with UpdateModel(model, Request.Form.AllKeys);

    We just added a new dropdown list to one of our forms, which has a javascript function to change the background colour of a textarea. And the UpdateModel() on our controller class promptly fell over ...

    It turns out that UpdateModel() requires your class to have a property it can map for every form control with a Name(presuming you are using the lazy 'Request.Form.AllKeys')... or it throws an exception ... not the most helpful or obviously expected behaviour. Instead, use TryUpdateModel(), or use our quick fix to remove the Name from our dropdown as it wasn't needed.

    For binding that uses reflection, I would far rather the default behaviour was just to ignore the property ... this would allow views to be changed more easily without having to change the controller.

     

  • ReSharper 4.1 Released

    Everyone else in the universe has blogged this already, but I don't see anyone else on Devlicio.us having done so ... so here it is ... ReSharper 4.1 is released, lots and lots of bug fixes, some cosmetic stuff, support for VS2008 SP1, and even a few new minor features .... get it here

  • Nasty "Gotcha" with ASP.NET MVC and Views

    We just spent far too long on what turned out to be a stupid problem ... we kept getting an error telling us that the view did not inherit from System.Web.UI.Page ... unfortunately the guy who was working on the particular view and controller could not think of a specific change he had made to cause this error, and looking at the code didn't reveal one either.

    The problem was actually quite subtle, and quite stupid ...

    A short while before the developer had decided to change the view from being an ".aspx" to being a ".ascx", so removed the view from the solution, added a new view that was a UserControl, and carried on working.  What he hadn't done was to actually delete the .aspx file, and even if he had done that, the other developers would have got this weird error too unless they pulled a clean copy of the solution, or manually deleted the files from their disk. (clarification: El Guapo pointed out I was being ambiguous here ... if the file is *deleted* from the *solution* then it will go from disk and from SCM, if if is removed from the solution and then deleted it will remain in other developer's directories *if* a VS addin like Ankh is being used, as the Update will operate against the solution and referenced files, not the folder structure)

    When ASP.NET MVC is told to render a view, by using RenderPartial("MyView") or return ("MyView") for example, it goes off merrily and scans the file system for a file matching "MyView.ascx" or "MyView.aspx" (presuming the default ViewEngine) - however if the view exists on disk in both forms, it is a bit of luck as to which actually gets returned and is rendered. Removing the old file fromn the solution is not enough, it still exists on disk - delete the old one and all is well. Hopefully this is a fairly infrequent problem, but it was a real pain to figure out.

    So if you get an odd problem in ASP.NET MVC relating to Views ... just make sure you haven't got old files in your directory structure!

  • Problems Upgrading ASP.NET MVC to Preview 5

    Expecting it to be painless to move from Preview 4 to Preview 5 was probably hoping a little too much ... but it certainly wasn't the worst thing in the world.

    A couple of things did catch me that I didn't find in the notes for upgrade, so I thought I best post them in case someone else gets the same problems:

    BindingHelperExtensions.UpdateFrom has gone

    Yep, gone ... which was a bit of a pain. I understand many people are using other methods, and probably we should be too, but this was the simplest option and is now being used commonly here.  In it's place it turns out that you can use:

    UpdateModel.From(model, Request.Form.AllKeys)

    this.ReadFromRequest has gone

    Another removal, the replacement is:

    Request["key"]

    LinkBuilder and BuildUrlFromExpression gone

    Actually they haven't, but they have been moved to Microsoft.Web.Mvc ... so you probably need to change your references to the new assembly.

    Multiple Entries for System.Web.Routing in web.config

    I did a manual edit to change the assembly version from 0.0.0.0 to 3.5.0.0 and I missed a few - it seems there are 4 entries for this assembly in my web.config - so check you updated all of them ...

    Update: Html.CheckBox("rememberMe", "Remember me?", "rememberMe", true) has changed!

    Missed this one till one of the developers here tried to get the login page to work ... it looks like they changed the signature of this, and a few other Html.xxxx extensions ... a bit of a pain, we only have around 50 views at the moment, and unfortunately it isn't a simple find/replace ... oh well ...

    Further Update: Html.ActionLink is just plain broken

    Grrrr ... This is annoying ...  They went and changed the signatures on Html.ActionLink

    This wouldn't be so bad, except that our previous line of:

    Html.ActionLink("edit", "Edit", ViewData.Model.ControllerName, new { item.Id })

    Doesn't work, and results in a link with ?Length=8 on the end of it. This appears to be because it is matching the wrong signature on the ActionLink overloads, and now matches "string controllerName" as object instead.

    Fixing it is rather "yuk" ... force it to use the right overload with:

    Html.ActionLink("edit", "Edit", ViewData.Model.ControllerName, new { item.Id }, null)

     

     

  • Domain Driven Design Quickly - InfoQ

    A little earlier today I found myself explaining Aggregate Roots and Anemic Domain Models to a couple of developers here, and I wished I had my copy of Domain Driven Design to hand to show them what I was explaining ... then I remembered that InfoQ published an *excellent* online book called "Domain Driven Design Quickly" - free to download, or you can buy the printed version. This book is a perfect introduction to DDD, and as it is free, you cannot really beat if for value for money!

    From the introduction:

    The most complicated aspect of large software projects is not the implementation, it is the real world domain that the software serves. Domain Driven Design is a vision and approach for dealing with highly complex domains that is based on making the domain itself the main focus of the project, and maintaining a software model that reflects a deep understanding of the domain. The vision was brought to the world by Eric Evans in his book "Domain Driven Design". Eric's work was based on 20 years of widely accepted best practices in the object community, as well as Eric's own insights.  Domain Driven Design Quickly is a short, quick-readable summary and introduction to the fundamentals of DDD. A special interview with Eric Evans on the state of Domain Driven Design is also included.

  • NDepend ... the Shortest Review Ever

    A long while ago I got a licence for NDepend ... I had used it previously but only on the trial version, where it had proved very useful in giving me a some pretty graphs that made sense to managment when my words did not.

    I haven't actually got around to using it until this morning, when I thought I would run it over our current project to see where we were at. There isn't a hell of a lot of code in the project, so I wasn't expecting too many surprises - and largely I didn't receive many.

    I was pleased to see our assembly dependencies were the right way around, and very pleased to see they were very near the centre line on the "Abstractness vs Instability" chart.

    The only very mild surprise was to see this flagged up in multiple CQL checks:

    RegisterforUpdates(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String)

    Obviously there is something wrong here ... and a quick word with the developer who wrote this established that he didn't know about the Binding Helpers in ASP.NET MVC so had passed every form field back into the controller via the parameter list. A quick hyperlink to him of Rob Conery's excellent tutorials on ASP.NET MVC and we have a much nicer method on the controller.

    One small win for NDepend ... I look forward to many more as time goes on!

     

  • Software Development is a Creative Skill, Building Houses is a Technical One

    Brad Wilson mentioned on the TDD mailing list that the waste and inefficiency within the software industry was akin to the house building industry. I'm sure in some respects he is right, but in a more fundamental way I disagree. 

    An average layman off the street hiring a builder can ask them to build a wall. The average layman can see if the wall isn't straight, the average layman can see when bricks are not aligned, they can see when a house is built to a high quality finish, where attention has been paid to detail. They may not be able to see if the builder has been deceitful by using substandard materials or hiding shortcuts, but a few hundred pounds to a surveyor will tell them all they need to know.

    Even the most technical of software management cannot tell if a basic 5 line piece of code is well written or not, let alone an application comprising many millions of lines of code. The best of them cannot even tell a "good" user experience from a "bad" one. It is almost accepted wisdom now that all developers write bad code, that all software is buggy, and that software projects never deliver what they promise.

    It is this problem that needs to be overcome ... it is easy to spend a lifetime in a development career, without ever having written a single line of even average quality code. There is very little visibility to non-developers.

    However, I assert the problem is that development is largely a creative skill, not a technical one. And creative skills are nearly impossible to quantify - you know when you like a piece of artwork, but you cannot say why in a way that means anything to anyone else. I cannot prove I am worth my daily rate, other than by people trusting me.

    With that kind of stumbling block, the best we can do is to rely upon automated tests, continuous integration, and Agile methodologies to at least make us more accountable, even if we are still unquantifiable.

     

  • Rare Company or a Persuasive Man?

    Troy mentioned in a comment on my previous post on ASP.NET MVC and Agile that I must be in a rare company, or I must be a lucky or persuasive man. There is certainly an aspect of truth to both those observations.

    It is certainly nothing out of the ordinary for me to be brought into projects that are struggling - partly I guess as a contractor you only get brought in when projects are behind, and partly I guess my CV tends to reflect that I usually end up being a troubleshooter, despite my original job title or role.

    My first comment at my current client was to quote Brooke's Law ... I was asked to come in for one month to tidy up some loose ends and help them push their project through the last hurdles to production ... they believed this was a month's work, and then it would be finished. That immediately range warning bells, and Brooke's Law was in the forefront of my thoughts.

    "adding manpower to a late software project makes it later"

    If this project was a month away from live release to clients, it must have been fundamentally finished a month or two ago, and now there must be only tweaking and bug fixing left. But there was nothing to see other than a dozen static pages and a SharePoint site structure that had been solely designed to support the navigation menu (yes, you read that right ... the structure of the SharePoint site was designed solely with the navigation menu and breadcrumb in mind). There was not even a basic page that retrieved an item from the database and displayed it - actually there was not even a database, nor was there a SharePoint list to support any of the data.

    Someone had got a figure of one month, but I have no idea where from.

    So my previous post covered the steps taken to get things moving again, but how did I convince them that this needed to happen?

    The Rare Company Theory

    My current client has a classic legacy suit of applications, some new, some old, mostly all customised by different suppliers and developers. They have experienced chaos and non-delivery. So they were open to new ideas. I guess that is a major part of the "Rare Company" thing.

    One of the first steps to recovery is admitting you have a problem.

    That sounds familiar ... but honestly I have no drink or alchohol problems I am aware of!

    It is however a familiar feeling at many clients. They continue on the way they are going because of a variety of reasons:

    • All software developers give bad estimates
    • No project ever goes to plan
    • All software has bugs
    • ... fill in generic "this is the way it has always gone" excuse here

    And yet none of these things are true. But they are almost accepted wisdom at many companies, especially with the decision makers at the top who are used to these and a host of other excuses for why for the upteenth time their project is not going how they asked for it to go.

    Until you can prove to a client that these things do not have to be true, they will go with the path they are comfortable with, and that is often a below average result or even total failure. Oddly I have found many places where it easier for managers to explain to their bosses that the project is a total failure, whilst blaming the developers or suppliers, than to stand up haflway through (when failure was obviously inevitable to all) and say "I need authority to get this project back on track, we may take a little longer, but you will get something that meets your needs".

    So, yes in many ways my current client is a "Rare Company" ... they (or at least the person with responsibility for this project) have had the courage to stand up, accept that this project wasn't working, and take a drastic and brave new approach.

    The Persuasive Man Theory

    I am certainly a strong character. In some circles it can be seen as confident, in some it can be seen as arrogant, in some it comes across as foolhardy, and in some it comes across as a leadership quality.

    I will be the first to admit that I have limited tolerance for silently doing things badly. I consider myself a professional, and whatever I do, I like to do it well. As a contractor I could very easily sit at a client's office for months getting paid, while knowing the project was in serious trouble, and no blame would come back to me, my future prospects would not be affected. This is the path of least resistance.

    But I tend to speak up if I see problems. The only question then is which way it comes across to the client. To the right client it can be a breath of fresh air and a different perspective. To the wrong client, or the wrong person, it can be seen as being troublesome or an attempt to ursurp authority.

    I have in mind a specific example of a former client, where the manager of the development team was highly persuasive, but lacked knowledge around the technical aspect of the project. It was "his" project, therefore any comments upon it were a critisism of him. He was not confident or strong enough to admit he may not have got it right, and so he tried to ignore and shut down my input.

    His director however was also involved fairly closely with the team, and he was open to hearing my thoughts. That left him with the dilema, he could believe his development manager (who he had known for years and trusted) or he could believe me (who he had known for a few weeks). That took some substantial negotiation to get approval for providing a prototype system that did the same job but in a much cleaner way. As it happens, by the time we had completed the prototype, and effectively proved the original project was not going to deliever, it was too late and the project had to be cancelled.

    The key to being persuasive is a mixture of self confidence, demonstrable experience and a degree of being a salesman. To persuad somebody, you only have to make them believe you are worth putting their trust in ... after that they will change their project, or buy a vacuum cleaner from you.

    So Which Was it Here?

    A few days after the director at my current client had agreed to effectively cancel the ongoing project, and start it from scratch, we had a meeting. He needed confidence that he had made the right decision - after all he just made a million pound decision (and more importantly took a political risk) in changing direction - all based on me. He had a right to be concerned.

    Unfortunately I am also a very honest person. So my reply was:

    "You really don't know. I could be very good at what I do, and I could be guiding you to the best possible solution to your problem. Equally I could be a bloody good talker and know bugger all, like the last people that you trusted and who put you where you are now. And to be totally honest you have no way of knowing which of those two is the truth."

    It is better to be up front and honest, at least it shows I understand why he is anxious. I cannot "prove" I know what I am talking about, and equally I cannot prove the last person didn't. So obviously his face at this point was a mixture of "well I wasn't expecting that reply" and "oh no, maybe he is just a good talker"

    So What Was The Clincher?

    "The best way you can judge whether I am leading you down the right path or not is by results. By this Friday you will have a full walking skeleton of the site, with all legacy data largely imported and viewable. You can then see the site as it evolves, you can see the story cards move across the board as we complete them, and if at any point you feel we are not making the progress we should be, we can discuss it and deal with it."

    The Clincher is ... Visibility

    When a client can see what is happening, they can judge for themselves. The "old" way involved months of telling the stakeholders that all was well and on target, but that they couldn't be shown anything yet, or that they could only see small parts of the solution.

    What Agile brings to the party is, now they can see exactly what the development team is doing. They don't have to put trust and faith in our words, they can put it in our results.

     

  • Recovering a Project with ASP.NET MVC and Agile

    I recently got brought on board to a new client where, true to form, a project was in a state of failure - everybody sort of knew it, but nobody would say it out loud.

    What Was Going Wrong? 

    After my initial assessment, I made a quick decision that the major thing holding everyone back was an early decision to use MOSS 2007 to host an external website, and as the primary content management system. This wouldn't have been a totally bad decision, if the team had a lot of good MOSS 2007 experience on board, but unfortunately they were learning as they went. If there is one thing that really doesn't work well in MOSS it is a "lets just start and change it as we learn and go along" approach. MOSS takes a fair amount of careful up front analysis and planning to get right, and has enough permeutations and "gotchas" to require some good experience on the team before starting. Otherwise you can rapidly end up with a big ball of mud.

    So we took the decision that using MOSS was a major stumbling block, and this had to be removed from the equation. Of course it *could* have all been done in MOSS, but it wasn't going to happen in the time left. There was also a small "jedi mind trick" involved too ... people had become so focused on the SharePoint "way" that they could no longer see the bigger picture.

    The decision was made to separate the public application away from MOSS, and to write it as a bespoke system. MOSS would still be used internally for document collaboration (which is where the strength of MOSS lies), and later on for publishing that information to the web site.

    The Software Stack 

    After some fast prototyping, some instinct based decisions, and a bit of faith, I finally decided on the following software stack to write the application:

    Some of these were fairly safe choices, I have used them before, or they are tried and tested in the field. But obviously the major exception to that rule was ASP.NET MVC

    I very briefly considered Monorail, but it does not have the tooling support or documentation support of ASP.NET MVC, and going forwards Monorail is likely to dwindle whilst ASP.NET MVC will only grow.

    I also considered writing a Webforms application, and using MVP to split the UI from the logic, but this approach required a fair ramp up from the developers, and had too many possible variations to try and coax people into the right appraoch.

    ASP.NET MVC therefore would provide a degree of familiarity to the ASP.NET developers we have in the team, whilst providing a clean separation of responsibilities. The only question was stability, which after asking around seemed not to be an issue, despite being only at preview stage (something MS haven't done before but is very welcome here) nobody reported any problems.

    By changing pretty much every element of the software stack we were using the team has been revitalised, and has approached the project with renewed vigor and enthusiasm. They get to learn some new things for their CV (pretty much none of them have used any of the new comnponents), and due to the amount of "magic" that things like Rhino and Windsor introduce they could get on with writing real functionality almost from day one.

    I am very impressed by how fast the developers have picked up MVC, here a large amount of credit goes to MS for making a very usable, approachable, and simple framework that does exactly what it needs to, and very little more.

    Making it Build With Continuous Integration

    When I arrived there was no project in place. Nothing, nada. I could not pull the project, build it and see it work. As everything was being done in MOSS people were writing projects for each small bit of fucntionality, and manually copying assemblies into a single MOSS deployment. And the only source control that existed was Visual Source Safe. To say the least, this was scary.

    So the first thing I did here was to install VisualSVN and TeamCity and get a build server running. After setting up a single solution with all the relevant projects included, we now have a build that operates on every check in, and it automatically displays on a web site for everyone internally to see the progress. On the dev machines we installed Tortoise SVN and Ankh SVN, Ankh now seems a lot more stable in version 2, but has some irritating quirks still - it is however much better than any MS source control plugin, and falling back to Tortoise almost always fixes the problem.

    We also installed the trial version of ReSharper on the dev machines. None of the people here had used it before, but within only a few days we were hearing a lot of "oh wow", "that's amazing", and "that used to take me so long to do" ... in a week or two we will have to buy licences, but I think it has more than justified itself to the development team.

    The URL of the build site was distributed to the business users, and now they take an active interest in telling me the "walking skeleton" is a "pile of bones" when someone changes the DB loging details last thing at night :)

    Changing the Process

    Also evident was that the approach that was being taken to the project was classic waterfall, along with a mixture of daily constantly changing and fluctuating requests and requirements. Communication was good with daily meetings, but the same things seemed to be repeated at each.

    So another bold decision I took was to approach this as a far more Agile project - using some elements of XP.

    I threw out the gant chart - much to the dismay of the project manager - and started writing up story cards, which promptly got placed on a commandeered wall. The project manager now has these story cards listed in an Excel spreadsheet so that he and the people he reports to can see exaclty where things are in a palatable form, but the wall remains the "one true master"

    We changed the 8.30am sit down meeting to a 9.30am stand up meeting, and have been trying to enforce a fast "what I did yesterday, what I will do today, what is holding me up" approach to stop us getting dragged down into details.

    We now have a lot more communication between developers as a result of this, and the business representatives are feeling very involved. There is still a degree of trepidation around what will be delivered, my protests of "you can see it as it goes along" and "it will be done when it will be done" are proving quite hard to swallow, but I think everyone understands there is no magic pill here and we just have to judge it step by step.

    The Proof Will Be in the Pudding

    So some good early steps have been taken. I cannot say the project is back on track, but everyone is now far more involved, has far more enthusiasm, and can see something starting to take shape. The perceived deadline of a few weeks from now is unlikely to be met with a fully functional site, but as "fully functional" is only vaguely defined, we are aiming to have something that is "good enough" by then, and then to make it better as people feed back into the process.

    So far a major success on the approach, now to see if we can turn that into a successfully delivered solution!

     

     

More Posts Next page »

Our Sponsors

Red-Gate!