Don't look a gift horse in the mouth
My friend Charles Bloom likes to rant on his blog, and I often envy him. He lets his inner id loose in a way few others do. Personally I don't let out a good rant that often but, tonight I will.
Now, earlier in the evening I must admit that I had a few drinks and I also admit that as a rule most of my public rants are fueled by exactly that kind of behavior. But, tonight I don't think that has anything to do with it.
This blog is called the 'code suppository' for a reason. It is the place where I insert my computer software into the anus of the internet.
Now, I release open source code for a number of reasons. Let me take this opportunity to say what they are and in order of importance.
(1) The number one reason is that I do it for myself. Like many programmers I have my 'bag of tricks' code snippets which I use over and over again. No one wants to keep writing the same parser,
or similar piece of utility code over and over again. Many long time C++ programmers accumulate a personal library of goodies over the years and, frankly we publish the source for ourselves as much as anyone else. Chances are I personally go back to the code snippets hosted on this site probably more often than anyone else. I never want to ever again have to write from scratch how to compute the nearest intersection point between a line segment and another arbitrary 3d point in space. I never want to write again form scratch code to read a .INI file, handle key-value spec properties, parse an XML file, etc. etc. So, I post those code snippets primarily for my own use. If anyone else finds them useful, that is just a bonus. This is, I believe, pretty much what my friend Sean Patrick Barret does. Sean is an incredibly generous guy who has released more useful free source code snippets used by more people than almost anyone else out there. For example, I think Sean's PNG reader/writer code has probably found its way into literally thousands and thousands of software projects.
(2) The second but, to me, the most important reason that I publish open code source is out of a sense of moral obligation. Over my 30+ years as a professional software developer I have benefited greatly hundreds, if not thousands, of times from the open source work of others. And when I say 'open source I don't mean that bullshit GPL garbage. I mean really, truly free open source conforming to the BSD/MIT license. Truly free source code in every way with with no restrictions on it other than "you can't sue me if it doesn't work."
(3) The third reason I release stuff open source is in the hopes that some other programmer might find bugs in the code and contribute fixes and/or improvements. There is no better example of this than when Khaled Mamou took my approximate convex decomposition algorithm and used it as inspiration for his dramatically improved hierarchical convex decomposition code HACD. It gives me a tremendous amount of satisfaction that my work inspired someone to do something even better. And, guess what, I'm returning the favor by optimizing HACD so that it will run several orders of magnitude faster than it does today. This process of using open source to work together as a community, helping one another out, is something I find very gratifying to be a part of. Or, at least *used* to find gratifying...
(4) The fourth and final reason that I release open source code is for educational purposes. I think of it as a service to the community and also as an educational exercise. Over the years, when I have tried to get something useful in terms of available open source code I have often run into major challenges trying to extract just the specific piece of functionality that I want. Many software engineers write their code on top of rather massive template libraries; especially for data structures and mathematics. So, if you want to get just a particular routine (like say computing the best fit plane equation to a collection of 3d samples), you cannot simply get just that routine. Instead, you have to adopt 50 to 100 thousand lines of source code, including a massive library and template framework to get access to that functionality. This isn't a problem if you want their whole library, but it is is a problem if you just want that one routine or want to refactor it to work with your own data structures and math template library.
My goal is to help educate the public in what I personally believe is the ideal way to share source code with others over the Internet; as 'code snippets'. With most of my releases I try to set a good example and educate others. I have received enough positive feedback over the years to know that a lot of people really do appreciate it.
Now, it's time to get back to the rant.
I have edited this post from it's original and will replace that content with one simple request.
If someone gives away free open source, and you have questions, feedback, or suggestions for improvements, please send a polite and friendly email to the author. Chances are that author will try to be of help. If you send the author a rude and insulting email, that's probably not going to be very helpful or put them in a mood to help you.
Also, if you don't get an answer to your email, don't be upset right away. Like many people on the Internet, authors of open source work can receive hundreds of email a day, and it's easy for one of them to either get marked as spam or the person intends to give a reply, but it slips through the cracks.
And, as your mother always said, if you have nothing nice to say, you can always say nothing at all.


