Demystifying common software licenses

Disclaimer: This is just a summarization. Do please read the actual license before deciding on one for your own projects.

I have always been very curious about the state of software licenses in India. Although we all can agree that no consumer has ever read a license or EULA in its entirety and most Indians do not even know that something like these exist. For them. software is usually provided by their local Computer Solutions shop for a meagre sum of money or by more technically advanced friends who usually get them off the P2P networks. Moroever, the Information Technology laws here are laughablly unenforceable.

So to make your computing lives a little harder, I am summarizing some of the most popular licenses (mostly open-source ones) so that if you happen to come by any of these, you’ll have an idea of what are you dealing with.

  1. GPLv2 (GNU General Public License v2)

    You may replicate and change the subject as long you keep all changes also under GPL2. If you are using third-party GPL code in your program, you MUST also open up the source code.

    • You must include the original license.
    • You must disclose the source code.
    • You may modify.
    • You may distribute.
    • You may commercialize your program.
    • You cannot hold the license owner liable for damages.
  2. GPLv3 (GNU General Public License v3

    You may replicate and change the subject as long you keep all changes also under GPL2. If you are using third-party GPL code in your program, you MUST also open up the source code. You must also track all the changes or modification timestamps of all source files. It’s quite similar to GPLv2 but the devil is in the details.

    • You must include the original license.
    • You must disclose the source code.
    • You must state all the changes done.
    • You may modify.
    • You may distribute.
    • You may commerciallize your program.
    • You cannot hold the license owner liable for damages.
  3. LGPL (GNU Lesser General Public License)

    You may copy and modify the subject as long as the modifications done by you are also licensed under LGPL. Derived statically-linked works must be under LGPL while non-statically-linked projects are exempted from this restriction.

    • You must include the original license.
    • You must non-statically link the libraries.
    • You may modify the software.
    • You may distribute your software.
    • You may commerciallize your program.
    • You may sublicense.
    • You cannot hold the license owner liable for damages.
  4. MIT License

    You may do whatever you want with the licensed material, as long as it’s accompanied by the original license.

    • You must include the original license and copyright.
    • You may modify the software.
    • You may distribute your software.
    • You may commerciallize your program.
    • You may sublicense.
    • You cannot hold the license owner liable for damages.
  5. BSD License

    You may do whatever you want with the licensed material, as long as it’s accompanied by the original BSD license in it. But you cannot use the names of original developers to endorse your derived works.

    • You must include the original copyright.
    • You may modify the software.
    • You may distribute your software.
    • You may commerciallize your program.
    • You may sublicense.
    • You cannot hold the license owner liable for damages.
    • You cannot use trademarks or logos.
  6. Apache License 2.0

    You may do whatever you want with the licensed material, as long as it’s accompanied by the original BSD license in it and significant modifications have been stated. But you cannot use the names of original developers to endorse your derived works.

    • You must include the original license and copyright.
    • You must state changes made to the software.
    • You may modify the software.
    • You may distribute your software.
    • You may commerciallize your program.
    • You may also use the licensed work for private purposes.
    • You may sublicense.
    • You cannot hold the license owner liable for damages.
    • You cannot use trademarks or logos.
  7. MPLv2 (Mozilla Public License)

    A somewhat less-restrictive license from Mozilla which . You may include your own propriatery code in your MPL-licensed derived works but what’s already under the MPL, must remain so.

    • You must include the original license and copyright.
    • You must open up the source code.
    • You may modify the software.
    • You may distribute your software.
    • You may commerciallize your program.
    • You may sublicense but not what’s already under MPL.
    • You cannot hold the license owner liable for damages.
    • You cannot use trademarks or logos.
  8. Creative Commons

    Creative Commons is not a software license agreement per se, but a set of attributes you can add to your created works which define the license and rights it would impart to the users,

    • Attribution The Licensees may modify, replciate or distribute the derived works only if they credit the original author in the manner specified.
    • Share-alike The Licensees may modify, replciate or distribute the derived works only if the derived work is also licensed under a license identical to the original work’s.
    • Non-commercial The Licensees may modify, replicate or distribute the derivatives only for non-commercial motives.
    • No Derivative Works The Licensees may copy or distribute the original work only. They are not allowed to modify it.

One company had put a clause about a reward in their EULAs and it took quite a long time before somebody found it.

The Mozilla Fallout

Few days ago, the Mozilla board named Brandan Eich, the creator of ECMAScript (popularily known as JavaScript), as the top boss of the corporation. It caused quite a furor on the interwebz, as Eich has already been on the radars for contributing dollars for a homophobic cause. Leading the announcement, many Mozilla developers have raised their voices against the popular browser-maker. A lot of app developers have denounced this recent move of Mozilla by shutting their apps out of Mozilla’s infant mobile marketplace. Half of Mozilla board which includes two of its ex-CEOs, has also resigned on a slightly unrelated note. According to some sources, they wanted an outsider to take up the top-job instead of Eich who is also a co-founder and was the CTO of the company since 2005. After 2 weeks of this PR debacle, Brendan Eich offered his resignation to the board.

It can be rightly said that, Mozilla and its leadership team is on the crossroads at the moment with Eich having resigned. All this has come down when Mozilla is in quite a tight spot. Firefox OS is not getting nowhere or atleast what it deserves. Chrome has become the new favorite browser of masses and is on the way to displace much-maligned IE from the throne. Thunderbird’s development has become stalled. And things are definitely not looking for the reception of new Australis interface which is due for release in Firefox 29.

Even after his resignation, things are not looking good, as now the conservatives are now deriding Mozilla for handling this poorly. It would take Mozilla atleast some time to get out of this difficult phase.

Why I love Python so much

I learnt Python in the first year of my college and since then it has become my go-to language for everything. Whenever I have to try out any algorithms or anything else, Python is always my first choice. People sometimes wonder why do I prefer Python over C++/Java so much.

  1. In-built basic data-structures which are very easy to expand.
  2. The open-source spirit in the Python community is very strong.
  3. It’s very easy for a beginner to pick-up Python instead of C/C++ or Java. It even reads like pseudocode.
  4. Indentations. Although, most of my friends in college don’t like to indent their code manually, Python’s indentation restrictions has made me so much habitual of indented code that I personally make it point to indent all code I get from anyone. (Text editors help a lot, too)
  5. PEP - Although they seem as annoying at first, but IMHO it makes the code look very elegant and beautiful. (The apt word would be: readable, of course)
  6. The performance-hit compared to Java or C++ is every penny-worth of the simplicity and awesomeness of Python. When you really need to use all CPU cycles for your time-critical applications, you can always embed C in your scripts.
  7. Batteries
  8. Prototyping is done best in Python. Period.

To the C++ purists: Performance of a programming language should not be the time taken between launching a program and completion of the execution. To me, it is the time since we decide to write a program till the time we become satisfied with what we have written. This is where Python fares above all other languages.

Text rendering in Sublime Text

I love Sublime Text. Unless I really need to use IDE-exclusive features, ST is my go-to choice to jotting down letters and symbols. Although text rendering on Windows looked fine for me, I discovered a way to make it even better.

Go to “Preferences -> Settings – User” and add this, to turn on DirectWrite:

{
    "font_options":  
    [  
        "directwrite"  
    ]
}

Put an appropriate comma, if required, to make it valid JSON. Also remember to update your GPU drivers because your ST now renders hardware-accelerated text.

Operator precedence in C++

Operator precedence and associativity in C/C++ is not too much unintuitive but…

1 #include <stdio.h>
2 int main()
3 {
4 int i=5;
5 printf("%d%d%d%d%d",++i,i++,i,i--,--i);
6 return 0;
7 }

Build systems for Sublime Text 2

I have been using Sublime Text 2 as my primary text editor. It’s not as much bloated as Visual Studio or Eclipse and it’s not as much hard to learn as Vim/Emacs (Sorry folks! I don’t have that much time to spare). But it’s highly extensible, customizable and light-weight to use, so this is the program I’ve been firing since 2012. I’ve been using Code::Blocks for C++ dev and NetBeans for Java so I needed to rewrite the ST2 build systems for C/C++ and Java. It enabled me to use both the editors without altering my workflow and duplicate installation of compilers.

C++

(using Code::Blocks’ mingw32)

{
     "cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
     "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
     "working_dir": "${file_path}",
     "selector": "source.c, source.c++",
     "shell": "true",
     "variants":
     [
     {
          "name": "Run",
          "cmd": ["start", "C:\\Progra~2\\CodeBlocks\\cb_console_runner.exe", "$file_base_name"]
     }
     ]
}

Java

{
     "cmd": ["C:\\Progra~2\\Java\\jdk1.7.0_40\\bin\\javac", "$file"],
     "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
     "selector": "source.java",
     "variants":
     [
     {
          "name": "Run",
          "cmd": ["C:\\Progra~2\\Java\\jdk1.7.0_40\\bin\\java.exe", "$file_base_name"]
     }
     ]
}

Fixing the Facebook and Twitter layout problems in Cocoon

All of my comrades who use Cocoon to evade campus firewalls are pretty content with the service except one thing: the ads. They usually block all the ads to get a web experience similar to the free open web. Let me be clear about ads…I’m not against them as they are part of the Cocoon’s business model and other free web services, but  their current implementation for the top-banner ads are too intrusive and have a major side-effect. They push the content far down so that the Facebook’s chat sidebar’s command palette is not visible at all. And if you’re blocking ads the top bar may be stuck floating in the middle  So here is a tiny CSS stylesheet to fix this. (I assume that you are using an advanced adblocker, preferably Firefox’s AdBlock Plus)

Step 1: First of all, you need to install Stylish. It’s an extension available for Firefox (and Pale Moon) which can modify a webpage’s look by altering its CSS (Cascading Style Sheet).

Step 2: Go to Cocoon Fixer for Facebook and Twitter – Userstyles.org and click “Install with Stylish”. Don’t worry about the link, it’s just a tiny CSS snippet written by me.

Step 3: Now add these custom filters to your Ad-blocker.

###cocoon_ad_container
||ad-server.vworldc.com^
||api.vworldc.com/fp/*
||api.vworldc.com/video-ad.html?*

To add custom filters in AdBlock Plus, open its preferences either through status bar or Add-ons tab and go to ‘Custom filters’ tab and add all these filters there in any of the groups.

Tada! You’re done. Cheers!!!

 

Cleaning up iTunes 11

iTunes, especially on Windows, has never been a joy to use. Of course, there are a lot of alternative iPod/iPhone/iPad sync softwares out there, but only iTunes offer the full-featured functionality for Apple-devices management. Although I regularly used iTunes when I had my MacBook but on Windows I had kept it out like a virus. But upon getting an iPad, I had to install it but I still only fire it up when I have to perform a sync. The the problem is that even if you don’t use it often, it runs a few system-level processes and services on startup.

  • Bonjour (mDNSResponder.exe)
  • Apple Mobile Device Support
  • iTunes Helper
  • iPod Service

So when I updated my iTunes installation to the latest version, I had to perform a new set to tweaks to keep my system devoid of running any Apple iTunes-related processes and services, but still being able to successfully sync my devices.

Bonjour

Go to Computer management > Services and change the startup of ‘Bonjour’ service to Manual. Or you can just uninstall Bonjour from ‘Uninstall or change programs’ window.

Apple Mobile Device Support

Change the startup type of ‘Apple Mobile Device Support’ to Manual. Although this will cause iTunes to throw an error box but it’ll be still able to automatically start this service when you try to connect an Apple device.

iTunes Helper

This process does nothing but preload iTunes libraries on startup speeding up the launch of iTunes. You can safely disable it in Startup tab of Task Manager. (on Windows 7 and earlier, you will have to use msconfig, the System Configuration tool)

iPod Service

This service is responsible for automatically launching iTunes whenever you connect an Apple device to sync. To disable it, change its startup type to Manual in Computer Management > Services. It will also be automatically launched when you try to sync.

Update:

It seems that there is another item called ‘Apple Push’ on select iTunes installations on Windows which is something related to iCloud. It can also be disabled using Task Manager startup’s tab or msconfig.