Wednesday, January 30, 2008

Making A Music Player

After downloading the new Flash program, I decided to make a music player, driven by a playlist that was coded in XML.

The playlist its self is not hard to write or to edit, but due to Flash's lack of saving, XML was the only choice.

I had remembered a great website that was made by a person called Lee Brimelow, which offered free high quality video tutorials on Flash.

So, I went ahead and downloaded his whole series, which was a whopping 1.45 GB, but it downloaded within a day on a 512 connection.

Using his guide to remember the basics of Actionscript, I made the player. With 140 lines of code, it was quite a long job, but it worked.

If you want to be more technical, the player reads the XML playlist to store the path to the MP3 files, and then it reads the ID3 tags stored inside the music files, which contain the song title/artist name and other information. Using these, it plays the music files.

And here is a screenshot of the program at work. You must excuse the quickly done background, and the weird name, and the stupid volume slider which I must replace. Other than that, I'm quite proud of myself. :D

Sunday, January 27, 2008

Coming To An End

My trip to this city, Nablus, is almost coming to an end. This week will be my last one in my holiday to this beloved city. Despite the severe cold we suffered this time, having to cover myself with five blankets each night, I must say I really enjoyed this trip.

In this city, I ate zalabyeh, met relatives, changed priorities in life, stayed in the bathroom because of all the knafeh we ate, visited soap factories, went trips around the balad, saw some old turkish bathrooms, visited long lost uncles and aunts, saw my great grandmother's new home, spoke to my one hundred year old great grandfather, ate tons of food, and a lot of other things I forgot to mention.

And here are some recent photos I took, to add to these words.





Wednesday, January 23, 2008

Changing Direction

This may be a non-Nablus post, contradicting the theme of the past several posts, but I hope this will be as interesting.

A few days ago, I was playing an online game I am addicted to, called Runescape.

Then, I had a thought I never thought of before. I asked myself, why am I doing this? Why am I wasting endless time on the internet, playing a useless game that will not do me any good in my life?

The thought stuck to me for a second, and then it left me.

A few hours later, after taking a break from Runescape, I started programming a bit. As strange as it may sound to non-programming folks, doing this is considered an enjoyable hobby.

Then the same thought struck me again.

Programming will help me in my future, when I start to write my CV, I could write down my knowledge in different programming languages, not all those hours and all those gold pieces I had on a virtual game.

All the memories hit me, those from years ago, when I would go to Youtube, not to look up Runescape money making guides, but to look up video tutorials. I would spend hours on the pages of forums, trying to look up a solution to a bug in my piece of software. I would type and type on MSN to a friend, not about how I just slayed a demon a hundred levels above me, but about a piece of code I was working on with him.

I could even remember how I would go, when I was in London, how I would search the Times Jobs website for jobs in IT, find the programming jobs, and gaze at the director of IT jobs, with their fifty grand annual wages, twenty grand above the average of good jobs in London.

And then, ironically, for the first time in two years, I decided to quit Runescape for good. I wanted my life back.

So, in my first step towards this new life goal, I went to my uncles' office and, instead of opening Runescape and burning more hours for nothing, I went to the Adobe website and downloaded the new Flash Professional CS3.

Then, the day afterwards, I went to my uncles' house and downloaded a few video tutorials of the internet for Actionscript, which with the videos help, I have made my own FLV player, and I have learnt API.

I now feel I am a much more balanced person because I am building towards my future instead of wasting my time.

And best of all, I am happy :)

Monday, January 21, 2008

More Views From The City



At the end of this street lived my grandmother, who now lives in Amman. I am sure she would like to see this photo when I come back.



To the back of this picture you can see many blocks in an area that was mainly fields or farming land. Most apartment blocks in this city are huge, in an aim to cut down the price of a residence by building lots of apartments on the same piece of land.



In Nablus there are two ways of transport around the city, either by your own car, or by a taxi. Because the town is still relatively small, you can call a taxi office and tell him your street/house, and it'll come to you. Quite convenient, eh?



A way of getting from one city to another is by going in a taxi like this one – an orange mini bus, or sometimes a seven seated car. The only drawback is the checkpoints, with long queues and hours of waiting inside the car.



This picture shows part of a close by village called 'Til', where a lot of farmers live, and plant or harvest their olive trees.

Saturday, January 19, 2008

Of Nabulsi Soap Factories

So they tell me my great grandfather from my mother's side, Adel Arafat (may Allah bless his soul), had a soap factory deep in the Old City of Nablus. And so, today we went to visit. The actual factory has stopped making the famous Nabulsi soap, but now is being converted into a museum. The aim is to restore the place into something educational that teaches about the making of traditional soap.



Part of the project was to use ancient doors from the old city, which were destroyed or broken during Israeli attacks. Local kids were given the chance to decorate the doors before being reinstalled.


This is one of the rooms in the soap factory which is being used to store some old objects that will be displayed later around the museum. This room was originally used to store soap.


Attention to detail runs throughout the project, instead of leaving the lightbulbs exposed, which would ruin the ancient effect, old claypipes were used as lampshades to cover the modernity.


Any walls or doors or staircases were restored to their old look, which has taken a long time and effort.


Some soap is still remade, for display or souvenir purposes, using the old method of making Nabulsi soap. You can also see, in this picture, the original scales used for weighing soap in huge quantities.

Friday, January 18, 2008

Zalabyeh

Nablus is famous for a special type of traditional sweet, made from cooked carrots or pumpkin in syrup (a bit like jam), wrapped in fried bread to add to the calories. Or sometimes, halaweh is added, just to increase your waistline.

Its name is Zalabyeh.


Zalabyeh is not home made, but bought from shops deep in the Old City, such as Abu-7arbi


The bread is bought from another shop, such as a shop owned by Arafat family


Roll the syrup-pumpkin in the bread, eat and don't feel guilty about the extra weight.

Side Note: This is NOT as good as knafeh. Remember that. ;)

Wednesday, January 16, 2008

In Words & Pictures: The Old City



One of the most significant things about the city of Nablus is its history, and the best place to take a look at it would be the Old City. No trip to Nablus is complete without a walk in the Old City, with its narrow streets and lined pavement, and the smell of fresh meat or vegetables in the air, and the shouts of sellers from their crammed shops assorted on the sides of the streets.



The Old City of Nablus is not just home to shops, but to Islamic history. There are many old mosques in the city, which many of them date back to hundreds of years. Each mosque has a stanza above its door, which was a way of telling when this mosque was built and by whom. This particular one was built in 1305 hijri, around 120 years ago.



The oldest of these mosques is named The Big Mosque, and is the biggest and oldest mosque inside the Old City. Its famous not just for its history, but for its way of making. Its walls are made from huge rocks, and held together with clay, which was later replaced by modern chemicals to keep the building together. It is also known for its circle-like mutawada2, which is found in the middle of the mosque.



A lot of tombs for major Islamic people can also be found in the Old City, and they are sometimes accompanied by mosques, such as one called The Mosque of Prophets. The actual identity of the people these tombs actually belong to is unknown, neither is their place or significance in Islam, but they are still named as Islamic Tombs.



My uncle then finished our tour around the Old City with a visit to an Islamic gathering called The Corner. This is a rather strange at first, but quite nice place for young people to gather and pray, sing nasheeds, or recite quran. This one was a home of a tomb of a supposed prophet, and also the home of three other tombs, who supposedly belong either to his three sons, or students.

Tuesday, January 15, 2008

Facts About Palestinian Economy

As you must know, its winter time.

This means that temperatures dip below zero, and right now its -3 degrees in the morning, and at noon it might reach 2 degrees.

So we need some source of heating.

But with Palestinian citizen's wages barely topping 200 Jordanian dinars a month, they will struggle to buy some natural gas to warm themselves.

Why is this?

Because with prices in Palestine soaring insanely high, gas costs you 10JDs per one jar. And you were complaining about 4.50JD a jar.

Also, one kilo of bread here has risen to 5 shekel, which is almost one dinar. In Jordan it is still 25 piasters.

Just thought you wanted to know.

I know I have not put any photos, this is because I am stuck with dial-up, if I go to my uncles I will post some photos.

Monday, January 14, 2008

A Journey To Nablus

As I said in the previous post, I am now on holiday in Nablus, Palestine (West Bank), for three weeks. In this town live all my relatives from my mums side, including my grandmother, as my grandfather passed away 3 years ago (allah yir7amo), and is also the town of my still living 100-year old great grandfather, whom I will go and visit hopefully this holiday.

In these posts, which I will be posting daily inshallah, I will include my daily actions in the city of Nablus. I will also try to include some photos, if I can. Some kind of 'live-blogging', if you want to call it that. Enjoy the first post of my visit to Nablus, the city under occupation.


Were to begin?

At seven o'clock in the early morning, the sun still barely coming out, the family was wide awake and on its way to the Jordanian bridge. The "bridge", for you that aren't familiar with it, is a building that you enter to cross between the two neighboring countries, Palestine and Jordan.

Two very close-by countries, but very far in political situations, for one is in war, and one isn't. And not just any war.

Almost five years of crossing the two countries, using this type of uncommon travel, I was used to entering the whole clich̩ of 'the bridge'. Everyone who has tried crossing the bridge will know how badly unorganized it is. And by saying that, I really do mean it Рchaos, mayhem, disorder.

But not this time. Allah was on our side, and we had chosen a perfect timing – in between the two terms, and just before the end of Tawjihi exams. And I must warn you, never ever think about going on the bridge in the summer holidays, because it will be total mayhem. We have learnt our lesson, and now go in between the two terms, when it is calm with barely any people.

Now let's get along with things, shall we?

We went through the Jordanian bridge, got on the rickety bus, and it began to drive. Looking out of the window, I could see the Israeli flags on the gate that we were approaching, with the pale men wearing sunglasses, green clothing and guns in their hands sitting in the bunkers.

After having to take off jackets and belts, removing mobiles and purses, and handing passports and papers, I entered that weird device that sprays you with some weird chemical (maybe air, or maybe bug spray). If anyone has been in that device or knows about it, can you explain what it is, because I felt a bit queasy after it. :D

Then, we got onto even more buses, who took us to the city of Jerico, or Aree7a, as it is called. There we tried to find a taxi who would take us to Nablus, but of course, they were taxi drivers, the worst species on earth. This time we had a driver who was a mixture of a dirty pig and a cheater (refer to post), because he tried to take 10JD extra from us to go early. Maybe he thought we were 'the rich idiots' or something.

Anyway, Nablus was quite easy to get to, this time the checkpoints were simple, and the driver did a good deed for once in his life, and took us a through a longer but checkpoint free route.

And now we ended up in my grandma's house. Of course, I typed all of this onto Word before pasting into Blogger, because this house still doesn't have the luxury of ADSL. It’s a good thing my grandma has dial-up. ;)

I'll keep posting whenever I can, maybe with some photos as well. Thank you for reading, and comments are welcome.

Sunday, January 13, 2008

Glasses. Khaled. Together?

Yes, I got a pair of glasses today. I had always thought it was very extra ordinary that my eyes had survived all these years, watching endless hours of television and computer screens.

Until a few weeks ago, back in school. I felt bored, as always, so I decided to try on a pair of glasses from my friend Hussain, who was mentioned in an earlier post concerning school. It was as if magic had worked for the first time.
Everything in front of me was much clearer, like when a photo which was blurred had just sharpened. The minute handwriting of the teacher, which was before unclear because of how bad the pen was, was now readable again.
I kept my mouth shut for the following weeks, afraid I would be doomed to wear glasses forever. Until one day, when the family was brought up the topic of blind people and such at the table, I decided to tell them my story.
The next day my mum told me that she would have to take me to get my eyes checked at Istiklal Mall. Angry at the thought, I refused at first, but then I kept negotiating till we agreed I would go in return of some Cadbury Drinking Chocolate.
Got checked by this wierd man at a shop called Grand Optics, wore the extra thick testing glasses, started guessing which lens was better, something called 'with or without or just-the-same'. The result found that I needed glasses to see smaller things that were far away.
However this wasn't it, because he added that my eyesight would worsen in the future, and I would need the glasses to see/drive/read, etc. He added though, luckily, that I would only need to wear them when I was on the computer, watching television, or in the class.
So here I am now, squinting in these new glasses, looking at a clearer screen and typing my blog post. Thank god its the holidays and I don't need to wear these in front of the class. Then again, that time is coming. For now, I will wear them and see what will happen.
* * *
On a much more important note, tommorow at seven in the morning, I will be setting off to Nablus, a town in Palestine (West Bank) for three weeks. From there I will still be blogging from my uncles computer which luckily has internet access, and will blog also about relatives as well as the current situation in there. Expect lots of photos of the place, that might bring back some old memories (I might even go visit the 'Old Downtown' or the 'Balad al-Adeemeh').
Wish me luck.

Saturday, January 12, 2008

The Perfect Hot Chocolate Drink

Go buy some Cadbury Drinking Chocolate. Choose absolutely nothing else unless you want to puke, even Nesquik (which tastes horrible). You can get one of these at C Town or Carrefour for around 3 JDs.



Take out three tea spoons of this magical stuff and put them into a mug of milk, then stir (yes, it won't completely dissolve because its still cold).



Put into your microwave for 2:30 (yes, I finally figured this out after many experiments). Go do something while this heats, because 2 and a half minutes is quite long and boring.



Remove from microwave and stir. Enjoy!

Thursday, January 10, 2008

Skeleton Key


Left: The author, Anthony Hortwiz // Right: Alex rider in the film Stormbreaker


In an aim to recap on my old english skills, I decided to continue reading a series I had only completed two books from. This series is called the Alex Rider series and is written by a guy called Anthony Horowitz. His books have won the 2003 Red House 'Childrens Book' award, and the series has seven books till now.

The series talks about the adventures of a teenage boy called Alex Rider, who is asked to do spy missions by the British equivilant of the CIA, the MI6. Not only was his murdered uncle a spy in MI6 as well, but he is also a powerfull and wise human for his age and size.

This book in the series, Skeletion Key, talks about the boy's new mission assigned by MI6 - to head to a private island south of Cuba. On this island he must investigate the island's owner, General Sarov, and his plans to destory the world with his weapons grade urainium.

Sharks. Assassins. Nuclear bombs. Alex Rider's in deep water.

This book is a great read, even for old people, because it is a nice thriller with many action packed scenes as well as interesting plots. Although this book's plot/general idea may seem a bit wierd at first, once you read it you will understand it is quite realistic and not any old children's book.

Wednesday, January 9, 2008

The Balad In One Picture



‘He was selling turmos. If I am not mistaken, he is blind.’


[via 7iber // picture by laithmajali.com]

Tuesday, January 8, 2008

How I Won $50



A few months ago, I used to go to this forum for young programmers. One day, this person on the forum wanted to get some entries for his deserted website. His website was a small database or collection of different codes, in many languages.

So, in vital need of traffic and entries, he put up a competition on the forum, encouraging all people to enter a $50 raffle if they entered a code onto the website. Of course, the more codes you entered, the higher the chance of winning.

I went mad. Fifty dollars was more than I had ever heard, although I thought that chances of actually winning anything were quite slim, as I had thought. I started sending in tons of codes, all in my favorite language, PHP.

The codes weren't anything special, just some bits and bobs that really did nothing extraordinary. Like censoring specific words in text, or rounding a number. Other programmers did alot more complicated work, like making an API for poker.

All in all, it was a raffle, so it didn't depend on complexity. I can still remember the happiness when I read that I had won the 50 dollars, first prize. I quickly made a Paypal account and I received the money.

A few months later, after spending here and there, its all gone with only 99 cents left. It was mostly spent on things like Runescape, but in the end it was well earned money, and I am happy that this is the first time I won something good.

So what have your experiences of winning in competitions been like?

Saturday, January 5, 2008

Native Deen // I'm Not Afraid To Stand Alone



I am not afraid to stand alone
If Allah is by my side
Everything is going be alright
Going to keep my head up high

Friday, January 4, 2008

Python That Swallowed 4 Golf Balls

What a poor old Python, mistook a few golf balls for eggs. These balls couldn't be digested, so they sat there in the Python's body until vets came to the rescue and removed the balls by surgery. I'm sure this will teach the snake not to eat anyones eggs again! Here are some pictures (one gross one was removed, don't worry)...




4 bulges in the snake indicate the golf balls inside



Another picture of the bulges of the snake



An x-ray of the body, the big circles are the balls



The surgery being done, poor old snake being opened



[Source: BBC News]

Thursday, January 3, 2008

Things To Do When You're Bored

I found a group on Facebook which gives you 253 things to do when you are bored at school. I've handpicked a few I think are the best and put them here.

Randomly raise your hand and say "The answer is three".

If your teacher walks around the room during the test, cover your test and glare at them suspiciously.

Raise your hand and point to a person on the other side of the room. Insist that this person is cheating off you.

Meow and bark occasionally.

Hold your head and groan, then tell your teacher that your multiple personalities are fighting.

Tell your teacher that you’re going to be sick tomorrow.

Randomly laugh hysterically.

Bring in a pillow and explain “The desk is too hard for sleeping”.

Ask your teachers if they find sick pleasure in tormenting you.

Do the chicken dance.

Hold up a piece of paper towards your teacher that says in large letters: CHECK YOUR FLY.

Bring a vacuum to class. Halfway through class, stand up and start using it.

In the middle of lecture, ask your teacher whether he believes in ghosts.

Wednesday, January 2, 2008

Happy New Year



Happy New Year To All Fellow Bloggers/Commenters


(Sorry if its a bit late, I was busy with exams)