John Ratcliff's Code Suppository

A place where I insert my code into the anus of the Internet.

 

Sunday, August 28, 2011

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.

14 Comments:

  • At 12:04 PM, Blogger Bryce said…

    I have come to pretty much hate the internet, especially people who have an inexhaustible supply of time to argue stupid crap. Then eventually it always comes out this "expert" lives in a trailer and sells nazi paraphenalia on ebay to make a living. But probably it's smarter not to engage, most people probably don't "get it" when it comes to why people post code - it's not for end user so much as people who have no problem taking it and running with it.

    I agree about GNU. There's not much free about their software, and they seem to have a pretty intrusive agenda to make all software go through them, and a lot of somewhat important software gets seriously hampered because of this.

     
  • At 12:11 PM, Blogger John said…

    Bryce,

    I recently made a blog post, on my personal site, about how insane people who leave comments on YouTube are. You will see, if you read that post, that I never got angry or upset. In fact, I thought it was funny (sad) but funny.

    However, between professional software engineers, especially if you are giving people stuff for free, I expected a certain amount of basic courtesy and respect.

    It turns out that it was true that some people had reported bugs with the texture packing code, over on the GoogleCode project page. However Google was not sending me email notifications, and these individuals never sent me a personal email as well. Nor did they ask to become a project member to submit a bug fix.

    Don't be part of the problem, be part of the solution. If you find a bug, or make a bug fix, then ask to become a project member and get involved. This is a true stone-soup group. It only works if every one benefiting from free source also contributes.

    But attacking people and being rude is certainly no way to make friends or encourage anyone to provide useful open source code.

    I have since done a google search on this character who emailed and I found forum posts littered with his verbal bombs and insults. I don't think he's making a whole lot of friends in cyberspace.

    John

     
  • At 12:52 PM, Blogger Majid Ali said…

    Please help me by reading my appeal on my profile

     
  • At 1:14 PM, Blogger Bryce said…

    I wouldn't assume most people trying to use code are proffessional software engineers, or that if they are they have any idea what they are doing.

    I was not defending the guy, though. It's your ball and your yard so to speak. You certainly don't have to even respond to him. I get a lot of messages along the lines of "this would be much more popular if it worked on mac/linux!" and don't bother explaining why that would be such a hassle.

    I do think this is sort of the Age of Entitlement. Something about the internet seems to bring it out in some people, too.

     
  • At 1:48 PM, Blogger Brian Karis said…

    I value what you do here. You are free to do what you want of coarse but please don't stop because of one asshole. Unfortunately usually the most vocal are the ones that are first to shoot down what others do, sometimes even professionals though in this case a pro would take the 5 mins to modify the code himself instead of asking someone else to do it for them and bitching it wasn't that way to begin with. Just know there are many that this likely helps and you will probably rarely hear from them. Those sorts of people solve their own problems and try not to bother you.

     
  • At 2:02 PM, Anonymous Anonymous said…

    Wow, sounds like Skybuck Flying never grew up. I remember him being very active/annoying on Usenet years ago, posting a lot, replying to himself, ignoring and dismissing comments from others, and generally being a pest.

    Good to know some things never change.

     
  • At 10:32 PM, Anonymous Anonymous said…

    Hi John,

    I can understand your frustration. I always find your code extremely helpful, and I believe most people do. Most people are reasonable, however the wonderful thing about the internet is that it connects you to millions of people - unfortunately some people are not as appreciative as you would like and are unwilling to put in the effort.

    I don't think the original emails aim was to upset you, so it might be helpful after getting an upsetting email to pause and reflect. Maybe the person sending the email is just lazy - no need to take what they say at heart (or even to bother to reply!).

    Keep up the good work.

    PS: I'm not sure if posting his real name is wise, if he ever changes his ways there is a good chance that your high-page-ranking site will be a difficult blemish for him to erase. Not saying he doesn't deserve it, just to be mindful of the impact.

     
  • At 3:06 AM, Blogger David Black said…

    Some people just cant take critiscism(sp?) :-P

    Seriously though, that email was OTT. But suggestions for improvement IMHO are worth many "that is nice" comments even if they are sometimes very badly posed.

     
  • At 6:58 AM, Blogger John said…

    Well, I just completely edited this blog post to remove the private email exchange. I left the bulk of the post where I talk about the reasons why I personally release open source material.

    The only point I wanted to make, if I even had one, was about common courtesy on the Internet. Ask someone nicely and be polite, interact with people on the Internet the same way you would if you were standing in their home, and things would all just run a whole lot more smoothly.

    Thanks,

    John

     
  • At 12:18 AM, Blogger Bryce said…

    Hey, I follow your blog because of the cool code samples, but I just noticed you created 688 attack su. I just wanted to say thanks - I played the hell out of that game for years and loved it. Best sub game ever.

     
  • At 10:18 AM, Anonymous Anonymous said…

    Just to add one more positive note- thanks for everything you post. I really appreciate the effort you make to post quality code here and the fact that you are not using a GNU license.

    Even when I don't end up using your code, it usually introduces me to new ideas or algorithms that I wasn't aware of before.

    -Robert

     
  • At 10:58 AM, Blogger Tatham Johnson said…

    Just wanted to say this:
    Thanks for all your writing, and your awesome code snippets. Those I've used (and abused) I've never had an issue with, or difficulties modifying them to fit my needs.
    Your insights into the inner workings of the programming side of the games industry are invaluable, and I've been thrilled to read about the creation of the Duatui project and to watch how quickly things have come together.

    So thank you for your posts, for you snippets and your thoughts. And I hope the actions of one arsehole won't serve to stop you from sharing them with the grateful masses :)

     
  • At 1:02 PM, Blogger Data said…

    Thank you for all your posts, rants and whatever you write here. I really appreciate it. Thank you, thank you, thank you.

     
  • At 8:54 AM, Anonymous christmas cash advance said…

    Hey there, You have done an incredible job. I’ll undoubtedly digg that and privately advise to my friends. We are assured these people may become took advantage of this site.

     

Post a Comment

<< Home