How big is your application?
Knowing how big your application is the very first step to performing an estimate. To perform any calculation, the value has to be numeric. There are many options on the type of unit that can be used to determine the size of the application. For most developers, lines of code seem like the most obvious solution. You might actually find a lot of literature using lines of code as the measurement units. Lines of code are easy to count. It can even be automated.
The main problem with it is that it’s completely unpredictable. Lines of code are easy to count once the application is written, but guessing the amount of lines of code to be used prior to any development does not make much sense. You can write the exact same thing using 10 lines or a hundred line, depending on the styles used. Counting the total amount of lines of code is easy, counting the increment is not so bad if you write down the number at the beginning. The real trouble starts when you try to count the amount of modified lines.
The solution to avoid counting lines of code is to count the functional size of the application. The objective is to get a meaningful value you can track your progress against. When using lines of code, the fact that you wrote 50% of the planned code does not mean 50% of the application is written in any way. With functional size, 50% really is 50%. Some pretend the functional size is abstract enough to be communicated to non-technical staff, but they say the same thing about UML, so I guess that depends on how technical is your non-technical staff.
There are many techniques to count functional size, such as IFPUG or COSMIC-FFP. Both methods are supported by international organizations and ruled by a standard. The COSMIC-FFP method is very simple to understand. It contains a few very simple steps:
- Identify the functional processes (ex: create blog post)
- Identify the data groups (Author, Post, Category, Confirmation Message)
- For each process, compose the process using basic operations on data groups. The 4 basic operations are Entry, Exit (or Display), Read and Write
- Count 1 point for each basic operation.
Using this method, creating a blog post would have a functional value of around 7 (entry, read categories, display categories, read author, display post, write post, exit confirmation message). The size you obtain may be a little different depending on what you considered was required based on your fictional requirements. The result I gave might not be 100% accurate as I’m not really a COSMIC-FFP specialist. I only give this “state of the art” example as a reference. I personally think that’s a little excessive for a web application. Considering reading a simple value, like your active author, makes no real sense as it’s not much harder than reading a variable. This level of detail is probably good if you actually have to read from a sensor in a real time application.
The technique I use is based off this COSMIC-FFP method, but it’s not as formal and I never wrote the rules for it. I basically take off the entry and exit data movements which are way too simple in a PHP application, and I pretty much group the reads and write. To summarize all this, I count the amount of affected data groups in a functional process. To make it even more simple, you can replace data groups with database tables excluding relational tables for database driven applications. I also tend to exclude the tables when all I do is a simple listing to fill in a drop list. In the end, that same blog post has a count of one, while the editing would have 2.
OK, I largely simplified the COSMIC-FFP method. I did it because it fits my needs better. I don’t care if my measure cannot be ported across different technologies, I want measurement to be fast and accurate. The method you use to measure does not matter as long as you remain consistent with it. In facts, you can even change the way you measure on the way if you realize it no longer fits your needs, but there is a price to pay, you will have to re-measure all your past projects unless you want to stop using them in your estimates.
I use a spreadsheet to perform my calculations and perform most manipulations, but I keep my analysis data in a wiki, where I list my processes and the size attributed to each of them. I include as much information about it as I feel like including. Keeping the source data of your measures is what allows you to adapt your measurement techniques. If you don’t have your process list and your data groups listed anywhere, there is no way you will be able to adapt the count and make sure it’s consistent.
I think I mentioned measurement of an application is subjective. The only way to improve is to measure applications. Multiple questions will come up as what should be measured the first few times. As those questions get answered, go back to the previous project and make sure they were answered the same way.
LP, what kind of wiki do you use for your analysis data?
Anything can be good, really. I used Bitweaver with MetaPackage, because it was installed already. The main issue with it is that it’s extremely slow. If you only want to install it for yourself, anything will do. I like DokuWiki. It stores everything in text file, the syntax is very clean and it’s simple to install. The downside is access control, but if you don’t need anything complex, it’s just perfect that way.
The Wiki is only used to preserve information about the analysis for further use. A text document on your computer, or better, in version control, would give similar results.