Murtaza Fazal's Blog

Murtaza Fazal's Blog
Murtaza Fazal's Blog

Friday, January 15, 2010

Becoming a Great Programmer

You might think that great programmers can type at a thousand words a second, have a mega-sized brain, and are fitted with a socket that lets them connect directly to a computer. This is not true. Especially the socket bit. In my experience, the best programmers are the ones who are the most fun to be with. The ones who you enjoy talking to. The ones who don’t get upset when you find a mistake in their programs and who will sometimes agree that your solution is better than the one that they had invented. I’d much rather work with someone like that than someone who can write a hundred lines of code a minute but who refuses to speak to me if I dare to suggest that one of those lines might be wrong. Great programmers take care to find out that what they are doing is the right thing. If they are working for a customer, they will make sure that the customer gets what the customer wants. They will not assume that they know the best way to do it and just do it their way. They will make sure that what they produce is tested and comes with helpful documentation. They will work in the team, make coffee when it is their turn, and do whatever it takes to make sure that the project has a happy ending. Of course, they might also fill your office with beach balls, superglue your keyboard to the desk, or cover your chair with aluminum foil, but these are all done with a friendly spirit.

I have secured the services of a great programmer who will be adding Programmer’s Points to our text. These are truly words of wisdom, so make sure to take note when you see them.

--
Rob Miles
In his book : Microsoft XNA Game Studio 2.0 Learn Programming NOW

Saturday, December 5, 2009

Tracing Recursive calls in Fibonacci Series


In mathematics, the Fibonacci numbers are the numbers in the following sequence:

0 , 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ...


By definition, the first two Fibonacci numbers are 0 and 1, and each remaining number is the sum of the previous two. Some sources omit the initial 0, instead beginning the sequence with two 1s.

int F(int num)
{
      if ( num <=1)
           z = num;
     else
           z =  F(n-1) + F(n-2);
     return z;
}

In this function , if we pass n, it should return n+1th term , e.g passing 6 will return 8 so let suppose we pass 5 to the function F then in this case, it will call the function for 5. It will test either if num (which is 5 at the moment) is with <= 1? NO, hence it will move to the else part where it will call the function F again for 2 new values and their final sum will be restored in z. so the equation will become like this

z = F(4) + F(3);

Now we’ll use the first come first bases rule and go and evaluate F(4) then F(3) . Hence F(4) will be called exactly as F(5) was called, it will again test for <=1 which is NO again and then it will call again the 2 recursive functions for F(4) i.e

z = F(3) + F(2);

This can be better explained in terms of a TREE






The bold objects are the values returned by the if clause of the function F. Blue color numbers are the one being returned to the previous state from the stack.

Wednesday, November 18, 2009

I Tried To Find Myself

I tried to find myself
I tried to burn myself
I left everything which was important to me
was it my family, friends or enemy

Every second I could feel the pain
you won't understand what I could gain
I wanted to burn myself
I wanted to find myself

But now I do miss all the good times
all the laughs and all the smiles
I know I'll get all of you back
but I won't b able to find myself after that

Today I don't feel any hesitations to cry out loud
I’m just leaving myself dead tonight
u won't find the same person ever
the one who wanted to know himself is lost forever

You won't see me sad again
do not think I’m insane
I just lost someone who was dear to me
it wasn't u but it was me

I wish I knew the end
I could have always pretend
that I never felt offend
as u r my best-friend

Friday, October 23, 2009

Windows 7/ Windows Server 2008 R2 / Exchange Server 2010 Sneak Peek

Windows 7 was released for retail distribution earlier today. The launch event started at around 9 a.m. at Sheraton Hotel, Karachi. The event witnessed presence of not only leading IT personals but also corporate guests from Telecom and Banking Industry. The chairperson HEC was also part of the event. The best part of event was the separate corner for bloggers with online laptops to blog and tweet the event live as it happened.




Find below, a pictorial peek of the event.








Wednesday, October 14, 2009

When You Love Someone - Bryan Adams

When you love someone - youll do anything

Youll do all the crazy things that you cant explain
Youll shoot the moon - put out the sun
When you love someone

Youll deny the truth - believe a lie
Therell be times that youll believe you can really fly
But your lonely nights - have just begun
When you love someone

When you love someone - youll feel it deep inside
And nothin else can ever change your mind
When you want someone - when you need someone
When you love someone...

When you love someone - youll sacrifice
Youd give it everything you got and you wont think twice
Youd risk it all - no matter what may come
When you love someone
Youll shoot the moon - put out the sun
When you love someone

Sunday, September 27, 2009

Naney Asghar (A.S)

Naney sey bachey na bhi ek misaal kayam kardi
hussain(A.S) key maqsad main jaan bhar di
na bol paya kuch bhi nanna Asghar (A.S)
kam sini mein he hujat tamaam kardi

Aya tha pani ki talab mein
theen roz jo ho gay they pani ko band howey
khush galey mein jo zabaah ko helaya
teer na bachey ko shahadat ka maqam per pouchaya

Tuesday, September 22, 2009

FACEBOOK LITE


With the immense use of facebook and everyday a new application is being developed. Facebook developers showed their concern about people who are not able to use facebook due to their slow connections. They have introduced a newer version of facebook framework as Facebook Lite.
Its fast, true me!!! It stripes down all the stuff like runtime searching capabilities and gives the user with the simplest and easiest form of interface. It emphasizes with the use of the 4 facebook features i.e wall, photo and video, friends and info.

If u got slow connection, try ‘lite.facebook.com’ rather than the regular one