Improved Wikipedia Citations 3 years ago

Highlighted citation

I don’t know about you, but I often find myself checking Wikipedia citations and notes either to read more on a subject or to simply check the authority of a source. I do this while reading and not after I’m done reading the article. This process involves clicking on those tiny bracketed citation numbers which plummet the viewport down to the references or footnotes section, highlighting the citation content and often bringing it to the top of the viewport. I say often and not always because the area beneath the desired citation may not be long enough to fully scroll the citation to the top of the viewport. As a result, you end up depending on the highlighting mechanism and/or the numbering to locate the citation.

Assuming the user wishes to check sources while reading an article, this method of locating citations within a Wikipedia article poses a couple of inconveniences:

  1. Disrupting the user’s flow: by shifting the screen downwards and suddenly to the references or footnotes section, the equivalent of navigating to a second page occurs and the user’s focus is interrupted. Returning back to where the user left off requires clicking the back button or a tiny arrow preceding the citation content, or manually navigating back using the scrollbar.
  2. Inconsistent placement of citation content: the desired default behavior of a page anchor is to bring a linked section of a page to the top of a viewport, but this could only happen if there is a sufficient area beneath the linked section to scroll it to the top of the viewport. As a result, the targeted citation content ends up positioned dependent on the length of the area beneath it, giving way to a slightly inconsistent user experience.
Suggested improvement

Instead of us heading down to the references or footnotes section, it should come up to us! I’m not saying that the footnotes or references sections should be eliminated in favor of in-page citations– no, they’re quite useful and, not to mention, required from any self-respecting research article. My solution simply introduces a tooltip, which contains the citation content and any associated links (which could be background-tabbed at the user’s leisure). This tooltip could be easily toggled on or off by clicking on any citation number or note-link in an article. This eliminates the need to travel downward in any given Wikipedia page and provides for a more efficient Wikipedia experience. Here’s an example of how this might look like:

Suggested improvement to Wikipedia citations

Shown in the diagram is an example of what could happen when a user clicks on a citation number. In the example above, the user clicked on the first citation which brought up a tooltip containing the citation information and an assortment of relevant links. This way the user’s flow of reading isn’t disrupted and they may open any linked sources in new tabs and quickly return back to reading the article by clicking on the toggle again to hide the tooltip.

This isn’t exactly a revolutionary idea, but I’m just throwing it around to whom it may concern. This is one area where introducing some Ajax could be considered a non-intrusive enhancement and it could be made to, easily, degrade gracefully (not that this matters much anymore) by defaulting to the current behavior.

Introducing Mo3jam 4 years ago

A crop of an inside page on Mo3jam

What is Mo3jam?

Mo3jam ( معجم ) is a user-generated dictionary of colloquial Arabic. Mo3jam is Arabic for lexicon or dictionary.

What?

It’s basically a website, where users can come in and share what they know about the spoken terms and expressions in the various dialects of Arabic.

Now I know, there have been multiple attempts in the past at documenting colloquial Arabic on the Web. From my initial research, most of this type of content can be found scattered around forum threads, blog posts, forwarded emails, and the occasional dialect-specific website. Mo3jam aims to address these issues, and create a central, multilingual knowledgebase of colloquial Arabic, with emphasis on usability and breadth. Anyone should be able to contribute, with no wiki-bureaucracy or red tape. Instead, quality should derive from consensus.

History Lesson

Like many of you, I always thought, why isn’t there a place like Urban Dictionary for Arabic? Thoughts like these floated in my head for a while when I graduated in June 2007, but I never acted on them until around August 2008. Initial research started then, and I registered the domain names around September. I laid out a basic framework and specification for the website, but then I placed the project on hold until March 2009. That’s when the real drama began.

For the past 4 months, I’ve been developing and designing Mo3jam to bring you a usable phase one running with basic features. What you see now on the website is a result of that effort. Most major dialects of Arabic are currently listed, with a few definitions created by me and a couple of friends. Now that I think about it, four months seems a bit long for the current feature list, but I’ve been juggling between this, a part-time job and other projects, so development took nearly double the time it required.

Benefits

  1. No registration required.
  2. You can define using Arabic (preferably), English, or French.
  3. In the case you decided to join, creating an account is easy through Facebook Connect, or using the regular registration process.
  4. If a term is already defined, you may still add your own definition. The best definitions bubble to the top through consensus on quality (via voting, and favorites).
  5. A proper multilingual interface (Arabic and English are currently supported).
  6. The website looks pretty, to my eyes at least.
  7. Implements transliteration of Arabic in input fields using Yamli.
  8. Audible pronunciation of terms.
  9. The list of dialects is not fixed. The system is designed such that there may be multiple levels of dialects and sub-dialects. All you need to do is suggest that a dialect be added.
  10. Get feedback on your definitions via a like/dislike and favorites system.
  11. Many more to come.

I must iterate on the fact that this is a developmental version of the site. The feature-set is not complete and bugs may surface at any point. Things like user profiles, password retrieval, commenting, refined listing of definitions are all missing, but should be up pretty soon.

The design of the user interface is influenced by the following: Facebook, StackOverflow, Vimeo, UrbanDictionary, DeviantArt, Wufoo, YouTube, Apple, Google, and my past frustrations with Arabic websites.

If you feel that you want to participate, please do not hesitate to do so. The feeling is natural.
Mo3jam thrives on your contributions, and your feedback is all but welcome.

Mo3jam is best viewed on the latest Firefox, Safari, or Chrome. If you must use Internet Explorer, then use version 8. Website is not viewable in IE 6, and I’m proud of that.

Spices 4 years ago

Let me take you on an adventure:

Spices of the East:
My entrails are set in flames
Toilet tragedy

Code Golf: Saving Time 4 years ago

A long while back Code Golf posted up the Saving Time challenge in which you were required to transform input representing a digital clock into an ASCII analog representation in as few key strokes as possible. Here were my solutions in both PHP and Python:

PHP: 234 characters


<?fscanf(STDIN,'%d:%d',$h,$m);$s=array_combine(str_split('0b1a29384756'),array_fill(0,12,'o'));$s[$h=dechex($h>11?$h-12:$h)]='h';$s[$m=dechex($m>59?0:$m/5)]=$h==$m?'x':'m';vprintf("%9s
%5s%8s

 %s%14s

%s%16s

 %s%14s

%5s%8s
%9s",$s)

Not exactly the most beautiful code. If there’s a shorter way of converting from decimal to hex I’d probably cut 10 more characters or so.

Python: 232 characters


h,m=[int(x) for x in raw_input().split(':')];s=dict(zip('0b1a29384756','o'*12))
h="%x"%(h,h-12)[h>11]
m="%x"%(m/5,0)[m>59]
s[h]='h';s[m]='mx'[h==m];print "%9s\n%5s%8s\n\n %s%14s\n\n%s%16s\n\n %s%14s\n\n%5s%8s\n%9s"%tuple(s.values())

The Python code is in no way exemplary as it’s mostly a translation of the PHP code. What I can’t fathom is how someone could possibly solve this problem in 134 characters in PHP, the way eyepopslikeamosquito did. That is insane my friend. Probably ran a Perl solution through PHP’s shell command functions.

It’s Not About Shrimps 4 years ago

While I’d love to own a lucrative web-front for import/export of shrimp and related marine life, this website is not even vaguely related to the crustacean as some would start to assume.

It’s just a logo, man. Stop emailing me about it.

The Daily Show with Jehan Sadat 4 years ago

A couple of days ago Egypt’s former first lady appeared on The Daily Show with Jon Stewart.

The full episode is available here.

Jehan Sadat was promoting her new book My Hope for Peace, and the interview wasn’t particularly hard-hitting. But what struck me was the simple clarity with which Jehan explained her late husband’s motive for pursuing peace:

He wanted to put an end to the bloodshed. He wanted to save his sons from being killed in the war. He thought: Who’s benefiting from this? Nobody. Nobody.

It’s a testament to Sadat’s courage and pragmatism that a group like Hamas still does not want to come to terms with this fundamental question: Is the empty bravado and relentless hard line worth the misery and death rained upon our populations? And it’s another testament to the impotence of Arab leaders that even today they still use the Israeli-Palestinian conflict as the crutch to achieve cheap populism in the face of crippling inadequacy at home.

Be practical. Be pragmatic. And love your people.

(Image courtesy of Wikipedia)

Divorce Rates 4 years ago

The National has a front page story on divorce rates in the UAE. Money quote:

Figures released by the ministry in Sharjah last week indicated that the divorce rate in the emirate had gone up from 26 per cent in 2001 to 33.9 per cent in 2008. Fresh statistics presented to the FNC yesterday showed the rate in Sharjah was now about 31 per cent, but 60 per cent of those divorces involved Emirati couples.

I’m guessing divorce rate here means the ratio of marriages to divorces. Finding good divorce statistics is a challenge. Divorce per capita (number of divorces per 1,000 individuals) is actually a fairly meaningless measure, since it means you’re ignoring people who can’t get married yet. For Arab countries with uncharacteristically high youth populations, it’s even more problematic.

Marriage to divorce ratio is more interesting. The problem is that it conflates two different segments within a single population, and obscures the rate of change. Wikipedia explains:

However, this measurement compares two unlike populations. Say there exists a community with 100,000 married couples, and very few people capable of marriage, for reasons such as age. If 1,000 people obtain divorces and 1,000 people get married in the same year, the ratio is one divorce for every marriage, which may lead people to think that the community’s relationships are extremely unstable, despite the number of married people not changing.

Both sets of statistics would obviously have their advantages and disadvantages. The lack of numbers in general is symptomatic of the actual problem.

Sharjah’s problematic statistics, aside from not being representative of the Emirates in general, are actually about middle of the road, especially for a developing country. According to statistics from the Organization of Economic Co-operation and Development, Sharjah’s divorce rate is actually lower than that of Japan, which retains one of the lowest divorce rates in the G8 (may it rest in peace).

Another disagreeable statistic is from the UN’s demographics yearbook, which lists the number of divorces in the UAE between 2002 and 2004. It’s fairly stable as a matter of fact, with 3,390 divorces in 2002, 3,243 in 2003, and 3,577 in 2004.

There’s more. The CIA World Factbook projects that the UAE’s population growth is around 3.7% per annum. Projecting back from the 2005 census, which placed the UAE population at 4,104,695, the population in 2004 would have been approximately 3.95 million. That’s 0.9 divorces for every 1,000 individuals, which is reasonably low. Something’s a bit off.

Even the 18,000 divorced and widowed Emirati women figure is not particularly high. 18,000 women is 4.4% of the Emirati female population in the 2005 census. Even when accounting for the increase in population, the figure remains spectacularly low compared to the US, whose 2005 census results showed that a staggering 51% of American women were living without a spouse.

Is Sharjah just not that indicative of the general, national trend? Are the numbers not particularly alarming? You make the call.

What is actually alarming is the fact that 60% of Sharjah’s divorces where among Emirati women, which is hugely disproportionate since locals make up under 15% of the UAE’s population. I’d be interested in reading some numbers comparing divorce rates among nationals and expatriates in the other emirates before I’m willing to conclude that a trend exists.

Save the Camels 4 years ago

A Camel

The Volunteer in Dubai group on Facebook (which now commands an amazing 4800 members), is planning a desert clean-up campaign on Friday morning. Garbage left behind by campers in Dubai is often consumed by camels nearby, turning into stone in their guts and killing them.

The group’s founder Lola Lopez explains on the group’s Facebook page:

I won’t get too technical on you (if nothing else its very unpleasant) but basically the camel comes along and eats not only the left over food, but the plastic bags that usually surround it. This bag calcifies in the stomach and basically turns to stone, which eventually kills them.

Dr Ulli, a leading Veterinarian specialising in these beautiful animals discovered the horrific issue and it is his expertise that we wish to support with our man power.

We’ll be there.

The Dark Side of Dubai 4 years ago

The BBC published a documentary and related story on labor exploitation in Dubai, planting reporter Ben Anderson amidst construction workers living in terrible conditions, as they work on luxury properties in the city.

“The latrines are so filthy we cannot use them, we are so disgusted. The roads are full of garbage and waterlogged. Living and moving about here is a great problem. We suffer greatly,” one of the workers told us.

We decided to find out for ourselves.

Armed with a secret camera we sneaked into the camp to be met with the smell of raw sewage. Sewage had leaked out all over the camp, and workers had to create a network of stepping stones to cross it and get back to their accommodation blocks. One toilet block had no water supply and the latrines were filled with piles of raw faeces.

The documentary itself is sadly unavailable on the BBC’s Panorama website outside the UK.

Seeds of Discord? 4 years ago

That the new Israeli right-wing coalition government will most likely be obstructionist has long been a foregone conclusion, although the fact that they’ve come out swinging right from the outset has made the abrasiveness of madmen like Avigdor Lieberman all the more unnerving.

And just so as not to leave anyone not alienated, the freshly minted cabinet is already taking up Lieberman and Benjamin Netanyahu’s hard lines, in defiance of explicit US statements. In an interview with The Atlantic’s Jeffrey Goldberg, Netanyahu said Israel would be willing to attack Iran’s nuclear facilities if the US failed to bring about adequate deterrence.

And now his environment minister appears incredulous:

“Israel does not take orders from [Barack] Obama,” Environmental Protection Minister Gilad Erdan (Likud) said on Monday, responding to an earlier statement by the US president in which he reaffirmed his administration’s commitment to all previous understandings between Israel and the Palestinians, including the process launched at Annapolis, Maryland, in 2007.

(Hat tip to the Daily Dish)

◄ Older Entries