Sunday, October 11, 2009

We have moved (302)


Hello all,
I have moved this blog. Actually i have merged it with my Arabic Blog. So i will be posting there. I will keep it here for sometime, but eventually i will have to delete it.

Thanks for you interest, and see you there.

Monday, September 14, 2009

"Bank Masr" security exposure!

Today I and my colleague Eslam were at Bank Masr because he was doing something there. Not only the bank looks poor, in my opinion, but also the screen on the wall got me stunned!

The screen was displaying a windows desktop with a folder minimized to the task bar and a window of internet exploerer displaying a page containing currency rates.

Apart from the ugliness of that page, the problem was they were showing the internal IP address the browser is using!!!

http://192.168.111.162/currencies/la2yenfa3.htm

The page name itself "la2yenfa3" is the Egyptian Arabic slang to say "no it is possible"! It was obvious two members at the IT were arguing whether they can show this page or not!

I couldn't take a pic with my mobile at the time, but will the next time i go there.

Oh did i mention that there was a warning too on the taskbar?!

Wednesday, June 17, 2009

The email i sent to Microsoft

Yesterday was a day of hell to me, because Internet Explorer deserves to be renamed to "internet Exploder!"...

I was working on the project and everything was going just fine, it looked very neat on firefox, opera and epiphany web browsers, with no errors or annoying distortions of any kind, it even passed the test of the w3c validator.

But when i was giving my client a status report, he told me the project is messed up, i opened an IE installation i have at my linux machine and everything was really upside down, with no obvious reason why it went like this!!

The client was upset, and he has the right to be so. So I spent all today trying to fix what IE destroyed. I really hate their browser, it is even not self-compatible, when you deal with IE the version differs so much that you have to make hacks in your CSS and HTML code for each and every version of them! How stupid that the same broswer renders html in a totally different way just because you are using another version!!

Out of frustration i issued a ticket to Microsoft's customer support as following:


Subject : Please stop releasing internet explorer

Message : Dear Sir/Madam, you don't know how much i am frustrated and filled with anger now because of your piece of software named Internet Explorer, I am in a very bad situation that is about to cost me a lot in my job because you don't care about web standards, and because of the unpredicted behaviour of your IE.

I please ask you seriously, and really you can't feel how much i feel badly inside, to stop releasing any further versions, stop shipping it, remove it from your websites and ask people not to use it anymore.

Thank you for your time, and your time only, but please stop using that time to make our lives like hell..


--------------------

Today came a reply from an employee there :

Dear Mr. Mosab,

Thank you for contacting Microsoft Technical support. Kindly be informed that your complaint has been reported to the responsible team.

Your feedback is highly appreciated.

----
Notes :
(1) The image is taken from the website "we hate ie".
(2) IE seems to make problems everywhere, read this article about the situation between Microsoft an EU.

Monday, May 25, 2009

inbox 404!


What would be your feeling when you find that your inbox contains "404" unread messages?!

Thursday, March 12, 2009

Caffeine Code Cycle


Here is the Caffeine Code Cycle* in the life of a software engineer or a programmer :
---
* I created this using the firefox pencil addon.

Originally posted at my website.

Sunday, December 14, 2008

Adhere : first open source mobile advertising platform

adhere mobile advertising platform
Citex Software (then company i work for now) has launched beta release of adhere -the first open source mobile advertising platform- on its website. You can download the product, or post any support issues on the adhere support forum.



For more info about Citex Sopftware Ltd. visit : http://www.citexsoftware.com



Long Live open source :)

originally written on my website.

Thursday, November 06, 2008

my dual monitor at work


Hi all,
This is my dual monitor at work, my laptop is Amilo (Fujitsu-Siemens), running Debian Etch. The setup is made using nvidia-settings.

Thursday, September 18, 2008

Chrome's sad tab


This is what Google's Chrome display when a tab goes bad! I really loved it so much (click on image to enlarge).

Note: This is my work pc, it is running windows -which i don't like- so I installed a Mac Theme.

Tuesday, September 09, 2008

Good Bye IOL..



Dear IOL* members,

It has been nearly 4 years now in IOL in different positions and departments. I believe it is time for me now to move, I should have done this at least a year ago, but I didn't in three different occasions because of many factors, most importantly 20at's** benefit. These years meant a lot to me, I learned many things really, but I believe I have now reached a saturation point, where my stay will not be of acceptable benefits for both IOL and me, in fact it even may do nothing but hold me still instead of going forward. Thus I decided a while ago considering opportunities that come along.

  Today at nearly 4:00 pm i received an offer, that I accepted, from a software company named "Citex Software" to work there as a software engineer. The offer satisfies many needs at this phase of my career basically and my life as well. On top of them is the need of new and fresh career blood, working with a young team that understands each other and can really think of things differently and effectively, a place where I can learn a lot of new things and a better financial level. All these factors exist in this opportunity along with others, so I am accepting the offer. I should start there right after The Eid, that means 2 weeks and a half from now.

  Despite the fact that there were some issues inside the company that could be dealt with better, I really find it hard to take such a decision and will always remember IOL was like home to me. It is the nature of things anyway; people leave their homes when they are grown up and choose their own way. Thank you all for everything, and yes I think this is a Goodbye. Hope you all the best from all my heart.

Best wishes ever,
Mosab Ahmad.

---
* IOL = islamonline.net, and media international company
** 20at = 20at.com, may main project i am was working on, i built it from scratch.

Monday, August 25, 2008

Debian Etch Tips (1) : version control your /etc

A good practice I found useful is to version control your /etc, because you might edit something and forget why you did so later on, or even want to revert to a previous situation.

In order to do this you have two options, either save a backup manually for each file before editing -which is to me a horrible nightmare-, or use a VC system.

If you chose option 2 welcome aboard :), -option 1 is welcome too but he will not find useful here-.

I have used three VC systems before, CVS, SVN and git. The first two are great and I like them really, but only git could “git” my attention and passion. I started using it on my laptop and it works like magic.

Let's start

(1)Installation :

you have two options, either using the prepackaged “git”, or compile it from source. Both are good.

- Using packages :
Open a terminal and issue the following command as root:
apt-get install git-core

- Using the source :

mkdir ~/git-core
cd ~/git-core

Now go to http://www.kernel.org/pub/software/scm/git/ and choose a version, for example :

wget http://www.kernel.org/pub/software/scm/git/git-1.5.6.5.tar.gz
tar -xzvf http://www.kernel.org/pub/software/scm/git/git-1.5.6.5.tar.gz
cd git-1.5.6.5
./configure
make
make install


and you are done :)

(2) Checking installation :
to check your installation simply run the following command :
git -- version

This is supposed to output something similar to : “git version 1.x.x.x” where x is correspondent to your version.

(3) Initiating a Git repository in /etc :
as root run the following commands :
cd /etc
git init

you are supposed to see something like : “Initialized empty Git repository in .git/ ”

git add .

Don't forget the dot “.” in the previous command.

git commit


then the default text editor will appear, write some comment like “This is the initial state of /etc”, save and exit and voila, you just version controlled your /etc :)

Practical Example:
Suppose that you wanted to add some lines to /etc/apache2/httpd.conf, and then found some conflicts with any other paramters apache has set, and you want to revert to the previous state. Here is how you do it using git (Note: you must have initiated a git repository as in step (3)):

cd /etc/apache2/
git add httpd.conf


now open the httpd.conf with your favorite editor -mine is emacs- and don't forget to open the editor as root, add your lines, let's say something like :

<virtualhost 3="">
ServerAdmin webmaster@host.foo.com
DocumentRoot /www/docs/host.foo.com
ServerName host.foo.com
ErrorLog logs/host.foo.com-error_log
TransferLog logs/host.foo.com-access_log
</virtualhost>


save the file, then run this command :
git commit


the default system editor will appear, so you are supposed to write a note to remind yourself why you did this commit, for example “Adding a virtual host to test git”.

Later on you discover that you no more need these lines in your httpd file and you want to revert to the previous version, then you have two options,

Option A : from command line
Option B : from GUI

both are similar, but let's explain a little thingy first, every time you make a commit, the git gives it an SHA1 code which servers as a serial number -let's call it this way for now :)-, this code is unique, which means there can't be two commits in the same repository having the same SHA1 code. All we need to get back to a specific version is to know it's SHA1. So let's start :

Option A : from command line :
go to the repository directory and type the following commands :

cd /etc/
git log


this will output something like :
commit 032ba6817b147adcb169f683dfdda5028b503bd8
Author: mosab ahmad <mosab>
Date: Sat Aug 23 00:32:56 2008 +0300

testing multiple files and pathcing :)

commit 6e1f5afef0cf0f6c10eec90679193b1fedc68ff5
Author: mosab ahmad <mosab>
Date: Sat Aug 23 00:31:42 2008 +0300

patch 1

commit 5357c214ac7deac555720bd62e8c285e6ec02389
Author: mosab ahmad <mosab>
Date: Fri Aug 22 23:47:53 2008 +0300

this is the third commit to this project.


this is somehow not user-friendly, for the ones who are not familiar with terminal. But it provides us with each commit's SHA1, so what we should do is :

git checkout 0b1016862478c628f9c22d2fb3da24d5f6c066a6


Of course replace the string with the proper SHA1 string you want to revert to.

Option B : From GUI

for those who are afraid of terminal -although the best way to use git is from terminal- the Git project provides a GUI tool that eases the navigation of a repository to start it enter into the repository directory and type :


cd /etc/
gitk


a GUI program like this will appear :



you will find many useful info here, but what we need for now is parts (1) and (2) marked on the snapshot.

part (1) contains the date and creator of each commit, and when you click on one of them part (2) shows its corresponding SHA1 ID. copy and paste this ID and issue the following command as in previous step :
git checkout feeb0b6388c36d8c244c957886dcb63e6fd5112f


open the file again; congratulations you got back to the version you wanted.
happy gitting everybody :)

-----
any additions, modifications or suggestions are very very welcome at : root@mos3abof.com