Showing posts with label unit tests. Show all posts
Showing posts with label unit tests. Show all posts

Mar 24, 2015

Building a New Product

As my opinion about perfect team structure has developed during the past years, so has my understanding of how awfully many different things need to be considered when building a new (desktop) software product.


As a coder I used to think that a random idea is a good starting point for a new feature. I still believe that making a crude and fast proto is a good idea, but there's maybe even better way. Before writing any code, make a sketch. Before implementing any functionality, test the idea with a real customer if possible. Then make variations to the design and iterate again. Do this for a while and you have less code to maintain and better understanding of what you maybe should be doing (Lean Startup and Lean UX).


Instead of just copying files between different computers, you might want to set up a version control system. There are many providers, but I can easily suggest Git. It's free, relatively easy to learn and so widely used that you can get help and skilled Git users easily.


"Well written code is its best documentation". I partially sign this statement but not totally. Useless comments that get out of date are just useless. But there might be general design ideas like what kind of inputs and outputs are expected and how different parts of the product are supposed to communicate together. Usually these higher level characterizations don't change much even though classes and modules can have much shorter life cycles. So some amount of (design) documentation is nice.


I like to promote test-driven development, because then you get a nice set of unit tests and presumably your life will be much easier later. It's like an investment into the future. Of course before you can write tests you need to implement a test framework. Fortunately for many modern languages these are often easily available. But if you are dealing with more exotic playground, you might need to invest a bit more time and effort. Never the less, having a unit test framework is an investment you seriously want to make.


It doesn't harm if testing and test automation is given a thought already at the design phase. You might want to have a tester involved.

If you are not intending to make your product open source (which is of course ok too) you should maybe build some kind of licensing system. There are many possible business models and maybe it also depends on if the users are expected to have internet access or not. But it's also an aspect to keep in mind.


Last but not least, after developing the product for a while you might remember that there should also be a way for the users to install the software. And it might have some prerequisites and dependencies that should be fixed before the happy user is able to start your product. You need an installer (WiX, NSIS, InstallShield). And if you haven't done that yet at this stage, you probably also want to set up a Continuous Integration system.


In addition to these, there are many more useful practices (coding and documentation conventions, manuals, 3rd party libraries, etc.), but I think I'm done here. The main point of this post was that there are really many things to consider when kicking up a new product. And even if you implement these it doesn't really guarantee anything yet. But at least you are not failing because you missed these things. :)


Jun 24, 2013

Factory settings

Coding practices generally are not something that Scrum pays attention to. Also, teams should probably have  as few outside dependencies as possible. But there are certain support functions that can be centralized. Or at least we have.

We have one special team that takes care of our constant integration server. Automatic build scripts do the compilation and linking and run the unit tests. If the build or some of the tests fail after checking in new code, teams get a message automatically.


Each of the teams have their private playgrounds. In addition we have some integration builds that combine efforts of multiple teams. And some builds that generate data about code metrics: cyclomatic complexity, routine lengths, nesting level etc. These are extra services that save time for all the teams. And they can concentrate more fully on producing value for the customers.

This one special team handles also the packaging of the product. Putting together executable + manuals + creating installers. This knowledge is scarce so we have decided to do these activities by one team. Again, a compromise, but in a multi team environment saves lots of manhours.

If you are familiar with Scaled Agile Framework, this team would be called System Team.