Open-Source Licensing For The Lay Programmer

When trying to get a new project off the ground, there’s no doubt that community is important, but from all the stuff I’ve run across, one of the least understood and most important aspects of doing so seems to be licensing. Your project’s license is its constitution. It tells potential users and contributors what your attitude is and sets the tone of the dialogue… and if you get it wrong, you can easily prevent like-minded people from joining you by accidentally picking a license that doesn’t actually allow what you think it does.

What follows is a lay programmer’s quick overview of the relevant terms, followed by a guide to choosing the most appropriate license. Not all of the terms are exact, but they should be understandable and that’s what’s most important.

Important: Because of the legal consequences of a misunderstanding, it is important to keep things simple by minimizing the number of licenses in use in the wild. This page lists the most popular license for each scenario you might find yourself in and choosing an alternative to the licenses here is strongly discouraged.

Terms

Derivative vs. Aggregate
The law makes a distinction between “derivative” works like modifying an icon, forking a project, or linking against a shared library and “aggregate” works like zip files and DVDs full of things.
That means that you can put two things with incompatible licenses in the same zip file or on the same DVD because that’s “aggregation”. This is a popular way to freely release a game’s engine for any use but restrict the game’s resources (level files, graphics, music, etc.) so only the original creator can sell them.
Licenses can set terms on aggregation, but generally that only happens in the kind you find in commercial software. For example, you’re not allowed to put Flash on a Linux CD. End users have to individually download it from Adobe’s site. (though that process can be automated by Linux package managers)
Free Software
The term “open source” is a fairly weak term and doesn’t encompass all of the freedoms we’ve come to expect in popular licenses. “Free software” is the older, more strict (but less popular) term coined by Richard Stallman to talk about licenses which explicitly grant these freedoms.
It is variously referred to by the terms FOSS, FLOSS, Free/Libre Software, and various others because English doesn’t have a word specifically meaning “free as in freedom”. (“Libre” is French, from the same Latin root as “Liberty”)
Copyleft and ShareAlike
A “copyleft” or “ShareAlike” license is a license which requires you to give others the same rights you received… so if you have access to the source code, you must give others access to the source for any modified versions you make.
Copyleft and “Distribution”
With one exception (The Affero GPL), copyleft licenses like the GNU GPL only require you to share your source if you share something built from it. Keep the binaries to yourself, and you have no obligation to share your changes.
For this reason, requiring end users to click “agree” in an installer is meaningless. Free Software licenses aren’t EULAs.
“Creative Commons License”
The term “Creative Commons License” is practically meaningless in and of itself, much like a “you must be human to ride” sign at an amusement park. The term refers to a large family of licenses with various properties and using the term without being more specific only makes things worse by spreading the misconception that it’s OK.
License Incompatibility
When two licenses require conflicting things, they’re said to be incompatible.
For example, the GNU GPL forbids people from imposing additional restrictions down the line and requires that derivative works also be GPLed. The license for Douglas Crockford’s JSMin contains a line that says “The Software shall be used for Good, not Evil.” (An admirable sentiment, but dangerously ambiguous) Because that counts as an additional restriction, you can’t use GPLed code and code from JSMin in the same program.
Dual/Triple-License
When a piece of software is “dual-licensed” or “triple-licensed”, it means that its creators have granted you permission to use it under your choice of two or more licenses.
While this is a perfectly acceptable option, it generally makes things more complicated and combinations like BSD/GPL should be avoided since, if you’re willing to license under BSD, you’re already GPL-compatible.

Licenses for Code

License Compatible with… Use when…
MIT or 2-clause BSD Everything You just want credit for your work. Others can use it however they want. (Also a good alternative to public domain. Not all countries recognize the right to give up your copyright.)
CC-BY 3.0 Everything You want MIT/BSD-like terms, but with a pretty icon and some RDFa metadata to embed.
Apache 2.0 CC-BY, MPL 1.1+, LGPL 3.0+, GPL 3.0+, AGPL 3.0+ You don’t mind being incompatible with “GPL 2.0 only” libraries and you want BSD-like terms, but with clearer legal language and an explicit patent grant.
MPL 2.0 Apache, GPL 2.0+, LGPL 2.1+, AGPL 3.0+ You want to copyleft-protect changes on a file-by-file basis but you don’t care what happens to the program as a whole.
LGPL 2.1+ LGPL 2.1+, GPL 2.0+, AGPL 3.0+ You want modifications to your library to be copyleft but use in closed-source programs is fine and you want to stay compatible with projects that removed the “or later” line from their LGPL declarations.
LGPL 3.0+ LGPL 3.0+, GPL 3.0+, AGPL 3.0+ You want modifications to your library to be copyleft but use in closed-source programs is fine and you want an explicit patent grant on contributed code.
GPL 2.0+ GPL 2.0+, AGPL 2.0+ You want project-level copyleft licensing while staying compatible with projects that removed the “or later” line from their GPL declarations.
GPL 3.0+ GPL 3.0+, AGPL 3.0+ You want project-level copyleft licensing with an explicit patent grant and the option to forbid companies from using your software on devices which control upgrades with DRM.
Affero GPL 3.0+ Itself only You want websites using your code to share their changes… assuming any are willing to use your code in the first place.

There are also various community licenses like the Python Software Foundation license and the Artistic License which you might want to use to follow community conventions.

When you are unsure about what a community-specific license entails, convention for large, popular communities is usually safe to follow. If in doubt, either dual-license between the community recommendation and one of the licenses listed here or pick one from this list that’s permissive enough to be compatible with the community preference.

Important:Unless you really know what you’re doing, don’t remove the “or any later version” clauses from GPL-family license declarations. If unsure, keep in mind that 3.0-series GPL-family licenses do allow you to specify a person responsible for making that judgement call on behalf of all contributors at a later date.

Licenses for Resources

As long as you’re not embedding them in your .exe files, your images (eg. icons), sounds, and so on don’t have to share the same license as your code. In fact, it’s better they don’t because someone might want to produce a derivative work and copyleft code licenses are incompatible with copyleft non-code licenses. (You can’t combine a GPLed image and a CC-BY-SA image into a new poster, for example)

License Compatible with… Use when…
CC-BY 3.0 Everything You just want credit for your work. You can specify how people must credit you, but remember that you’re competing with the world and don’t get too greedy.
CC-BY-SA 3.0 Itself only You want CC-BY’s attribution provisions, but you also want people to have to share derivative works under the same terms. (This is the recommended way to scare off predatory commercial use)

Important: The NoDerivs and NonCommercial variants of Creative Commons licenses are not included here because they have non-intuitive consequences, don’t achieve what is generally intended, and their incompatibility with the popular CC-BY-SA variant makes them a deal-breaker for many potential users/fans.

Posted in Geek Stuff | Leave a comment

Second-Tier Cartoon Classics and The Effects of Perspective

I just discovered something rather interesting about the cartoons I and those of my generation grew up with. If you ask us about companies, everyone can probably name the top-tier ones: Disney, Warner Brothers and Hanna-Barbera… and deservedly so. Walt Disney wasn’t the only innovator around and, while Disney was the best at what they did, quantity does have a quality all its own (a quote usually credited to Josef Stalin) …especially in reruns.

What I just realized is that many of the things we remember from our childhood were actually from a single source, rather than a mish-mash of one-hit wonders like The Swan Princess, Ferngully, and The Nutcracker Prince. (Or the ones like Quest for Camelot which just didn’t shout out that Warner Brothers made them.)

The more aware of you might be thinking I’m going to be talking about Don Bluth, who brought us cartoons like The Land Before Time, An American Tail, The Secret of NIMH, Thumbelina, and Anastasia (among many other less classic ones), but this isn’t about him.

This is about a little company named Rankin/Bass Productions which sometimes published through Warner Brothers, but was quite visibly not them.

Do you remember those old stop-motion holiday films like Rudolph or Here Comes Peter Cottontail? Early Rankin/Bass Productions.

How about the animated version of The Hobbit or things like Flight of Dragons and The Last Unicorn, which, as an adult, I now find deeper than their better-drawn Disney contemporaries in some ways? You guessed it. Rankin/Bass again.

Incidentally, they contracted a Japanese studio named Topcraft to do the animation. The core members of Topcraft would later found Studio Ghibli, (And The Snow Queen was one of Hayao Miyazaki‘s big inspirations, but that’s as far off-track as I’ll let myself go.)

So, is there a point to this ramble? I suppose, if anything, it’s that, nostalgia and re-examining old favorites aside, learning details like these can help to see your past in a new light. I don’t know about you, but I love that feeling of understanding that comes when a new detail finally “clicks”.

For example, If you’ve watched any significant number of Miyazaki films, take a look at The Snow Queen. It’s fascinating to see what thematic and stylistic elements of it he chose to borrow and refine. Sailor Moon wasn’t on the TV channels I got as a kid but, if you watched it, you probably weren’t aware that it basically introduced the idea of magical girls working in a group to fight off large-scale villains. (Up until that point, that was the domain of Super Sentai. Stuff like Voltron and Power Rangers which I also didn’t watch.)

As for comments, what do you find most memorable about these second-tier classics? The song, This Is My Idea, from The Swan Princess? Amalthea’s words from the end of The Last Unicorn? The intro? James Horner’s soundtrack for the original The Land Before Time? Share it.

Posted in Otaku Stuff, Web Wandering & Opinion | Leave a comment

A Few New Projects Up on GitHub

Over the last few days, I’ve been trying to clean out a bunch of old TODO notes. One of the more procrastinated ones has been to tidy up as many of my in-progress projects as possible and get them up on GitHub, both so they’ll have some offsite backup, and so I’m practicing what I preach.

So far, here are the ones I’ve added:

  • gvrun (A partially complete gmrun clone written in Vala and begun as a port of the address_bar.py backend I wrote for IceWM)
  • png2pdf (Python script for turning a bunch of PNGs into a PDF, with partial caching on regeneration. Uses PyPDF and ImageMagick. Uses far less memory than letting ImageMagick do the whole process but still has room for improvement.)
  • languagetool-fanfiction (In-development set of LanguageTool rules for catching common fanfiction grammar and spelling mistakes)

I should probably also draw attention to these specific, older gists, since they can easily get lost among the ones I’ve already blogged about:

Posted in Geek Stuff | Leave a comment

Cleaner Firefox Context Menus Using Stylish

Since the Firefox Menu Editor extension doesn’t get along with the new HTML5 context menu support in Firefox 8 and up (it prevents site-added entries from appearing with no option to allow them), I thought I’d whip up a few userstyles to get the same, more Chrome-like (useful, but cruft-free) context menu I normally have without sacrificing that feature.

Here are the ones I’ve written:

The one to clean out Firefox-native entries is especially important to me since Firefox devs seem to care more about moving the RSS icon out of the address bar (fix) and hiding behind their toolbar heatmaps than even doing a heatmap study on the context menu. I seriously doubt things like “Send Image…” get used often enough to be in the top level of a context menu without Chrome’s “one entry or submenu per extension” rule. (And why is “Select All” not shown only in text fields in this day and age?)

If you want to make your own, the process is very simple. Use mine as an example and then follow the instructions on Mozillazine’s Menu customization page.

If you want to remove something with a name that changes based on what you select or you want to “do it right” so your script works for everyone, rather than just people who share your locale, follow the “Using ID selectors” instructions rather than the “Using attribute selectors” ones. Finding the ID is a bit technical, but, here’s how I do it:

  • locate your profile folder, then go into the extensions folder.
  • One of those files or folders holds the code to the extension, so use your favorite archive tool to poke around until you find the right one. (.xpi files are .zip files with a different extension, so use your favorite archive tool)
  • Use grep -r "text from the menu item" path/to/unpacked/xpi or a grep-like tool to find the file and line number to start at. (If you get no results, try a smaller fragment)
  • Go to that line number in that file using your favorite text editor. The ID should be nearby, either as id="waggawagga" or in a bit of Javascript which looks up the object by ID
Posted in Geek Stuff | Tagged | 5 Comments

Getting your way with setxkbmap

If you’ve ever poked around in the KDE or GNOME control panels, you know that the X11 keyboard system is very customizable and, as the KDE keyboard controls clearly show, that it’s all done using a little command named setxkbmap.

The problem is, Google isn’t very helpful if you want to use this tool directly. All the results seem to tell you to read the raw config files or only give you single, purpose-specific examples.

The good news is that your system actually DOES include a single file equivalent to (and probably the source for) the listings you get in the GUI tools:

/usr/share/X11/xkb/rules/base.lst

For those who haven’t used KDE and need an example, here’s the command I run on login (These can also be specified in xorg.conf via Option directives, but I prefer something I can keep in my roaming profile):

setxkbmap \
  -variant altgr-intl \
  -option \
  -option compose:rctrl \
  -option lv3:ralt_switch \
  -option terminate:ctrl_alt_bkspc \
  -option eurosign:e \
  -option nbsp:level3n

As usual, the backslashes are only necessary if you’re splitting it across multiple lines. Here’s what they actually do when used with a us104 or us105 layout:

-variant altgr-intl
The default variant of the US 104 layout doesn’t have tertiary symbols like ¢ and þ for AltGr to access, so I’m selecting one that does.
You can also use the intl variant here but, for some reason, it maps ² to AltGr+2 and ³ to AltGr+3 but ¹ to AltGr+Shift+1.
-option
An empty -option resets the layout options so I’m starting from a clean slate.
-option compose:rctrl
This remaps the Control_R keysym to Compose, so I can access glyphs like ½, ±, and é by typing “Ctrl 1 2” or “Ctrl + -" or "Ctrl e '“.
-option lv3:ralt_switch
This remaps Alt_R to AltGr, granting access to ¬ (AltGr+\) for making ¬_¬ smileys and giving me simpler key combos for commonly-used glyphs like µ (AltGr+m) and © (AltGr+c).
You can also use ralt_switch_multikey here to make Shift+AltGr the Compose key on compact keyboards but my muscle memory has already settled on Control_R. (Note: Make sure you press Shift first or it’ll just send an ordinary AltGr+Shift)
Note:If anyone knows why ¬ is no longer on AltGr+`, please leave a comment.
-option terminate:ctrl_alt_bkspc
Restore Ctrl+Alt+Backspace as the “Kill X Server” shortcut without relying on a superior but root-privileged and Linux-only config tweak.
(Again, I like settings I can store in my roaming profile)
-option eurosign:e
I’m Canadian, so on the occasions I need to type €, it can take me a while to remember that it has two cross-bars so I know to use “Compose e =“. Since my muscle memory already uses “Compose e '” for é anyway, let’s remap AltGr+e to €.
-option nbsp:level3n
Lets me type non-breaking spaces with AltGr+Space for those times when   doesn’t have special meaning.
Using level3n rather than level3 lets me type thin non-breaking spaces with Shift+AltGr+Space.

The beauty of doing things this way is that you’re unlikely to break things badly. It’s nearly impossible to paint yourself into a corner using variants and options alone (It’s models and layouts you have to be careful with) and, if you ever try to apply your settings to a keyboard they weren’t intended for, an unrecognized variant will abort the process and unrecognized options will simply have no effect.

Have fun and, if you’ve got any other interesting keyboard tweaks, share them in the comments. If I like one that applies to us104 enough to use it myself, I’ll update the example in the post body.

Posted in Geek Stuff | 32 Comments

Activism and Human Psychology

Given the recent focus on harmful attempts at law like SOPA and ACTA, I’ve spent more than the usual amount of time, lately, thinking on why it’s so hard to build up a stable, strong political movement and I’ve narrowed it down to two fundamental psychological problems that activists often don’t seem to address:

First, that humans are creatures of habit, yet activists seem obsessed with converting the general public to their cause. I can’t count the number of causes I’ve sympathized with but lost interest in because the only option they offered me for participation was, in essence, a firehose of all the day-to-day details of their fight. As an activist, you need to accept that not everyone can be made to care about your cause as deeply as you do. Provide services for all levels of engagement, so people who just want to be notified of new petitions and phone-call campaigns won’t be overwhelmed while those who want more can easily step up to the next level of involvement.

Second, that we instinctively desire, on an emotional level, a clear victory which our opponent acknowledges… something which activism doesn’t provide. Activists struggle against parties who will never concede defeat and we must find ways to help people focus on incremental victories and long-term trends, rather than dwelling on the occasional inevitable loss or being demoralized by the endless nature of the struggle against selfishness.

Finally, while not a point about psychology in and of itself, the adage “It’s always darkest before the dawn” does characterize activism quite well. Opponents never fight harder than when they’re desperate and, in the case of the current battle against online censorship, SOPA and ACTA will quite probably, if defeated, prove to be the turning point in the fight for freedom from the old media oligarchies.

Update: Though, as Cory Doctorow points out, that’s just a fragment of the issue. The real fight is for the right to use our computer-based technologies without government-mandated spyware locking down what we can and can’t do with them.

Posted in Geek Stuff | 1 Comment

Personal Status Update and Some Extra Modules for Porteus

TL;DR: Porteus modules here

Roughly two weeks ago, my main PC died and, since I didn’t feel like re-ripping 2.5TiB of movies and music, I spent two weeks of playing Towers of Hanoi with my media library to squeeze it all onto either my brothers’ PCs or one of 100 DVD+Rs.

With that finished and my backup PC (too slow) and backup backup PC (too little expansion room) part-way to being comfortable, I’ve come to several conclusions:

First, that I need to prioritize the completion and enhancement of my roaming profile. (Already in progress with my goal being to use it, a Lubuntu CD, and Dropbox to go from blank hard drive to comfortable PC in under two hours.)

Second, that 32-bit Porteus is the best LiveUSB Linux distro I’ve ever tried and, aside from backsliding on the UI since it was called Slax (something I may volunteer to fix eventually), it’s great… but it doesn’t have all the modules (packages, basically) I want and lacks Slax’s big, community-populated collection.

Therefore, I’ve taken it upon myself to build modules for everything I want.

Some of them (like BasKet Note Pads and Filelight) are converted Slax modules that still work perfectly well, many are converted Slackware packages which have been adjusted if necessary, and some are converted Debian packages.

It’s actually not that hard to do (the website has instructions and Porteus comes with conversion scripts) but it can be somewhat time-consuming so I’m offering the ones I create in case they help anyone else. (I really don’t have the time to be a maintainer in any official sense, or I’d see if the Porteus guys are interested. These’ll probably only get updated when it causes me problems.)

Feel free to use them or not. If you want to verify that I haven’t done anything funny to them, they’re generally easy to match to Slackware, Debian, or Slax packages/modules and diff -ur will tell you the rest.

Posted in Geek Stuff | Leave a comment