Project Gutenberg and cloud storage integration


, , , ,

I was writing a blog draft (about politics, so I don’t think it will come out here) when I thought I would benefit from reading Tocqueville’s Democracy in America. This is an old book, written in 19th century, so naturally it is in Project Gutenberg’s collection. The original is in French, but it was translated quickly into English.

Project Gutenberg now offers the option to download ebooks to online storage service, such as Dropbox (and Google Drive and Microsoft One Drive). I have known this for some time, but usually I just ignore it. But this time I was intrigued to try.

If you choose downloading to Dropbox, the service will ask your permission to authorise Dropbox. If agreed, Project Gutenberg will create a new directory inside your Dropbox folder, and place your downloaded books there. This means I am now able to access my downloaded Project Gutenberg’s books using Dropbox service. Which is nice: I don’t always bring my laptop with me. I haven’t installed the Dropbox app on the phone, but I think I will do now.

Shellshocked: A collection of links about the Bash bug


, ,

I don’t really think I understand the new bash bug, cutely named as “shellshock”. I’ll just use this post as a dumping ground for links I have quickly collected. But some explanation first.

Bash is a shell, or command line interpreter, used by various Unix-derived or (in case of Linux) clone operating systems. It is included not only in various GNU/Linux distributions, such as Red Hat, Ubuntu or Debian, but also in a more mainstream operating system: Mac OS X. There is a bug in Bash that enable attackers to execute commands remotely, and potentially enable them to do naughty things.

As far as I know, usual PC systems are largely not affected. Most PCs use Windows, which doesn’t use Bash, thus not vulnerable to this bug. Even personal machines that use Linux or Mac OS X usually doesn’t enable remote service that can be used by attackers to exploit this bug.

The systems affected will be mainly servers. Although Windows rules personal computers, a very large portion of servers run Linux or some version of Unix. Most web servers, in fact, runs on Unixes (with Apache or Ngix). So even though your own system may not be vulnerable, Internet as whole has a great problem.

On to the links. I may add new ones.

  1. Initial report from Akamai
  2. An overview of the bug from Troy Hunt (via Hacker News)
  3. Fedora Magazine explains how the vulnerability works
  4. Apple says most Mac OS X users won’t be affected, but you should update anyway when a patch is released.
  5. The initial patch doesn’t really eradicate the problem. And there may be more bugs lurking.
  6. The bug is quickly exploited
  7. Oracle products (other than obvious one like Solaris and Oracle Linux) are affected as well.
  8. Good explanation about several techniques that can be used to exploit this vulnerability. 

Doing scheduled blog posts


, ,

I have some blog drafts lying around. I plan to release them in a sequence. The problem is I haven’t finished them in the right order. It’s seems that I will have to complete them all, then doing staggered posting.

It turns out that Blogger (where I save the drafts in question) have this feature called scheduled posting, something I haven’t explored before. Of course I have heard about it, but I didn’t really pay attention. WordPress and Tumblr also have the aforementioned feature. I guess I’ll use this feature more often.

Of course, this post is scheduled :)

Tails: quick review


, , , , , ,

Like all trendy, privacy-conscious, NSA-suspicious self-respecting journalist, I am interested in Tails, an operating system that aims to “preserve privacy and anonymity”. But I didn’t have the inclination to try it until recently.

Tails uses Tor for anonymity, GPG for email encryption, and OTR for chat encryption. You can set them up in standard Linux distribution (like I have done), but in Tails all of these are already prepared for you and ready to use. It is also designed to be run from CD or USB drive, thus won’t leave any trace on the computer.

As the screenshot shows I run it on a virtual machine (VirtualBox instance), which is not really recommended for typical usage. But I am only curious about how it looks. It seems Tails is based on Debian Squeeze, which is really old (it uses, for instance, GNOME 2). But the kernel is rather modern (Linux 3.12), which ensure it to be compatible with latest hardware. The browser is also quite up-to-date (based on Firefox 24).

Because I have only used this OS for two days I haven’t tried feature(s) like persistent storage. I may provide further updates, so stay tuned.

Update: It turns out that persistent storage requires two things: Tails Installer (which is only found in Tails images) and a USB storage, with space larger than 4 GB. I failed at the last requirement, because I only have got 2 GB flash drives. No luck yet.

Wikipedia and voter education



April 9 2014 will be the day of election in Indonesia. From quick observation I find there are still a lot of people who can’t make up their mind yet. Who to choose? Who is the suitable candidates as members of local and national legislatures?

Many will just select the party, not the candidates him/herself. This simplifies things: voters do not need to concern themselves with track records, programmes, etc. Just the party. Just the political tribe. This is not ideal (at least not to me): sometimes the parties do not rank the candidates by their capabilities, but by  connections to party leaders. Good, promising candidates are put in lower ranks. In this case it’s better for voters to choose the candidate directly. In the case of regional representatives (DPD) you can’t choose parties, so information about candidates is even more important.

The Election Commission (KPU) have actually put the information about the candidates on their website. But as usual it is poorly presented, and the information is sparse. Several sites and apps have sprung up to offer better presentation and visualisation, but the data are still mainly sourced from the KPU database.

Here I think Wikipedia can, and should help. It is a crowdsourced platform (so every one can contributes), well-known, and also easy to search. Wikipedians can create entries for politicians and public office holders, and document their successes and flaws. Wikipedia biography articles usually reference public sources (news, government publications, etc), so they are very easy to check. It won’t really replace election apps and sites (such as presented in, but it can be complement and perhaps an additional database to such apps.

Unfortunately Indonesian Wikipedia coverage of the country’s politicians is rather sparse, and existing articles are not always of good quality.  Adding and editing politicians biography articles can be a theme for future Wikipedia editathons.  It might be too late for choosing MP candidates, but it still can be done when the results are out and the elected candidates are known. Over the time Indonesian Wikipedia should have better coverage of Indonesian politicians and help the voters to educate themselves in the next election.

On that Pywikipediabot presentation


, ,

So I agreed to do a presentation on Pywikipediabot for Indonesian Python community. The only problem was I hadn’t really understand it yet. I also didn’t really trust my ability in doing (and reading) Python. Luckily there was still time (a month) before presentation. I should have got plenty time for preparation.

My first step was to take a quick refresher course, A Gentle Introduction to Python from Mechanical MOOC. Because I had exposure to Python before I didn’t really follow the exact time table. I picked some topic I didn’t really understand, mainly object-oriented programming part of Python, and I did the exercises.

Of course this didn’t really cover the Pywikipediabot framework itself, which was rather intimidating to me. I had used it before in limited way, and I found it rather easy to use (not to read or modify though).  But some changes had complicated things (at least for me).

First is the move to git from subversion. I had read that git was hard to use, and I rather dreaded the change. The pywikipediabot manual had been updated to cover the git usage, but I found errors if you didn’t do daily update (I only tried to update about a week after initial installation).  Subversion was rather more forgiving in this respect. I just deleted and did the clone operation again.

Second the configuration (and installation). There are steps that needs doing after downloading the whole framework that was not documented (the most important one is setting PYTHONPATH). Well at least for the new version of Pywikipediabot. The documentation of the framework was for the old branch (the compat branch), and there are some things that needs to be updated. It seems to be better now.

So for the last days before presentation I decided to tackle the framework itself. I didn’t think I would be really able to master it, so I focused on some things I really wanted to do. That is, mass creating of articles. Admittedly this can be done with other tools (it seems to be easier to be done with Auto Wiki Browser for instance) but Pywikipediabot seems to be more flexible for other uses.

My strategy for creating articles was to put necessary  data in a csv (comma separated value) file, then read the records from the file to patch together a wiki formatted text which can be uploaded to Wikipedia. To read the csv file I use csv module from Python standard library, and Pywikipediabot is only necessary to upload the text into Wikipedia.

The script itself is quite simple. I’ve put my presentation online, where you can see yourself the implementation of the strategy. I intended to create articles on our members of parliament, but I couldn’t find good structured data for it. So I did manual data entry just for five MPs, which served the purpose for demonstration.

The difficulty for finding good database of MPs lead me to interest on Open Data, and encouraged me to attend a meetup about that topic on 4 September. But that will be another blog post.

I am rather pleased to agree to do the presentation. First I am much better motivated at programming Python now. I also find some interesting projects to do, like learning to scrape data from websites. My interest on data journalism is also rekindled

Ingress, four months later


, ,

I wanted to write about Ingress some time ago, but I hadn’t really got around to it. Perhaps I was too busy playing. I have installed Ingress in January and messed around with it, but I got really serious about it in February.

If you don’t know what Ingress all about, take a look around the web. Plenty of web pages can be read for introduction. After four months and have reached the highest level possible, I am not really interested in explaining much about the game itself to newcomers. I’ll just say here that it is a multiplayer Android game, and often dubbed as augmented reality game. I’ll just focus on how it changes me.

At the beginning I tried not to have much interaction with other players. I am a lone wolf after all, and rather uncomfortable interacting with new people. But it was then clear it would be easier to advance to upper levels with the help from other players.

So I began to socialise with other players, mostly from my faction (Enlightened) but also from the adversary (Resistance). Some players (agents in Ingress terminology) are in the thirties, lots are in the twenties. Some are even younger.  They are usually interesting characters, although some of them can be irritating. Along the way, I make new friends and acquaintances. Most are outside my usual social circle, although there are one  or two exceptions (well, actually maybe four).

A lot of active players are passionate about the (roleplaying) game, and sometimes there are clashes. Later changes to the game demand even more coordination from the agents, so the game is getting more social than ever.

Unlike other videogames which can be played in front of the screen, Ingress forces you to move around. So, I move around, like other players too. I walk a lot, and uses public transportation more. It gives me reasons to go to places I don’t normally go, like Pulau Untung Jawa (see the linked video about an awesome project we did back in early June)

I started to notice more details about the City: statues, museums, cemeteries, monuments. People watching is an old hobby of mine, but I began to observe some other people that usually not interest me: street pedlars, security guards …. and petty criminals. I know gated communities exist, but after playing in Tangerang I saw them for the first time. Suffice to say I think I know Greater Jakarta  better now after playing much Ingress, which is nice if you live and work here.

Adventures in DVD ripping


, , , , , , ,

I haven’t found a good system for ripping DVDs in Linux until recently. I have tried AcidRip and DVD::Rip. It somewhat works, but I am unsatisfied with the interface. Both are also seems unmaintained (last updates are in 2010). Some modern portable devices (phones, tablets) don’t have DVD player, so it is desirable to convert DVDs to more appropriate digital format.

HandBrake is a nice option, but it has several problems. First it can’t read encrypted DVDs without external help. When it can read DVDs at all (unencrypted, or, it can’t copy the content to hard disk first, which is my preferred procedure. Fedora repositories don’t have it, and the developers have stopped offering Fedora builds since version 0.9.8. Last Fedora builds offered are for version 0.9.5 (from 2011).

Even so I decided to use HandBrake to rip some DVDs I borrowed to a more readable format for tablets. First problem is to find a convenient program to copy DVDs to disk. Various options exist: for command line program I guess you can use dd or ddrescue, but I have only tried vobcopy. It works, but coughes on some bad DVDs.

K3b is often touted for working with DVDs. It can write DVD images (ISO format) to disk, but again it stutters when facing scratched DVDs. A more flexible application is K9copy. It can copy DVD chapters selectively, a feature I use when I found a DVD can be copied well except for the last (unimportant) chapter.

For subtitles you can use the subtitle tracks from DVD (VOBSUB). This usually means you shouldn’t only copy the VOB files (which is the default action of vobcopy), but also the subtitles. The easiest way to ensure this is to copy the whole DVD content.

The subtitles in DVD are actually pictures. If you prefer text format, you can either run text recognition program on it or just download available subtitles from sites like AnySubs. Handbrake can handle both format: VOBSUB and text (SRT) with no problem.

DVD ripping is a very computationally intensive task. I found that HandBrake consumes almost all computing power from the processor.  It needs about 30 minutes to 2 hours to convert the DVD, depends on the quality setting you choose. The trick is to find a setting that do the task in convenient time length without compromising the quality too much.

2012 in review

The stats helper monkeys prepared a 2012 annual report for this blog. Not really interesting report, nevertheless, I’ll share it with you, dear readers.

Here’s an excerpt:

600 people reached the top of Mt. Everest in 2012. This blog got about 10,000 views in 2012. If every person who reached the top of Mt. Everest viewed this blog, it would have taken 17 years to get that many views.

Click here to see the complete report.


Get every new post delivered to your Inbox.

Join 992 other followers