views:

191

answers:

5

I've been holding off on releasing a library I wrote because it is the first library which I'll be releasing publicly. Here are my concerns:

  1. The library isn't complete it is in a very usable state, I'd say it is version 0.3, however it still lacks a number of features which I would like to at some point implement, and control how they're implemented (meaning not merging someones implementation).
  2. I'm fearful of criticism, I know there are a few things which should be reorganized/refactored, but I wrote the initial class quickly to be functional for another project I am working on.

So when is the best time to release? Should I just throw it up on github and work on the issues post-release? Or should I wait until I refactor and feel completely comfortable with what I have written?

Most classes/libraries I see are always very elegantly written, however I have not seen any in very early release stages, are a lot of classes fairly sloppy upon initial release?

+14  A: 

Release early, release often.

Criticism is a good thing as long as its constructive. Ignore the haters, pay attention to the folks filing bug reports and commenting.

The internal structure of the code matters, but it matters more if it works for its intended purpose. In general, refactoring will change how code works internally but will not affect how it is used. Same inputs and outputs.

Freiheit
+12  A: 

You need to get something half-way useful first, and then others will say "hey, that almost works for me", and they'll get involved in the project.

Linus Torvalds
Linux Times (2004-10-25).

Gary Willoughby
+1, good find ;)
James.Elsey
+4  A: 

It depends on why you are doing this. If it's to provide something useful and it's useful and has benefits that no other library has, then go for it. Just list the status and what's coming next.

If you are doing this to point to on a resume, get it in good shape (the code, not necessarily feature complete). Imagine a future employer poking around the code to see what it looks like, not downloading and running the code.

Lou Franco
+2  A: 

Whether you release the code in an incomplete state or not, it's always worthwhile having enough documentation to allow users to understand how to use the library.... even if it's only API docs. Make sure that anything incomplete is tagged as TO DO - it helps to maintain a target list of tasks to complete, and lets users know that the feature/method/whatever hasn't been forgotten.

Providing a set of code style/standard documents (perhaps with architectural notes on class relationships) allows other developers to contribute more readily, and in a manner that enhances the library rather than making it a hotch-potch of spaghetti code. It's never easy releasing a library, then having to refactor, while maintaining backward compatibility for users who have already taken up and are using that library in a production setting.

EDIT

Don't be afraid of criticism... it goes with the territory. Some critcism can be constructive (take heed of that). There'll be plenty of other people who criticise your code (for whatever their reason) without being constructive, or who just denegrate your work. The difference is, you've produced the goods, they probably haven't ever contributed to any OS product/library.

Users expect you to fix their problems immediately, or to write their code for them to use your library, or simply say "it doesn't work" without any explanation of what they mean. You have to learn to live with that 24x7x365.

But just once in a while, somebody will thank you for saving them hours of work, or for providing something useful... and suddenly all the stress and hassle feels worthwhile.

Mark Baker
This is very insightful, especially on how to deal with criticism. Should it be expected that you maintain backward compatibility prior to a 1.0 release?
evolve
You can get away with breaking backward compatibility as long as any users are aware of the changes in advance... users who always download the latest release tend to expect to be testers (though letting even them know in advance is courtesy where practical)... otherwise follow the axiom of "release early, release often" that Freiheit mentions: you can then deprecate older methods to give advance wanrning of a change within your beta/production releases. Always try to ensure that public method inputs and outputs remain constant where you can, but provide advance warning where you can't.
Mark Baker
A: 

I read a document by Joshua Bloch, a pricipal software engineer at Google that talked a lot about the best type of API design. Basically, once you release it, it is more or less set. He says

Public APIs are forever - one chance to get it right

You can check out the slides here. It's definitely worth reading. I have a PDF of it as well; let me know if you need it.

Steve