joepie91s Ramblings

Random posts about technology, activism, programming, people, and anything inbetween.

Month: February, 2013

Why DRM is bad

It’s really quite simple, and doesn’t require an extensive blog post.

The motivation behind DRM is ‘preventing piracy’. Seeing as virtually every method of DRM is cracked straight away (let’s not forget that software crackers see this as a fun challenge), that motivation is somewhat invalidated.

On the other hand, DRM presents problems for paying users, to the point of publicly shaming someone that legitimately purchased the software, or even permanently destroying many hours of work by legitimate users.

To summarize:

  • DRM does not have the positive effect people want it to have
  • DRM does have many negative effects

Conclusion: DRM is bad.

If you so much as think about responding to this with “but we have to fight piracy!”, then you should pause now, and think to yourself whether stopping piracy is really your motivation, or whether you’re just looking for a way to feel good about “inconveniencing those nasty pirates”. After all, we’ve already seen that DRM does not contribute to “stopping piracy”.

The Python documentation is bad, and you should feel bad.

Python is quite often hailed as a language that is great to learn programming, due to its simple and often natural-language-like syntax. But there’s one big issue that many Python developers conveniently overlook: the documentation.

While PHP is no doubt a terribly inconsistent language that has some very bad language design, the documentation is, perhaps ironically, very good. It misses some information here and there, and even has some incorrect information in it, but overall it’s a very valuable learning resource – especially for people that are new to programming.

In this article, I’ll go into the most important differences between PHP and Python documentation, and how this is seriously affecting the adoption of Python.

Let’s start out with a simple example. Say you are a developer that just started using PHP, and you want to know how to get the current length of an array. You fire up a browser and Google for “PHP array length site:php.net”. The first result is spot-on, and one minute later, you know that count($arr) will suffice.

Now let’s say that you wish to do the same in Python. In this case, you would Google for “Python list length site:docs.python.org”, and the first result is… a page with several chapters on standard types? It’s entirely unclear how to get the length of a list, and you’ll have to scan through a giant amount of text – even ctrl+F will not help you much here – to figure out this very basic operation. Five to ten minutes later, you know that len(lst) is how to do it.

Note that I have added domain restrictions to both queries, to limit the search to the official documentation – after all, that’s what I am discussing here.

This example immediately shows the first issue with the Python documentation: the organization and resulting Googleability. As opposed to the PHP documentation – which is nicely segmented into separate pages for each function and concept – the Python documentation is written like a book, with chapters and paragraphs. Ever tried to look up the exact point where something happened in a novel? It doesn’t work.

When you Google for something, you will end up on a page that explains a lot of things, including what you’re looking for. But how are you supposed to know where on the page it is, or whether it’s even on the page at all? The problem here is that the particular operation you are trying to find documentation on, does not have its own page.

I frequently bring up the above example in conversations with others about the Python documentation. A common response to that is “but everyone knows how to get the length of a list, that doesn’t need its own page!” But consider this: if the documentation doesn’t explain how to use the language – especially the core components of it! – then what was the purpose of the documentation to start with? The whole point of the documentation is to explain things to people that do not understand them yet. Which brings us to the second issue…

The Python community

Update, February 19: Several people have pointed out that Python developers on Reddit and StackOverflow in particular do not really fit the following section, and I have to agree with that. This section refers primarily to communities that consist mostly of Python developers, and do not have a very distinct culture of their own. The two examples given by others – Reddit and StackOverflow – both have a very distinct and ‘unusual’ atmosphere in general, also outside the Python subreddit/category.

I will no doubt piss off quite a few people with this statement, but the community around Python is one of the most hostile and unhelpful communities around any programming-related topic that I have ever seen – and with that I am not just referring to #python on Freenode, but to communities with a dense population of Python developers in general. This point actually consists of several separate attitudes and issues.

The general norm for the Python community appears to be that if you are not already familiar with the language, you do not deserve help. If you do something in a less-than-optimal way, other Python developers will shout about how horrible you are without bothering to explain much about what you did wrong. When you ask out of curiosity how a certain thing works, and that thing is considered a bad practice, you will get flamed like there’s no tomorrow – even if you had no intention of ever implementing it.

Another issue are the very strong elements of fanboyism around various approaches and particular modules. Try asking any kind of question about sockets, and the standard response will be “use Twisted”. Try explaining why you do not wish to use Twisted, and no matter how valid the reason, the response will be along the lines of “use Twisted anyway”. And it’s not like these are some random people shouting stuff – no-one will even answer the question you asked in the first place, because everyone is too busy telling you to use Twisted.

But one issue in particular bothers me to no end: the assumption that source code is a reasonable replacement for documentation. The documentation on module X is bad? Just read the source. Want to know how the Python interpreter deals with input Y? Read the source. And so on, and so on.

Isn’t the purpose of tools to make your job easier, and less time-consuming? Isn’t the purpose of a higher level language to abstract away the lower level things you do not want to have to worry about? Then how is it acceptable to expect someone to invest large amounts of time into reading the source code of something to understand how to use it?

Would you expect a plumber to know the exact manufacturing process of his wrench?

But perhaps the biggest issue with the Python community is the ostrich mentality. All of the issues mentioned in this article so far – and all those that will be mentioned later on – are conveniently ignored, waved away, or justified by many Python developers whenever they are brought up. The ‘read the source’ mentality is, in fact, often a clear example of this ostrich mentality – instead of working on fixing the documentation, the lack of good documentation is justified by saying that “you can read the source anyway”.

Incomplete documentation

Let’s do an experiment. Think of a random function in a random standard library module in Python, visit its documentation entry, and try to find all the error conditions (return values, exceptions, when they happen, …) without scrolling the page. Didn’t work? That’s not very surprising.

The Python documentation is incomplete. While not always incomplete in the sense of not carrying all the information, it’s very often incomplete in the sense of not carrying information in all the right places. When you go to look up any function in any Python module, standard library or not, you should have an immediate overview of the accepted arguments, the return values, the error conditions, and when these occur.

Again, PHP shines here, having all of the above in a standardized format, for nearly every single function in PHP. To figure out the error conditions for a Python function, you’ll first have to read the function description blurb, then scroll to the top of the chapter, the top of the page, the bottom of the chapter, and the bottom of the page – it may be in any of these places. If you’re very unlucky, the information is not on the page at all, and you have to either Google for it – or even try all permutations of input you can think of, in an interactive shell.

Error handling is important, that is pretty much universally accepted in the Python community. But if error handling is so important, why are you not giving people the tools and information to do so?

The documentation is unclear

Yet another problem. In many cases, the Python documentation is simply unclear. Natural language is ambiguous by nature – many sentences can be interpreted in more than one way. This is an absolutely deadly situation for documentation of a programming language, where you can blow up your entire project by doing one thing wrong.

PHP solves this by having examples for every single function and class. If you’re not sure what is meant with a certain sentence in the description, you just look at one of the included examples, and all ambiguity is removed. It’s immediately obvious how to use things.

In the Python documentation, examples are extremely scarce. If examples are given at all, they are often incomplete, unclear, or lack initialization code or context. More examples are necessary.

Why is all this important?

Now, by the time you’ve reached this point in the article, you may be thinking to yourself: “but I’m doing fine, I have no issues with the documentation as it is, you’re just whining!”

Think about this for a moment. If you are not only reading this article, but you are sufficiently pissed off by it to think something like this – does that not mean that you are already experienced enough not to need solid documentation? If you are an experienced developer, then you are most likely in a very bad position to judge how beginner-friendly the documentation for a language is.

On the one hand, the Python community is trying to actively ‘spread’ the word, and is telling people that Python is ‘so easy to learn’. On the other hand, both the documentation and the community are very newbie-hostile and unhelpful. Don’t you see a problem with this?

If you wish more people would use Python, then start making it possible for them to do so. Restructure the documentation. Think twice about how you respond to a newbie. Respect someones reasons for wanting to do things themselves – as long as you inform them of the associated risks or problems, in an informative manner. Turn Python from a language that pretends to be beginner-friendly, into an actually beginner-friendly language.

Most of all, accept that your personal experiences with Python, as an experienced developer, are not worth very much. Listen to the newbies when they tell you the documentation is hard to read or find stuff in.

No-one is fixing this

Some of these problems are very obvious. Others are less obvious, but still exist. With the amount of issues in the Python documentation and community, you’d expect at least some kind of effort to be underway to fix these… but as far as I can determine, there is not a single person or group of people working on fixing these problems. Why not?

This issue will not solve itself. The only way this issue can be solved, is through a cooperative effort of any Python developer that can spare a few minutes. If even half of the experienced Python developers in the general Python community rewrote the documentation for one function or concept, we would have an absolutely golden documentation in less than a month.

Make it happen. Recognize that it’s broken, and fix it. That’s what developers do.

tl;dr

As this is a tl;dr, it does not include in-depth elaboration and just serves as an overview of the points made in this article. If you’d like to respond to any of these points, please take the time to read the corresponding explanation above first, so you have a complete understanding of the point I am trying to make.

  • The Python documentation is not divided into method- or class-specific pages, and as such is very hard to Google through.
  • The Python community appears to assume that documentation doesn’t need information about core mechanisms in the language.
  • The community is generally unhelpful and hostile (save for Reddit and SO, generally). Beginners are often treated as unworthy of help.
  • The community has strong elements of fanboyism (Sockets? Use Twisted!)
  • “Read the source” is considered an alternative for documentation.
  • The documentation is incomplete (lack of error handling, return value, and parameter information).
  • The documentation is ambiguous (very few examples, unclear descriptions).

UPDATE: A reader requested that I provide an example of how the Python documentation could be improved. It took me a while to get around to it, but here goes – I’ve decided to rewrite the documentation for os.path.walk() as an example. The original documentation can be found here, my suggestion can be found here. My version is written using ZippyDoc, the source of the documentation page can be found here.

YourAnonNews is bad news, and here’s why

If you’ve kept an eye on Anonymous in any way, you have almost certainly come across a particular Twitter account known as @YourAnonNews. This very large Twitter account – it has over 850,000 followers at the time of writing – has become the primary source of news for many media outlets and individuals when it comes to Anonymous. To say it differently, YourAnonNews has become a media outlet themselves. Here’s why this is a bad thing.

Twitter is a closed platform

Twitter is a business. A business, generally, has certain things they cannot do to keep up their reputation or legal liability. While Twitter is most certainly more relaxed than most businesses in terms of, for example, compliance with government requests, they have a certain responsibility in the end. Additionally, it is very important to them to have a good brand image, and exclusive access to the content that is created by their user base – otherwise, what would their business be built on?

While all this sounds pretty bog standard for a business, there’s one big problem that’s easy to overlook: their interests do not align with yours. While “making it possible for everyone to broadcast” may be one of their values, it is most certainly not their primary motivation – running a business, however, is. What this means is that if it comes to a conflict between the interests of the users and the interests of the company, the interests of the company will always prevail.

To give a more concrete example of this: say you wish to move to a different micro-blogging provider, such as identi.ca. Is Twitter going to give you a full backup of all your tweets in a standardized format? Probably not. Is Twitter going to place a redirect on your Twitter profile to your profile on the new provider? Almost certainly not. It’s in their best interests to keep your data and follower base locked up.

This closedness might not seem like a very big issue for an individual writer from some random place on the globe tweeting about the kind of coffee he drinks at Starbucks, but it most definitely is a problem for YourAnonNews, who relies completely on Twitter. As could be seen with the account suspension of YAN, Twitter has full control over the fate of what is currently the biggest media source for Anonymous. The one that holds the keys to the metaphorical YourAnonNews office is not the owner of YAN itself, but Twitter Inc.

YourAnonNews is a closed platform

A bit of history here: YourAnonNews used to be run by one or two people that set it up as a source of news bits about Anonymous. Over time, a few more people got the password to the YourAnonNews account. After criticism over bias and closedness, a new system was set up where GroupTweet was used to give a larger amount of users tweeting access to YourAnonNews – DMing the YourAnonNews account would result in the DM being re-posted on the public timeline, and all posted messages would be logged, including origin.

While at first sight this seems like a more open solution, there was still a big flaw: there were still only one or two people that had complete access over the account. These few people would still be the only people with the ability to add or remove tweeting access for individual other users. Throw some basic psychological bias into the mix, and you end up with the exact same situation as you had before – after all, the owners of the account are more likely to grant access to people that are biased similarly to themselves.

Simply put, as an arbitrary Anon, there is no way to gain access to the audience that YourAnonNews has, unless you are on the “side” of the owners – in which case you would probably not need that access in the first place, as your news would likely already have been tweeted by them. I will elaborate on this a bit more in the following section.

YourAnonNews is biased

It really is. In part due to what was mentioned in the previous section, there will always be a certain primary ideology speaking from the YourAnonNews account. This is made worse by the fact that there really is no proper way to submit your own things to YourAnonNews.

If you try to submit something via the IRC channel on VoxAnon, you will first have to figure out who has tweeting access, which is not always an easy task, and then hope that you can find the one person with tweeting access that agrees with your desired tweet enough to actually post it. That is, if anyone is responding and in the same timezone in the first place. This clearly doesn’t work.

If you try to submit something by DMing or mentioning someone with tweeting access on Twitter itself – if you know who that is in the first place – there is no guarantee that they will ever read your message, nor are you very likely to get a response indicating such. Again, you also have the same problems in finding someone that agrees with your view. This also appears not to work.

So you’ve come to your wits end, and decide to click the ‘website’ link on the YourAnonNews profile page on Twitter, and end up at their tumblr page. There’s a “submit a press release” link, but this appears to only apply to the tumblr – and who reads the tumblr? The followers are on Twitter, and all the media outlets always refer to the Twitter account as well. Again, there’s no guarantee of feedback.

At this point you’ll probably just give up, post it on AnonNews and CyberWarNews, and just hope that someone from YAN picks it up. If not, your operation or communication fails, because no one has read about it. The media never picks it up, because it wasn’t on YourAnonNews.

To add to the insult, the YourAnonNews account seems, from the name, to be a news account – but frequently, personal opinions are tweeted. Sometimes just off-handed remarks, sometimes very strong accusations.

In a surprising turn of events, the hacktivist group spewed venom against Dotcom using the Twitter handle @YourAnonNews, calling him a snitch. Anonymous has dubbed Dotcom ‘master of delusions, illusions and double crossing’.

Source: http://tech2.in.com/news/web-services/anonymous-attacks-kim-dotcom-over-new-revelations-of-ninjavideos-closure/709432

And it gets worse.

YourAnonNews seems official

While YourAnonNews does not claim to be an “official” account of any sort, this impression is certainly given by the appearance of the Twitter profile, and the wide referencing in various media outlets. On the account itself, no clear attempt is made at removing this assumption – but how could they, if the closed platform that is Twitter doesn’t allow one to change anything on the profile beyond the image and the bio?

The wide assumption that YourAnonNews is an “official” account of some sort can be easily recognized by reading a few news articles about Anonymous.

According to a tweet from Anonymous’ mouthpiece account @YourAnonNews, police were notified by the Westboro Baptist Church’s lawyer that they would not be attending the funeral.

Source: http://www.latinospost.com/articles/9704/20130116/anonymous-stops-westboro-baptist-church-picketing-aaron-swartz-funeral.htm

But more than an hour after its main Twitter account — @YourAnonNews — was shut down, Anonymous announced the account had been re-activated in a series of tweets.

Source: http://www.huffingtonpost.com/2012/12/19/twitter-suspends-anonymous_n_2331390.html

Hacking group Anonymous said Thursday it knocked out the websites of the FBI, U.S. Department of Justice, and several entertainment industry sites as retribution for anti-piracy efforts by both the government and the entertainment industry. The group said it was “the largest attack ever,” with 5,635 participants involved in bringing down the sites.

Source: http://www.nbcnews.com/technology/technolog/anonymous-says-it-takes-down-fbi-doj-entertainment-sites-117735

In many other cases, this assumption can be seen in the common use of terms like “The Anonymous Twitter account”.

YourAnonNews causes a “race to fame”

Aside from all the issues that make YourAnonNews problematic in the first place, there’s also one particular issue that makes it hard to solve the problem: everyone wants a piece of the pie. If you are trying to set up an operation of some sort, you will most likely need some press attention. And what better way is there to get press attention, than to try and get tweeted by YourAnonNews?

The desire of people to have their own projects tweeted out, makes it unlikely they will speak out against YourAnonNews or any of its flaws – after all, it could harm their ability to get media coverage. Perhaps ironically, YourAnonNews stays “in power” for the same reason corrupt governments do – everyone is too busy trying to get their share of the power, to speak out against its corruption or flaws in public, thereby perpetuating the problem.

Until is it commonly accepted that these issues exist, YourAnonNews is unlikely to go away, and is in fact likely to grow even more. YourAnonNews already has (almost) all of the characteristics of the so often disliked “mass media”, and is already single-handedly controlling the direction Anonymous is going in according to the preferences of those controlling it, through their sheer power in the media.

Closing words, and why creating a new account won’t help

All of these problems apply to any kind of news account on Twitter. They are not problems specific to YourAnonNews – it’s inherent to the model that YourAnonNews uses. This is also why creating a new account on Twitter with the same purpose won’t help the cause and will, in fact, only make it worse by making this model more commonly accepted.

It is not possible for an Anonymous news source of some sort, to operate off a corporate platform without conflict of interest. It is not possible for an Anonymous news source without any kind of standardized and objective submission process, to remain unbiased. It is not possible for an Anonymous news source to operate like YourAnonNews does, without compromising on some of the most important aspects of decentralization.

With this post, I hope to make people realize that something is terribly, terribly wrong with YourAnonNews and that it greatly harms the decentralization within Anonymous. Please do share this with others if you can recognize these problems, as I consider it unlikely that YourAnonNews will report on it. If YourAnonNews does tweet this post, then please do realize that that alone, is not enough to make all the problems mentioned above go away.

Update: YourAnonNews responds… or well, really doesn’t

As if the list of reasons itself wasn’t bad enough, this was posted by YourAnonNews literally minutes after this blog post was posted in various places, including the #YAN IRC channel. Of course no reference to this blog post to be found, anywhere.

original_owely20130205-20956-1xnhb9e

Update 2: YourAnonNews reposts… sort of?

YourAnonNews appears to have just retweeted a reference to this blog post from another account, after publicly criticizing the lack of reference. It appears to be coming from a different user with tweeting access.

Update 3: YourAnonNews changes Twitter bio

As a result of this post and discussion with the owner of the YourAnonNews account, the YourAnonNews bio has been changed to indicate its non-officialness.

We are Anonymous, We are legion, We never forgive, We never forget, Expect us. As official accounts do not exist, we’re an Anonymous account amongst many.