Building Software Cheat Sheet

10 12 2009

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 :)

Methodologies

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.

Language

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.

Building System

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.

Build Server

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.

Metrics

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.

Version System

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

IDE

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.

Links

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.





Adjust Webcam settings ubuntu

8 04 2009

My solution was to run this small tool :

luvcview -f yuv -l

I have a creative live im ultra.. Works like a charm.. Now if I could only get my twin display working when I play games!





Stack page

7 10 2008

This is my stack page. Opensource tools that I use, find interesting or need to remember will be listed there:

In use (partial list):

http://wicket.apache.org/

http://wicketstuff.org/

http://sourceforge.net/projects/wicketopia/

jpa http://java.sun.com/javaee/5/docs/api/javax/persistence/package-summary.html

http://www.hibernate.org/

http://www.springframework.org/

http://browsershots.org/ (when I need to test cross platform browser)

http://geo-google.sourceforge.net/

https://simple-log.dev.java.net/

http://jbehave.org/

JTS / Hibernate spatial

Maven plugin:

http://maven.apache.org/plugin-developers/cookbook/add-svn-revision-to-manifest.html

Images / Art / Icons for applications free via creative commons or similar

http://tango.freedesktop.org/

http://www.everaldo.com/crystal/

http://www.famfamfam.com/lab/icons/silk/

http://www.deviantart.com/

http://www.iconfinder.net/

Tools to help your css:

http://www.cssjuice.com/tools/

http://www.roundz.net/

Interesting:

http://sli4j.googlecode.com/svn/site/1.0/index.html (guice log injection)

http://www.codesmell.org/blog/2009/01/quartz-fits/

http://dev.eclipse.org/blogs/kmitov/2009/06/12/jpicus-the-tool-for-java-io-analysis/

http://sixrevisions.com/resources/40-beautiful-free-icon-sets/

http://picocontainer.org/

http://www.jdave.org

http://geoserver.org/

http://code.google.com/p/google-guice/

http://links.sourceforge.net/

http://www.dillo.org/

http://sourceforge.net/projects/protogen/

http://sourceforge.net/projects/qwick/

http://code.google.com/p/liquidform/

J2ME stuff:

https://meapplicationdevelopers.dev.java.net/mobileajax.html

Trouble shooting:
(decompiler eclipse) http://java.decompiler.free.fr/?q=jdeclipse

https://visualvm.dev.java.net

Desktop development:

http://download.oracle.com/javafx/index.html

funstuf

http://slick.cokeandcode.com/

jmoneyengine

documentation:

http://repo.exist.com/dist/maestro/1.7.0/BetterBuildsWithMaven.pdf

http://apollo.ucalgary.ca/tlcprojectswiki/index.php/Public/Subversion

http://apollo.ucalgary.ca/tlcprojectswiki/index.php/Public/Project_Versioning__Best_Practices#Build_Versioning

Project Stitching Spider

CI : https://hudson.dev.java.net/

Issue : trac

WIKI: http://www.xwiki.org

SVN:http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91





SCRUM

18 06 2008

Some time ago I was introduced to some of the scrum principles. Coming from a waterfalll based background, and being introduced partly to scrum it felt wrong.

Some time has passed since that and a I’ve read a couple of books on scrum, and been so lucky to take Jeff Sutherlands certification course on scrum. Seeing scrum in a new light, it feels right. Namely because coming from a waterfall based background, I’ve never seen a project using waterfall complete in time and/or get the customer satisfied with the feature set.

So to summarize what I see scrum are about

  • Giving control to the right people, and by doing that you get the benefit of them committing to their work, on a completely different level than otherwise.
  • Realizing that no project can be specified once and then written, it’s fluid.
  • Giving developers cycles(sprints) of time to concentrate/focus

So what controls does scrum provide?

  • Burndown chart

I’d recommend for the scrum master to create the issues and then assign them to whoever it were agreed upon in the scrum daily meeting. And do remember that you still need the white board and yellow stickers, to keep it fast and simple.

So heres something like scrum in 5 minnutes:

Roles

In scrum there are 3 roles, team member, scrum master and product owner.

Scrum masters role are to remove impediments and oversee the daily meetings, and keep track of team progress.

Team members role are todo the work, estimate, maintain sprint backlog and tell about impedients.

Product owner maintains the product backlog, sorts it probably by a business/complexity ratio once estimated by team. This should be a represent from the customer if you have one, or maybe a marketing represent.

Tools

Burndown chart, every issue has remaining work hours and that make it possible to create a burndown chart. Scrum masters use these to document progress.

The whiteboard for tasks/issues are divided into three categories, sprint backlog, inprogress, done
. Team members/scrum master uses these to keep track of progress within a sprint

Product backlog, which are maintained by by the product owner. This backlog are sorted so the next important issue are first.

Sprint backlog, maintained by the team. Inhere they take what they believe they can manage to complete for the sprint.


Flow

Pre sprint planning/work

Here it’s important to maintain the product backlog, this goes for both the product owner and team members, since the product owner cannot prioritize without without story points. As a best practice it’s good to give external dependencies a special mark, and if they aren’t completed halfway through the sprint it’s probably not gonna get done.

Sprint planning

Here the team creates the sprint backlog.

Sprint

Here all the work are done, each day the team meets at their daily standup scrum meeting (taking no more than 15 minnutes) and says shortly what they have done, are about todo and if they have any impediments.

At the end of every spring there are sprint demo and the idea are to be able to go live with what you have accomplished so far.

General rules

The team, Scrum master and product owner have the ability to abort a sprint if everything are going very bad.





Firefox or FireMem?

3 04 2008

Today I noticed as a lot of times that firefox eats a lot of memory. 358 mb to be exactly, on osx 10.4. It’s wierd, must be a leak. I do know I like to use tabs but currently I have only one and still 344 mb.. And acting slow:/

So I think it should be called FireMem the way it burns memory. However it’s still way better than Internet Exploder.





ROR, Rails what do I think?

31 03 2008

Some of my collegues likes Rails, I see some of their points

  • No need to worry about frameworks
    • Rails comes boxed with a persistance framework
  • They have great support for test, by generating unit tests as default, for controller and functional tests for view and Integration test.
  • They claim fast development(which seems to be true in the beginning anyways)

So I really like the testing part, that it’s all served for you, in java we have archetypes or mojos if you use maven. But still it still does’nt have the complete feeling that Rails has with it’s test, it just feels a little more TDD friendly or at least right now.

Being a consultant that has tried a lot of languages, i’ve tired of learning new languages, or at least im very critical about it. I mean why should I switch from java, I know that there are some things bothering people. But heey the grass is always greener on the otherside. And when it comes to it, you never get the perfect solution. What you can do is minimalize how bothered you are by this by selecting whats right for you.

Which brings me to the down sides of Rails as I see it and as I know(I know very little of Rails):

  • No markup inheritance
  • No real mvc, you can actually have functional code in your rhtml
  • And when it comes to it, you really have to worry about frameworks, for testing, ajax etc

All these concerns bring me to the conclusion that, I would like to stick to this stack:

Wicket+JPA+Spring+OpenJPA

I guess I arent that critiacal about the persistance layer or the IOC but I feel that wicket really has hit the right spot!

And that I foresee that projects where you use Rails, will probably take off quick and the slow down as the project becomes more complex.

Since I like complex projects, I don’t really see me following that path..








Follow

Get every new post delivered to your Inbox.