Monday, April 28, 2008

Whats wrong with the Toktok?

Many people have been talking about the toktok and how its not a civilized approach to transportation. I hate it when people use the corresponding Arabic words for "not civilized". To be honest this country lacks many aspects of civilization. All we care about is looking civilized when in actual fact we are years behind.



I believe recently the authorities have decided to banish the toktok from Egyptian sands. I see this as a foolish decision. When you decide on something, you must think of the consequences to yourself and the others who will be affected by this decision. The toktok is an excellent means of transportation over short distances in remote areas of Cairo. If you take this away many people will suffer. Find another cheap solution before you take this away. Think about the people. That is being civilized.

Another problem we face in West Cairo is the "highway" called the Mehwar. There was no maintenance done to the highway throughout its lifetime. Now they are in the process of redoing it and still they yet to learn that there is something called a hard shoulder which is an empty lane reserved for broken down cars...etc. They also want to stop the micro-buses from stopping on the highway. This again is the black and white decision making of the authorities. What will people who live around the highway do? They will have no easy means of transportation. They will surely suffer. Wouldn't it be better if we offered them another solution, if we thought about them for a second, if we thought about their rights as citizens in Greater Cairo.

Te2ool lee meen? ("Who do you tell?" - an Arabic expression of hopelessness)

Masr Om El Donia!!! ("Egypt - the mother of the world")

:D

Telescope? Did I order a telescope? Oh yes...

Ah yes...now I remember! I ordered a telescope in December of last year.
Have I received it?
Nope. The customs put me through hell. So I was forced to forfeit it.
Why?
Because they believe a telescope is associated with explosives, weapons and ammunition.
What the hell?
Yes, its true. They offered me a choice though. Which was very good of them :).
I could either go ahead with the transaction and pay taxes equal in amount to the price of the telescope and then pay a further pricey fee for a metaphysical test on the telescope which would then dictate whether or not this type of telescope was banned.
The other option was to disown it and donate it to the government. The last option which I initially decided to go with, was to reship it out. I though of shipping it to my family in the UK...but NOOO!!! It has to be shipped to the same country from which it came from or otherwise they will think I was trading telescopes. Then I discovered that to reship it out to the US alone would cost a considerable sum, let alone shipping it later to the UK.

It seems there is a lack of understanding. Everybody told us something different. A guy in customs told us to ship it to the US and on the way instruct the courier service to change destination at Heathrow airport and then ship it to a location in UK. This was complete bullocks. The courier service said to just leave the telescope at customs and forget about it. It would go to the government in the end. The official responsible for weapons and ammunition told us that the government will not leave it alone. They will charge us money for the space the telescope is taking up in the warehouse.

Its a complex world it seems. I'm still trying to ask to give up the telescope and disown it altogether. I'm glad the ordeal is coming to an end...isA

It was an unwise decision to order that telescope. Let this be a warning to anyone who wants to order something from abroad to Egypt.

Thursday, April 24, 2008

Reflection()

I've been doing some programming using reflection recently and when I thought about the term I was unable to put together a formal definition, so here it is...

Reflection in computer science is: "Reflection allows code to discover information about the fields, methods and constructors of loaded classes and to dynamically invoke them. It basically entails reaching into the JVM (if in JAVA) and grabbing out information about loaded classes at runtime"

The Revolution of the Google App Engine

As they have done before, Google are revolutionizing the way we deal with the Web. For developers like myself, they have created a whole new scheme of things to come. Google has announced Google App Engine which provides developers with a means of instantaneous web publishing. You can create a website through Python (the first supported language) and using the SDKs provided test it and debug it and then publish it within minutes.
This will revolutionize web dev. I think this is damn innovative stuff...



"Google App Engine lets you run your web applications on Google's infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it's ready to serve your users.

You can serve your app using a free domain name on the appspot.com domain, or use Google Apps to serve it from your own domain. You can share your application with the world, or limit access to members of your organization."


App Engine is free!!! You get 500MB of storage and enough CPU power and bandwidth for about 5,000,000 page views a month

Simply beautiful...

I tried to get the preview release but it was only being given to the first 10,000 developers to register. I was obviously too late.

The SDK is available for download...so anyone interested go ahead! There is also documentation. But there is still no space to register for publishing on the production environment...

Soon...my friends...soon :D

Backronyms

Never knew there was a word to describe this. An acronym is a abbreviation. A backronym on the other hand is a phrase constructed from a previously existing word or abbreviation.

An example: A Spool in computers is a buffer area used for data transmission between a computer and a peripheral of lower speed. People constructed the phrase Simultaneous Peripheral Operations On-Line based on the believed-to-be acronym Spool. Its the inverse (the reverse direction) of developing an acronym.

I thought this was quite interesting...

Wednesday, April 23, 2008

Google Alerts

Just came across Google Alerts. This is darn kool. It'll allow me to keep up to date with issues. Check it out...

Radio on The Run

As usual I started driving to work this morning and tuned into our local English radio station. As many time in the past, I SMSed the station telling them I would love to play one of their games where they ask a guy 5 Qs and then ask a girl 5 Qs. Call it sexist, call it competition....whatever :D. I was the first one to be asked the questions. I got 4/5. I got the easiest of all questions wrong. I always get confused about the capital of Canada. I said Ontario. Ontario is the county which contains the capital city, Ottawa. Well I got 4/5 and the girl got 2/5 so I won myself a mobile line and some goodies from the mobile service provider. Hope the number is good. I don't know if I'll be able to go pick them up...we'll see.

In actual fact, they made my drive to work fun. I enjoyed the ride and partially was unaware of the time it took in the crowded streets of Cairo. I then took a wrong turn as I smiled at the girl who got most of the questions wrong....evil me! That wrong turn cost me a lot. I had to take a long detour to get back to work.

Yalla...I had a nice morning so far. Hopefully the day will meet the high expectations ..isA

Sunday, April 20, 2008

Vector Graphics Vs. Raster Graphics

Curiosity killed the Cat! Not in my case - I'm looking into something called Vector Graphics.

Vector graphics...AKA geometric modeling or object-oriented graphics. OOG...hehe.
Vector graphics is the use of geometric primitives like points, lines, curves and polygons which are modeled by mathematical equations to represent images.

Vector graphics is the opposite of Raster Graphics. Raster Graphics is representing an image by an array of pixels (also the technique used for rendering photographic images). This mechanism makes images pixelate as you zoom in, as you can see in the picture below.



This pixelation does not happen with vector graphics. Vector graphics files store the lines, shapes and colors that make up an image as mathematical formulas. A vector graphics program uses the mathematical formulas to construct the screen image by building the best quality image possible, given the screen resolution, from the mathematical data. This is why you see the difference between both techniques in the picture above. Vector graphics render themselves using math equations according to the resolution of the image.

So this is an exceedingly brief look at the two techniques. For a complete and detailed description of the PROs and CONs of each see Wikipedia - Vector Graphics

Stay tuned for more posts...

Friday, April 18, 2008

Thursday, April 17, 2008

Monty Hallin'

Two days ago I saw the movie 21. Its based on a true story. Its a story about five MIT students and how they are recruited by a university professor to count cards in Black Jack. The plot is absolutely predictable but I definitely enjoyed it.

They referred to the Monty Hall Problem in the beginning of the movie. This sent nostalgia spinning up my spine. I never did pay attention in that class on probability, maybe cause the room was always so jam-packed and the professor was sooo irritatingly annoying. Thus, I never did get the hang of it and I think that was my lowest grade in all my years at uni. So I obviously couldn't remember much about the problem except its name.

The Monty Hall Problem is a problem of probability based on a tv show. The host asks you to pick one door out of three knowing that behind two of them is a goat and behind just one of them there is a bran new car. The objective obviously is to pick the door with the car behind it.



Once you pick one of the doors which has a probability of 1/3 to have the car behind it, the host then goes and opens one of the other two doors. It reveals a goat. The host then asks you whether or not you want to change your choice. So you offered to keep to your first choice or to switch to the other closed door.

The simple scenario is that you pick one door and stay with it. The probability in this case is 1/3 that the car is behind it. But actually it would be wiser or mathematically wiser to switch. Why?

The probability of your chosen door is 1/3 which makes the probability that the car is behind one of the other two doors 2/3 (shared across both doors). When the host reveals one of the two other doors, he has made the 2/3 probability rest solely on the closed door of the pair. Therefore your chosen door has a probability of 1/3 (same as before) and the other remaining door has a probability of 2/3. This is why it is wiser to switch.



You can look at it from various angles. You can analyze it using Bayesian analysis or map out all scenarios and see what happens. Another way to look at it is that the probability of choosing a goat in the first place is 2/3. In all cases if you choose a goat in the first place, and switch, you will win the car. This is because the host will reveal the other goat and thus the remaining door has the car behind it. But if you stick to the choice you only have a 1/3 chance of winning the car.

An easier way to look at this is to increase the number of doors to say; a 100. You choose one and the host reveals 98 of the other doors. Will you switch? The probability of choosing a goat first is 99/100 which is 99%. It is almost certain that you choose a goat door. Then the passes along the other 99 doors and opens them all except for one somewhere along the line. A rational decision would be to switch to that door knowing that there is a 99% chance you choose a goat to start with and a 1% chance you choose the car from your first choice. Pretty cool huh?

Its a really cool problem that sparked confusion and debate in the world. The problem and solution were published in the Parade magazine. About 10,000 readers (including several hundred mathematics professors) wrote to the magazine claiming the solution was wrong. People saw the problem of switching as a bran new problem independent of the first choice. In actual fact it is because depending on which door you choose at the beginning the host will reveal one of the other doors which has a goat. So the host's choice is based on your choice. So therefore there is a relationship between which door the host reveals and the door you choose.

Tuesday, April 15, 2008

My Lumix

Got my new camera two days ago and took it for a Macro Morning Spin!!! Took some pix in my back garden this morning using macro. Here they are...

An Egyptian fly unaware of my presence...



Eaten by a rose...



Mushroom Kings



Love...



Honey suckle....or close



The Brain...



Crown




A fallen rose

Asciimation!!!

This is sooo kool!

You've got to check it out!!!!



Open up the windows command prompt (you'll find it under All Programs > accessories.
Once the black window opens up type in the following line:

telnet towel.blinkenlights.nl

and enjoy :D!!!

Wednesday, April 09, 2008

Stylish Firefox

This is definitely the best UI enhancement add-on for Firefox I've seen. It's called Stylish. It actually applies styles to the websites of your choice. It replaces the existing styles of websites and puts your own.

The effects of this add-on are amazing! and as usual in the open source world there has been a swarm of commotion and hence you can find ready made styles to install onto the add-on. Here are some snapshots of what can be done.

Gmail in black!



Wikipedia painted dark!



Rainforest Yahoo!!!



There is a site called http://www.blackle.com/
which claims that because of it's black theme it saves energy and is easier on the eyes. Easier on the eyes maybe but Google denies the greenness of black. It says displaying black on flat-panel monitors actually uses more energy.

:D

Wednesday, April 02, 2008

Tuesday, April 01, 2008

Aliens in Egypt!!!


View Larger Map

This funny looking sign was found on Google maps. It shows a weird pattern in the middle of nowhere. Could it be aliens?

hehe...don't think so...Could be some very innovative dumpster truck drivers with a lot of free time :). Its quite interesting. Some of them are holes in the sand and some are tiny hills. There are no traces of vehicles to show how it was made. It could actually be a Google April fools prank. It could have been deliberately inserted into Google maps by Google!!!

Can you think of any other explanations?