A free software license

There are many free software licenses available these days, from viral and stringent licenses like GPL, with some grey and confusing like LGPL to business friendly licenses like ASL and X11. All of these licenses are “open source”, which means the software source is also available to public along with its binaries. Which is great for open source and I personally like ASL among the lot and tend to use it for most of my open source software. But sometimes you might feel that these licenses are not “free” enough, and pack tons of terms and conditions in a pretty complicated language. There should be a software specific license which doesn’t restrict the user in anyway and allows to freely use, modify and distribute the software in any way the user likes. And the derived work should be allowed for both commercial and personal use, with or without a charge.

Now with the above situation in mind and as a developer of free software, here is my attempt to create a re-usable free software license. Lets call it, for obvious reasons, The Free Software License (TFSL). I must also mention that this license is inspired from GPL, ASL and WTF licenses and I have borrowed a few things from them. This license is also DRM-free and is composed of the following three important things:

  1. Terms of use
  2. Warranty
  3. Liability

I think these three things explain fully how the software should be used and also protects the developer/vendor from any damages inured from the use of the software. This license also makes sure that the software, licensed under TFSL, is distributed for free.

Version 1, April 2011

Copyright (C) 2011 Kamran Zafar <kamran@kamranzafar.org>

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing is allowed as long as the name is changed.


0. You can use, modify, reproduce and distribute the software and any of its components in any way you want.
1. The software is available on “AS IS” basis and comes with absolutely NO warranty, either express or implied, to the extent permitted by applicable law.
2. In any event and under any legal theory, the copyright owner of the software will NOT be liable for any direct or in-direct damages incurred by the existence or the use of the software.

This “free software license” is available for free and can be used by any software vendor to distribute software as long as it meets the terms and conditions outlined in it’s text. In order to apply this license to the software, each source file of the software MUST contain the following wording.

Copyright [year] [name of copyright owner]

This program is a free software and comes with absolutely no warranty. You can use, modify, reproduce and distribute this software under the terms and conditions of The Free Software License.

You can obtain the copy of The Free Software License at


Now like I said, it is just an attempt to create such a free software license and I am sure this is not perfect but it can be modified as per vendor requirements. This license is also available for download here.

Crawl, index and search

Sometimes you need to search for files or pages on content-rich websites or browser-based information software/encyclopedias that don’t really have a search functionality. And it could be a pain to find what you are looking for. I wrote a little crawler once in python that works well to search for stuff, on websites, on the fly. But sometimes a real “index” is needed for searching. There are a few libraries available and among them is the open source Apache Lucene, an excellent high-performance text search engine library that one can use for free. Lucene coupled with a multi-threaded web crawler and you have a pretty good index and search functionality; though not as good as google, but close.

Below is an example of how you can use Lucene to build searchable indexes for websites.

Now once the index is created we can start searching it for content. Lucene provides IndexSearcher class that is used to search the index using a Query. Below is an example that searches for results in the above created index, and prints the website URL where the required content is found.

The full source of this example, including the web crawler, can be found here and is available under GPL.

Project migration from Sourceforge to Googlecode

I have been using googlecode for some of my recent open source development work, and I was surprised how googlecode speeds up development. The SCM is very fast and gave me no troubles, it is easy to create wiki pages and documentation for projects etc. etc. Although it offers limited features, compared to sourceforge for example, but the real power is in its simplicity. Sourceforge offers more features like, hosting web pages and shell services and if you are smart you can also create your own little maven repository for your artifacts; one might argue that all these features make sourceforge very complex. But recently sourceforge has become slow as hell, and it is bit of a pain to manage your work, SCM is slow, web pages are not served with a desired speed, shell services (although more secure) but slower and the whole shell-creation process takes too long. So to cut the story short, I finally decided to migrate some of my work from sourceforge to googlecode, simply because googlecode is faster and simple.

In the beginning I had no clue how to achieve this task. But it was much simpler than I anticipated. My only concern was to get the code migrated fully, safely and with all the version history. This is done by synch’ing the project’s SVN repository on googlecode with the repository on sourceforge. First I reset the googlecode repository to enable svn synch’ing. This is done under Administrator->Source tab on your project’s homepage on googlecode. Then I began the synch’ing process.

The first step is to initialize the googlecode’s subversion repository

After this we just start synch’ing the repositories.

The above command will fetch all the code, with the version history and including tags and branches.

And this is all to it. For more information on the svnsync refer to the subversion redbook.

Open Source “Duke Nukem Forever”

One of my favorite games of all time, Duke Nukem 3D had me waiting “forever”, for DNF (Duke Nukem Forever). Then in May 2009 the wait finally ended, when the DNF team got axed. And the game was then kicked into the back burner of Apogee. I think the fans of Duke deserve better, we waited 13 years for the game and in the end it was all in vein.

I think it is time to make DNF Open Source and let the community and fans develop it, and I am pretty sure it won’t take that long for the game to be completed. The Open Source guys have done it in the past by developing the High Resolution Pack for Duke Nukem 3D, and I am sure they can do it again.

I’ll end this entry with my favorite dialog from DN3D: “it’s time to kick ass and chew bubble gum, and I’m all outta gum.”

Cyber Sanctions: “Freedom” the American way

US government has recently asked Sourceforge to deny content to certain countries, including Cuba, Iran, North Korea, Syria and Sudan. This means that users in these countries trying to post or access content on Sourceforge will get a big 403 error. Here is what Sourceforge is saying about it, although not happy but they don’t seem to have a choice:

Since 2003, the SourceForge.net Terms and Conditions of Use have prohibited certain persons from receiving services pursuant to U.S. laws, including, without limitations, the Denied Persons List and the Entity List, and other lists issued by the U.S. Department of Commerce, Bureau of Industry and Security. The specific list of sanctions that affect our users concern the transfer and export of certain technology to foreign persons and governments on the sanctions list. This means users residing in countries on the United States Office of Foreign Assets Control (OFAC) sanction list, including Cuba, Iran, North Korea, Sudan, and Syria, may not post content to, or access content available through, SourceForge.net. Last week, SourceForge.net began automatic blocking of certain IP addresses to enforce those conditions of use.

This move will only divide the open source community and will not achieve anything. There are other ways to access content through mirrors and other project hosts; and people will be forced to use anonymizers etc. to hide their identity. But will the US government stop Microsoft, Apple etc. to sell their applications to businesses in these countries? I doubt that. So why target Open Source alone? And what is next? denying free email and web hosting services?

On a more serious note, we all know that most of the affected countries are poor and belong to the third world, so it will just push the users towards piracy. It also means that Internet and WWW are still not global and have a lot of American influence. The US seem to have their own definition of freedom, which just serves the US interests with hypocrisy written all over it. On one side US is trying to battle the Chinese censorship on Google and on the other hand they are doing the same thing by denying people services, which are licensed to be free for all.