Tuesday, 18 June 2013

Movie genres in Plex media center: huh?

This post is not so much about a quirk in a particular program. Read through to the end and you'll see that it exposes a problem with crowd-sourced internet databases in general.
A few updates ago, Plex switched to a a new database for movie genres. According to what I can find from a cursory scan, it is Freebase). Previously it used IMDb, which only had a very limited set of genres. So it was supposed to be an improvement. However, when I browse through movies in Plex I now see things like this:
If someone would pick REC or The Fly for a romantic evening with their girlfriend, things would not end well. And in what way is “black-and-white” a genre? And don't get me started about “airplanes and airports”. Apparently I misunderstood the whole point of Indiana Jones. They should have made it more obvious that it was all about Indy hopping from one airport terminal to another.
When browsing through the films in Plex Media Manager, they prove to have multiple genres and the second genre often makes a lot more sense than the first (e.g. Thriller for Sin City, Horror for REC).
I can guess how this database came into existence even by only taking a glance at the Google results page for the “freebase” thing I did not know until now. It probably works in a similar way as the good old Google Image labeler, where random people are encouraged to slap as many labels onto random images as possible. The people who have the most time for doing this are children and teenagers, whose first impression of a film like Sin City is “it's black-and-white!” (Which is wrong by the way, there is quite a bit of colour in it.) Therefore the labels that get the most weight, are the ones that these age groups consider relevant. Maybe it would be helpful if the database would keep track of what labels were assigned by what age groups. Any user of the database could then re-weight the entries according to an age group of interest.

Sunday, 2 June 2013

Assassin's Creed II & Brotherhood on Mac OS X: avoiding the keyboard bug

Anyone who has tried to play the Mac OS X version of Assassin's Creed II or Assassin's Creed Brotherhood on a machine with more than one keyboard or with a fancy gaming mouse, will have encountered the annoying bug that causes the keyboard not to work. The game must be started multiple times before it reacts to the desired keyboard.

The reason for this is that the game can only handle one keyboard. When it starts, it will pick a keyboard at random. Gaming mice like the ones from Razer or SteelSeries also present themselves to the OS as a keyboard, therefore it is possible that the game will pick your mouse as the keyboard device and you have no keyboard input at all.

The workaround is simple in theory: make sure that only the keyboard you want to use is plugged in while starting the game (from the UPlay interface). In practice this is problematic in case you want to play with an external USB keyboard on a MacBook: you cannot unplug the internal keyboard. Luckily there is a way to disable the built-in keyboard on a MacBook Pro as reported on the MacRumors forums. The following console command will unload the kernel extension that drives the keyboard:

sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext

(Ignore any errors that may appear.) The following command will re-enable it:

sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext

Obviously you will want to put these commands into scripts to make your life easier.

In case you have a gaming mouse and a Mac with no built-in trackpad, you will need to either launch the game by navigating the UPlay game launcher by keyboard, or you can quickly unplug the mouse right after having clicked the “Play!” button. It suffices that the keyboard you want to use must be the only keyboard-like device at the moment the game is booting. After the menu screen has appeared, you can plug in anything at leisure. One consequence of all this, is that you will not be able to use fancy keyboard macros with a gaming mouse.

By the way, the only way to play AC II in OS X without getting horribly frustrated by the mouse controls, is to use a high DPI gaming mouse, disabling all acceleration, and setting the X&Y sensitivity in the game's setting to minimum. Let's all thank Ubisoft for adding a bit of extra challenge to their games! (not)

Friday, 15 March 2013

Watch Phones, Smartwatches, and the iWatch

Recently some rumours about an Apple “iWatch” have popped up, and many people thought the idea of an internet-enabled communication device on one's wrist is something novel. Not really: so-called watch phones have existed for more than ten years. Of course, the first ones were clunky and barely went beyond prototype stage, but there have been widely available and quite usable watch phones for more than five years. Most of them originate from China, and can be bought in various places for reasonable prices. My main cell phone has been a watch phone since June 2008.

The main problem with pretty much every watch phone that currently exists however, is that it severely lacks in a certain way. And for some reason, whenever a manufacturer produces a new model that improves upon certain features, it gets worse in other features — I dubbed this “the law of conservation of suckiness”.

In a new article on my site, I shortly discuss the history of watch phones, what is good and bad about past and current models, why the concept of smartwatches that need a smartphone makes no sense from an economical point-of-view, and last but not least: a concept of a watch phone which I believe could become popular, and which I would really like to see manufactured in the near future.

One of the biggest problems is that whenever I tell someone that my watch is also a phone, they will immediately ask if it isn't uncomfortable to make calls with it and if I need to hold my arm in silly poses. The answer is: no. Yet, most current models do effectively suffer from this problem. My proposal contains a solution to get rid of this misconception. Watch phones will not become a commercial success as long as people have this Knight Rider-inspired mental image about them.

Uurwerktelefoons, Smartwatches en de iWatch

Recent zijn er geruchten over een Apple “iWatch” opgedoken, en velen dachten dat het idee van een communicatietoestel met internetverbinding dat op de pols gedragen kan worden baanbrekend was. Niet echt: zogenaamde watch phones of uurwerktelefoons bestaan al langer dan tien jaar. Natuurlijk waren de eerste modellen lomp en kwamen nauwelijks voorbij het prototypestadium, maar sinds vijf jaar zijn er wijd verspreide en behoorlijk bruikbare uurwerktelefoons. De meeste hiervan komen uit China, en kunnen op verschillende websites gekocht worden aan democratische prijzen. Sinds mei 2008 was mijn GSM voor dagelijks gebruik een uurwerktelefoon.

Het grootste probleem met elk model uurwerktelefoon dat nu bestaat is echter dat het zwaar tekortschiet op een of meerdere gebieden. En om een of andere reden vinden fabrikanten het nodig om telkens ze iets verbeteren aan een nieuw model, het te verslechteren op andere gebieden. Ik heb dit “de wet van behoud van onbruikbaarheid” gedoopt.

In een nieuw artikel op mijn website geef ik een korte geschiedenis van uurwerktelefoons, beschrijf ik de goede en slechte punten van vroegere en huidige modellen, waarom het idee van smartwatches die een smartphone nodig hebben om te werken op niets slaat, en tenslotte: een concept voor een uurwerktelefoon waarvan ik geloof dat hij wél populair zou kunnen worden, en waarvan ik hoop dat iemand hem kan produceren in de nabije toekomst.

Een van de grootste problemen is dat telkens ik iemand vertel dat mijn uurwerk ook een telefoon is, zij ogenblikkelijk vragen of het niet oncomfortabel is om te bellen en of ik mijn arm niet in een idiote pose moet houden. Het antwoord is: nee. Desondanks lijden de meeste huidige modellen effectief onder dit probleem. Mijn voorstel bevat een oplossing om dit misverstand uit de weg te ruimen. Uurwerktelefoons zullen nooit een commercieel succes worden zolang mensen er dit door Knight Rider geïnspireerde idee over hebben.

Monday, 4 March 2013

Transmission-daemon: never set peer limit to 0

In older versions of Transmission(-daemon), it was possible to set ‘peer-limit-per-torrent’ to 0 in settings.json, which would supposedly mean “unlimited number of peers”. A few versions ago however an industrious programmer found it necessary to make the limit literal and suddenly the “0” really meant “zero peers”. This caused Transmission to sit there, doing nothing, without giving any hints. It took me quite a while to figure this out. Even just a small warning in a log would have saved me a lot of precious time, dear developers…

Transmission-daemon: zet de connectielimiet nooit op 0

In oudere versies van Transmission(-daemon) was het mogelijk om ‘peer-limit-per-torrent’ op 0 te zetten in settings.json, wat dan zogezegd “onbegrensd aantal connecties” zou betekenen. Een paar versies geleden echter vond een ijverige programmeur het nodig om de limiet letterlijk te nemen en “0” betekende plots echt “nul connecties”. Dit zorgde dat Transmission op zijn gat bleef zitten niksen zonder een hint te geven waarom. Het heeft mij behoorlijk wat tijd gekost om hierachter te komen. Zelfs maar een simpele waarschuwing in een log had wat van mijn kostbare tijd kunnen redden, beste programmeurs…

Friday, 25 January 2013

robots.txt retroactively removes content from Wayback Machine

There is a fun experiment anyone can try: create some unique information and store it on two kinds of media: print it on a sheet of paper and store it in a file on a USB pen drive. Then, put both these objects on a hard solid surface, like a concrete floor. Take a hammer and hit the paper hard once. Then, hit the body of the USB pen drive with the same force. Next, try to recover the information from both media. The paper may have a hole in it, and perhaps it is impossible to read a few words. The pen drive however, is likely to be a total loss. If the silicon chip is cracked, your only chance would be to bring it to a specialized laboratory which will charge you a fee you cannot even imagine just to have a tiny chance of recovering perhaps a few words from the text.
What I am saying with this whole story is that I laugh at every advert that claims “save your old photos by scanning them with our digital photo scanner!” The easier it is to create and replicate information, the easier it also is generally to lose it. I am certain that at some point in history, there will be something like a super-sized version of that hammer, hitting our fragile digital archives. If it is bad enough, humanity will be catapulted back to medieval times and history will be a black hole starting from around the year 2000. Maybe they will believe the world really went to hell at the end of 2012. If you have something you really want to preserve, make a hard copy of it. No, make as many copies of it as possible, on all kinds of media.
Now, this whole introduction serves to illustrate how grave a certain issue is with the Internet Archive's “Wayback Machine”. The Wayback Machine is a great initiative. Its goal is to create digital archives of old websites. I once believed that once a website was archived, it would stay accessible until either the whole Wayback Machine were destroyed, or someone explicitly asked the information to be deleted. Now however I have discovered that information can disappear also in a very trivial and dumb way.
If someone places a ‘robots.txt’ file on a domain that prohibits crawlers from retrieving the domain, the Internet Archive will retroactively apply this prohibition. There is logic behind this: if someone noticed that a confidential website has leaked and has been archived in past months, this system allows to remove the archive without much fuss. The mechanism however is dumb as a brick and if a domain expires and is subsequently bought by someone who has no rights whatsoever to the original content, they can still put anything in the robots.txt to retroactively remove anything from the archive.
Proves that there are many domain name squatters who buy old domains and place a prohibitive robots.txt on the empty “for sale” page because they do not want it to litter search engines, which is actually a good thing. What is bad however is that this instantly hides the entire archive in the Wayback Machine. There is no justification for this aside from laziness of the programmers and excessive prudence. The squatter has no rights whatsoever to influence the information that was stored on the old website, he only has bought a domain name. Therefore I would greatly appreciate it if the people responsible for the Wayback Machine would implement a better way to provide a balance between legal concerns and the completeness of their valuable archive.

Friday, 4 January 2013

Approximating iTunes DJ in iTunes 11

iTunes 11 has generated both praise and revolt in the online community because it is a mix of both improvements and regressions. One of the most annoying things for me and many others is the omission of the iTunes DJ feature. Apple's idea was to replace it with the “Up Next” feature, but it is not the same. What I liked a lot about iTunes DJ is that it was a regular playlist that I could easily tweak and I could see all the desired information about upcoming songs at a glance. The Up Next feature requires a click on a button to temporarily view a severely limited list of what is coming next, and manipulating it is a hassle.
It is possible however to create a smart playlist that more or less behaves like the good old iTunes DJ.
The screenshot is pretty straightforward, it shows the most basic setup but you can tailor it to your needs with additional rules. The only essential things are the fixed limit “selected by random”, the “Live updating”, and the “Last played not in the last …”. All these things combined will automatically remove a played song and cause a new one to be added to the queue, just like in iTunes DJ. The time span for the “last played” rule is not essential, anything starting from 5 seconds should work. You can use a larger value if you want to avoid hearing the same song twice within a certain time span.

Next, make sure the playlist is sorted on the very first column (the one with the numbers and no header title), and disable shuffle. Then you can arrange the songs to your liking, and start playing. You will notice that whenever you remove songs, new ones will be added at the bottom just like in iTunes DJ. The only aspects in which this differs are:
  • The biggest drawback is that it is impossible to add specific songs to the playlist. If you want to play one or more specific songs that were not randomly picked, your best option is to use “Up Next” after all.
  • There is no practical way I know of to increase the chance that higher rated songs are played more often. Not a big deal for me since I never used this.
  • One cannot see the played songs, you will need to use a separate “recently played” smart playlist for this.
  • Of course the feature to let people vote for upcoming songs is still missing.