Archive for the 'Internet' Category

Weird GMail Habit: Removing Control Characters

GMail has a weirdish feature that probably very few people except me know about. When using it with a Hebrew user interface, invisible control characters—LRM, RLM, RLE, LRE and the like—are added to some strings to make them appear correctly in a mixed-direction interface.

Most notably, they are added to email addresses. I sometimes want to copy these email addresses as text, and my mouse pointer picks the control characters as well. Of course, these control characters are by themselves invisible to humans, but very much visible to computers, and an email address with these characters is not correct, even if it appears to be the same to human eyes.

It already became a habit for me to carefully delete and manually restore the first and the last characters of an email address to make sure that the control characters are removed.

It would be better if GMail just used the <bdi> element or CSS bidi isolation. They are fairly well supported in modern browsers and provide better experience.

The Fateful March of 1998 – my #webstory

I first connected to the web in the summer of 1997. I bought a new computer with Windows 95 and Microsoft Internet Explorer 2. For about a week I thought that that’s how the web is supposed to look, but I kept seeing messages saying “Your browser doesn’t support frames” on a lot of sites. And then I found that there’s this thing called Microsoft Internet Explorer 3. I went to microsoft.com and downloaded it. It was the first piece of software that I downloaded. It was about 10 megabytes and took about an hour on my dial-up connection.

Most notably, Microsoft Internet Explorer 3 supported frames and animated GIFs. I loved animated GIFs! I guess that it makes me quite a hipster.

A cat in headphones dancing to house music.

House cat. Sorry, it’s an anachronism— this animated GIF is from mid-2000s. 1997’s animated GIFs were quite different.

And then Microsoft Internet Explorer 4 came out. I thought—”well, if the move from IE2 to IE3 made such a big difference, then I guess that I should try number 4, and it will be even cooler”. And I tried. And it was a disaster. The installation screwed up everything on my computer. I had no idea how to disable the dreaded Active Desktop, which it introduced. It didn’t work so well with my Hebrew version of Windows 95. So I did what a lot of people did very often back then and formatted my hard drive and re-installed Windows.

And the question arose—which browser should I use? IE3 was stable, but I didn’t like that it was getting old. So I went to netscape.com, to try that Netscape Navigator browser that I kept hearing everybody talking about it.

And I loved it.

I loved its nifty toolbars and its bookmarks manager. I loved the crash reporting; it crashed quite often, actually, but I didn’t feel so bad about it, because Microsoft’s programs crashed often, too, and in case of Netscape I felt good about reporting these crashes. Netscape’s email program, Netscape Messenger, was truly outstanding. I especially loved the green dot, which marked messages as read and unread in one click. Most of all, it said very clearly something that I came to realize only years later: “I am a program that lets you browse the web as well as possible. I am not trying to do anything else.”

Fast forward to March 1998. Netscape made the big announcement that the development of its browser becomes an open source project code-named “Mozilla”. I started hearing about “open source”, “free software” and Linux shortly before that, but it was mostly in the context of crazy geek hobbyists. And then suddenly a big famous end-user product that I love becomes open source—that felt really cool.

I followed Mozilla news since then. I heard about Bugzilla before its first version was released. I liked Mozilla’s decision to redo the whole rendering based on standards, even though many people criticized it. The thing that annoyed me the most in Mozilla’s early years was the lack of support for proper right-to-left text support, which was present in Internet Explorer. That’s why I, sadly, used mostly IE, and even became a bit of an IE power user. But I waited eagerly for Mozilla to do it and tried every alpha release.

"Are you fed up with your browser? You're not alone. We want you to know that there's an alternative... Firefox." The logo of Firefox is drawn with names of people.

The famous New York Times ad.

I was thrilled about the announcement of Firefox, the first stable version of Mozilla’s browser. I gave 10$ to the famous 2004 New York Times Firefox advertisement, and I still have the poster of that advertisement at home.

A long list of names, including Amir Elisha Aharoni

And there’s my name. Third line in the middle.

It always seemed natural to me that I follow Mozilla news so eagerly. I thought that everybody does it. I mean, how is it even possible to use the web in any way without being at least a bit curious about the technology that runs it?

And then in 2008 I wrote a little unimportant post in my Hebrew blog about a funny spelling correction. Tomer Cohen commented on it and suggested me to try the Hebrew spelling dictionary and Hebrew Firefox in general. And that’s how my big love story with software localization began.

I started sending corrections to the translation of Firefox’s interface translation. I started sending corrections to the Hebrew spelling dictionary. I got so curious about the way the spelling dictionary was built that I ended up doing a whole university degree in Hebrew Language. Really.

And in 2011 I started working in the Language Engineering team in the Wikimedia Foundation. I love it, and it probably wouldn’t have happened without my involvement with Mozilla. In the same year I also became a Mozilla Rep—a volunteer representative of Mozilla at conferences, blogs and forums.

Probably the most important thing that I learned from my Mozilla story is that loving the web and being curious about it is not something obvious. Most people just want something that works for checking weather, news, Facebook friends updates, homework help and kitten videos. And for the most part, that is perfectly fine. But the people’s freedom to read reliable and complete news on any electronic device cannot actually be taken for granted. Neither the people’s freedom and privacy to share their thoughts in social networks. Mozilla is among the most important organizations that care for these things and it develops technologies that make them possible. Technologies that let you browse the web as well as possible and don’t try to do anything else.

We do it for one simple reason: We love the web.

Do you love it, too?

P.S. As I began writing this post, I realized that Microsoft’s Active Desktop was not so different from today’s devices, which are heavily based on web technologies: Firefox OS, Chrome OS and others. I can’t say that I love Microsoft, but as it often happens, it was quite pioneering with ideas, and not so good with their execution. Credit where credit’s due.

Always define the language and the direction of your HTML documents, part 01

I received this email from Safari Books Online:

Email in English from Safari Books, oriented like Hebrew

Email in English from Safari Books, oriented like Hebrew. Click to enlarge.

The email is written in English, but notice how the text is aligned unusually to the right. Notice also that the punctuation marks appear at the wrong end of the sentence. I used Firefox developer tools to apply the correct direction, and saw it correctly:

The same email, with corrected left-to-right formatting using Firefox developer tools

The same email, with corrected left-to-right formatting using Firefox developer tools

This happens because I use GMail with the Hebrew interface. GMail has to guess the direction of the emails that I receive, because in plain text there’s no easy way to specify the direction (I hope to discuss it in a separate post soon). Usually GMail guesses correctly. Ironically, for HTML-formatted emails like this one, GMail often guesses incorrectly, even though in HTML, unlike in plain text, it’s quite easy to specify the direction by simply adding dir=”ltr” to the root element of the email.

Unfortunately a lot of HTML authors don’t bother to specify explicit direction. Many are not even aware of this exotic dir attribute. Others think that because “ltr” is the default, they don’t have to specify it. They are wrong: As this email shows, the left-to-right HTML content is embedded in a right-to-left environment, and the “rtl” definition propagates to the embedded content.

You could blame GMail, of course, but it’s much more practical to always define the direction of your HTML content, even if it’s the default. You can never know where will your content end up.

P.S.: I read this post before publishing and suddenly realized that its style is quite similar to “Best Practices” books, such as Damian Conway’s classic “Perl Best Practices” – it tells you to do something that is not obviously needed, and explains why it is needed nevertheless. I like to acknowledge sources of inspiration. Thank you, Damian.

The International Union of Wikis

People who work with Wikipedia quickly run into the interlanguage links – links to other versions of the same article. Inside Wikipedia lingo they are also frequently called “interwiki links”, although actually it’s not quite right: Interwiki links is a much wider concept.

Wikis existed long before Wikipedia was the most popular wiki of them all. They were a strange idea – websites that anyone could edit. They tried various ways of creating an inter-wiki community, in which different wiki communities would exchange ideas and reuse content and skills. Various schemes to do that were proposed, but none of them ever caught on – the old-days wikis were respectable, but small, and the web was too large and free-form.

And then Wikipedia came. Wikipedia started as a yet another wiki, so it tried to blend in the wiki community. At some point it got interwiki links – easy ways to link to other websites. It is easy to link to another page inside the same wiki by adding square brackets, and it is only slightly harder to link to another wiki: Instead of writing a whole URL with http and all that, you would just write a short prefix and a name of a page, and that’s it.

But to which wikis it is possible to link? Thanks to the popularity of Wikipedia, MediaWiki and other wiki engines, there are thousands of them now, and you don’t have prefixes for all of them. The prefixes for Wikimedia projects were managed in the internals of the database by the small group of developers. The list was exported to the Wikimedia Interwiki map. And actually… it wasn’t used that much. The old dream of having a network of wikis which are not just Wikipedia hasn’t come true yet. But this may change now, because recently the process became more open and user-friendly: The Interwiki extension was installed on Wikimedia wikis.

This extension allows displaying all the available interwiki prefixes in a dedicated table. It also allows users with appropriate preferences to edit them. Take a look at the Interwiki table for the English Wikipedia and you’ll see all the prefixes. Many of them are language codes – these are the interlanguage links. But there are many others: wiki communities of city residents, scientists, programmers, librarians, enthusiasts of countries etc. If you try the URLs in the list, you’ll see that some target sites are sadly dead, so they should probably be removed from the list. But others can be quite promising – for example Appropedia, a knowledge base of collaborative solutions in sustainability, appropriate technology and poverty reduction. That’s a very positive thing, not just because sustainability is a nice thing, but because it’s great to have many specialized information sources and not just one huge Wikipedia.

Now Wikimedia wiki communities can add their own interwiki prefixes to link to other websites that may interest them. An example off the top of my head is that the Slovak Wikipedia community would add a prefix for easy linking to a site with information about Slovak culture. Of course, the language and the topic can be just about anything.

This feature, just like all other MediaWiki extensions is translatable to all languages in translatewiki.net. For example, here’s the translation of the Interwiki extension to Hebrew. The translation of the Interwiki extension to the Slovak language, which I mentioned earlier, is not complete yet and should be completed. If you are curious in translating the extension or any other component of MediaWiki into your language, open an account at that website and just start translating.

Why I Don’t Plan To Use Any Apple Products

Well, basically, because of this. If that page offends you, then you deserve to be offended.

And seriously, I have so many completely practical reasons not to use any Apple products:

  1. I don’t want to waste a second of my life on getting used to the weird Alt, Control, Command and Option keys, or whatever they are called there. I’m efficient with using keyboard shortcuts, which are similar in Windows and graphical desktop GNU/Linux environments with Windows-style keyboards. Every time I try to use a Mac, I immediately start climbing up the walls, because the shortcuts don’t work. If you tell me that once I learn them, it gets really natural, then you are defeating the whole Mac idea of “it just works”. Not that I ever seriously thought that it’s true.
  2. I love right-clicking and I hate control-clicking. I know that I can connect a normal mouse with two or three buttons, but the very idea that by default the mouse has only one button because I’m apparently too stupid to understand the difference between right-clicking and left-clicking offends me. And the Mac touchpads come with one button. Mac lovers tell me that I can use gestures to achieve the effect of a right click, but I hate gestures with a passion. Call me old-fashioned if you will.
  3. I’ll have to buy Mac OS X even though I’m not going to use it. I once spent an hour with an experienced Mac user trying to understand how to write Hebrew from right to left properly. I suppose that it’s possible to do it there somehow, but in 2012 I don’t want to waste a second of my time on an operating system in which it’s so hard to figure out how to do such a simple thing.
  4. I do not want documents to scroll the other way. I do not want documents to scroll the other way. I do not want documents to scroll the other way.

And all that – even before I get to the ideological points. For example, that Apple wants to kill the open web with walled-garden apps, that it forces app developers to get approval for everything, that its licenses are among the most obnoxiously proprietary.

That everything made by Apple is unnecessarily expensive just because it’s supposed to be more fashionable. Yes, they probably invested a bit more in design. Yes, they probably invested a bit more in the right alloy. But the main reason for their high prices is not the quality of the product and not even the fact that they are stylish, but because the high price is the thing that makes them more fashionable. This is preposterous and I am not cooperating with that.

Well, yes, Macs have certain positive points. A Mac can run all the development tools that I need – it comes with a usable Unix-style terminal and programming languages, such as PHP, Python and Ruby (I didn’t check, but probably Perl, too). It has a high-quality screen. On the average, Macbooks are usually thinner and lighter. But there are no Mac features that are compelling enough for me to bother to reconsider the above points.

What I really fail to understand is why so many Free Software developers use Macs – but that’s a topic for a separate post.

Uri Avnery and the Israeli Haredim

Uri Avnery is one of the main voices of the Israeli political left. Especially for people abroad – his English blog is frequently quoted in foreign blogs by people who are interested in Israel.

The opinions that Avnery expresses are strong and often unpleasant, but they are legitimate and they are usually have at least some basis in fact.

His latest column, Israeli Mustard, is about the ultra-orthodox Jews, also known as Haredim. It was quoted in Richard Stallman’s blog, for example. And it’s problematic. It’s mostly factual, but it has some imprecisions in details. They may seem unimportant, but they may be quoted and they may form people’s opinions, so I want to correct them. I don’t really care whether it’s intentional disinformation or neglect on Avnery’s side; I just want the corrections to be written down somewhere.

“Haredim [...] are not part of the Israeli state. They don’t want to be.” – Well, not quite. It’s very open to interpretation, of course, but the situation goes more or less like this: There are Haredi leaders and ideologists, who express strong opposition to the existence of a Jewish Zionist state. What is important, however, is what people do and not what ideologists say.

For most purposes they are a part of the Israeli state and that’s how they want it. They mostly speak the same language (more on that later), they mostly vote in the same elections, they mostly have the same identity cards, they mostly ride the same buses. Despite the common rumors, many of them work in the same workplaces, although it’s true that many don’t work and instead spend all of their life in religious studies, earning much of their living from donations and from working Israelis’ taxes.

The Haredim are somewhat comparable in this regard to Jehovah’s Witnesses, although for many reasons they would, of course, hate the comparison. The Witnesses’ ideology is opposed to the modern idea of states, elections, conscription and so on, but in practice they are mostly integrated in the civil life of the states in which they live. From what I heard, the Witnesses don’t vote, and the Haredim actually do. And as far as I know, the Witnesses’ are not funded by taxpayers’ money, and the Haredim are.

“Actually, the Orthodox will never allow their children to join the army, because of the justified fear that they will be contaminated by ordinary Israelis” – again, not quite. Many Orthodox serve already. Patriotism is human, Haredim are human, serving in an army is an expression of patriotism – hence, some of them simply want to serve. Some do this not so much because of patriotism, but because they think that it is a good career move. Some do this with their parents’ agreement and some without. That’s fact. As for my opinion on the matter – well, my feeling is that their number is likely to grow, because it’s simply impossible for them to avoid this completely.

“The separation between the Orthodox and others – between Jews and Israelis, so to speak – is almost complete” – no. It exists, because at least some of them want it, or are pressured into it by their communal leadership. The separation is strongest in the education system: They definitely study in very different schools, and very few of them study in Israeli universities. But elsewhere the separation is weak: They often shop in different stores, but not exclusively. They often live in Haredim-only neighborhoods, but again, not exclusively. There is some separation in transportation, but despite the buzz that this topic generates, it’s actually quite small.

“The orthodox speak another language (Yiddish, meaning “Jewish”)” – no, and this is very important. Some Israeli Haredim speak Yiddish in some social contexts, but all of them know Hebrew. Not just the Hebrew of religious books, but the spoken Hebrew of the streets, the government, the newspapers and the shopping malls. They write with pretty much the same spelling inconsistencies that are characteristic to all Israelis. Of course, being a special and tightly-knit social group, they use some unique expression in their Hebrew, but you could say the same about computer programmers, too. For the most part, the Hebrew of Israeli Haredim is the same language as the Hebrew of the other Israelis. (I’m actually happy that Haredim keep Yiddish alive, but that’s a topic for a different post.)

The last paragraph of Avnery’s post made me particularly angry:

BY THE WAY: when an Israeli Jew is asked by a stranger anywhere in the world “what are you?” he always answers: “I am an Israeli”. He will never, ever, say: “I am a Jew”. Except the Orthodox

Well, this is not even wrong. “What are you”? What kind of a question is that? People don’t ask each other “what are you”, people ask “where are you from”. The answer to that is “Israel”, of course; both religious and secular Israelis say that. In the rare case that I’m asked what is my ethnicity, I say that I am a Jew, even though I’m not religious. So that’s definitely not a “never, ever” situation, as Avnery claims.

This is not to say that there is no discussion about the existence of an Israeli ethnic identity. It exists, and it’s old and passionate. Avnery just describes it very badly. I even agree that an Israeli ethnic identity exists, or, more precisely, co-exists with a Jewish ethnic identity. And despite their lifestyle and the claims of their leadership, the Haredim definitely belong to it. Israeli Haredim are Israeli, much like American Jehovah’s Witnesses, who are definitely American – whether they like it or not.

Why Google Chrome Will Make the Web Worse Than Television

I know very few people who still watch television.

Television is boring, pointless and hopelessly outdated. For some reason millions of people still watch it, but it’s a matter of time until the whole industry will crumble like the governments of the USSR and Libya did, and we shall wonder why did it take so long. It will be painful to some people who make their living from it, but it will happen.

The future of entertainment and broadcasting is shaping now, and the direction is not bad. With each version of the modern web browsers – Firefox, Chrome and Opera – embedding video into pages is getting easier and works better. Users are forced less and less to install proprietary and unstable plugins. Flash is becoming a thing of the past, with YouTube working without it just as well. Diverse people create excellent music and films in their homes and they are able to publish it instantly. Business models for getting people to pay for DRM-free video and music are improving, too, for everybody’s benefit.

For some reason, however, Google and Microsoft aren’t happy about these perfectly sensible developments. They are proposing to add DRM – Digital Restriction Management – to the HTML standard. This weird document says that “No ‘DRM’ is added to the HTML5 specification“, but a document that speaks about encrypting and “protecting” content is a document about DRM. This is not “protection”, but restriction, and it is defective by design.

Preventing the copying of music and video files is not actually important to Google or to the media production companies. They will find ways to charge money for music and video. They rather want to know who is listening to what, to know what to produce and to whom to sell it. Google is essentially an advertising company, and an advertising company’s biggest asset is demographic data about people’s tastes and customs.

This is a grave privacy concern, of course, but there are enough privacy geeks to write about that. I’m not much of a privacy geek; what i really care about for this matter is the future of culture. Culture has to be interesting, vibrant and constantly innovative. When advertisers and media providers know the tastes of the “consumers” too well, culture tends to repeat itself and become very bad. Much like television in the last few years.

It is highly unlikely that the W3C will accept this proposal and make it standard. W3C dislikes DRM to begin with, Mozilla representatives in the W3C will definitely oppose to it, and even Google’s own W3C representative isn’t enthusiastic about it. Nevertheless, it’s easy to imagine that Google will implement this proposal in Chrome, and Microsoft will implement it in Internet Explorer. Then they will set up several websites with “partners” who will provide “content” that cannot be played without this DRM scheme, and this will pull more people into using these browsers and lock them into a nightmare of pointless, recycled, creativity-stifling entertainment.

I am a Mozillian. You may think that this means that i want Firefox’s market share to be 100%. That is not what i want. I love the web and i want it to be great for all people, no matter which browser they use. Building Digital Restriction Management into browsers will make the web, and the whole culture around it, bad and boring.

Don’t let that happen to the web. If you care about culture and arts, use Firefox – a browser that is committed to openness and not to advertising revenue.



Follow

Get every new post delivered to your Inbox.

Join 1,706 other followers