October 2, 2006 at 6:09 pm
· Filed under Misc
Some inspiring words I came across:
[http://www.paulocoelho.com/engl/dow/River.pps]
“To be like a river that flows
silent through the night
not fearing the darkness and
reflecting any stars high in the sky
and if sky is filled with clouds,
the clouds are water like the river, so
without remorse reflect them too
in the calm deep”
- Manuel Bandeira
Permalink
March 30, 2006 at 3:44 pm
· Filed under Misc
Softec this year was much more than a programming competition. It was a great learning experience for me! I’ve divided the entire visit into several segments.
The FAST Lahore Episode:
On day 1, we were only able to solve 1/5 questions which was pretty bogus as most of the other teams got 1 too! Some even got 2 and 3 so the test day didn’t work very well for us. Actually the test day was very helpful for a warm up and we made full use of that. On second day, we heard that there were some internal problems due to which the 5-hours competition which was supposed to start at 9:30AM actually started at about 1:00PM. The competition was intense with about 50 teams from all over Pakistan and India. We clinched first position by solving 5/9 questions. LUMS came second with 4 solutions and PUCIT came third with 4 solutions as well.
We had fourth position in the first-ever competition we entered in Procom 2005 (FAST Karachi), third in Softec 2005 (FAST Lahore), second in ProQuest 2005 (ACM-KU) and finally first in Softec 2006!
Permalink
February 21, 2006 at 11:31 pm
· Filed under Misc
I’m taking an AI course this year and we have started to study some algorithms which will involve graph and tree traversals. For starters, we were given a very stripped down version of the travelling salesperson algorithm to work out in C/C++/C#/etc. The graph is undirected and each city can be visited only once, the salesperson must start from A, visit all cities and come back to city A. The values along the paths are the cost associated to the travel to each city. The task was to devise an algorithm which would compute all the possible paths and would give the total cost of each route. I devised a generic solution (it still can’t do city repetitions and it assumes that all cities are to visited). The first algorithm was aimed at solving the problem at hand and was a quick and dirty solution to get the job done. It wasn’t thread-safe and it used fixed-size data structures. The output was as follows:
ABCDEA - Cost: 940
ABCEDA - Cost: 920
ABDCEA - Cost: 920
ABDECA - Cost: 995
ABECDA - Cost: 875
ABEDCA - Cost: 970
ACBDEA - Cost: 975
ACBEDA - Cost: 930
ACDBEA - Cost: 930
ACDEBA - Cost: 970
ACEBDA - Cost: 910
ACEDBA - Cost: 995
ADBCEA - Cost: 880
ADBECA - Cost: 910
ADCBEA - Cost: 855
ADCEBA - Cost: 875
ADEBCA - Cost: 930
ADECBA - Cost: 920
AEBCDA - Cost: 855
AEBDCA - Cost: 930
AECBDA - Cost: 880
AECDBA - Cost: 920
AEDBCA - Cost: 975
AEDCBA - Cost: 940
Smallest Cost: 855
After that I redesigned the solution to be thread-safe and more organized with lesser hacks. I still have to incorporate a bunch of features. Here is what the header of tsp3.cpp reads:
// TODO:
// MUST VISIT: allow user to Nodes.mustvisit (char) for nodes that MUST be in the solution
// ALLOW REPEAT: a flag which tells us if cities can be revisited to find the most optimal solution
// TRAVEL: Nodes.Travel(src,dest) and take into account MUST VISIT and ALLOW REPEAT and give possible solutions
The solution I designed inherently supported directed and undirected graphs so that is one less thing on the TODO list.
Permalink
January 24, 2006 at 9:08 pm
· Filed under Misc
We’re doing a AI and Robotics Workshop under IEE NED Chapter. Uvais bhai was generous enough to leave his Lego Mindstorm kit with me so I could mess around with it. He has an extra RCX 2.0 module which he has borrowed from Basil (another cousin, 10 years old).
Here are the first two vehicles I have designed. The bigger one will be the star of tomorrow’s workshop! It is fitted with two light sensors which help the vehicle steer through a black line. The second one is fitted with two touch sensors and is programmed to simply reverse the direction of motors to forward and backwards upon touching a physical object.
Lego Mindstorm is very simple and it is extremely intuitive. There are a number of cool plugins available for Lego, such as a Video camera and a bunch of other sensors. The only drawback is that it has very few input and output ports. Although they can be stacked but I couldn’t see any way to multiplex them using available parts in the kit. I don’t have a user manual handy.
Playing with Lego Mindstorm reminded me of the good old school days when I used to play with the DC motors, make my own portable fan and small gadgets and of the good old Meccano which I received on a birthday. I designed so many things using it… once I tried to use my toy car’s motor to drive the pulley in a lifting truck I designed using meccano but the motor couldn’t take the load. I wish I had my digital camera then or maybe there will be a device in the future which will let me capture an image of whatever I have in the mind! Well, it does exist in Star Trek! I guess I’ll have to order one from Starfleet.
Permalink
January 1, 2006 at 2:46 pm
· Filed under Misc
“The busiest people I have known in my life always have time enough to do everything. Those who do nothing are always tired and pay no attention to the little amount of work they are required to do. They complain constantly that the day is too short. The truth is, they are afraid to fight a good fight.”
Page 51 of Pilgrimage, by Paulo Coelho
Permalink
December 9, 2005 at 9:30 pm
· Filed under Misc
Sharah-e-Faisal at 8:50a
|
Mr. Aseel is presenting TechNet
|
Seat shortage! People (uncle-type!) are standing in TechNet
|
Chad is literally throwing away T-Shirts!
|
We had some fun on the stage!
|
Munir’s first seminar! LOL!
|
Permalink
December 8, 2005 at 10:02 am
· Filed under Misc
CIS is now offering wireless network in all the labs and I’m enjoying 100KBps downloads!
The wireless network added a special touch to our Software Engineering project presentation today. We presented our software ‘Video Teleconferencing’ for final review today which is developed using C# and SQL Server 2005. I demonstrated how a teacher could deliver a lecture to remote audience while enjoying a walk in the corridor! There is a wireless router in all the labs and moving from one lab to another does not break the connection however it deteriorates significantly, we can always switch to the wireless connection of that particular lab in such a case. I’m thinking of all I can do with wireless connectivity and blazing fast internet…
Permalink
November 24, 2005 at 2:01 am
· Filed under Misc
… i’ve been training myself for this murder for a couple of months now. I have been paid in advance and I know the exact date and time when it has to be done. I’m too confident that I possess all necessary skills to get the job done with minimal effort.
Finally, the showdown is tomorrow and I’m sitting here loading my guns and practicing my aim when I realize that my aim has gone all rusty and I couldn’t even aim to a half meter diameter around the target. A series of thoughts went blazing through my mind; should I make backup plans? should I try to invent some device which could slow time for everybody else except me so I’ll have more time to practice my skills to get it right? should I just give a go in a hope that it’ll all work out well? I practiced really hard during the night to get the groove back. I’m pretty convinced that I wasn’t able to slow up the time for everybody but I believe I did manage to speed it up for myself, as I was able to cover huge grounds in little time (from the external frame of reference, of course!).
Its morning now. I have done all that I could and now its time for the ultimate showdown. I reached the predetermined place on schedule and took my position. The arms and ammunition I carried passed away the sensor network but I had to throw away a device which would help me in aiming. Well, its all instincts now! Its a do or die situation. One hit, one chance! I received intelligence earlier in the morning that if I am unable to put my target out of commission, it’ll be curtains for me! It is a bizarre situation of passion, courage and … fear.
The time is almost here. I have a total of three hours to complete my mission. The clock hits 9:30a and there I can see that my target approaching me. All kinds of thoughts occurred to me: just kill it, its a sitting duck; the easy outer cover could be a phoney and I need to be careful. I took my time and in about an 1.5 hours, the target was finaly in my clutches. As I am focusing on my prey, everything around me has gone invisible and silence is in full wrath. There is a very loud noise in the background which is extremely irritating and it took a while before I could reprogram my mind to filter out that noise so I could concentrate on what my instincts were whispering to me. I get to take this one shot only and I cannot afford to miss it! Everything is in order now, my mind is focused and the game plan is set and they prey is in my clutches. My alloted time for the job is almost over now and I must make a move NOW! Because if I don’t, I’d be a dead man.
There’s a vicious blow in the room, followed by a loud hurl which is heard all over the place… moments after, everything is silent and peaceful.
.
.
.
Lying before me is a murdered Database Management System paper!
I walk outside the room and wish the tyrannical semester would finish soon…
Permalink
November 16, 2005 at 2:54 pm
· Filed under Misc
Google has a new toy for us!
http://base.google.com/
Tariq bhai has put up a neat introduction on his blog.
Permalink
November 16, 2005 at 2:49 pm
· Filed under Misc
Get Google analytics for your blog. Its a pretty neat tool and of course its free!
http://www.google.com/analytics/
Permalink