views:

793

answers:

11

I'm setting up a Java development shop, currently just for myself as the only developer, but with hopes of needing to hire others as the business grows. Obviously I'm hoping to set it up right so that as more people come in, they can be productive right away. Please help suggest things I want to do, and tools to do them.

Here's what I think I need:

  • Distributed source code/revision control (Subversion?)
  • Bug tracking (does Trac do this?)
  • documentation (both internal and customer facing)
  • team communication
  • frequent automated building
  • maybe something to make sure automatic tests pass as part of the check-in process?
+2  A: 

Subversion is not a distributed approach -- go for Mercurial, Bazaar or git instead!

Yes, Trac does do bug tracking (among other things -- check it out!).

Documentation is indeed a must but I'm not sure what you're asking -- tools for it? Why not just javadoc?

For communication you can have many tools, such as skype, email, IM of many kinds, and so forth -- you need to express your specific issues better to get specific advice, I think. Google Wave once it matures may be just great, but it's not production-ready yet.

For continuous build check out CruiseControl -- of course it also run tests &c.

You can write "triggers" for any of the build systems I've mentioned (and even good old svn;-) to run some test suite and reject the commit if it fails.

Alex Martelli
Good points. I'd add: unless you're a API developer, javadoc is probably not right for your customer-facing documentation.And if you're running a complex test-suite in your post-commit hook, you're probably going to slow down your checkins quite a lot. Maybe just run some simple tests on checkin ("does it compile") and run the complex tests from CruiseControl...
Stobor
Javadoc does not do customer facing documentation. I was thinking more in terms of whether specs and user documentation should be done as a wiki, or as repository of Word docs, or something different.
Paul Tomblin
For general-purpose docs I like Docbook (with oXygen, XMLMind or other editors yet, see http://wiki.docbook.org/topic/DocBookAuthoringTools -- you probably need a good XML editor anyway as it's hard these days to not have XML files in your codebase, so why not use XML for the docs too;-), but I know this puts me definitely in a minority, taste-wise (I _hate_ "what you see is what you're supposed to get but actually never will and you'll waste your life tweaking formatting" text editing;-).
Alex Martelli
+2  A: 

A few more items:

  • IDE
  • Billing Software - will you be charging by the hour? If so you might want to track what your time is going towards.
  • offsite backup of some kind.

Each one of your bullet points is probably worthy of a community wiki by themselves. Though in the end you might not care so much about best of breed in each area, but care more about how well they all integrate with your IDE or with each other.

Also, if you really want to get new teammates up and running quickly, consider putting as much of your dev environment into source control as you can, so you can just checkout your "dev-env" project onto a new computer and be up and running instantly!

Peter Recore
But be careful to make your dev-env user-independent! I've had to deal with annoying projects where checking out the dev-env resulted in lots of config files containing "/home/otherusername/..." strings, and changing the files for your local environment made a checkin-able change, which often made svn-update complain about conflicts when someone else accidentally checked in their copy of the config file with some other bigger change.
Stobor
very true! even the best of intentions can go horribly wrong. I had a good mentor who schooled me in the virtue of relative paths and the evil of absolute paths.
Peter Recore
This is very often caught early with a build server. Bad paths will result in broken builds resulting in alarms going off. The sooner the better.
Thorbjørn Ravn Andersen
+5  A: 

To see what a big amount of people thinks to make a good software development environment read this article on the 12 points of joels test

This list does not include the things more important for you. Getting clients getting them to pay and manage legal stuff and taxes.

Janusz
+1 for the importance of having clients.
David Moles
+1  A: 

Rather than use Trac, consider Redmine. It allows you to have multiple projects stored in the one issue tracking system. You can then use the same setup for each project, rather than having to have N instances of Trac.

Matthew Schinckel
+2  A: 

One of your specs (in your question) says:

maybe something to make sure automatic tests pass as part of the check-in process?

I would suggest this is essential. Check out this matrix of continuous integration servers to see which one fits your requirements.

Brian Agnew
+6  A: 

I like Hudson for Continuous Integration builds, and I like JIRA for issue tracking. Eclipse has plugins for both.

Hudson can watch software repositories and rebuild those projects that use the changed resources.

If you need more documentation than javadoc can cover (which is quite a lot) then consider a Wiki. Easy to use, and with a bit of structure you can massage it into a PDF.

Source control is a bugger. Too many to choose from. For a small development team start with either subversion or CVS (which is old but has supreme IDE support) and when you outgrow that and know your needs, then migrate to a better one. Most have migration tools from svn or cvs. It is harder to move from e.g. git to Mercurial, and you defintively want one with more than one implementation. Remember to have good backups of the source control repository - it IS your business. Frequent rsyncs, often tapes.


EDIT: You also want decent hardware. For the Continuous Integration server, the fastest build machine you can afford. For yourself the largest monitor you can afford (not in size, in resolution) for your primary monitor and as many extra monitors as you can afford to have (including adapters to your computer). I have found that Mac's use the pixels better than Windows, so that might also be a point.

My primary monitor is pivoted 90 degrees. This allows me to see many lines at once instead of a few long lines. (For some reason tradition says that editing areas should be wide and short, which may work in word but not in code where lines should not be wider than 72 characters)

Note on Eclipse: Use the source repository to have a single workspace per project! Use the Java Editor Save Function to reformat your code everytime you save - this makes it more readable up front, and goes better with the source repository as changes are marked in the correct version.


Edit: The reason for the CI server needing to be better than your development machine is because it will run all your tests every time you check stuff into your source repository. After a while, that WILL take time.

Personally I have found tests working well for library routines. They specify what works and what doesn't. It is harder to write good tests for whole applications, but you may want to look into that from the beginning, as it allows you to ensure that everything works for every check in. Write a comment if you are not familiar with the concept.

Whatever you choose for the individual parts, you will be glad if they can work together. Hudson knows how to talk to JIRA for instance. JIRA knows how to look in CVS.

Thorbjørn Ravn Andersen
+4  A: 

Most important, the right staff:

  • get great people who find work and handle customers (aka sales)
  • get software engineers who are smart and get things done (http://www.joelonsoftware.com/items/2007/06/05.html)
  • get someone who knows about accounting and the local legal and tax regulations, so you don't get any surprises

Tools / Processes:

  • use a distributed version control system like git or mercurial
  • jira or the like for bug/issue tracking
  • continuous integration with hudson or cruisecontrol
  • wiki system to share the teams tangible knowledge
  • unit tests, clover, checkstyle, findbugs, ...

From a managerial point of view i would try

  • daily standup meetings (checkout scrum) to keep the team updated members to commit by saying what the did, do, and will do
  • timeboxed meetings, everything else sucks.
  • plan iterations/sprints
  • let team do task time estimations
  • pair programming (gets you better code)
  • code reviews (builds trust)
  • weekly in house "techtalks" to build a strong sense for the team
  • twitter like communication tool to keep all insync and informed with minimal distraction
  • develop team towards dynamic languages (groovy, scala, ...)
  • yourself, listen to what the guys at http://manager-tools.com/ have to say...

good luck!

raoulsson
You noticed that he is the only developer for now? :-)
Thorbjørn Ravn Andersen
Yes. But I also read this: "with hopes of needing to hire others as the business grows" ;-)
raoulsson
There's a lot of great info here. Thanks.
Paul Tomblin
+1 for sales people. Too many developers only thing about the technical side of the business, just to find out that stuff doesn't sell itself.
ammoQ
+1  A: 

For starters, SVN will be enough for you. Definitely get a bugtracker. JIRA is good but isn't free. Enforce a rule "No commits without a bugtrecker ticket". This way you will be able to track the development. Do a cruise control and run a build + unit tests after every checkin into the main branch. Bigger changes should be made on a separate branch and then merged into the main branch.

Invest in a good IDE (I recommend intelliJ IDEA) and a good profiler (I recommend JProfiler). They're not free, but they are definitely worth their price.

quant_dev
I'd like to hear more about your experiences with "No commits without a ticket" - it might be suitable for us.
Thorbjørn Ravn Andersen
Put a pre-commit hook into SVN to check for the commit ticket number in the commit message and then check whether the ticket is in the required state and is owned by the commiter.
quant_dev
Atlassian just announced starter licenses for JIRA for $10. http://www.atlassian.com/software/jira/pricing.jsp
Thorbjørn Ravn Andersen
@quant_dev, I was more thinking in human terms - how does it work for your team?
Thorbjørn Ravn Andersen
It was working like that when I joined the team, so I don't know whether there were any transition period problems. But now, nobody complains. The benefits are obvious - it is easy to track what task a particular commit relates to.
quant_dev
+3  A: 
Jay R.
Great answer, thanks.
Paul Tomblin
"There is really no reason to pay for a Java IDE." Believe me, there is. I've switched from Eclipse to intelliJ and nothing would drag me back to this resource hog. Eclipse + large codebase = lots of cursing at the screen when your IDE freezes for, literally, minutes. And intelliJ inspections absolutely rock. With two keystrokes I can add @Override annotations everywhere in the class file where they belong, convert the for (int i = 0; [...]) loop into foreach loop. Refactoring support in intelliJ is much better than in Eclipse as well.
quant_dev
I actually switched the other way. All of the times that I had issues with Eclipse freezing are because of Symantec Realtime Virus scanning and Windows Explorer sucking because of a "large" zip file in a directory. On linux it works and seems fast. My machine at work has a decide amount of memory, so an app using 512Mb of memory doesn't seem that bad.
Jay R.
I don't think Eclipse is as bad as quant_dev says, but having used it for three years after using IDEA for four, I agree that IDEA's refactoring support is significantly better, and IMHO (but, sadly, not my manager's) worth the money.
David Moles
quant_dev, you need lots of memory for Eclipse for big projects. Is that the issue here?
Thorbjørn Ravn Andersen
+3  A: 

Here is what development stack our team of five developers is using over a year now:

  • Eclipse IDE (worked better for us than NetBeans)
  • Maven as a project comprehension and build tool -- simply a must tool!
  • Nexus: The Maven Repository Manager -- serves as a local Maven repo for proxying, and for managing internal and 3rd party libs; simple in use and is really necessary if you're going to use Maven
  • Subversion for source versioning -- was chosen mainly due to very good IDE support (Subclipse for Eclipse IDE)
  • Trac as a bug tracking and requirement management tool -- it nicely integrates with Subversion, has very useful plugins including blog and discussion plugins; also it can be integrated with Eclipse Mylyn.
  • Hudson as continuous integration, which nicely integrates with Subversion, Maven and Trac -- very valuable even for a small team.
  • Sonar code quality management platform -- a tool which integrates a large number of code quality matrix with intuitive web interface supporting code review and drill-down facility for analysis of the problems; integrates with Maven.

In our case this development stack is running under Ubuntu (workstation components: Eclipse IDE, Maven) and CentOS (server components: Maven, Nexus, Subversion, Trac, Hudson, Sonar).

As for the documentation, LaTeX (TexLive and Kile under Ubuntu) works just great supporting high quality PDF generation. The documentation source can be managed by Subversion the same way as the application source. Allows making of simple several page document and large multi-chapter books.

Hope this helps.

01es
+3  A: 

Distributed source code/revision control (Subversion?)

  • Subversion is good enough unless you want to use this as an opportunity to learn Git or Mercurial.

Bug tracking (does Trac do this?)

  • Trac works fine if you don't mind CamelCaseTurningIntoWikiWords. JIRA is fancier but (as noted) not free, and I find its data-ink ratio annoyingly low. Good once you learn which parts of the UI to ignore, though.

documentation (both internal and customer facing)

  • Internally, I would prefer communication over documentation unless you're really willing to commit to spending time keeping internal documentation updated. Javadoc your integration points (internal/external APIs), but try to keep your code and build scripts as self-documenting as you can.

  • That said, requirements docs are useful. I'd suggest using one tracking system for bugs and requirements. JIRA lets you create hierarchical issues, but I wouldn't bother with that till you need it.

  • Trac includes a Wiki, which can be handy although too much content will get stale.

  • Customer-facing docs are all over the map -- depends a lot on what you're doing. If you need big fat manuals (either printed or HTML or on-line help) FrameMaker + the DITA Open Toolkit is a nice combo, but a FrameMaker license is going to set you back $1000.

  • At a certain point this shades into corporate communications (marcom and PR), which are kind of a different animal.

team communication

  • Google Talk (or the instant messaging framework of your choice), email, and the occasional Skype teleconference are probably all you need.

  • An internal wiki and/or internal blogs might be nice but you probably don't need them right away, even once you've added a few more developers. Trac includes a wiki.

frequent automated building

  • Switching from CruiseControl to Hudson has made everyone here much happier -- two teams made the same decision independently and both are pleased with it. Hudson's flexible, easy to configure, and shiny.

  • I have yet to be convinced by Maven. I suspect its value depends on how much you want automated downloads of the latest versions of all your open-source libraries.

    • Edited (Feb. 2010) to add: Several months of Maven 2 experience now and I'm still not convinced. I think (like many frameworks, e.g. Rails) it may work well if you're starting from scratch and structuring your project according to its conventions, but if you already have your own structure in place it's a lot less advantageous.

maybe something to make sure automatic tests pass as part of the check-in process?

  • I'd advise against it. Most of the time the tests will be passing (or should be, anyway) As long as continuous integration notifies you quickly of failures, and you also have stable automated builds (a couple of days' worth of nightly builds, tagged iteration builds, etc.), you want more and faster checkins, not fewer and slower.
David Moles
Using Maven doesn't require you to use the latest versions of open-source libraries. I think you could do this if you wanted to, but a typical project would specify the exact version of each dependency (e.g. commons-lang-2.4.jar). Maven is a great tool, and dovetails nicely with lots of other great tools like Hudson and Sonar.
Andrew Swan
Fair enough. I try to stay away from the build system these days, so I'm not the best judge.
David Moles