Category Archives: Uncategorized

Protect Internet Freedom — Oppose “Net Neutrality”

Many internet sites are banding together this week in support of so-called "net neutrality"—the idea that internet service providers should not be able to discriminate between different internet content.

This sounds good; after all, none of us want to see particular viewpoints or content sources that we support or consume being blocked. But the truth is, that rather than supporting a freer, more vibrant internet, net neutrality actually does the opposite.

Until a few years ago when the FCC classified the internet as a Title II utility, ISPs were free to serve content as they wished. If consumers didn't like the service that they were getting, they had the freedom to decide to either put up with it or switch to a different ISP that offered the service that they wanted. Just like we do with services in every other part of our lives.

Consumers also had the freedom to seek out ISPs that provided service specially tailored to their specific needs, based on what kinds of content they did or did not want to consume, and what kind of devices they used. This meant that ISPs could offer plans that blocked unwanted content, or optimized the serving of a particular kind of content. That way, consumers could get the sort of plan that they needed, instead of having to pay for a generic plan that treats all content equally—even content that a particular consumer doesn't need or want to see.

In other words, net neutrality actually limits consumer freedom, by limiting what kinds of internet service plans are allowed to be available for a user to purchase. It means that consumers would no longer be allowed to seek out plans tailored specifically to their needs. Everybody would be forced to have the exact same generic treatment of all content equally.

Of course, even without net neutrality, ISPs are free to offer plans that treat all content equally, if this is the experience that consumers want. Those people who support net neutrality can put their money where their mouth is, and only purchase service from providers that don't discriminate between different kinds of content—no government intervention necessary.

And with all of many big cable companies' shortcomings, at least we have the freedom to take our money and go elsewhere for service if we don't like a particular ISP. But you can't just decide you don't like how some government bureaucrats are are handling things and shop elsewhere—unless you want to leave the country.

And once the internet is classified as a Title II utility, it is just the first step to even more government intervention and regulation of the internet—which in the end could undermine the very principles of net neutrality that those supporting Title II classification are aiming for.

And no, net neutrality won't sock it to "big cable". Instead, while big cable will weather the storm, it will force some niche ISPs out of business. And it will make it harder to compete with the big cable companies in the future, because there will be one less way for smaller companies to differentiate. By compressing the market, it will actually make it more difficult to challenge the large cable companies when we're dissatisfied with their service.

In short, supporting "net neutrality" is not unlike saying that Google shouldn't be able to discriminate between different content in its search results on any basis whatsoever; that it should have to toss out its algorithms; that all search engines should have to treat all content the same as every other search engine. Of course, that would defeat the purpose of their existence, because they'd be forced to comply with an arbitrary principle instead of simply providing the experience that offers the best results for their users.

Net neutrality would take away our freedom to get what we want out of the internet, the way that we want it. Instead, we'd all have to see the internet through the very same lenses.

Most of us don't want our ISPs discriminating in particular ways—great, so don't buy internet service from any that do. And if you can't find an ISP that does exactly what you want, the good news is, that at least for now, it is still a free country, and you or somebody else can create one to fill that need.

That is, it is still a free country, as long as we continue to stand against net neutrality. After that, you'll no longer have that freedom. And innovation, and thus the Internet's vibrancy and diversity, will suffer as a result.

Why WordPress should stop user-focused development

WordPress prides itself on being user-focused, and its development process is focused largely on building new user features. However, it is time to change this. WordPress needs to stop user feature-focused development.

Now, I'm sure that many users are thinking that I'm just some snobby developer who doesn't care about users. Actually, though I am a developer, I am also a user myself, of course, and I'm drawing on both of these experiences to come to my conclusion.

I'm not saying that I think WordPress should stop being user-focused, in the sense of trying to achieve the best possible user experience. I think that the WordPress core devs, despite the flack that they sometimes receive from other devs (like myself, even!), are usually right in the way that they put users first in many decisions that they make.

However, I think that it is no longer possible to truly put users first if WordPress is building user facing features.

WordPress is no longer blogging software. WordPress is no longer even a CMS. WordPress is no longer really any one thing. It is many things to many people, which is why it is easy to argue over which of these things it is. Is it a CMS, or blogging software, an app platform, or a framework? It is used for all of these things, and probably more.

This is to say, that WordPress no longer has the privilege of deciding what it wants to be. It isn't just a little kid who can pick what he'll be when he grows up. Instead, WordPress is at the point where it is ultimately the users who are deciding what it is. Many people use it to build their blogs; many more use it as a CMS; still others use it as a back-end for a web-app. WordPress core no longer has one single purpose; it is many things to many people.

So when user-facing features are developed in core, there are inevitably problems. Some people like them; others hate them. Some people need them for their blog; others think that they are just wasted time and superfluous "bloggy" features in their CMS. And vice versa.

There is no way for core developers to avoid this conundrum when developing many user-facing features, and it will only get worse as WordPress attempts to push from 25 to 50% of the web. There is a danger of fostering both grumbling majorities and vocal disgruntled minorities.

But there is a way to avoid this, by side-stepping the problem completely: just stop developing user-facing features in core.

In fact, go a step beyond that, and begin removing user-facing features from core.

Now, obviously, that is only half a plan. User-facing features still need to be developed, of course.

And in fact, they already are. WordPress.org hosts a directory of almost 50,000 plugins that add the features that users need (and probably a few that they really don't). WordPress has always fostered the extension mentality, and the idea that many features belong in plugins, and not in core. But in the development cycle, it is still often user focused. We feel compelled to include user-facing features in each release, and to market them to users via the About screen on update. WordPress is still being built and is serving updates as if it was just blogging software, or a primarily UI-focused product.

But it doesn't have to be. It is largely a throwback to the past that is just what both developers and users are used to. And it is time to change.

We all know that plugins are really WordPress's secret super-power. And they are here to save the day!

Nobody builds a WordPress site without plugins. The first thing one does when setting up their site is to begin installing plugins, and maybe a theme with plugin-like features.

WordPress isn't becoming a framework, or plugin platform. It already is one. And has been for some time. And and I think it is time that we acknowledge and fully embrace that. Or else we'll never get to 50% of the web. Or if we do, it may be as "the menace" that everybody uses, but nobody is really satisfied with.

So let's start developing WordPress as a plugin framework. Let's stop it with all of the user-facing features being built into core. In fact, let's start turning existing features into plugins and moving them out of core. Let's stop forcing the core developers to make increasingly impossible decisions about what WordPress is, and let the users choose. Let's democratize WordPress.

Let's start making WordPress's development plugin developer focused, instead of user-facing feature focused. This will improve the lives of plugin developers, meaning more and better plugins. And that will improve the lives of users, by improving the choices that they have available to make WordPress whatever they want it to be. That way, everybody has the WordPress that they want. And that way, everybody wins.


This post was created with the new Gutenberg editor, that has sparked debate and complaints over what core developers should be focused on.

The Law of Software Thermodynamics

I just found this quote, and I wanted to save it for reference:

There’s this little law of thermodynamics that says energy is neither created nor destroy[ed], it just changes form. This law almost holds true for complexity in software development – except that we can and do create complexity in our systems. And it seems that once we create the complexity, it never seems to get destroyed. It only gets moved around.

Source: Backbone.js: Getting The Model For A Clicked Element by Derick Bailey

PHPUnit and the WordPress file system API

If you unit test your WordPress projects with PHPUnit, sooner or later you’ll want to test some code that interacts with the filesystem. If you are interacting with the filesystem properly, you’ll be using the $wp_filesystem object.

A few months ago I found myself needing to test some code that created a file using the WordPress filesystem API. I searched for a good solution, and found the information about mocking the filesystem on the PHPUnit website. But after tinkering with vfsStream, I decided it would be easier to build a simple filesystem mocker myself than to integrate vfsStream with the WP Filesystem API. So I did.

The result is the WP Filesystem Mock.

[It] Provides a class that can be used as a mock filesystem, and also a shim for the WordPress filesystem API that uses it. This is useful in unit tests that include simple filesystem operations.

Enjoy!

Unserializing Safely

Avoid object injection with this:

	
    if ( 1 !== preg_match( '~O:\d~', $maybe_dangerous ) ) {
        // All is well, this is safe to unserialize.
    }

For security it is best if you use json_* or something else instead. But if you are working with a project built by someone else and you have no choice, this will keep you from unserializing any objects.