Building Software with a smile
I’ve been wanting to write this article for a while now, I use all my articles as personal notes, plus giving back to the community are something that counts in my book aswell. The article are about how we manage and build our software at work and the stuff im using for my private pet projects. It’s an ever evolving process, that will probably never stop. There’s always process’s that can be simplified. It’s a short article that you can use for getting a stack together quick. Enough chatter, onto the fun stuff 🙂
We try to adhere under the ideas of people like Robert Martin (whom have summed up a lot of ideas of other people), go grab clean code you wont regret it. In short write code in a minimalistic readable way, remember to test it, care about your code and smile. Clean code really has summed it all up. Although there’s a lot of books on the topic’s of coding, testing etc. It’s my favorite. Oh and do not forget something like scrum.
I’m not going to rant about why but we use Java, there’s several reasons but I have no deeper feelings about this topic, I havent looked enough into Ruby, Scala etc. to be a judge. Mostly that there’s so many things available for Java, however the same are the case for Grails, Rails etc. I just like static languages a bit more. However the topics in are not in depth about Java.
We are using Apache Maven 2, which has some really nice features like it’s convenience over configuration. There’s very good integration towards build servers and a huge list of plug-ins that’ll to the job for you. Just rememberer do it the maven way, and let the system work for you, do not fight it 🙂 One side of Maven are testing, for that we are using a mixture of Junit4, Jmock and JBehave that ensures us maximum freedom and productivity.
As for build server we are using Hudson, it’s simple and straight forward. It has great integration towards maven, I guess we could just as well have used Continuum but Hudson worked on first try Continuum did not. In Hudson we have three projects per Maven project, one for continuous integration and one for making a release and one for our metrics. The CI project are notified by our version system upon changes, then grabs the source and builds. The release project awaits when we are ready for a release, and then assigned build manager “clicks” build, awaits and downloads the finished release product, simple as that! The release process of course, checks out a fresh copy tags it in scm builds and releases/package the artifacts. I’ll write a bit about the metrics project below.
Now what goes hand in hand with a build server are a metrics analyser like Sonar which actually are a bunch of subprojects packaged nicely together and presented in style. It’s really easy to add to any Maven project just have the sonar running and run mvn sonar:sonar and voila fresh metrics. Just remember sonar will only keep one set of metrics per day AFAIK.
Before I discovered Sonar I used a lot of time configuring Maven metric plugins. However Sonar does it all and easy, plus have a lot of features/plugins, like timeline hotspots and quick wins. Very nice all in all.
For scm we use Subversion, no real arguments here it works for me and I haven’t tried out any other scm. Most annoying thing though are that we are having some trouble using branches (svn 1.5 using eclipse/tortoise etc) otherwise not much to say. I’ve peeking a bit towards git, but haven’t had the time to go further.
Ticket System & Wiki
For Tickets/Defects/issues & Wiki we use trac. Reasons are that it’s simple and materialistic. Although sometimes to minimal, theres always a plugin that will just expand trac the way you want. Only thing that are bothersome is working with multiple trac sites. I’ve been eager to try redmine out, it seems like trac but can a bit more. So heres what im missing in trac:
- Ticket dependencies
- Multiple site support easy
We use Eclipse, mainly because it’s the one I’ve been using longest and one of our vendors has made a specific product based on eclipse. I’ve tried both subclipse and subversive, and can’t figure out what are best. None of them seems to be working optimally with branches. Only way to get a good diff when merging a branch are in svn command line One note though we are limited to Eclipse 3.2 and plugins that support that. So it might be better in newer versions.
I’ve been told a couple of times by different people that idea, are better and actually will make you more productive. And now with the free community version I might give it a try.
So following above, you should be set all the software mentioned in this article are free. Now go download and start making the world a better place. There’s a lot of projects out there waiting for you, either open source or for money. And just remember it’s better to try than not, some one once said it’s by our mistakes we learn 🙂
Stuff we use:
Stuff that i’d like to investigate:
Ohh and if you have any comment’s feel free to write.