Everybody knows the benefits of the open source software. Of course, the main benefit is the availability of the source code and the licence that allows us to perform he modifications and to distribute the derived product. The availability of the source code makes us think that the source code should be perfect. However this is not always true.

Don't get me wrong. I really love some open source projects. In addition to great features, they have neat code that can be used as an excellent learning material. Even Microsoft understands that. CodePlex and MSDN Code Gallery are good examples of that fact.

However there are project, very popular projects, I must admit, that simply badly written. I've been developing with PHP for many years and I ran into really popular, but no so well written applications. I don't imply that it's a fault only by PHP applications, I just had a lot of experience with that.

That may sound really ridiculous, because when the source code is open, many people can read it and make better. However sometimes it doesn't happen, people prefer to concentrate on adding cool features that is right, but on the other hand it makes the code unmaintable and bloated.

That is really a paradox. I think it can be explained by the fact that the open source software is built mostly by the enthusiasts who love to do what they like. I mean that is far more interesting to introduce brand new features rather than to worry about the quality of the source code.

I might be wrong on that though. So, I want to hear your opinion. Have only dealt with well written open source projects? If you have an experience with poor written ones, what do you think is the cause of that?