Agile Is Not A Process

by Jeff Doolittle 23. May 2009 07:07

Lately I'm hearing a lot about agile "processes" and teams that claim to be adopting an agile "methodology".  This sort of language speaks as if certain structures and procedures can be adopted which will make a team agile. This thinking is misguided at best, damaging at worst. When Kent, Bob, Ward and the other 17 "Apostles of Agile" crafted the Agile Manifesto, they did not publish a list of procedures or processes.  Instead they provided a set of values and priorities.

Are you part of a team that is striving to be agile?  If so, ask yourself, what is the primary driving force behind your efforts?

  • Structures
  • Procedures
  • Processes
  • Methodologies

or

  • Values
  • Priorities
  • Principles

Do we need structures and procedures?  Absolutely! They are the context in which we perform concrete actions in order to fulfill the values and priorities to which we are committed. However, it is the ability to adapt these structures and procedures that makes an Agile team. When methods and structures are rigid and unchanging, agility has ceased.

Agile is not a process, but it is about how we create, shape and adjust our processes. The real question to ponder is this: "Do current structures, procedures and metholodogies enable us to maximally operate according to our values, priorities and core principles?" This is the question of alignment (a concept I will explore further in future posts). If the answer is "no" then are you willing to do something about it?

Currently rated 5.0 by 2 people

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

Tags: , ,

Agile Project Management

Preparing for an Agile Retrospective

by Jeff Doolittle 19. March 2009 17:02

One of the facets of the Agile methodology I appreciate is the emphasis on transparency.  Rather than ignoring the proverbial elephant-in-the-room, Agile helps us to quickly identify (and hopefully address!) the real issues that affect our teams.  This aids the continuous learning process as we must constantly face hard realities and find creative ways to address them.

A vital part of the Agile process is the retrospective.  In this process, the team members identify the events which have occurred during a previous time-period.  They then seek to discover patterns in these events.  Finally, the culmination comes as the team identifies ways they can continue doing what is working, improve on what is working, and avoid doing what has not been working.

It is important to enter the retrospective process with a dispassionate view as to the events which have occurred prior to the retrospective.  It is non-productive to place blame on individuals or circumstances.  Instead, we must work together to face reality in the form of hard facts. As we reflect on these factual events, we work collaboratively to identify possible solutions that enable the team to reach for ever more productive heights.

This isn't to say there is no room for feelings in a retrospective.  Certainly the team members may experience a range of emotions as they reflect on the events of the previous time-period.  But the idea is to avoid any form of us-them mentality, or to blame circumstances for the outcomes.

Retrospectives can be an exhilarating and enlightening experience.  They are a great tool for improving the continuous learning of your teams.

Be the first to rate this post

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

Tags:

Agile Project Management

ASP.NET MVC Version 1 Has Shipped

by Jeff Doolittle 18. March 2009 07:12
Version 1 of Microsoft's ASP.NET MVC framework has shipped.  Find out more about the framework or go download it.

Be the first to rate this post

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

Tags:

Software Development

Patterns & Practices - Part 2

by Jeff Doolittle 17. March 2009 15:37

In my previous post on Patterns & Practices, I discussed the fact that in order to learn P&P, you have to be willing to make mistakes.  In the early stages, it is beneficial to look for opportunities to apply patterns to your development so that you can begin to see how they take shape.  You may not understand their benefit in the early stages, but this is a vital step, akin to the experience of the "Karate Kid" as he was told to "wax on / wax off".  He spent weeks practicing the same moves over and over again, not really understanding the purpose of such repetitive tasks.  What he failed to realize was that he was developing muscle memory and creating well worn neural pathways that would prove vital in his development process.  This holds true for us as software developers as well. [For this early development stage, a key resource is a book such as Head First Design Patterns].

Eventually you gain some proficiency with the repetitive tasks.  You begin to realize that certain patterns work better than others in certain circumstances.  You might discover that some patterns can paint you into a difficult corner (Singleton is of course the prime example, though Static Gateway has its pitfalls as well). At this stage you are beginning to deconstruct the value and utility of particular patterns for certain situations and contexts.  You awaken to the realization that code can have a "smell" that communicates whether a design is fitting or not.  While you cannot necessarily name the "smell" it is clearly there.  [At this stage, you're ready to tackle Refactoring to Patterns].

Take time to identify patterns that fit well for addressing particular smells.  Look for examples in code written by others (you are taking time to read code written by others, right?).  And start looking for ways that improper use of patterns can introduce smells of their own.

In my next post in this series, I will switch gears and discuss the relationship between Patterns and Practices and why you ultimately want to emphasize the Practices over the Patterns.  Stay tuned!

Be the first to rate this post

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

Tags: ,

Software Development

Visual Studio Project Sorting Fix

by Jeff Doolittle 4. March 2009 04:40

When you first create a solution using Visual Studio 2008, your projects sort nicely in alphabetical order.  But then as your project grows, you begin using solution folders to organize your projects.  It is at this point that your projects no longer sort alphabetically within their solution folders. 

Of course I've heard of the trick where you just choose one of the projects in a folder, press "F2" (rename) and then leave the project name as it was previously.  But this is 1) a pain, and 2) only sorts projects in that one solution folder.

So I created a tool that will modify your Visual Studio solution file (.sln) and make the projects sort properly within the solution folders.  Check it out at CodePlex:  Visual Studio Solution Sorter (http://solutionsorter.codeplex.com/).

Currently rated 5.0 by 1 people

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

Tags:

Software Development

Patterns & Practices - Part 1

by Jeff Doolittle 3. January 2009 02:20
This is the first post in a series on Patterns and Practices.  The series will explore the learning process of a developer who desires to learn and apply good patterns and practices.

Emilio and I had an interesting discussion a few days ago regarding Patterns & Practices.  We observed that when a developer first adopts P&P, he behaves like it's all about the patterns.  The developer begins to read books and blogs that describe the various patterns and how these can be useful.  He begins to discover patterns in existing libraries and frameworks.  He starts looking for opportunities to implement patterns in his own development.  And he almost inevitably ends up suffering from some form of patternitis (often concentrated around an overuse of Singleton!).

I believe this phase of development is necessary for a developer.  To comprehend patterns you have to actually try developing with them.  You can learn a lot about patterns from a book, or by reading code from someone else's project.  But ultimately the only way to truly understand patterns is to actually put them to use in a project of your own.  In this regard, learning patterns is like learning to ice skate - you can watch others skate, you can read books on skating, but ultimately you're going to have to throw on some skates and hit the ice.  And when you do, you're going to fall.  When I learned to skate as a kid I remember that I was always afraid to fall.  This fear prevented me from learning.  But eventually someone told me that the only way to learn to skate was to push myself, and that meant I was going to fall sometimes.

So dig in, read about patterns, study them, learn to discover them in your code and in the code of others.  And go ahead and try using some of them in your own projects.  Yes, you will make mistakes, but this is a vital part of the learning process.

This post has focused on the initial process of learning patterns.  In my next post on this topic, I will explore how the developer can begin to experience success applying patterns in his or her own projects.

Be the first to rate this post

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

Tags:

Software Development

Signature Converter

by Jeff Doolittle 23. December 2008 16:27

For a mobile application I'm working on, I needed a simple signature capture control. I found just such a control at the Code Project (http://www.codeproject.com/KB/mobile/SignatureCapture_PocketPC.aspx). The code will capture a signature and actually convert it into bitmap coordinates. This will allow me to store much less data rather than full images. But at some point I'm going to want to convert these bitmap coordinates back into an image. And unfortunately, the signature capture project only provides Java code for performing this process.

Well, if anyone else is interested, here is the Java code ported to C#. My next step will be to extend this class so that it isn't directly dependent on File System IO. But this should be enough to get anyone started who'd like to use the Signature Capture control from CodeProject, but wants to use .NET and C# to convert the bitmap coordinates back into an image.

using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Drawing; using System.Drawing.Imaging; namespace Agilification { public class SignatureConverter { const int baseX = 25; const int baseY = 25; public static void Convert(String inputTxtFile, String outputGraphicsFile) { List<String[]> v = readFile(inputTxtFile); Hashtable ht = getMinMax(v); int minX = (Int32)ht["minX"]; int maxX = (Int32)ht["maxX"]; int minY = (Int32)ht["minY"]; int maxY = (Int32)ht["maxY"]; int width = maxX - minX + baseX; int height = maxY - minY + baseY; Image image = new Bitmap(width, height); Graphics g2d = Graphics.FromImage(image); var b = new SolidBrush(Color.White); g2d.FillRectangle(b, 0, 0, width, height); drawImage(g2d, v, minX, minY); g2d.Dispose(); image.Save(outputGraphicsFile, ImageFormat.Jpeg); } private static void drawImage(Graphics g2d, List<String[]> v, int minX, int minY) { for (int j = 0; j < v.Count; j++) { String[] points = (String[])v[j]; int x1 = 0; int y1 = 0; int x2 = 0; int y2 = 0; for (int i = 0; i < 4; i++) { x1 = Int32.Parse(points[0]) - minX + (baseX / 2); x2 = Int32.Parse(points[2]) - minX + (baseX / 2); y1 = Int32.Parse(points[1]) - minY + (baseY / 2); y2 = Int32.Parse(points[3]) - minY + (baseY / 2); } var p = new Pen(Color.Black); g2d.DrawLine(p, x1, y1, x2, y2); } } private static Hashtable getMinMax(List<String[]> v) { Hashtable ht = new Hashtable(); int minX = 9999; int maxX = 0; int minY = 9999; int maxY = 0; for (int j = 0; j < v.Count; j++) { String[] points = (String[])v[j]; for (int i = 0; i < 4; i++) { minX = (Int32.Parse(points[0]) < minX) ? Int32.Parse(points[0]) : minX; minX = (Int32.Parse(points[2]) < minX) ? Int32.Parse(points[2]) : minX; maxX = (Int32.Parse(points[0]) > maxX) ? Int32.Parse(points[0]) : maxX; maxX = (Int32.Parse(points[2]) > maxX) ? Int32.Parse(points[2]) : maxX; minY = (Int32.Parse(points[1]) < minY) ? Int32.Parse(points[1]) : minY; minY = (Int32.Parse(points[3]) < minY) ? Int32.Parse(points[3]) : minY; maxY = (Int32.Parse(points[1]) > maxY) ? Int32.Parse(points[1]) : maxY; maxY = (Int32.Parse(points[3]) > maxY) ? Int32.Parse(points[3]) : maxY; } } ht.Add("minX", minX); ht.Add("maxX", maxX); ht.Add("minY", minY); ht.Add("maxY", maxY); return ht; } private static List<String[]> readFile(String fileName) { List<String[]> v = new List<String[]>(); var reader = new StreamReader(fileName); String record = null; while ((record = reader.ReadLine()).Trim().Length > 0) { String[] points = new String[4]; points = record.Split(' '); v.Add(points); } return v; } [MTAThread] static void Main(String[] args) { try { String inputTextFile = ".\\Sign.txt"; String outputImageFile = ".\\Sign.jpg"; Convert(inputTextFile, outputImageFile); } catch (Exception ex) { Console.WriteLine(" exception: " + ex.ToString()); } } } }

Be the first to rate this post

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

Tags: ,

Software Development

My Visual Studio Color Settings

by Emilio Cavazos 8. December 2008 02:59

I am really surprised that there isn't a community site for sharing Visual Studio settings.  If there is one, let me know because I've looked and couldn't find anything.  I thought it would be nice to share my font and color settings for the people interested.  It's a version of Ragnarok Grey that I tweaked a little to fit my personal taste.  I uploaded some screen shots below to give you a preview.   The download only contains font and color settings so it will not change any of your other VS settings.  You should still back up your current settings just to be on the safe side. 

Dark-Colors.zip (1.97 kb)

You can find more color settings by Tomas Restrepo here including the original.

C#



HTML

JavaScript

Currently rated 5.0 by 2 people

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

Tags: , ,

Software Development

ToFormattedList Extension Method

by Emilio Cavazos 1. December 2008 14:54

Forgive me if this incorrect, but I believe the ToFormattedList() IEnumerable extension method was part of the early ASP.NET MVC previews.  If you’ve used the method then you are aware of its usefulness.  You pass in a format string (ex. “<li>{0}</li>”) and you get back a string of all the objects that were in your IEnumerable individually formatted ("very nice" -Borat).  This is perfect if all the objects in your IEnumerable have an acceptable ToString() method. What if you are working with POCOs or business objects and you would like to use a property instead of an objects ToString() value?  This is exactly the scenario that prompted me to create a ToFormattedList() extension method for IEnumerable<T>.  

To satisfy this new requirement I needed to add a new parameter.  My version of ToFormattedList() takes a Func<T, string> parameter to access the appropriate property (we need the func, we gotta have that func).  Below is the simple code that makes this work and example of its use.

Code

    public static string ToFormattedList<T>(this IEnumerable<T> list, string format, Func<T, string> func) {
        var s = "";

        foreach (T item in list) {
            s += string.Format(format, func.Invoke(item));
        }

        return s;
    }

Usage

    var output = companies.ToFormattedList("<li>{0}</li>", c => c.Name);

Be the first to rate this post

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

Tags: , ,

Software Development

Lazy Init VS Constructor Init

by Emilio Cavazos 26. November 2008 10:18

One of my favorite things about programming is also one of the most frustrating things about programming. There's always more than one way to solve a problem.  Software developers are faced with many choices.  There is much to consider at every phase in the process.  Efficiency, deadlines, performance, maintainability and scalability are all important topics to consider.  So what criteria should you use to choose the correct convention or pattern?  I'm here to let you know, there is no definitive answer (surprise).  Also, this versus article is not meant to declare a victor.  I wanted to use this example to illustrate my point on the choices developers have to make and the criteria that affect those choices.

Let's take on lazy init first.  Below is a simple class with a Names property.  Instead of initializing the list when the object is created, initialization is delayed until the property is needed.  The if block is there to protect against the creation of a new list every time you retrieve the Names property.  Performance is the most common argument I hear for using lazy init.  Performance is a very good reason to use lazy init.  As you can see, there is quite a bit going on for a simple object initialization.  At minimum, you need a field and a property, not to mention the null object precaution.  If you've been developing for a while, it is easy to get in the habit of starting with optimized code.  Shouldn't the goal be to start simple and refactor as required?  Is this common convention needless complexity?

 public class SimpleClass {

        private IList<string> _names;
        public IList<string> Names {
            get {
                if (_names == null) {
                    _names = new List<string>();
                }
                return _names;
            }
        }

        public SimpleClass() {

        }

    }

And in this corner we have the challenger, constructor init.  Using this approach, the Names property will be initialized when SimpleClass is initialized.  One benefit of constructor init, as seen in the example below, is simplicity.  There is no need for a field or an if statement.  What about performance?  Performance is a valid concern but it should be weighed against code efficiency.  Simply put, a developer has a lot less code to write when using constructor init.  The need to optimize for performance may never arise.  In fact, if lazy init improves your code's performance, you might have a problem with SRP (zing).

    public class SimpleClass {

        public IList<string> Names { get; private set; }

        public SimpleClass() {
            Names = new List<string>();
        }

    }

It's probably obvious that I prefer simplicity over complexity.  I acknowledge that complexity has its place in development and is appropriate at times.  I believe the priorities and factors that lead to code complexity are an important and overlooked part of software development.  If you're not sure why you need it, maybe you don't.  The complex solution should answer the why.

Note: a similar comparison can be made for Service Locator and Constructor Injection but I will save that for another post.

Be the first to rate this post

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

Tags:

Software Development

Powered by BlogEngine.NET 1.4.5.0
Theme by Extensive SEO


Subscribe

Jeff is reading...