Two important (but perhaps tedious) aspects of software engineering are effort estimation and progress tracking. As software developers, we often enjoy the creative aspects of our jobs and we sometimes see the software management folks as boring bureaucrats (at best). However, as functional programming is adopted on larger projects, it will become more important to understand how estimation and progress might be different when using functional programming languages (or if it is basically the same).
For almost any nontrivial software project, and certainly for every commercially developed piece of software, someone will probably want to know:
- How much effort will it take?
- How far along are you?
- How much more time do you need?
- How long will it take to fix this bug?
- How long will it take to add this feature?
Different or the Same?
The first issue I want to explore is whether estimation and progress tracking are different at all in functional programming. To do this, I’ll split the estimation methods and concerns into two categories.
First there are architectural, systems, and task level aspects of estimation. I claim that these tend to be more subjective. For example, a developer assigns story points informally and subjectively in Scrum for an upcoming task. I think this process of estimation is fairly language independent (though the estimate itself may depend on the chosen language). But even higher level estimation is fairly subjective in my opinion. I’ve seen large systems trying to use sophisticated estimation models that ultimately rely on past experience and human judgement to produce reasonable numbers. When tools like function point analysis are used to estimate effort, the result and its units may not differ from language to language (but when using lines of code, the result would likely be very different for functional and imperative languages).
What may be a little more interesting and more likely to differ in functional languages is objective progress tracking as well as estimation for maintenance tasks. Let’s say we already have some code–a partially developed system. Can we objectively determine what percentage this represents of the fully developed system? Also, given a maintenance task (e.g. bug fix, feature addition) of some complexity and an existing FP code base, can we estimate how much effort it will take to make the change? Would it be based on lines of code or some other metric?
I don’t have good answers to these questions and I haven’t seen any, but I think that as the FP community matures, we’ll have to develop some reasonable answers. One important foundation on which to build here is software metrics, and there has been some interesting work there.
An early PhD thesis by Klaas van den Berg provided an initial treatment of metrics in functional programming. However, Chris Ryder’s more recent thesis covered subject that are more immediate interest to the topic at hand. Even still, neither work addresses estimation and progress tracking, but some brief discussion is warranted here and certainly in a separate post.
The van den Berg thesis focuses on complexity metrics in functional programming. These could certainly relate to estimation since complexity can be a factor in maintenance costs.
The Ryder thesis also covers complexity but adds a lot of cool metrics such as various attributes of call graphs and functions, plus testability, refactoring metrics, and others. He even talks about visualization of Haskell programs which is important not only for measurement but also for design and maintenance.
A Call for Comments
If you have used some sort of formal (or even semi-formal) method for estimating software and tracking progress on a project using a functional language, please post a brief description of what you did in the comments. In fact now that I think about it, if there’s a group that has used formal metrics in large scale FP projects, I bet I could find it in the Erlang community–maybe I’ll go ask them…
A Few Links
Managing and Leading Software Projects – Academic Text
Wikipedia Article on Scrum
Fundamentals and Introduction of Function Point Analysis
Software Measurement for Functional Programming – Chris Ryder Thesis
Software Measurement and Functional Programming – Klaas van den Berg Thesis