Mango Mystery

July 19, 2008

A boy comes to a garden to gather mangoes. At the gate, he encounters a gate keeper who allows him on a condition that the boy should give him one more than half of the mangoes he would collect. The boy agrees and moves forward. On his way to the tree he meets a gaurd who allows him to move forward on a similar condition, i.e. give him one more than half of collected mangoes. The boy agrees and reaches the tree. Under the tree, there is another gaurd who again makes the same request. The boy agrees and starts collecting mangoes. He gathers the required number of mangors, then hands over one more than half of mangoes to the first gaurd, then to the second and then to the gatekeeper. At the end, he leaves the garden with only 1 mango, so how many mangoes did he gather?


1000 Doors

July 19, 2008

Well, I have decided to remove the Riddle page from my blog, and will post the riddles here as post, whenever any beautiful riddle will come across me :)

So here goes 1000 Doors!

There are 1000 doors in a hallway. Each door is numbered from 1 to 1000 in increasing order. Initially, all doors are closed. A person enters the hallway and opens all doors and leaves the hallway. Second person enters the hallway and closes all even numbered doors and leaves the hallway. Third person enters the hallway and toggles the state of all those doors whose number is a multiple of 3 and leaves the hallway. The fourth person toggles the state of those doors whose number is a multiple of 4 and leaves. Mathematically speaking, a person x enters the hallway, toggles the state of all those doores whose number is the multiple of x and leaves the hallway.

If 1000 persons enter the hallway, perform the required task and leave the hallway, then after the 1000th person, how many doors are still open?

If you can determine that how many are open, then you can easily determine what are the numbers of the doors that are open. :D


Certificate for successfully downloading Firefox 3.0 :P

July 3, 2008

Certificate for downloading Firefox 3.0


Butterfly

July 3, 2008

One day a small opening appeared on a cocoon. A man sat and watched the butterfly for several hours as it struggled to force its body through that little hole. Then it seemed to stop making any progress. It appeared as if it had gotten as far as it could, and it could go no further.

So the man decided to help the butterfly. He took scissors and snipped off the remaining bit of cocoon. The butterfly then emerged easily. But it had a swollen body and small, shriveled wings. The man continued to watch the butterfly because he expected that, at any moment, the wings would enlarge and expand to be able to support the body, which would contract in time.

Neither happened ! In fact, the butterfly spent the rest of its life crawling around with a swollen body and shriveled wings. It never was able to fly. What the man, in his kindness and haste, did not understand, was that the restricting cocoon and the struggle required for the butterfly to get through
the tiny opening was God’s way of forcing fluid from the body of the butterfly into its wings so that it would be ready for flight once it achieved its freedom from the cocoon.

Sometime struggles are exactly what we need in our life. If God allowed us to go through our life without any obstacles, it would cripple us. We would not be as strong as what we could have been.

We could never fly ……..

I asked for strength and God gave me difficulties to make me strong.
I asked for wisdom and God gave me problems to solve.
I asked for prosperity and God gave me a brain and brawn to work.
I asked for courage and God gave me danger to overcome.
I asked for love and God gave me troubled people to help.
I asked for favors and God gave me opportunities.
I received nothing I wanted and I received everything I needed.

THANK YOU GOD.


Usman Qutab got selected in Microsoft

June 22, 2008

Good News for all those who know my friend Usman Qutab. He went to Dubai for recent interviews taken by Microsoft and got selected.

Usman has been outstanding throughout his academic life and has shown great commitment in his professional life. His creative thinking, outstanding algorithmic and development skills have enabled him to join Microsoft. Congratulations Usman, for such a great achievement. I wish you good luck for your future plans. Cheers (Y)


Reconnected to Blogspot

April 9, 2008

After a long time, I reconnected to Blogspot. Blogspot has improved a lot. My blogger page is Rana Hammad


Tricastmedia In-Office Counter Strike Competition - March 2008

March 19, 2008

I and Usman Qutab were given the responsibility to organize an In-Office Counter Strike Competition. We worked very hard to arrange this event. MIS department, administration and especially our core team cooperated fully with us to make this event a success.

We selected aim_headshot, de_dust2 and de_inferno as the maps for the competition, made rules and emailed everyone about the event. I designed the following poster, which was then displayed on the notice board. We received about 20 participants, so instead of making 5 teams of 4 players, we made 4 teams of 5 players each. The 4 teams were Alpha, Bravo, Charlie and Delta……..which were directly sent to the semi-finals :D  

In-Office Counter Strike Competition Poster

The first Semi-Final was between Alpha and Bravo. Alpha lost by a great lead. Khalid Zubair Khan of Bravo led from the front.

The second Semi-Final was between Chalie and Delta. Great effort from Usman Qutab of Delta was not enough to beat Charlie which was led by Rana Hammad Hussain. ;)

The Final match took place between Bravo and Charlie, in which Bravo out played Charlie in all 3 matches.

  • Bravo became the best team.
    • Khalid Zubair Khan - 65 Kills (CT) & 56 Kills (T)
    • Muhammad Shahzad Amin - 27 Kills (CT) & 17 Kills (T)
    • Muzzamil Hussain - 9 Kills (CT) & 16 Kills (T)
    • Muhammad Rizwan - 4 Kills (CT) & 7 Kills (T)
    • Syed Ahmed Sohaib - 2 Kills (CT) & 1 Kill (T)
  • Khalid Zubair Khan won the best Counter Terrorist Award with 65 kills.
  • Rana Hammad Hussain won the best Terrorist Award with 73 kills.

Congratulations and thanks to all participants who played till the end and cooperated a lot with the organizers.

 


PUCIT First Degree Awarding Ceremony

February 22, 2008

PUCIT arranged its first Degree Awarding Ceremony for BSC Hons students on 6th February 2008. The most awaited event, though arranged haphazardly, but still left a great positive impact for later degree awarding ceremonies. Both BCSS01 and BCSF01 batches were called for the rehearsal of Ceremony on 3rd February 2008. All students participated well and fully cooperated with the organizers.

The Nation newspaper outlined the event on 7th February 2008 in the following way:

Pakistan has a great potential in the field of computer sciences and information technology and the new graduates of PUCIT (Punjab University College of Information Technology) can contribute a lot in this regard.
India is earning Rs 10 billion annually from IT industry and Pakistan is also preparing a lot of professionals through public sector universities to compete with India in this field.
This was stated by Punjab Governor Lt-Gen (r) Khalid Maqbool while addressing the first-ever degree awarding ceremony of PUCIT held for BS Computer Science Spring 2001 and Fall 2001 graduates at Allama Iqbal Campus on Wednesday. PU Vice-Chancellor Dr Mujahid Kamran, Dean Faculty of Science Prof Dr Jamil Anwar, PUCIT Principal Dr Syed Mansoor Sarwar, Dr Naveed Malik, Prof Azhar Ikram, Prof Dr Mujahid Mansoori faculty members and chief executives of local software houses were also present on the occasion.
The governor said that Pakistan can come upto the standard of advanced countries with digital technology. He said Pakistan is making advancement in many fields especially in information technology and computer sciences. The Punjab government is building a technology park at a cost of Rs 3 billion. The industry needed dedicated and committed professionals and the government is providing all out support to public sector universities to take up this challenge.
He said the PU has started mega projects at a cost of Rs 4 billion which include PUCIT campus at New Campus at a cost of Rs 600 million and a cell of custom built. The government is also providing a sum of Rs 70.50 million for new academic block of PUCIT.
PU Vice-Chancellor Prof Dr Mujahid Kamran in his address said the invention of digital technology, in particular the Internet, constitutes a revolution of the same magnitude as the invention of printing. The invention of printing enabled the thoughts of any one individual to be scattered across the globe. The Internet enables access to vast stores of human knowledge in a flash. This is pure magic. He said the PUCIT is the outgrowth of the department of computer science which was founded and established by Prof Dr Naveed A Malik who is also the founder Vice-Chancellor of the Virtual University.
Eulogising the services of Principal PUCIT, Dr Mansoor Sarwar, the Vice-Chancellor said that his supervision, the college witnessed academic peace and quality to this College. Dr Mansoor Sarwar has managed to rid this College of the restlessness and attendant decline in quality. The Principal is the proud Pakistani whose textbooks on UNIX and LINUX published in the US are recommended texts for over 200 US universities. All of his books have been translated into Spanish and Chinese.
The PUCIT has begun to expand its activities. Its projects have been approved recently by the government of Punjab and the Higher Education Commission. The funding to universities is a consequence of the perception that knowledge is the key to wealth and power and, above all, to a place of respect in the comity of nations. The PUCIT is a product of exceptional times. He advised the young graduates to work conscientiously and creatively, be open minded and tolerant, alert and active, forward-looking and cultivate the desire to make a mark on the world. Pakistan stands at cross-roads today - it must choose a tolerant and open world view or regress into strife ridden darkness, he added.
Principal Prof Dr Mansoor Sarwar said that the college has progressed considerably within a rather short span of time. From a modest start in 1988 as the Centre for Computer Science today PUCIT is the largest institution of higher learning in the country in the area of information technology, offering curricula that are in line with the guidelines of the HEC and international bodies like the IEEE and ACM.
He said we believe in producing well-rounded graduates, who are professionally competent and contributing members of the society. We provide a learning environment which inculcates technical soundness and motivates understanding of human and social issues, enabled by well-balanced curricula and co-curricular activities. Curricula of BS programmes have around 25percent content dedicated to Humanities and Social Sciences. During the past year and a half, the college has spent around Rs 1.5 million on student activities, including bi-lingual declamation contests, poetry recitation competitions, quiz competitions, programming and gaming contests, graduation dinners, comical skits, sketching competitions, tug-of-war, girls table tennis and badminton contests, participation in international activities and competitions, and student recreational trips. Due to student societies in the University, our campus hums with co-curricular student activities throughout the year.
The College has also progressed in many other ways, including hiring of qualified faculty, higher admission standards, up-gradation of IT infrastructure and tools, and uplifting of faculty offices and the college library. We have also started degree programs in BS Software Engineering, MS/MPhil Computer Science, and (regular) MSc GIS, and consolidated our masters degree programs into one MSc Information Technology programme. The College faculty has recently brought the first-ever research grant from the HEC worth Rs 2.63 million and Rs 11 million funds through the National JCT R&D fund are in the pipeline.
The Vice-Chancellor congratulated the new graduates and extended warmest felicitations to those who achieved distinction. He said that the graduating students must feel proud that they have joined the rank of all those who have graduated from this university in the past 125 years.
Earlier Chief Executives of Gen/Team, Umair Javed, Zartasha Uzmi of Confiz Solution and Wyne of Angro appreciated the quality of education in PUCIT. They urged for linkage of the college with industry and some hours of the students to be spent in software houses.

Besides the above speeches, Governor Khalid Maqbool awarded Gold Medals to position holders. Kiran and Sohaib were not present, so their relatives collected the Gold Medal, but I was lucky enough to receive it myself. We had lunch and group photos after the ceremony. Overall it was a great event. It would have been nice if everyone attended it.

I am uploading couple of unofficial photos here. :)
The Nation - 7th February 2008 - Page 18Rana Hammad

Group Photo 1Group Photo 2

Group Photo 3Group Photo 4

Group Photo 5Group Photo 6

Group Photo 7 Group Photo 8


Welcome 2008

January 2, 2008

A long year(2007) has come to an end. Many memorable moments occured in that year, for which I will remember this year. Just a reminder of what happened in 2007, can be listed as follows:

At Personal level:

I participated in Table Tennis Tournment held in Techlogix. A little effort of mine took my team to the final of the tournment but due to an immense pressure, I lost the decider set of the final match and our team ended up second in the tournment, although it was predicted that our team would not qualify for the quarter finals as well. :)

I spent a night at Techlogix to complete one of the user story, in which we had to handle the free rotation of tools drawn by user at design time of InteractX. I enjoyed and learned a lot working in this application and mainly on this particular user story. A lot of basic mathematical calculation was used in it. The main problem was that the CDC class of MFC does not support any angle. The bounding rectangle, which can be scaled and translated in the client area, is drawn by 3 general parameters namely, top cornor point, width and height; and there is not support for rotation; so I had to implement a wrapper over it which would provide:

ROTATION: draw a lollypop(also called rotation gripper) above the bounding rectangle to provide free rotation,

SCALING: handle the cornor masks so that it can be easily scaled up or down without altering the shape of the contained object,

TRANSLATION: translate the object and bounding rectangle anywhere in the client area.

I joined Tricastmedia Pakistan (Pvt) Ltd in July 2007 as a Software Engineer and my team mate changed from Haroon Saeed to Usman Qutab. So in other words, no difference occured in the team environment. :D
Tricastmedia took a sports gala trip to the northern areas of Pakistan and I fully participated in the event, by scoring quick odd runs in couple of matches which helped us to go to the final of the cricket tournment via run rate rule. Though we lost the match but I was the only one to take the only 2 wickets of the tournment champions which they lost in the final. Besides cricket, I scored the last goal in the football match which has made our chances to go to the final of the football tournment as well. The tournment was delayed due to rain and will be continued later this year.
Tricastmedia arranged Most Paindoo Day in office. A paindoo is a person with countryside background and has been living in modern city but is still not influenced by its atmosphere. I participated fully, and got the first prize. :D
I received a Gold Medal for academic achievement in BSc(HONS) in Computer Science from PUCIT, University of the Punjab. My office celebrated the occasion and congratulated me.

My little most brother underwent a plastic surgery of his ears in Rawalpindi. I went there to stay with him for his care, and it was a great trip.

At Pakistan Level:

The year 2007 began with Eid-ul-Azha and enjoyment for all.
 First suicide bomb blast for Pakistan occured in January 2007 and many followed all year in different locations.
Brutal murder of Zille Huma, who was the Punjab Minister of Social Welfare and was killed for “not adopting the muslim dress code”.
The “Samjhoota Express”, a friendship train between Pakistan and India was blown up.
Pakistan participated in cricket World Cup 2007 and got out from it after a shameful defeat from Ireland. Australia won the World Cup third time in a row.
Bob Woolmer, Pakistan Cricket Team coach, died on the day following the defeat from Ireland. The reason of his death is still under question.
Inzimam-ul-Haq retired from oneday cricket and Shoaib Malik became the new Pakistan Cricket Team captain.
Lal Masjid incident.
Chief Justice of Pakistan incident.
May 12 mayhem in Karachi.
“Khuda ke liye” released last year which faced many protests.
Extremism in North and North-Western areas of Pakistan.
Nawaz Sharif, chairperson of PML(N) and 2 time prime minister of Pakistan, returned after 8 year exile, but was sent back from the air port. He then came back again for general elections.
Pakistan participated in the first Twenty20 International WorldCup. Shoaib Akhtar, Pakistani pace bowler, set another example by using bat against own team mate Muhammad Asif, and was sent home. Pakistan performed well and due to brilliant efforts of Misbah-ul-Haq reached the final of the tournment and ended up as runners up.
Misbah-ul-Haq continued his brilliant performance in all forms of cricket. He was aggressive in T20, moderate in 50 over game and was the most defensive in Test matches from Pakistan.
Police action in Geo TV office in Islamabad.
Government banned some channels and Geo is still banned.
Benazir Bhutto, chairperson of PPP and 2 time prime minister of Pakistan, also came back after a self-exile for the general elections and was welcomed by a couple of bomb attacks.
Emergency was imposed in Pakistan, and all parties’ activists were being held. Imran Khan was arrested after IJT students in Punjab University beat him and gave him to the police.
General Pervez Musharaf retired from the post of Chief of Army Staff and became President, after long delays by Supreme court.
Pakistan Cricket Team lost to India in India after a decade or two.
Assassination of Pakistan’s most famous artist, Gulgee, took place.

Benazir Bhutto was killed during his election campaign and investigation is still under process.

Overall, for Pakistan 2007 can be called a year of anger and angst as explained in All Things Pakistan. Lets hope the new year 2008, bring relief for the people of Pakistan and happiness for all of us. May Allah bless our country and us (Ameen).


Nvidia Named Forbes’ Company Of The Year 2007

December 31, 2007

Graphics card manufacturer Nvidia has been named by financial magazine Forbes as its 2007 company of the year.

Nvidia’s graphics cards are now the most expensive part of high-performance PCs. Gaming fanatics will frequently supercharge a $1,200 desktop from the likes of Alienware, a Dell subsidiary, with another $1,700 worth of Nvidia graphics chips. The Santa Clara, Calif. firm has 62% of the market for desktop PC graphics cards, up from 57% a year ago, according to Mercury Research. Its archrival ATI stumbled badly last year in the two-company horse race for technical superiority and was bought by chipmaker AMD for $5.4 billion. In a PC industry racked by deflation, Nvidia has managed to increase its gross margin from 29% in 2004 to a current 46%. In the fiscal year ending in a few weeks Nvidia will gross $4 billion, up 33%, and net $900 million, up 50%. Since Huang took the company public in 1999, Nvidia’s shares have risen 21-fold, edging out even the mighty Apple over the same time period. Such accomplishments, over the last 12 months and the past five years, earn Nvidia the title of FORBES’ Company of the Year.