GPL defense issues

A friend sent me a link to this email from Linus Torvalds to the Kernel Summit Discussion mailing list.  The subject of the conversation is the General Public License (GPL) and whether or not it should be enforced in courts.  Read the whole thing – it’s quite interesting.  Here are a few snippets just to get you started:

Let’s be clear about this: lawsuits destroy. They don’t “protect”.

Lawsuits destroy community. They destroy trust. They would destroy all the goodwill we’ve built up over the years by being nice.

And then this:

Because lawsuits – and even threats of lawsuits – makes companies way less likely to see you as a good guy. Even when you’re threatening
somebody else, everybody else around the target starts getting really
really antsy.

I talked to an Oracle lawyer a few months ago, and told him their
lawsuit just makes Oracle look bad. The lawyer was dismissive, and
tried to explain how it’s silly how people take lawsuits personally,
and talked about how layers _understand_ that lawsuits aren’t
personal, and that they are still friends outside the court.

I’m sure a lawyer can “understand” how lawsuits aren’t actually
something personal at all, but lawyers really seem to be the *only*
people who “understand” that.

The fact is, lawsuits (and threats of lawsuits) do not make for
friends. You just look like a bully.

Why are browsers so slow?

As a user of Opera browser in the good ol’ days, I share Ilya Birman’s pain

But I am not talking about rendering and scripts. I am talking about everything else. Safari may take a second or two just to open a new blank tab on a 2014 iMac. And with ten or fifteen open tabs it eventually becomes sluggish as hell. Chrome is better, but not much so.

… and this too …

What would you do today if you opened a link and saw a long article which you don’t have time to read right now, but want to read later? You would save a link and close the tab. But when your browser is fast, you just don’t tend to close tabs which you haven’t dealt with. In Opera, I would let tabs stay open for months without having any impact on my machine’s performance.

Wait, but didn’t I restart my computer or the browser sometimes? Of course I did. Unfortunately, modern browsers are so stupid that they reload all the tabs when you restart them. Which takes ages if you have a hundred of tabs. Opera was sane: it did not reload a tab unless you asked for it. It just reopened everything from cache. Which took a couple of seconds.

In fact, maybe it’s a good time to try out Opera browser again.  After all, the two primary reasons I’ve switched from it were:

  • Open Source.  This was back in a day when I was a zealot.  (Yeah, if you think I’m one now, you should have seen me in my 20’s.)  Now  I am much more calm about the licensing.
  • Rendering issues.  That was back when Opera had its own rendering engine and couldn’t quite keep up with all the changes on the Web.  Since then, Opera has dumped its Presto rendering engine in favor of Webkit (the same engine that Google Chrome, Chromium and Safari browsers are using), and then dumped Webkit in favor of Blink, which is like … erm .. new Webkit (?) or something like that.

So maybe it’s good enough in rendering department and I can have my performance and tab management back.  As Ilya mentions, no other browser came close to the tab management of Opera back in a day.  I frequently have a 30+ tabs open, and its only because that’s as much as Chrome can handle on my laptop.

Update: Tried out the latest version of Opera now for about half an hour.  I suddenly remembered another reason for why I’ve switched – fonts.  Default fonts configuration is far from optimal.  For multilingual pages (English and Russian) is more than horrific.  Oh well, I guess, I’ll have to wait some more.

Feature Flags in PHP

Today edition of the “Four short links” from the O’Reilly Radar, brings a quick overview of the different feature flag implementations.  It touches on the following:

  • Command-line flags, with the link to gflags.
  • A/B flags
  • Dynamic flags, which are more difficult
  • More complex systems.

I’ve dealt with feature flags before, but never found an elegant way to scale those.  Some of the issues that I came across were:

  1. Naming conventions.  With more and more features added to the system, naming things becomes more and more difficult.  Especially, when features cross over from one part of the system into another and need to be supported in different sub-modules.  In a way, this reminds me of the old argument in the blogging community about using hierarchical categories vs. flat tags, with categories providing more order and tags providing multiple paths to the destination.
  2. Modularization issues.  Feature flags are often need in the larger applications.  The kind that provides a lot of features (duh!).  But those large applications often consist of smaller parts, or modules.  Deciding whether or not to implement the feature on the application level, and/or on the module level is difficult. Especially if those module features will need to be later grouped into application features.

In terms of implementation, I haven’t used any special tools or libraries.  It was basically a set of configuration files, with feature variables defined per environment and altered during the deployment.

These days, something more robust than that is necessary for some of the projects at work.  Gladly, there are plenty of available tools to choose from – no need to reinvent the wheel.  For a good starting point, have a look at PHP Feature Flags website.  The ones listed so far are:

So, I guess, PHP is well covered when it comes to feature flags tools.  The above cover cookie-based, IP-based, URL-based dynamic features, configuration-based features, and A/B features.

The point now is to actually utilize them in the project.  After all, the lack of feature flags is one of the 5 toxic things for the scalability, as per this page:

  1. Object Relational Mappers (ORMs)
  2. Synchronous, Serial, Coupled or Locking Processes
  3. One Copy of Your Database
  4. Having No Metrics
  5. Lack of Feature Flags

I haven’t decided which library to use yet – will need to try them all and see which one is the most appropriate, but for now I don’t think I’ll dive as deep as cookie/URL/IP based features or A/B testing.  Even the simplest configuration-based implementation will be helpful.

HexChat IRC Client

Well, apparently I’ve been leaving under a rock for the last few years.  When it comes down to IRC clients, I’ve been mostly using XChat.  Turns out, XChat has been abandoned for years, and it’s still around mostly because Linux distributions care so much about it that they patch it and ship it.

As with anything in the Linux world, there are plenty of alternatives.  And one of them was right under my nose all these years – HexChat:

HexChat is an IRC client based on XChat, but unlike XChat it’s completely free for both Windows and Unix-like systems. Since XChat is open source, it’s perfectly legal.

HexChat is often shipped right next to where XChat is or used to be.  For Fedora users, it’s as close as “dnf install hexchat“.

dotfiles – your unofficial guide to dotfiles on GitHub

Warning: you will lose a lot of sleep if you follow the link below. :)

No matter how well you know Vim, bash, git, and a whole slew of other command line tools, I promise you, you’ll find something new, something you had no idea existed, something that will help you save hours and hours of your life by shaving off a few seconds here and there on the tasks you perform on a daily basis, in the repositories link to from this site.

I think I’ve spent most of my Sunday there and my dotfiles are so different now that I’m not sure I should commit and push them all in one go.  I think I might need to get used to the changes first.

Some of the things that I’ve found for myself:

  • PHP Integration environment for Vim (spf13/PIV).
  • myrepos – provides a mr command, which is a tool to manage all your version control repositories.
  • bash-it – a community Bash framework.
  • Awesome dotfiles – a curated list of dotfiles resources.

… and a whole lot of snippets, tips, and tricks.

P.S.: Make sure you don’t spend too much time on these things though :)