Archive

geek || nerd

On April Fools’ Day this year, Reddit created /r/place and did a social experiment for 72 hours that involved a blank canvas. Members could colour one pixel of the canvas once every five minutes. By end of the experiment, multiple subreddits were working together to create a formidable work of art full of various cultural references. It’s amazing to see how it progressed and to see people on the Internet working together to create something, even with some conflict here and there. It also goes to show how even a small action like colouring a small pixel has a large impact if everyone does it.

Inspired by /r/place, I created potential-octo-potato. As I like to describe it, it’s like /r/place but with code on GitHub. The idea is that through very many minimal transformations, a working piece of software will be created. I have no idea what the program will do, what it’s supposed to be like, or even what language it will be written in; that’s all decided by you, the contributors. Even the name isn’t mine; it was the name suggested by GitHub when I created the repo. The only things I provide are the repo and the rules.

Like /r/place, there are rules in place to ensure that everyone gets a chance to contribute. The details are in the README, but in summary, each user is limited to one active pull request at any given time. Each pull request can only contain one commit, which must contain only a “minimal” change, whose definition is under the discretion of the project maintainers. The limit on the number of pull requests gives a temporal restriction, much like the five-minute restriction on /r/place; the “minimal” change requirement gives a scope restriction, much like the single pixel restriction on /r/place. I’m the only one who can approve pull requests right now, so I hope it won’t become too overwhelming.

A project like this requires lots of communication, so full use of GitHub’s issue tracker and wiki is highly recommended. If this project picks up, I might even consider creating an IRC channel.

Even if you can’t code, there are still ways to contribute. Want to see a feature in the project? Add an issue! Think something should be documented better? Write the documentation! Think this needs a logo? Go make one! You can also tell your friends about it and give the project more exposure.

I’m excited to see how this will turn out. Will it fail? Will it be unexpectedly popular? What will it do? That’s all up to you. So go ahead, make a pull request today and tell all your friends!

tpenguinltg/potential-octo-potato on GitHub.

I don’t have a Facebook account, and as much as people try to convince me to get one, I invariably refuse for a number of reasons. Among those reasons, there is one that stands out. Yes, privacy is a concern, but this reason is even deeper, more fundamental, than that.

You won't find me on Facebook

Image credit: FSF

I always say that getting a Facebook account would compromise my principles, but nobody asks how. Let’s start with a superficial reason for not getting an account: I don’t want to provide my real personal info. This, of course, stems from the privacy concern mentioned earlier. “Alright,” you might say, “but lots of people create accounts with fake names. What’s the issue?”

Everyone doing something doesn’t make it right. Everyone lies, but lying isn’t right.

If you actually take the time to read Facebook’s Terms of Service, you will encounter Section 4:

Read More

My stats sparkline script has been updated to v1.1.0! This version adds support for custom domains.

If you have auto-update enabled for the script, you should receive the update soon. Otherwise, you can force an update check for the script in your extension or head over to Greasy Fork and install it manually.

If you own a custom domain, you have an extra step to do, again because of technical limitations. By default, the script won’t run on your custom domain because it doesn’t know about it. To fix that, find the script in your user scripts extension (Greasemonkey, Tampermonkey, etc.), go to the script’s options and add the following as a user include, where example.com is your custom domain:

https://example.com/*

If your extension doesn’t support user includes, you will have to edit the script manually, although doing this means you won’t get automatic updates and you will have to do this every time you update. If you need to this, add the following line after the existing @include line:

// @include https://example.com/*

A big shout-out goes to Dennis for alerting me of the bug and helping me test! This release couldn’t have happened without him.

If you’d like to read about the technical details of the update, continue reading. Otherwise, if you have any questions or experience any issues, please leave a comment. Happy blogging!

Technical details →

The staff at WordPress.com are at it again, removing useful features for the sake of consistency with the “unified experience” vision. This time, it’s the stats sparkline in the admin bar that was introduced in 2011. It still lives on hidden in the sidebar that appears when you click “My Sites” in the admin bar, but its usefulness is greatly reduced because it’s hidden in the sidebar and not immediately visible in the admin bar.

This was unacceptable, of course, so I wrote a script to bring it back. Unfortunately, because of certain technical limitations, this script can only run on URLs that have wordpress.com in the domain part. If you want to add support for your custom domain, you will have to extend the script’s include directives. You can add one in the script’s options in your extension. If your extension doesn’t support adding custom includes, you can add it yourself by adding a custom @include line to the script, but you won’t be able to receive automatic updates.

The sparkline restored to the admin bar

The sparkline is restored

If you’ve already installed one of my previous scripts, you’ll know how easy it is to install this one. If installing user scripts is new to you, don’t worry; it’s very simple. If you don’t already have one, install a browser extension that allows you to run user scripts. Then, install the script from Greasy Fork.

If you have any questions or experience any issues, please leave a comment.

You don’t need to know how the script works to use it, but if you’d like to know the technical details, read on. The source code is available on GitHub.

Happy blogging!

Technical details →

v2.1.0 of my classic stats redirect script has been released! As I had mentioned in my previous release post, v2.1 of this script features support for redirecting when there is no blog domain in the URL. This is the case for /stats, /stats/insights, /stats/day, and the others stats types. Unfortunately, due to the nature of the solution, the page must load first before you are redirected. Fortunately, though, this probably isn’t a very common case.

The script was updated earlier today, so you may have already received the update if you have auto-updating enabled for the script. Otherwise, you can install the new version manually from Greasy Fork. Leave a comment if you experience any issues or have any questions.

Technical details follow.
Read More

Version 2.0.0 of my classic stats redirect script is out! I had actually released it on Thursday, but I didn’t get a chance to write this post until now. If you have auto-updating enabled for the script, which is the default, you should have already received the update. Otherwise, you can head over to Greasy Fork to install it manually. This new version redirects instead to the classic dashboard stats page. Thanks goes to PiedType for alerting me of the problem and to Dennis for the idea for the solution.

If you would prefer to use the new stats page and would like to use your screen space a little more, you can install my stylesheet that does that.

If you’d like to learn more about how the script works, keep reading. Otherwise, you can stop here and enjoy your classic stats! Leave a comment if you have any trouble setting it up or if you have any questions.

Insights and technical info →

PiedType informed me earlier that WordPress.com has killed the old stats page and redirected the URL to the new one. Anyone with my stats redirect script would have encountered an infinite loop as the script would redirect to the old stats page, which would redirect to the new stats page.

I have put out a temporary hotfix that disables redirecting altogether so the infinite loop stops happening and am working on redirecting to the classic dashboard stats instead. If you have auto-update enabled for the script, you should receive it soon. Otherwise, you can either disable it until the new version comes out or you can reinstall it.

More details to come in the next post.