Monday, June 27, 2011

TeXnicCenter and Adobe Reader 10

I have recently installed the free TeXnicCenter IDE for working with LaTeX documents. It is a nice frontend. However, getting it to produce PDFs and preview them in Adobe Reader 10 wasn't a breeze. I easily found help on how to configure it to produce PDF documents on some forums (google around, if you're stuck at that stage). But the preview was broken. I would get failure when the DDE command was run. Adobe Reader would open but sit at it's main splash screen.
I opened Adobe Reader's preferences (ctrl+K) and set the "Show splash screen" (not sure if that one helped), and unchecked "Enable protected mode on startup" on the "General" tab. That solved the problem.

Saturday, February 26, 2011

A very good resource

A very good resource for interesting problems and their efficient solutions.

Friday, October 08, 2010

Air quality

Space and Upper Atmosphere Research Commission (SUPARCO) has this Air Quality Monitoring program. I've been seeing a truck parked between the girls hostels and faculty apartments at LUMS for several days. A couple of days ago, it moved to a different place on campus, between REDC and the physical plant.
The quality being monitored is neither "space" nor "upper atmosphere." I wonder how they can justify the millions spent on that truck. Maybe they have more of those. I'm glad they're doing it, but I wonder if it will result in some positive impact. It makes no sense, however. I'd be happier if the EPA or some such agency were doing this work, and SUPARCO were concentrating on what their real job is.

Thursday, October 07, 2010

German muslims

I agree with the German premier on this. What she and most others don't know is that according to Islamic sharia, obeying the law of the land is part of one's faith. And unfortunately, most muslims don't appreciate this either.
So, muslims in Germany should follow the law of the land. If they find it in contradiction with Islam, then they can either legally influence rationalization of the laws or migrate somewhere else.

Accountability

The whole point behind accountability or any law for that matter is to maintain a balance in society. That is the whole point that our premier forgets when he wants us to leave Mush to himself. That is the point that he forgot when he let him go. They had other stabilizations in mind. Society can go to hell.
Sure, try all the past culprits. By all means. And not just the corrupt, the killers, too. But here's one example that we could have set. Here's one example that would've set the stage for accountability in days to come. Here's one example that would've deterred the worst of plunderers, and yet, we should leave him to himself. To borrow from "Scent of a Woman"
What a shame! What kind of a show are you guys puttin' on here today....

Tuesday, October 05, 2010

Addendum

I wanted to post one more photograph from the Namal trip mentioned in my earlier post. This is relevant because Mr. Umar Suleman (extreme left) was not visible in any of the photographs I had uploaded earlier on. The reason was obvious. He had taken all of the photographs that I had uploaded in the said post, himself.

Friday, October 01, 2010

Reality or perception

I was thinking last night. What is reality? Whatever is "really" happening anywhere in the universe has only one reality, right? And yet, different people will perceive the same situation differently. They will debate over it and give convincing arguments about it. Are they all correct? Are their multiple realities? It can't be, unless their are simultaneous overlapping, yet parallel universes, each with it's own reality.
ARGGGGHHHH, I'm confusing you, right? Let's take an example. Two cars collide on a Pakistani street, something really common. One incident, one reality. The two drivers will disagree and present their own version of reality. But there is only one "true" reality. One side note: both drivers could be arguing for a false version of the reality.
Why does this happen? Bias! All of us have our biases, no matter how neutral we may claim to be. Our biases make us perceive reality differently. Enough philosophy. Let's leave it at that.

Mobile Internet and the trouble with filtering

You might recall some recent attempts at Internet filtering in Pakistan. You might also have heard that some users reported were still able to access the blocked websites even though PTA had ordered ISPs to modify their access control to restrict access to these sites. You might also recall the complaints that Blackberry users made about Blackberry browsing not available at all. Why did that happen?
Well, Blackberry devices use what is known as Blackberry Internet Services (BIS). The device does not fetch the Internet resources using the service provider's network (such as Telenor or Mobilink). It sends the request to RIM's (the company that designs and makes Blackberry devices) servers. These servers fetch the resources for the device, does any preprocessing that may be required and compresses the response before sending it back to the device. Everything travels on the Internet, sure, but you can't do anything about it, because the requests are not destined to any "blocked" website. All you can do is block all access to RIM's servers, resulting in a complete blackout of Blackberry Internet access.
A similar approach is taken by the Opera Mini web browser, which is resident on most cellular phones. The Opera Mini web browser sends web requests to Opera's servers, which fetch the resources, preprocesses and compresses the resources before sending them down to the cellular phone. Again, can't do much about filtering such web requests, unless you block access to Opera's servers altogether, which would mean total blackout for Opera Mini's users.

Thursday, September 30, 2010

Saving simulation results

Recently (now that's a big lie, but, oh, well...) I've been running long running simulations on a remote machine. I used to connect to it using an SSH client. The trouble was, that due to intermittent faults in our Internet connectivity, the SSH session often gets disconnected. When it does, the simulator process is history. I couldn't see what output it produced to the console, because there isn't any console anymore, and the process itself is killed due to the sad demise of its parent.
So, one solution suggested to me by my advisor was to prepend the simulator invocation command by "nohup" and append an "&" to it. That will ensure that the simulator keeps running even if the SSH session dies. I put in statements to write simulator results to a file. Now I can periodically poll the simulator using a "ps aux | grep" command and when I see that the simulator is no longer working, I can access the results in the results file.
A neater solution was suggested to me by my collaborating researcher in the US yesterday. He advised me to start a VNC server on the remote machine using the command "vnc4server :x" (where x is an integer) and then use a VNC client to access an xWindow session on the remote server. You just need to point your VNC client to "remotemachine:x" (where remotemachine is either your remote machine's IP address or DNS name, and x is the same integer used in the vnc4server command). This is much neater.
But the story doesn't end there. I had an interesting problem. My VNC client keeps telling me that "no password configured for vnc auth." I kept scratching my head and noticed that there is nothing in "$HOME/.vnc/passwd." At that point, I sought help from my collaborator who told me that we're running out of disk space on the remote machine. I deleted several debug files from my home folder and that fixed the problem. Now that was hard to figure out. No error messages and nothing to suggest that it could be a disk space issue.

Enthusiasm

During my recent trip to Namal College, I learnt quite a few things that I've been wanting to blog about. Some of them, I've already covered, and others I will cover in this and some future blog posts.




This post is about the excitement and enthusiasm that I saw at Namal College. The student's excitement is quite obvious. Some of them probably couldn't have continued their education, had it not been for Namal College. You see, Namal College waives all or part of the students' fees on a need basis, and focuses on remote areas where education is really lacking. Namal itself is in such a locality, making it accessible to a large section of the higher education deprived community. But I'm drifting from the point, here.
Like I said, the students are really excited. One of them was telling us that when he first came to Namal College, the other batches were on vacations and their was not much activity on campus. After his first visit, when he went home, he complained to his parents that they had sent him to a place where he feels really lonely. But when he returned from that visit, the older batches had returned. The activity on campus excited him and he no longer wants to go back home. Many undergrads at other institutions also share this sort of feelings, but I found that the level of excitement at Namal College was quite high.
But that's not all. It's not just the students at Namal College who are excited about it. The feeling is shared across the board all the through the staff, the faculty and the Board members. The senior most faculty were telling me that due to malfunction in the water supply system, the previous day they had carried buckets full of water to the dorms, and washed them with wipers themselves. I can relate to that kind of enthusiasm, because I had my first job at the Department of Computer Systems Engineering, N.E.D. University of Engineering and Technology, right after it was formed. Nothing was on the ground, just like Namal College. No processes were defined. We felt no separation between ourselves and clerical and janitorial staff members. We worked shoulder to shoulder with them, never shying away from laborious work nowhere in a faculty member's job responsibilities. Now Namal's situation is amplified over ours. They have higher bars to jump over, simply because we were in Karachi, they are at Namal and because we were part of a larger university, and their university is only as big as they are. Everyone there is ten times as enthusiastic as me and my colleagues were at the Computer Systems Engineering Department at N.E.D. You should go and see them. You'd feel the urge to share the hard work with them.
In addition to being incredibly excited, the students at Namal College are really intelligent. They area also not shy and come forward with their questions to you and you wouldn't be able to leave them without a satisfactory answer. Some people would be surprised to see that kind of openness and sharp intellect in students coming from such remote areas where primary education is, supposedly, really lacking. But, the reason Namal was envisioned was the abundant presence of such brilliant minds in the remote areas and the relative shortage of higher education facilities for them.
Namal College has progressed very rapidly. I wish them plenty of success in the future and pray that they realize their dreams.

Monday, September 27, 2010

Van powered by CNG

On yesterday's trip, we traveled on a rented chauffeur driven, Nissan Caravan. I didn't get the make year, but here's the interesting thing. The 9-seater van was running on CNG. That, with the airconditioner running full speed ahead. For a vehicle on CNG, it was running quite well. We could never have guessed its fuel source, until the driver stopped at a rest stop on the motorway and headed towards the CNG station. We thought such vans were almost invariably on diesel. I guess rising diesel prices have made the switch over to CNG cost effective. For a CNG-driven vehicle, it was running pretty nicely.

Speed breakers on Lahore Ring Road

I had earlier blogged about the dangerous U-turns on Lahore Ring Road. Yesterday, during the trip to Namal College, I noticed something else. This time, unlike my previous outings on the Ring Road (on my way to Sialkot), we did not get off the Ring Road near the Ravi bridge to head on to GT Road. Instead, we went on towards the Motorway. We were obviously travelling fast when all of a sudden the driver noticed a speed breaker. He braked hard and managed to avoid a dangerous take off. We noticed several speed breakers along the way on our return trip at night. Wouldn't these cause road safety issues? I know that otherwise pedestrians would be endangered, but they aren't using the overhead pedestrian walkways anyway, and not adhering to crossing the road near the speed breaker.

Meeting with a celebrity

I was teaching a class at N.E.D. University when I touched upon the matter of priorities and keeping things within the limits that they deserve. For instance, there could be a really great actor, you might really like him/her for the wonderful acting. But don't take it out of proportions and make a god out of it. Don't idolize him/her and start imagining that he/she is all good and no evil. More importantly, don't disrupt your own life over him/her. Studies, work etc all should have priority over that cricket match, or that movie.

A student of mine at that time asked me, "Sir, who's your hero?" My hero, I told him, are my students. Nothing pleases me more than seeing them go out in the field and making a name for themselves and making achievements. I stand by that thought to date.
However, there is one person who I really really regard highly. I met the great Khan himself in person yesterday. It's obviously not Genghis Khan, and definitely not your favorite lollywood Khan. I don't give a rat's ass about the latter. It was Imran Khan.

A few of my friends have been working with Namal College, an affiliate college of the Bradford University. There were several obvious ways in which we could help Namal College. The first, is by assisting some of their relatively less experienced faculty members with academic planning. The second, is that all of their faculty members are bound to enroll in a PhD program at Bradford University, we could help them gain from whatever experience we've had being graduate students. Thirdly, we can help Namal students capacity building by offering workshops, seminars and guest lectures. A group of my fellow PhD students at LUMS have been contributing towards at all of these efforts. I've also contributed a little bit. I think we are trying to do a little bit of our dutiful contribution to society.

Namal College faculty and administration have always shown a lot of gratitude to us for working with them. Recently, Namal College joined the Cisco Networking Academy program, and launched Bachelors degree programs in Electrical and Electronics Engineering. Yesterday, they had the launching ceremony and we were
invited.



So, four of us set off from LUMS at 8:30 am. On the map, LUMS is the marker A and Namal College is the marker B. I haven't highlighted the route, but we took to the Lahore-Islamabad Motorway, M-2, exitted at Balkasar interchange and headed through Talaganag on to Namal. It took us about 6 hours and thirty minutes to get to Namal. Along the way, the inflight entertainment consisted of screening of the movie, "The Pink Panther" on Zeeshan's laptop.


Along the way, we ate at a restaurant, which is said to be famous for its daal. Rumour has it that whenever Imran Khan travels on that route, he eats at this restaurant. Well, he was obviously not there when we arrived because he'd be busy with meetings at Namal College at that time.

Well, we had our daal and ate it, too. In this photo, you can see me and Junaid on the right handside and Zeeshan flanked by the driver (the latter enjoying a smoke). This, by the way, is several "garaibees" after our arrival.

The daal itself was tasty and the desi ghee tarka on top was amazing. Towards the end of the meal I discovered that the achaar served along with the daal went really well with the daal.

After doing justice to the daal, we went on to add our fellow PhD student, Malik Jahan to the caravan. Malik lives in the area. We stopped at a Masjid and prayed zuhr. It's fun having to pray only two rakat when traveling.

After the prayers we went straight to Namal College. When we arrived, we were greeted very warmly by the Vice Chancellor, Deputy Vice Chancellor, Director Administration, Faculty members and Namal College board members Dr. Arif Nazir Butt, Mr. Abdur Razzaq Dawood and Aleema Khan (Imran Khan's sister). While we were having chit chat with the Deputy Vice Chancellor, talking about our trip, the great Khan emerged out of the conference room. It is hard to describe his charisma and how one feels humbled in his presence. For a moment, I couldn't decide if it would be fitting for a mere mortal like myself to say Assalamo alaikum to him, but I did. Dr. Arif Nazir Butt introduced us to Imran by telling him that we were the LUMS students who have been working with Namal voluntarily. Imran immediately smiled and shook our hands, said Assalamo alaikum and asked us how we were. I had been imagining how shaking his hand would be. I had been thinking if I'd say to him, "A great fan." But I think that is meaningless. He doesn't need to know that. It's already understood. What did that handshake feel like? Was that a soft hand or a tough hand? Funny thing is, I can't remember it at all. The awe was all too much.

After that, he went on to do a press briefing before we all went to the canopy where the launching ceremony was to be held. There was a lovely breeze which sometimes managed to squeeze its way into the canopy. It was a bit warm in there and I was sweating slightly, but it's funny how I never noticed that until later. I guess I was still too awestruck.

After recitation from the Holy Quran, Dr. Irfan Awan, Vice Chancellor, Namal College delivered an introductory speech. He told the audience that Bradford University had other affiliate colleges, but Namal College was the first affiliate college established at an under-developed location. He talked about how this presented a unique opportunity to deliver education and transform the lives of people of rural areas. He mentioned that being an affiliate college meant that the college's operation as well as student assessment and performance was monitored strictly by Bradford University. He gave credit to the students for having stood out in this scrutiny by mentioning that Bradford staff had found Namal students to be at least at par with Bradford students and in some cases, even better.



Dr. Lucas, Deputy Vice Chancellor at Bradford University was the next speaker. He spoke instead of the Bradford's Vice Chancellor, apologizing on his behalf for not being able to attend the ceremony himself. Dr. Lucas echoed Dr. Irfan's praise of Namal College and it's students' performance. He said he wished if Bradford were at as picturesque a location as Namal College is. As you can see in this photograph, he wasn't exaggerating. The Namal Lake is right next to the Namal College.


Dr. Aamir Mateen, Country Manager, Cisco Systems praised the Namal College for its vision. He said that while his company had been a bit late to join the effort, he would do everything in his powers to help Namal College realize its vision. He promised to convince other major IT companies to enter into similar partnerships with Namal College. He also promised to assist Namal College students with internships at Cisco and other IT companies where he had personal or professional leverage. He also promised to help Namal College by sending Cisco employees to deliver guest lectures every once in a while, an offer he claimed that he had not made to any other Cisco Networking Academy in Pakistan.

As the Master of Ceremony put, next was the man himself. Imran Khan started by thanking Cisco for entering into a partnership with Namal College. He thanked Dr. Amir for taking personal interest in Namal College and for the promises he had made to help it. He described the vision of Namal College and thanked the Board members individually by name. He also thanked Dr. Arif Nazir Butt for all his efforts for Namal College. Can you guess whom he thanked next? He thanked us, the LUMS students who have been helping Namal College voluntarily. He wondered where we were in the audience and asked us to raise our hands. We complied to a big round of applause. Imran went on to thank the local people who had helped his vision by offering the land on which Namal College was built. He spoke of the plans for the college's future and how it was destined to nurture the future leadership of Pakistan.

After Imran's speech, the audience were requested to proceed to tea. Well, it was more than just tea, it was a quite proper lunch, if you ask me. I'm sure many delegates would have traveled to Namal College that day and it must've been a welcome sight for them. As for us, we'd already had lunch. After tea, Imran Khan talked a bit more to the media and was then surrounded by the students. He walked around with them and talked to them.






Meanwhile, we took a few photos. The first one shows the radio link tower put up very quickly by PTCL to get enhanced Internet bandwidth to Namal College, which will be quite useful for the Cisco Networking Academy program. The next photograph shows the main entrace to the College building. Imran Khan is standing in front talking to some students. The next picture shows us with Dr. Arif Nazir Butt (wearing the jacket) and Mr. Abid, who is a very hard working part of Namal College, Imran Khan Foundation and Shaukat Khanum Hospital. The last picture, of course, is us, with the Namal Lake in the background.

At 5:30 pm, we set off on our return to Lahore. We prayed asr at the same mosque where we had prayed zuhr. We, then said good bye to Malik Jahan who returned to his house nearby. After various stop overs for CNG, saying maghrib prayers and another stopover for a cup of tea, we arrived back at LUMS at about 11:45 pm.

We decided that it was too late to go home and wake someone up for dinner, so we decided to dine out. We went to the Red Apple restaurant at DHA, Lahore and had dinner together while watching news on the restaurant's TV. We then said good bye and went our separate ways home.

Boy it was quite a day. A day when I met a celebrity and shook hands with a hero who wasn't my student. Going isn't particularly easy for us Pakistanis to make achievements. However, when a Pakistani makes up his mind to do great things and works hard against all odds and is successful, I believe he/she should be appreciated. Especially if the success touches other people's lives and makes them somewhat easier to live.

I ask myself, will I see him again?

Friday, September 24, 2010

A monument with a stellar cost

According to this article, the Government of Pakistan has approved construction of a monument in honor of former Prime Minister, Benazir Bhutto. The cost is estimated at $11 Million.
According to a Daily Times news Item, the construction of the monument was challenged in Lahore High Court. Spread the word and advocate public opinion against this total waste of money at a time when the Government talks about austerity, the poor man is struggling to feed his family and one in every eight Pakistani is made homeless by the recent floods.

A new take on web searches

Well, it might not be new, but is as far as my limited knowledge is concerned. This report on Dawn points out that several search engines have sprung up on the web that are geared to not provide search results containing indecent content. These search engines are gaining in popularity and are developed and used not just by muslims but by people from other faiths as well.

End of a long tour

Pakistan team has returned from a four month long tour of England. Several things stand out from this tour.
I think that the first noteworthy point is Afridi's incompetence at captaincy. He's been in and out of captaincy and he's been playing cricket for a long time now. He should've learnt his lessons by now. Granted Pakistani fielding is not good, but he has thrown away bowling advantage over and over due to defensive tactics. Time and again, when the batting side can be taken under pressure, he has applied defensive tactics, concentrating on saving runs instead of attacking to take wickets.
Second, I think Shoaib Akhtar staged a nice comeback. I didn't expect much of him, but he bowled well out there. For the first time, I am of the opinion that he should be included in the side consistently. I think he has shown signs of maturity.
Thirdly, no need to even mention the childishness and unreasonably defensive response shown by Pakistan Cricket Board over reactions to as yet unproven match fixing allegations.

Upcoming Microsoft community events in Pakistan

Microsoft is bringing a community event to Pakistan. It is called Open Doors. It will be held in Karachi and Lahore next month, i.e., October. I'm contacting the source to update the dates, which seem to have changed (based on inside information). Stay tuned!
The idea behind Open Doors is to bring Microsoft Professional Developer Conference (PDC) and TechEd quality content to a wider community's doorsteps.

Research Assistant Position at LUMS

I received this advertisement today. Contact the mentioned email if the opportunity interests you. Pasting the adv below:

Research Position in Computer-Aided Diagnosis (CAD)
For a collaborative project with Dept. of Radiology, Shaukat Khanum Memorial Cancer Centre, we are seeking a highly motivated RA or Student RA to develop image processing and computer-aided diagnosis algorithms.

The ideal candidate will demonstrate a strong aptitude for problem solving in 3D image processing, along with a capacity to grasp the medical significance of this project. Highly motivated candidates lacking experience, but showing a keen willingness to learn, will be considered.

This is a compensated position, and demands at least a commitment of 20 hours per
week, and the ability to travel to SKMCC as required.

Pre-requisites: Willingness to learn or knowledge of programming and the basic notions of image processing. Excellent written and verbal communication skills.

Familiarity with human anatomy, computerized tomography or image processing will be
a plus.

Interested candidates should email their CVs to Dr. Usman Qazi, Biology,
(usmanqazi@lums.edu.pk) or Dr. Sultan Sial, Mathematics (ssial@lums.edu.pk).

Thursday, September 23, 2010

Upbringing

I visited Dr. Iftikhar Waris' homeopathic clinic, Gulberg Homeopathic Clinic in Gulberg, Lahore, yesterday to get some medicine for my three years old. Whenever I go there, I see some interesting characters who are obviously living in some other country within the one that I live in. Women with short and see-through clothes are abundant. Dr. Iram Hassan's Hassan Medical Center beats Dr. Iftikhar's clinic, though. But that's besides the point.
Anyway, back to the point. A family came in as we were waiting for the medicine to be prepared. They had two servants to take care of their one and a half year old son. One was your typical mulazima, whose only duty was to tail the kid, pick him up if needed etc. The other one was probably looked like she belonged to the Phillipines. The way she interacted with the child in English made it quite obvious that she had been employed to teach him good manners typical of the western nations and missing in us uncivilized Pakistanis. I can personally relate to their concern for a spoilt child.
The climax, however, was when I discovered that their attempts at "the cure" weren't working for them either, just as mine aren't working for me. When the boy started protesting and crying over something, nothing worked. Neither the gentle words in English from the foreigner, nor the desi mulazimas words of love. I could not tell a difference between his behavior and that of my daughter when she was his age. Unfortunate! Well, I didn't have to spend as much as they do over a child that embarrasses you with his/her misbehavior in public.

Oh, the games they play

Mismanagement and corruption is a real menace. It is sad to see that an international games event, the Commonwealth Games is in such a huge mess. All this while, the powers that be had apparently been sleeping.