/index.xml

so sick of farmville...

wanted to take a short break, so i decided to take out 20 minutes and write a silly song about farmville (it’s a rip off of ne yo’s “so sick” song). note that the lyrics (and thus the mp3) are in pre-alpha (and are not likely to see any future revisions).

audio version

lyrics:

gotta change the favorites i have, for the new design in store, cuz right now i really can’t, take it any more, and i know it makes no sense, cuz my farm is nice fo’ sure, but i can’t wait for gas anymore.

it’s ridiculous… it’s been weeks, i’ve been playing and i can’t get over it, and my time’s worth more than this, enough is enough, no more sitting around, clicking around, i am so tired of farmin’ up, to get ahead of you,

and i am so sick of farmville, hear me loud and clear, so done with planting, flowers and corn ears, and i am so sick of farmville, and the much clickin’ fo sho' so why won’t this game leave me alone?

got nice equipment on board, a tractor and seeder, too bad they’re as useless as, a plastic weed eater, i am so sick of running out of gas, and clicking every square, and how every click must be multiplied by three…

that’s the reason that i am so sick of farmville, hear me loud and clear, so done with planting, flowers and corn ears, and i am so sick of farmville, and the much clickin’ fo sho' so why won’t this game leave me alone?

said i am so sick of farmville, hear me loud and clear, so done with playing a game, makes me bored to tears, and i am so sick of farmville, unless i find a bot, so why won’t this game leave me alone? why won’t this game leave me alone…

salam, android!

after the nexus one came out, i became a little more interested in android. while i had written a simple ‘salam world’ app some time ago, i figure it would be nice to delve a little deeper and try to write something remotely useful.

so without further adieu, introducing a (very simple) quran for android:

source code on github

for the most part, android is fairly fun and easy to develop for. however, one of the most frustrating parts is the extremely limited memory for apps. since apps can’t be on the sd card (due to some security issues), you are limited to the very small amount of memory on the device. consequently, in order to display the images for the quran in this app, the app must download the data to the user’s sd card.

note - try it at your own risk, i only tested it on the emulator…

so long, yahoo!

on july 19th, 2006, i posted my first blog post from california. i moved there to start a new job at yahoo! ~3.5 years later, it was time to go, and so at this point, i am officially a non-Yahoo!

what’s next? i don’t know yet, but i am both excited and optimistic about the future. insha’Allah khair. maybe it’s not a bad time to give a startup a shot…

a little rhyme about makkah

mok and i were chatting about makkah on im and we brought back a very old habit of ours from the days of highschool and college - rhyming about any and everything. so without further adieu, here’s a snippet from our im conversation:

omer: makkah makkah, i love u like i love my motha you are a city like which there is no otha above u the angels do hover

me: in you i am a little more pious i drop my prejudice and all my bias the times of salah set my pace, before the adhan to the haram i’d race

omer: as i see the nur coming off them hujjaj’s face

me: first floor, second floor, or even third watching the tawaf made by humans and birds

omer and i: seein people doing tawaf around the clock all types of people - doctors, engineers, nerds and jocks

omer: and as the clock, goes tick and the tock u listening to the rhyme by mok and ak

by the way, you can see a few of the pictures i took at the haram here.

quran jetpack script

so i had a little bit of time before i depart on my journey for hajj, so i wanted to play around with the firefox jetpack extension a little bit. so without further adieu, this post is here to introduce a simple quran plugin for jetpack :)

what is it this is a quran script for jetpack, a plugin for firefox which allows customizing the browser just through javascript.

when you are typing in a textarea (in wordpress, gmail, google talk, etc), if you highlight any text in the format of sura:ayah (ex 1:1) and right click on it, you will be given a menu that allows you to replace that with the actual verse (in arabic, transliteration, or translation).

this is very nifty for taking notes, chatting, sending emails, etc.

how does it look like? here is a screenshot: quran jetpack script screenshot

known issues

  • sometimes, the server appears to take long to reply so it doesn’t return and you are forced to try again.
  • the plugin doesn’t work on google docs and other sites that overwrite right click functionality.
  • the plugin also doesn’t seem to be working on gmail when rich formatting is on.

how to install it

  • install jetpack for firefox.
  • go to this page. on the top right corner of the webpage, you will find a button that says, “Install…”. click it.
  • scroll to the very bottom, click the “auto-update this feature” checkbox, and then click on “i know what i am doing, install it!”

source code the source is also available as on github in this gist.

changelog november 16th, 2009

  • fixed a bug in which the appended (sura:ayah) to the text was put at the end of the textarea rather than right after the ayah.
  • added a little favicon for the menu.

quran jetpack script screenshot

thoughts before hajj

so i was sitting on a plane in san francisco awaiting the departure of my flight to atlanta, from where i will insha’Allah be leaving for hajj. the captain mentioned something about a leak that they have to fix, so i figured, “why not write a blog post on my phone in the meanwhile?” (the plane took off and i realized i had more stuff to add and edit, so the in-airplane mobile blogging commenced on land and in the air).

anyhow, i wanted to write the pieces of advice and gems given to me by my shuyookh, elders, family and friends who have already went to hajj.

hajj - themes and similitudes when i went to ummrah before, i have always been told how i7ram makes all people equal - you could be the richest of people or the poorest of people, you could be from america, china, or burkina faso, but ultimately, it didn’t matter - you were wearing the same simple non-embellished two pieces of cloth while doing your ummrah (or hajj).

however, the parallel i recently learned is that between hajj and the day of judgment. there is a plethora of people (millions), all moving towards the same place, each to themselves and not worrying about those around them. the rich and the poor, the arab and the non-arab, the powerful and the weak, the healthy and the sick all gather from all parts of the land for this journey. on this day, all are dressed in i7ram - similar to the burial shrouding one is wrapped in - and as though all are just being resurrected and walking towards “ard al ma7shar” to await reckoning - may Allah make that day easy upon us!

it is thus not surprising that surat al hajj would start with these verses (22:1-2).

hajj tips 0. first and foremost, the importance of time during hajj. so many people advised me, “don’t waste your time, maximize your time of worship.” others told me, “american crowds go to hajj in luxury, with constant buffets of the best of foods and so on - so eat minimally, especially from once you go to makkah until after the day of 3arafah!” (to stay light and avoid down time). another common advice was “watch who your company is on the trip and beware of bad company!” another tip was “lose the watch, you don’t need it!”

  1. almost everyone advised “do not get angry!” i was told “forget logical reasoning, don’t resist or try to convince anyone of anything, you don’t want to lose your hajj.” i was also told “everyone will be on edge there, you will be pushed, shoved, and tested a lot there, so stay on your toes and whatever you do, don’t lose your cool!” may Allah make it easy! i think ayah 2:197 is very relevant.

  2. the most important request people always make is for du3a2 - du3a2, du3a2, and more du3a2 - du3a2 for ones family, friends, shuyookh, those who have rights upon us, those who passed away before us, the ummah, and for ourselves - du3a2 for this world and for the next. may Allah make it easy and accept!

  3. writing the waseya (islamic will) before leaving - this action in and of itself reminds a person that death can come at anytime, and thus reminds us of the importance of being prepared. may Allah grant us حسن الخاتمه - ameen.

  4. on a related note, calling family, friends, and people with whom you may have had trouble in the past to ask them for forgiveness highlights the importance of brotherhood, good character, and making sure one is on good terms with all people.

hajj - aspirations/what to aim for 0. first and foremost, that Allah accepts it and makes it a hajj mabroor - this is absolutely critical, because without this, the trip would arguably be wasted.

speaking of mabroor, brother Ihab gave an awesome khutbah on hajj, in which he cited a hadith in which the Prophet (saw) said that there is no other reward for a hajj mabroor except for jannah. the sa7aba asked the Prophet (saw), “wa ma biruhu?” - and what causes a hajj to be mabroor? and he (saw) answered with “it3am alta3am” (feeding food) and “ifsha2 al salam” (spreading salam).

[note - i had forgotten the second item and found it in this blog post].

  1. that Allah returns one home completely free of sin, and helps one to improve upon themselves and to become a better person (and ultimately, to grant them حسن الخاتمه and jannah).

  2. that Allah accepts one’s du3a2s while there.

  3. that Allah allows hajj to be a positive turning point in one’s life.

ayat/verses

credits may Allah reward sheikh Mohamed, brother Ihab, and all of those who gave me hajj training, advice and shared their experiences with me in any way, shape, or form (the names are too many to mention here and i would undoubtedly forget someone, so i will suffice by saying, “may Allah reward you all”).

and finally… some last (and mostly unrelated notes):

  • this is most probably the longest piece i have ever written on my phone (and on a plane). for the record, writing long articles on an iphone is a painful experience!

  • that having been said, while i plan on taking my iphone with me, i am hoping not to use it - otherwise, knowing me, i’ll get distracted and start live blogging my hajj - (“i am now at mina! check out this picture/video!” - and, of course, “i am now on 3arafah! send your du3a2 requests via twitter before maghrib and i will pray for you!”)

  • and yes, in case you are wondering, i felt strongly obliged to start my lists at 0.

rtm versus toodledo

last year, i signed up for a 1 year subscription to rememberthemilk. now that it has expired, i’ve started wondering whether i should re-subscribe or switch to something else (toodledo appears to be a popular option).

so i made a toodledo free account and imported my tasks from rtm - fairly straight forward and easy (although i had to re-tag and group everything, but no big deal). i tried using both of them for a few days together, and here are my thoughts:

what i like about rtm:

  • interface - the ui is really slick

  • keyboard shortcuts are like vim’s - familiarity is good!

  • the new smart input bar is really nice and allows for fast inputting of tasks

what i like about toodledo:

  • more emphasis on goals, tying tasks to goals, etc

  • development seems a lot more active - rtm seems dead at times

  • team seems to be more friendly

  • nice subscription features (statistics, subtasks, auto-scheduler).

i’ve used rtm’s iphone app but haven’t used toodledo’s yet (although i read that it’s also really good) - so i am guessing that on the phone front, they are roughly equivalent. rtm is $25/year and toodledo is either $15 or $30/year, depending on which plan you get.

rtm is pretty functional without a pro subscription, but you can’t use the iphone version. with toodledo, you can use the iphone app (a one time ~$4 charge), but you have other limitations (task history of completed tasks is limited to 2 weeks).

so in summary - it’d be pretty nice to use something like orgmode for emacs (if i can dedicate enough time to learn it) or something like taskwarrior and just use plain text files. the advantages of such approaches are the price tag and portability/accessibility, and ease of use. the downside is that there’s no mobile (or web) interfaces unless i were to serve my todo files on my webserver (or write some code to sync to another service, etc).

another option is to buy things, which is a really well done app - but the problem is that i am then locked in to seeing my tasks on my mac and my phone (but not on the web and therefore, not on my linux box). it’s also $50 for the desktop app plus $10 for the iphone app. other apps have similar issues (omnifocus and the hit list).

decisions, decisions… sometimes, deciding on this sort of thing makes it “how to not to get things done” :)

subqueries make life easy

often times while working with databases, you find the need to do some simple tasks (adding a column and populating it with a value from another table, etc). rather than write a script to do this, use mysql’s native subquery (and temporary table) functionality - it makes life much easier.

consider the case where you have two tables:

mysql> describe colors;
+-------+-------------+------+-----+---------+-------+
| Field | Type        | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| id    | int(11)     | YES  |     | NULL    |       | 
| color | varchar(10) | YES  |     | NULL    |       | 
+-------+-------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

and

mysql> describe color_mapping;
+------------+---------+------+-----+---------+-------+
| Field      | Type    | Null | Key | Default | Extra |
+------------+---------+------+-----+---------+-------+
| picture_id | int(11) | YES  |     | NULL    |       | 
| color_id   | int(11) | YES  |     | NULL    |       | 
+------------+---------+------+-----+---------+-------+
2 rows in set (0.00 sec)

let’s say you want to update the colors table to add a frequency column such that you know how often a given color is used. it turns out this is really easy using mysql:

alter table colors add frequency int;
update colors set frequency = (select count(*) from color_mapping \
   where color_mapping.color_id = colors.id);

and that’s it. also useful are temporary tables:

create temporary table color_frequencies select color_id, count(*) as cnt \
   from color_mapping group by color_id;

if you then attempt to desc color_frequencies, you’ll see a table with two columns - a color_id and a cnt column.

hopefully this will save some people some efforts writing scripts next time some simple database updates are needed :)

my previous keyboard

[center]note the v, n, and m keys (or lack thereof)[/center]

finally replaced my keyboard with a new one :)

quran plugin updated for ubiquity 0.5

i’ve done a quick port of the quran ubiquity plugin to work under the new version of ubiquity (0.5). as you may know, ubiquity 0.5 and beyond use a new parser (parser 2) that isn’t compatible with the old parser (parser 1 for 0.1.x versions of ubiquity).

you can get it here. make sure to select “automatically update this feed” so that you get any updates i may get around to making.

this version is pretty much identical to the older one, except that now, you can use “get-ayah,” “get ayah,” or “ayah” to get an ayah, and “search-quran” or “search quran” to do a search. i hope to support some of the new stuff from the pre-alpha version of the quran api soon insha’Allah (other translations, etc).