Showing posts with label Agile. Show all posts
Showing posts with label Agile. Show all posts

October 27, 2007

Best Practices Discussions and Debates

I think I have learned something today that I was previously unaware.

Starting a discussion about software development best practices is akin to talking about parenting techniques with a group of mothers.  Most will patiently listen, but at least one will get super defensive and tell you in detail about why that wouldn't work with their baby.

I have relatives who are also very argumentative, in that they just love to argue.  The funny part is that they will argue about things THEY AGREE WITH!  Unfortunately, they are too bent on arguing that they don't care that they agree.

I see this happen on blogs all the time.  And while I think that blogs are great ways to spur discussion, they are not great ways to HAVE a discussion.  User groups, phone calls, and hallways are all vastly superior environments for a discussion.

In my case, I have a commenter on my blog post about best practices that is doing a wonderful job of arguing some of my points, all while telling me I'm wrong.  We disagree on one point: Developers should have their own copy of the database they are developing against, and developers should have access to all source code and software need to do their job.

I think the reason the anonymous poster and I are not able to agree is because we really aren't able to talk to each other about the ideas.  Plus, I have a strong feeling we are separated by a common language (we have different definitions of the same words).    More than likely we agree on the software, we just don't agree on the terminology.

As far as the database part: there are a ton of ideas hidden in that statement that are not easily expressed.  There are scripts that extract the meta-data out of a database, source control that houses that script, continuous integration for verifying all of the changes work to both code and database scripts, creation of development data, etc.  

Then the kicker: 90% of that is automated.  I really don't thing the anonymous submitter saw that point.  In fact that should be a blog post in itself.  He/she saw it as another backbreaking task the developer would have to maintain by hand.  But if you do it right, it isn't.  Updating the database scripts is as simple as running a batch file.   And not updating the batch file and then running it, no -- just run it.  The batch file creates the scripts for creating the entire database.  This should take 5-30 seconds.  Then you are ready to go.

As I said, there are a lot of aspect to this that were not mentioned in this post or the previous post.  But blogs are there to START discussions, not to have them.

October 20, 2007

Software Development Essential Practices

I was in an interesting discussion last night: what software development practices do you consider essential? 

While opinions varied, I think there was some consensus on a few items.  In my list I also include some tools.  Some of these were mentioned by the group, but consider them my own additions.  Also, I am making this list specific to .NET, but the list applies to just about every language.

Universally agreed Practices

  • Source Control (1)
  • Local Development -- Every developer should have everything on their computer to run the system.  This includes all of the software and all of the source code.
  • Bug Tracking - nuf said.  There are to many tools available to list here.
  • TDD - Test Driven Development.  There was a little bit of back and forth, but the general consensus was that this should be done.
  • ORM - Object-Relational Mapping
    • NHibernate 
    • SubSonic - My person favorite
    • LINQ to SQL - not yet, but I feel this should be on the list.
    • LLBLGen ($) - Not free, but I've heard many good things about it.
    • More
  • Continuous Integration - Simple process that sits on a server and waits for things to get checked into your source control system.  When it sees something new, it gets all of the latest source code, compiles it, and runs all of the unit tests.  If there are any problems anywhere in that process it alerts the users (email, desktop icon, wave red flag, etc). (3)
  • One Step Build - it is unbelievably cool to be able to click one button and have your entire project compile, run all tests, and possibly create an install in one step.  Personally, I do like it, but with the current set of tools this is one of the hardest parts to setup.

Highly thought of but non-essential practices

I'm sure I have missed some tools in the list, but it is the practices that are more important anyway.  But if you put a comment about any tool that I missed I will add it to the list.

(1) Source Safe was notably not in the list.  While I don't like it either, it is better than nothing.  But if your team is greater than 5 people or you have multiple people working on the same project you really should look at one of the other products on the list.

(2) Not a unit testing library, but a Mock Object library.  Pick a unit testing libarary (NUnit, MBUnit, XUnit), then pick a mock object library (Rhino Mocks, TypeMock, NMock) to use with it.

(3) I really need to talk about continuous integration more.  But it is one of those things that leads you down a path.  First you add source control, then you start adhering to separation of concerns, then you start unit testing and mocking more, then you add continuous integration, and then one step builds are all part of the mix.  One best practice leads to another, but they don't make a bit of sense without some of the prior pieces.

(4) If you are a Code Rush person instead of a ReSharper person -- carry on, you are in good company.

($) The cost money - not just beer, but may have free version versions as well.

January 23, 2007

Adventures in Agile Development

I've started a new project, with a new team, under a new development methodology. And for the most part I am happy with that. We have a small team of two developers and an architect/manager/used to be coder, and we are going as agile as possible.

Now Agile development means a lot of different things to a lot of different people. It is so bad that saying that you are an agile shop can mean almost anything you want it to. So to alleviate some of the confusion, here is some of what we are doing.
  1. Daily Scrum. This is a 10-15 minute meeting every morning to talk about what is going on with your code. Where are we at, what are we trying to do.
  2. Test Driven development. This means having tests for as much as possible (NUnit in our case). Granted, you cannot test everything, but there are development patterns that allow you to test most of what you do. Chief among them is the MVP pattern (Model-View-Presenter). I'll talk more about this later.
  3. Frequent check-ins. It goes like this. Write a test for your code. Write the code. Make sure the test works. Check in. This means you are checking in up to four times per day. It also means you are less likely to get lost in all the things you are trying to do. And it means you need a source control system (we are using Subversion), and an automated build process (we are using NANT and Cruise Control).
  4. The customer is allowed to get the daily build. This way they can keep up to date with what you are doing.
  5. Now throw in an alphabet soup of other best-practice-somewhere technologies like Rhino Mocks, Spring, and NHibernate . You see there is a lot to learn.
Luckily, Agile and Test driven development have reached a critical mass such that there are now tools to help you with this process. I've already mentioned NUnit, NAnt, Subversion, and Cruise Control. But there is also the excellent Microsoft Team Systems that has all of those tools bundled together.

Another tool that wasn't listed that we are also using is ReSharper. Very cool tool with a lot of enhancements to Visual Studio.NET -- and a little bit of pain as well. ReSharper has an extremely large collection of shortcuts, so many that it actually overwrites a number of Visual Studio.NET shortcuts. But, it does have a feature to deal with that. Any time you his a shortcut that both ReSharper and Visual Studio.NET want, a dialog pops up asking which short-cut to use. I guess that is the best compromise. Anyway, for the side of ReSharper, the refactorings, and unit test integrations make it worth the cost of entry (a little over $100).

Now, this is enough for right now. I hate overly long rambling blog posts, and I'm afraid this will have to turn into a series. So, next time I'll write up what MVP, Spring, NUnit, and Rhino Mocks have to do with each other.