March 16, 2015

Is There A Commercial Open Source License?

"Any headline that ends in a question mark can be answered by the word 'No'." - Davis' law
Putting Commercial and Open-Source together is often considered an oxymoron. Part of this is caused by constant confusion between the terms Open-Source and Free Software, which is made even worse by people who have more liberal interpretations of the phrase "Open-Source". In many cases, keeping the source code of a product proprietary serves no other purpose than to prevent people from stealing the product. Putting an application under the GPL and selling it is perfectly reasonable for software aimed at end-users, whom are unlikely to know how to compile the freely available source. Libraries aimed at developers, however, usually must resort to Dual Licensing.

To me, dual licensing is a bit of a hack job. Using two fundamentally incompatible licenses at the same time always rubbed me the wrong way, even if it's perfectly legal for the creator of the software. The other problem is that this is usually done via copyleft licenses, and I would prefer more permissive licenses, given that I only care about whether or not the result is commercial or not. This, however, turns out to be a bit of a problem.

My ideal license for a commercial library would state that anyone is free to modify, distribute, or use the source code in anything they want, provided the resulting source code retains the provided license. If the resulting product is strictly noncommercial, it would be free. If, however, the source code or any derivation of the source code is used in a commercial product, there would be a fee. It'd basically be an MIT license with an added fee for commercial derivative works, with additional restrictions on what commercial derivative works are allowed.

The problem is, even if I were to use a dual-licensing strategy, there is no open-source license that contains a noncommercial restriction, because this isn't open-source. Specifically, it violates Freedom 1 as defined by OSI:
1. The license shall not restrict any party from selling or giving away the software as a component of an aggregate software distribution containing programs from several different sources. The license shall not require a royalty or other fee for such sale.
So, the first sentence of the definition of open-source software has made it abundantly clear that my software isn't open-source because I'm trying to make money off of it. This seems overly restrictive to me, because the source code is still freely available for people to distribute and modify, just not sell. Even then, they can still sell things made with the source code, they just pay a royalty or fee for it.

Now, there are good reasons why actual free software would forbid this. For example, if someone made an open-source library that required a royalty for commercial use whose code was repeatedly modified over and over again until it crept into all sorts of projects, it could then claim royalties on all of those products, even if only a few lines of its source code were used. This is obviously not conducive to creating a culture of sharing code.

However, there is another benefit of open-source software, which is now becoming progressively more obvious. It's the fact that, if you have the source code and compile it yourself, you can verify the NSA (probably) hasn't injected a backdoor into it. This is a benefit of visibility, and I think it should be encouraged. The problem is that the restrictions placed on free software are too harsh for most commercial libraries, who will then often resort to simply being proprietary.

So, sadly, there are no open-source commercial licenses, because those aren't open-source. Perhaps we need a new term, for software whose source is accessible but has usage restrictions. Even then, it's not entirely apparent what such a license would look like, or if sites like GitHub would actually allow it on public repositories. I took a peek at the Unreal Engine 4 license, but despite claiming to have it's source code available on github, it's actually in a private repository you must gain access to. To make matters worse, the actual Unreal Engine 4 license is incredibly restrictive. You are only allowed to distribute the engine code to other people who have agreed to the license! This obviously isn't what I want, but apparently no one else seems to think that software that's kind of open-source is actually valuable.

It's an awful shame, because I really don't want to make my project proprietary, but right now I don't have much choice. As far as I'm concerned, releasing something under a restricted open-source license is preferable to making it entirely proprietary. Unfortunately, the loudest programmers are also the least likely to be willing to compromise over ideological divides.

February 18, 2015

Does Anyone Actually Want Good Software?

Are there any programmers left that actually care about writing good software? As far as I can tell, the software development industry has turned into a series of echo chambers where managers scream about new features and shipping software and analyzing feedback from customers. Then they ignore all the feedback and implement whatever new things are supposed to be cool, like flat design, or cloud computing, or software as a service.

The entire modern web is built on top of the worst programming language that's still remotely popular. It's so awful that IE now supports asm.js just so we can use other languages instead. With everyone relentlessly misquoting "Premature optimization is the root of all evil", it's hard to get programmers to optimize any of their code at all, let alone get them to care about things like CPU caches and why allocation on the heap is slow and how memory locality matters.

Some coders exist at large corporations that simply pile on more and more lines of code and force everyone to use gigantic frameworks built on top of more gigantic frameworks built on top of even more gigantic frameworks and then wonder why everything is so slow. Other coders exist in startups that use Scala/Hadoop/Node.js and care only about pumping out features or fixing bugs. The thing is, all of these companies make a lot of money, which leads me to ask, does anyone actually want good software anymore?

Do customers simply not care? Is everyone ok with Skype randomly not sending messages and trying (poorly) to sync all your messages and randomly deciding that certain actions are always unread on other computers and dropping calls and creating all sorts of other strange and bizarre bugs? Is everyone ok with an antivirus that demands you sign in to a buggy window that keeps losing focus every time you try to type in your password? Is everyone ok with Visual Studio deciding it needs to open a text file and taking 15 seconds to actually start up an entirely new instance even though I already have one running just to display the stupid file?

It seems to me that we're all so obsessed with making cool stuff, we've forgotten how to make stuff that actually works.

Did you know that every single person I know (except for two people) hates flat design? They don't like it. I don't like it. There's a bunch of stuckup, narcissistic designers shoving flat design down everyone's throats and I hate it. The designers don't care. They insist that it's elegant and modern and a bunch of other crap that's all entirely subjective no matter how hard they try to pretend otherwise. Design is about opinions. If I don't like your design, you can't just go and say my opinion is wrong. My opinion isn't wrong, I just don't agree with you. There's a difference.

However, it has become increasingly apparent to me that opinions aren't allowed in programming. I'm not allowed to say that garbage collectors are bad for high performance software. I'm not allowed to say that pure functional programming isn't some kind of magical holy grail that will solve all your problems. I'm not allowed to say that flat design is stupid. I'm definitely not allowed to say that I hate Python, because apparently Python is a religion.

Because of this, I am beginning to wonder if I am simply delusional. Apparently I'm the only human being left on planet earth who really, really doesn't like typing magical bullshit into his linux terminal just to get basic things working instead of having a GUI that wasn't designed by brain-dead monkeys. Apparently, I'm the only one who is entirely willing to pay money for services instead of having awful, ad-infested online versions powered by JavaScript™ and Node.js™ that fall over every week because someone forgot to cycle the drives in a cloud service 5000 miles away. Apparently, no one can fix the audio sample library industry or the fact that most of my VSTi's manage to use 20% of my CPU when they aren't actually doing anything.

Am I simply getting old? Has the software industry left me behind? Does anyone else out there care about these things? Should I throw in the towel and call it quits? Is the future of software development writing terrible monstrosities held together by duct tape? Is this the only way to have a sustainable business?

Is this the world our customers want? Because it sure isn't what I want.

Unfortunately, writing music doesn't pay very well.

February 11, 2015

Why Don't You Just Fire Them?

"Nothing is foolproof to a sufficiently talented fool."
  — Anonymous
Programmers love to bash things like templates and multiple-inheritance and operator overloading, saying that they are abused too often and must be unilaterally banned, going so far as to design them out of their programming languages thinking this is somehow going to save them.

This makes about as much sense as saying that bank robbers use cars to escape police too much, so we need to ban cars.

Templates, fundamentally, are very useful and perfectly reasonable things to use in most sane contexts. They are used for things like vectors, where you want an int vector and a float vector. However, people point to the horrible monstrosities like Boost and say "Look at all the havoc templates have wrought!" Well, yeah. That's what happens when you abuse something. You can abuse anything, trust me. You simply cannot write a programming language that's idiot proof, because if you make anything idiot proof, someone will just make a better idiot.

Multiple inheritance is usually useful for exactly one thing: taking two distinct object inheritance lines and combining them. If you ever inherit more than two things at once, you probably did something wrong. The problems arise when you start inheriting 8 things and create gigantic inheritance trees with diamonds all over the place. Of course, you can build something just as confusing and unmaintable with single-inheritance (just look at the .net framework), but the point is that the language doesn't have a problem for letting you do this, you have an architectural issue because you're being an idiot.

You do have code reviews, right? You do realize you can just tell programmers to not do this, or simply not use a library clearly written by complete maniacs? Chances are you probably shouldn't have more than one or two template arguments or inherited classes, and you really shouldn't overload the + operator to subtract things. If you do, someone should tell you you're being an idiot in a code review, and if you keep doing it, they should just fire you.

What really bothers me about these constant attacks on various language features or methodologies is that nearly all of them are Slippery Slope fallacies. If we let programmers do this, they'll just make something more and more complicated until nobody can use it anymore! It's the same exact argument used for banning gay marriage! If your response to a programmer abusing a feature is to remove the feature, I really have to ask, why don't you just fire them? The programmer is the problem here. If anyone succeeds in checking awful code into your code base, you either have a systemic failure in your process, or you've hired an idiot that needs to be fired.

Programming languages are toolboxes. I want my array of tools to be powerful and adaptable, not artificially castrated because other programmers can't resist the temptation to build leaning towers of inheritance. It's like forcing all your carpenters to use hammers without claws, or banning swiss army knives because someone was using it wrong. If someone is using a tool wrong, it's because they haven't been trained properly, or they're incompetent. The mindset of banning problematic features in programming languages arises from coders who have to maintain bad code, and who are deluding themselves into thinking that if they got rid of those pesky templates, their lives would be much easier.

Having personally seen a visual basic program that succeeded in being almost impossible to decipher even after several weeks, I can assure you this is not the case, and never will be. The problem is that it's bad code, not that it's written in C++.

November 26, 2014

How Not To Install Software

It's that time of the year again, when everyone and their pony puts on a sale, except now it seems to have started much earlier than the traditional Black Friday. Needless to say, this is the only time of year I go around buying expensive sample libraries. One of these libraries was recommended by a friend: LA Scoring Strings - First Chair 2, a cheaper version of LA Scoring Strings. It's $100 off, which is pretty nice, except that the page that describes the product doesn't actually have a link to buy it. You have to click the STORE link, and then buy it from there, because this is a completely obvious and intuitive interface design (it isn't).

So, after finding the proper link in the Store and verifying I am actually purchasing what I want to purchase, they give me exactly one payment option: Paypal. This is pretty common, so we'll let it slide, and the whole process seems to go smoothly until they give me my receipt. On the receipt page, they gave me a link to download the files, and a serial number. How helpful! Until I click the download link, which does not open in a new window, and instead opens a completely different webpage with absolutely no way to get back to the page I was just on, because there is no store page with this information and I have no user account on this site. So, I have to go to my e-mail, where they have helpfully e-mailed me a copy of the receipt (probably for this exact reason) to get the serial number.

I then go back to the download page only to discover that I am required to use their stupid download manager in order to download the product I just bought. There is no alternative option whatsoever. So I download their stupid download manager and it magically installs itself somewhere on my computer I will likely never be able to find because it never asked my permission to do anything, and then demands that I log in. Well, obviously, I don't have a log in, and no one asked me to register until now, so I go to register, which helpfully opens my web browser to register... on a forum. Well, ok, so I register on the forum with a randomly generated password, and activate my account.

So naturally, they then e-mail my password back to me, which by definition means they are storing it in plaintext. So now the password to my account was sent over an unencrypted, entirely open channel, which is insanely stupid, but this is just a sample library, so whatever. I go back to their download manager and put in my credentials and... the login fails. Well, maybe it takes a bit to propagate - no, it just isn't working. I try again, and triple check that I have the password right. I log out and back into the forum with that very same password, and it still works. It just doesn't work in the application.

Standard procedure at this point is for me to take every single weird punctuation character out of my password (making it much weaker) to address the possibility that these people are pants on head retarded and can't handle a password with punctuation in it. I change my password to an alphanumeric one, and lo and behold, I can suddenly log in to the download manager! Let's think about this for a moment. The password I used had some punctuation characters in it (like "!&#*@(?" etc.), but in order to make sure it was still a valid password, I logged in to the forum with that password, and it succeeded. I then went to this application and put in the same password and it failed to log me in, which means the program actually only accepts some random subset of all valid passwords that the forum lets you register with.

This is laughably bad programming, but my woes aren't over yet. I click the download button only to get this incredibly helpful message: "Cannot connect to download servers." Pissed off, I go play a game in the hopes that once I get back, the servers will work again. I close the game only to discover that my download manager is one giant grey screen no matter what i do to it. It's forgotten how to draw it's own UI at this point. I restart the program, and it has (of course) helpfully forgotten my login credentials. This time, it displays a EULA it apparently forgot to show me the first time around, and once I accept, clicking install successfully starts downloading the files!

Of course, once the files are installed, they aren't actually installed installed. I have to go into Kontakt and add the libraries to it's magical library in order for them to actually get recognized. I can't tell if this is AudioBro's fault or Native Instruments fault, but at this point I don't care, because this has already become the worst installation experience of any piece of software I have had to go through in my entire life.

What's frightening is that this is par for the course across the desolate wasteland that is Audio Sample Libraries. The entire audio engineering industry employs draconian and ultimately ineffective DRM security measures, often bundled with installers that look like they were written in 1998 and never updated. The entire industry uses software that is grotesquely bloated, digging it's filthy claws into my operating system and doing all sorts of unspeakable things, and there is no way out.

You can't disrupt this field, because samples rule everything. If you have good samples, people will buy your shitty sample libraries. EastWest moved from Kontakt (which is a pretty shitty piece of software considering it's the best sampler in the entire industry) to their own proprietary PLAY engine, which is unstable, bloated, entirely dependent on ASIO4ALL to even work, and prone to crashing. They still make tons of money, because they have the best orchestral samples, which means people will put up with their incredibly bad sampler just so they can use their samples, which are all in a proprietary format that will get you violently sued if you attempt to reverse engineer it.

So, even if you develop the best sampler in the world, it won't matter, because without samples, your software is dead on arrival. Almost all the samples that are worth having come in proprietary formats that your program can't understand, and no one can convert these samples to another format (unless they want to reverse engineer the program and get sued, that is). So now the entire sampling industry is locked in a oligopoly of competing samplers that refuse to talk to each other, thus crushing competition by making the cost of entrance so prohibitively high no one can possibly compete with them. And then you get this shit.

November 22, 2014

Never Reinventing The Wheel Is Anticompetitive

Reality is that which, when you stop believing in it, doesn't go away.
― Philip K. Dick
Nowadays, you aren't supposed to write anything yourself. In the world of open-source software, you're supposed to find a library that does what you want, and if that doesn't work, commit a change that makes it work. Writing your own library is a bad thing because it's perceived as redundant if there's already a library that does most of what you want. The problem is that this is inherently anti-competitive. If there's only one library that does something, you have a monopoly, and then you get Heartbleed, because there's zero diversification. However, if I try to invent my own wheel, I'll just be scolded and told to contribute to an existing wheel instead, even if my wheel needs to have giant spikes on it.

I'm beginning to wonder if these people actually understand how software works. Code is not some kind of magical, amorphous blob that can just get better. It's a skyscraper, built on top of layers and layers of code, all sitting on top of a foundation that dictates the direction the code evolves in. If someone invents a better way to architect your program, you can't just swap pieces of it out anymore, because you are literally changing how the pieces fit together in order to improve the program. Now, I'm sure many coders would say that, if there's a better architecture, you should just rip the entire program apart and rebuild it the better way.

The problem is that there is no one-size fits all solution for a given task. Ever. This is true for any discipline, and it is still true in the magical world of programming no matter how loudly you shout "LALALALALALA" while plugging your ears. By definition you cannot create a software library that is constructed in two different ways, because that is literally two different software libraries. Thus, just like how we have many different wheels for different situations, it is perfectly fine to reinvent the wheel to better suit the problem you are tackling instead of trying to extend an existing library to do what you want, because otherwise you'll end up with a bloated piece of crap that still doesn't do what you want. If you actually believe that it is possible to write a vector math library that covers all possible use scenarios for every possible solution, then I invite you to put monster truck tires on your smartcar and tell me how well that works. We might as well ask the Flying Spaghetti Monster to solve our problems instead.

You want there to be several different libraries for rendering vector graphics. You want there to be many different programming languages. You want there to be multiple text layout engines. These things create competition, and as each codebase vies to be used by more and more people, each will start catering to a slightly different set of problems. This creates lots of different tools that programmers can use, so instead of having to use their Super Awesome Mega Swiss Army Knife 4000, they can just use a butter knife because that's all they goddamn need.

At this point, most coders will struggle to defend their position by falling back on the tried and true saying of "well, for most programmers, this is perfectly reasonable." Exactly what do they mean by most programmers? Because most programmers use C++, C, and Java, and are probably maintaining systems that are 20 years old and couldn't possibly apply anything they were just told in any realistic scenario. Do they just mean programmers who are making hip WebGL applications? What arbitrary subset of programmers are we talking about here? Of course, at this point, it doesn't matter, because they are literally cherry picking whatever programming community supports their opinion, and we're praying to the Flying Spaghetti Monster again.

Diversity is important. I am tired of programmers living in some fantasy world where all diversity has been eliminated and everyone follows the One True Path, and uses the One True Library for each individual task. This is not a world I want to live in, because my problems are not your problems, and even if your library is amazing at solving your problems, it probably won't solve mine. I'll go even further and say that this kind of thinking is dangerous. It reeks of cargo-cult coding and institutionalized knowledge designed to destroy creativity.

When people say you shouldn't re-invent the wheel, they mean you shouldn't re-invent the wheel if that's not what you're trying to do. If your main goal is to make a game, you shouldn't write a graphics engine. If your main goal is to make a webpage, you shouldn't write a webpage designer. However, if you just finished a game and think "Gee, that graphics engine was terrible, I'm going to make a better one," then writing your own graphics engine is perfectly fine.

Including the entire jQuery library just so you can have the $("id") shortcut is like driving a smartcar with spiked monster truck wheels down a freeway. It's dangerous, stupid, and completely unnecessary.