Posts tagged with 'gotcha'
I recently got an iPad (more on this later), and with it I got the much hyped smart cover.

I loved the simplicity of it, and how quickly you can take it off and put it back on again… However, I quickly realized that I probably had more dust on the screen while using that thing than if I didn’t have any cover at all. Among the problems I had the infamous “dust lines” — those three lines you get on the screen at exactly the same spot as the cover’s folds.
The problem was pretty obvious: the natural way to fold the cover, and the way Apple advertises it, is as follows:

But this results in the following situation:

The iPad rests on the folded cover as expected, but the outer faces of that triangular stand are the faces that go against the screen when the cover is closed! They would therefore pick up dust and other particle directly from the table and all around, and put them back onto your screen as soon as you walk away… I don’t know where Steve Jobs used to go with his iPad, but my house is not always spotless clean, and neither are any restaurant tables or office desks that I want to put my iPad on.
An easy workaround for this problem is to fold the cover the other way:

This way, the faces that go against the screen are actually inside the triangular stand, where they’re very unlikely to pick up any dust. This way of folding is a lot less intuitive, but once you get the hang of it, you can actually close and open it as fast as before. I haven’t had much dust on my screen ever since I started using this technique.
There’s just one big caveat to this workaround: it doesn’t work with the “stand up” mode.

If you look closely at the picture above, you’ll notice what’s wrong: gravity alone can unfold the cover and make your iPad fall down on the table. In my case, the magnetic strength of the cover is barely enough to counteract the iPad’s weight and make it stand on its own, but the slightest touch can make it crumble down like a house of a couple of very expensive cards. However, I don’t care because I’ve never felt the need to use that position so far.
You may be shocked by what I’m about to say but here it is: PHP is fucked up.

Oh, no. Wait. No you’re not shocked. You already knew it.
Today’s topic: namespaces.
I have a ReadyNAS NV+ at home to store most of my data and I’ve been pretty happy with it so far… except for one thing: although it’s running a flavor of Linux that you can access as root user (if you installed the EnableRootSSH add-on), you can’t do everything you would normally do with a Linux box.

First, like most pre-2010 consumer grade NASes, the NV+ runs on a sparc CPU, so there’s a lot of packages you don’t have access to unless you recompile them yourself. And that’s fine, if you know you’re going to waste your whole evening figuring out weird broken dependencies and compile errors. But, second, there’s some custom stuff in there, I don’t know what it is, but it basically prevents you from even upgrading to newer versions of some of the packages you do have access to. This means: don’t run apt-get upgrade on an NV+.

Let me repeat that: don’t run apt-get upgrade on an NV+. Ever.
What happens when you do it is that you lose SSH access, the web administration interface stops working, some of your network shares become inaccessible, and half of your left socks magically disappear. I know, I did it twice in the past (yes, I’m stupid like that).
In both cases, I was lucky enough to recover from my mistake by performing an OS reinstall. It keeps all the packages, add-ons and configuration settings you had before, and only resets the admin password to netgear1 or infrant1 (depending on the version of RAIDiator you had installed), so it almost works again right away afterwards. The downside is that if what fucked up your NAS was one of those add-ons or packages, you wouldn’t have any other option than to do a factory reset and recover your data from a backup (you at least have daily automated backups, right?). But in my case, I think it was one of the OS libraries (like glibc or something) that was causing the issue so that’s where I got lucky. Twice.
Those are the only problems I ever had with that box, so overall I’m still happy to own it. The X-RAID that comes with it makes life a lot easier (you can hot-swap disks, and you can mix different disk sizes), and the machine is small and pretty quiet (my external backup disks are louder). Unlike my media center PC, I wouldn’t have much fun trying to build my own NAS, I think.
…but DON’T RUN APT-GET UPGRADE!
Since I’ve migrated this blog to PieCrust and all its comments to Disqus I’ve run into a few problems that took me some time to figure out (although I got help from the nice Disqus guys). Those problems come down to the following information which was not quite clear to me even after reading their documentation several times:
- The
disqus_identifier value gives a unique name to a thread.
- The
disqus_location value indicates the URL(s) at which a given thread can be found.
- A thread can be used by several URLs, but no URL can be used by more than one thread.
The first 2 points are pretty straightforward, but that last one was the tricky one. Basically (at the time of this writing, obviously) if you have 2 threads with 2 correctly unique identifiers that were created both with the same URL, your page at that URL will show all kinds of weird behaviours, from never loading any comments (you get the “Disqus loading” icon animation) to loading one of the thread regardless of what disqus_identifier you specified on that page. You would think that identifier would, well, identify exactly what thread you wanted to display, but no, the URL from which it is loaded apparently also plays an important role.
This means, for example, that you can’t display more than one thread on a single page, although the Disqus guys told me this limitation will be removed in a few months.
Another little thing to look for is the subtle distinction between http://example.com/some/url and http://example.com/some/url/ (note the trailing slash character at the end of the second URL). Those URLs are effectively different, as far as Disqus is concerned. This is especially important for statically generated websites since the actual URL of a page or post is http://example.com/some/url/index.html, so there could be at least 3 correct ways to access the same page. Hopefully, as long as you don’t have some weird address collision, you won’t run into the problem mentioned above (which I ran into because I was messing around with the very handy Disqus Python bindings to batch rename and re-identify my threads).
Hopefully this will save somebody some head-scratching.
Everybody knows, or at least says without really knowing, that Facebook has a few privacy issues, but there’s one thing I never quite realized until recently…
It all started with my friend Bertrand opening his new personal blog. He wanted a dedicated place to post personal stuff, which he previously posted alternatively on his professional blog or on Facebook. I’m pretty sure he also wanted an excuse to play around with his new cool baby, Orchard… Anyway. In order not to start completely from scratch, he imported those previous articles he wrote, along with their comments, to the new blog.
I immediately sent him an email to tell him he could work at Google Buzz, seeing how he just disclosed Facebook comments to the public… but as I was writing it, I wondered… were his notes already public in the first place? You see, Facebook gives you a lot of control over your content’s visibility. You can specify exactly who gets access to what, who gets to comment on what, etc. The problem is that, although the content creator knows what the privacy settings are, the content consumers don’t. Being on Facebook, I just assumed that those notes were, at best, visible to friends of friends… but of course, it wasn’t the case. Bertrand’s notes were public all this time, and as I commented on them, I unknowingly posted completely public stuff.
None of those comments being public bothers me, mind you. But it’s just annoying how, when you participate in your friends’ online social life, you don’t really know what kind of privacy level you’re dealing with. Obviously, Facebook should add some kind of indicator whenever you post a comment, telling you who will be able to see it. I’m surprised this hasn’t been such a big deal so far. Maybe people are too busy with “Company XYZ is evil!!”-type generalities to bother with actual details.