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. ;)