Chad Perrin: SOB

14 January 2009

IBM’s Linux Ad from 2003

Filed under: Geek — apotheon @ 07:06

Within the last couple of days, I saw someone’s statement in an online forum that he had never seen a TV ad for Linux. Just in case you (my reader — whichever one of you is reading this right now) also haven’t, I thought I’d share IBM’s Linux advertisment from 2003.

Click here if you want to go to the YouTube page, or copy the URL if you want to use youtube-dl to download the video and watch it with something like MPlayer.

Flash Workarounds for FreeBSD — especially YouTube

Filed under: Geek — apotheon @ 04:33

Getting Flash working on FreeBSD can be kind of a challenge, sometimes. This is because Adobe only offers narrowly targeted platform support for its Flash player plugins. There are up-to-date players for MS Windows and Apple MacOS X, of course, but the Linux player tends to lag a bit, tends to be more buggy, and is really Linux-only. This leaves many uses of Flash on the Web poorly, or un-, supported on Linux — and leaves other OSes such as the various BSD Unix systems entirely on their own.

There are a number of options that people have employed for working around the problem on FreeBSD. One is to install the MS Windows version of Firefox using Wine, and use the MS Windows Flash plugin with that.

Another is to install the linux-firefox port, which uses FreeBSD’s Linux compatibility libraries, along with the linux-flashplugin port. It’s sorta like the Wine solution, really, using a Linux version of Firefox with a Linux version of the Flash player plugin.

A third is to use the FreeBSD-native port for Firefox, and use the nspluginwrapper port with the linux-flashplugin port.

There are also some other options for getting a Flash plugin working with a FreeBSD-native port of Firefox, or other browsers, but they tend to be buggier than using nspluginwrapper.

Then, of course, there are open source Flash players, like swfdec and Gnash. The downside here is that they aren’t really up to the widespread Flash support level of the Adobe Flash player. It’s typical for swfdec and Gnash to fail to properly support Flash video, such as YouTube.

Personally, I have exactly two cases of needing Flash, generally speaking. One is the traffic graph in WordPress (it doesn’t need to be written in Flash, but some idiot in the WordPress development team apparently thought it should be — much the same way some idiot thought it should be written in PHP as a heap of spaghetti code in the first place). The other is YouTube.

I’ve discovered that swfdec supports the WordPress traffic graph just fine. It’s also open source, which is a plus. While it (like Gnash) is GPLed, it at least isn’t a GNU project the way Gnash is, so I feel like it might just marginally be a better choice for purposes of ethical boycott. Marginally. At best.

That leaves me unsatisfied with regard to YouTube, though. Thank goodness I’m not the only person in the world with Flash plugin support for YouTube problems. Someone — some several someones, actually — out there has (have) solved my problem. The solution looks like this:

  1. Install MPlayer.
  2. Install the win32-codecs port (to get Flash video support in MPlayer).
  3. Install the youtube_dl port.
  4. Enter youtube-dl 'url-for-YouTube-video'.
  5. Enter mplayer video-filename.flv.
  6. Watch the video.

I’ve run across probably half a dozen FreeBSD users who are, in many ways, quite more knowledgeable than me about the OS and its common tools, who are entirely unaware of the youtube-dl + MPlayer option. I figured I should just post the specifics here so maybe a Google search for freebsd flash youtube will help someone figure out how to solve this problem in the future.

Smart Quotes Considered Harmful

Filed under: Cognition,Geek,RPG,Writing — apotheon @ 12:37

“Smart quotes” is a term often used to describe quotation marks that curve one way or the other depending on where they’re placed. They are also known as “educating quotes” and “curved quotes”. Specifically, when I use quotation marks as scare quotes around the words “smart quotes” (because I don’t think they’re very smart), the double-quote on the left should curve to the right, and the double-quote on the right should curve to the left, when using curved quotes.

This is the old typographical standard, and it’s perfectly reasonable when working with print media. When reading a novel, I expect to see curved quotes used, just as I expect to see curved apostrophes used. Technologies used to format text for print media should definitely include functionality that makes it easy to properly produce directional quotes.

The term “smart quotes” arose as a result of certain word processor programs using a function by that name to translate straight quotes to curved quotes. The idea is that the function is “smart” about curved quotation placement — and as the term became generally adopted to refer to curved quotes in colloquial use, the converse (straight quotes) has come, ironically, to be known by some as “dumb quotes”. The official term for the process of translating from straight quotes to curved quotes is “educating quotes”, however.

In the context of electronic communication where directional quotation marks are automatically selected by a function because the keyboard doesn’t supply directional quotes, I’ll refer to those directional quotes as “smart quotes”. The type of function used to produce smart quotes will be referred to as “educational quotes” or “educating quotes”, depending on context. Directional quotes in print media, on the other hand, are “directional quotes”, “book quotes”, or “curved quotes” when referring specifically to the curved variety.

The Problem�:

With that in mind, smart quotes present a number of problems in electronic media:

  1. Certain character sets don’t support smart quotes at all — a real problem for ASCII compatibility across platforms.
  2. Certain character sets use different encodings for smart quotes, so that even if the platforms’ character sets support smart quotes, quotes may not show up properly across platforms.
  3. Educating quotes functions sometimes make errors — though this is a problem of diminishing frequency in common usage.
  4. Educating quotes functions are usually misapplied to code segments. WordPress, in fact, tends to apply its educating quotes function even to text inside <code></code> tags.
  5. It is pretty much impossible to create text search technology that automatically determines which way you want a quote to curve in (almost) all cases, so that text search capabilities are often broken in text with smart quotes in it. Try using the Ctrl-F text search in Firefox on a typical WordPress Weblog that uses smart quotes to find something with an apostrophe in it some time.
  6. Different languages actually use different types of directional quotes — not all use English-style curved quotes. For instance, some languages use smart quotes with the right-side double quote down at the comma level rather than up at the apostrophe level. Others use directional double-chevron quotes (guillemets). Basically everybody recognizes straight quotes, though, because of the de facto standard set by early computer use.
  7. Keyboard layouts assume straight quotes in many languages.
  8. Copying and pasting text from one electronic textual medium to another can often result in broken quote characters when smart quotes are used.
  9. As pointed out in a comment by medullaoblongata below, copy/paste problems with smart quotes can combine with code quote character issues to produce greater problems, as users who are not clearly aware of the problem can then end up entering smart quotes into an SQL database management client and causing errors. Beware of advocating for automatic translation of directional quotes to straight quotes, or other such hackery, with SQL database management clients, however — as this can serve to make input validation more tricky, and thus increase the likelihood of unintended SQL injection vulnerabilities.

If you’re using a keyboard layout with directional quotes of some sort, and you know for a fact that your intended readership will always enjoy full support for the kind of directional quotes you’re using, this obviously doesn’t apply to you. The point here is that the use of educational quote functions for electronic media — i.e., smart quotes — is harmful. It interferes with compatibility, portability, and readability, as well as correctness in many cases (e.g., code examples).

Only in closed circuit communications where full support for directional quotes is known, or where the generated text will be circulated in print form, should smart quotes be used. On the Internet, however, and in documents otherwise intended to be distributed publicly or to people whose computing environment is unknown (such as the Web or sending English-language Word documents not intended for print to a group of people on different platforms), smart quotes should be considered harmful.

I’m personally sick and tired of text searches failing because I don’t have a curved apostrophe symbol on my QWERTY keyboard. Stop it.

The Solution:

As Fabien indicated in comments below, the solution to this is pretty obvious. Specifically, when dealing with electronic documents, meant to be read on a computer, for public distribution or otherwise without clear and certain knowledge of what’s on the recipient’s computer, the burden of quote translation should be on the recipient’s system — and not on the system that generates the documents for distribution. This way, those who prefer smart quotes for aesthetic reasons (or other reasons — I don’t discriminate) can have their smart quotes, and those who don’t or for some reason are not able to view them properly will not be burdened with documents that contain characters they cannot view as intended or do not care to view. Everybody gets to be happy, that way. This solution would even allow for text searches where the search string includes “straight” quotes, if desired, even while the screen displays curved quotes.

So . . . for those of you distributing text documents for rendering to a screen, Smart Quotes Considered Harmful. Let the viewing software handle it. For those distributing in print form — as I already said above — go ahead and use directional quotes, because nobody’s going to be doing a select/cut/paste or browser-enabled text search on them anyway (at current technological levels, anyway).


Please feel free to share, if you know of other reasons smart quotes are harmful.

All original content Copyright Chad Perrin: Distributed under the terms of the Open Works License