Sunday, February 9, 2025

Reunion After A Decade

Everyone gathered around after a decade. All thanks to Baber for this effort. It is tough to find a place and time where everyone agrees. After a week of discussion with the class group, we finally reached The Canvas. 

A decade changes a lot. 

Everyone has grown up. We all were students in one class. Now someone is an entrepreneur, a team lead in a giant tech company, whereas someone has been a great mommy at home. But everyone seemed to win their lives.

  1. Muhammad Usman is now Usman Ajmal, works at Techlogix
  2. Baber didn't change, works at Huawei as a compiler engineer
  3. Hamza grew a beard, running his own company named PyFlow labs
  4. Ahmed Majeed's belly wasn't visible. Can't comment
  5. MOhammed AHmad PErvaiz still jokes about Sajawal and why he dropped Islamiyat. Ahmad visits Georgia every other week. No visa for people living in Dubai/Abu Dhabi
  6. Hafiz Asrar is same. لم يتغير شيء. Lives in Bahrain
  7. Apparently Imran Baig's eyes were still red for some kind of bloodshed. Luckily Salu didn't come
  8. Nauman Zafar is now within NaumanZafarWrapper
  9. Kamran Azmat still smokes and now is running his own setup
  10. Hassan Mujtaba has a gaming studio
  11. Anum works in Techlogix
  12. Rabbia has 3 beautiful daughters
  13. Hammad Khan has a YouTube channel
  14. Haseeb works with Baber and are bootstrapping their own company (MA)
  15. Usama is running his own company
  16. Kashif works at Techlogix
  17. Zillehuma teaches CS students

Wednesday, July 12, 2017

Disabling Some Argument In Shell Command (Linux)

To disable any shell command's argument, all you need to do is to add following code in any of the initialization script of your shell/terminal.
cats_dont_meaow() { 
  if [ $1 = "meaow"]; then
    echo "Cats don\'t meaow in parallel universe."
  else
    cat $*
  fi
}
alias cat=cats_dont_meaow
Thanks to https://cdn.meme.am/
Consider the application of the script in case you have cached your git credentials and you accidentally hit enter after randomly typing some keys that may become git push origin master. This function will save your gits (pun intended).
block_git_push() {
  if [ $1 = "push" ]; then
    echo "\"push\" is blocked temporarily to prevent volcano eruption."
  else
    git $*
  fi
}
alias git=block_git_push
Gist: https://gist.github.com/fahadsiddiqui/ecb81755ae19eb5add1fce17bf7c730a

Tuesday, July 11, 2017

Customize Your Linux Dude

How can you use Unity without any tweaking? Why don't you feel the need to change your desktop appearance? I think it is time for me to write something that can put a new cloth on your lets-not-touch-it-we'll-break-it OS. I know you fear. I know your fingers shake when you type sudo. I know you are a coward and think you will break something like apt-get or you will get like 374 error messages and 34 warnings next time you boot. Nothing is going to happen. Try these.

1. Numix
Numix is an open-source project having icon sets and appearances for Debian/Android for free. You can go to their website and install (its pretty straight forward). Just add their PPA
sudo add-apt-repository ppa:numix/ppa
For more information go to https://numixproject.org/.
To change the theme/appearance you must install some tweak tool first. I prefer unity-tweak-tool, easily available from default repository
sudo apt-get install unity-tweak-tool
You are good to go.

2. Hyper
Do you like the default terminal? That's okay. But I would suggest you to try Hyper once. Built on top of Electron (by Github) framework, Hyper provides you much customization. I mean who wouldn't want to watch a YouTube video on your BASH terminal just by pasting a YouTube link? Interesting? Okay, go for it then. https://hyper.is/
A word of advice, do install node package manager and node itself before installing plugins in your Hyper terminal. Hyper internally uses node.js to install its packages. It also has its own package manager named "hpm". Try these packages https://github.com/bnb/awesome-hyper.

3. Atom
I wouldn't suggest this if you are a geek. Sure you'd want VIM or EMACS. But if your pokemons are evolved, and you have heard of Sublime text, you should try Atom (by Github). Click https://atom.io/.

4. f.lux
Do your eyes feel tired working straight 8 hours a day? They should be, you are wasting them.
Try f.lux (https://justgetflux.com). The reason why I recommend everyone to use f.lux is the blue screen hazard. It blinds you over time. You should read the research over here https://justgetflux.com/research.html.
Installation instructions are pretty straight forward, you just have to install the application indicator and run some scripts. See https://github.com/xflux-gui/xflux-gui.
Another option for screen color temperature adjustment is redshift-gtk, but it sometimes goes too off while adjusting (too warm for eyes).

And for God sake, change the default wallpaper. Huh.

Tuesday, June 20, 2017

پرندے مر نہیں جاتے

قفس کی ان سلاخوں میں
جو صدیاں قید رکھتی ہیں
پرندے مر نہیں جاتے
نہ اڑنا بھول جاتے ہیں
نہ اڑنے کی تڑپ دل س
کبھی بھی ختم ہوتی ہے
خدا بھی دیکھنے والا
انھیں مرنے نہیں دیتا
اندھیرا کتنا گہرا ہو
انھیں ڈرنے نہیں دیتا
پرندے جانتے ہیں وہ
ہوا کے ایک جھونکے سے
قفس کو توڑھ ڈالے گا
پرندوں کی تو سنتا ہے
میں تیرا ماننے والا
تیری خلقت میں افضل ہو
میری بھی مانلے یا رب
میں خود کو توڑ بیٹھا ہوں
بہت امید ہے تجھسے
میں دنیا چھوڑ بیٹھا ہوں
(فہد صدیقی)

Wednesday, May 31, 2017

دنیا خواب سی ہو جاتی ہے

پیارے بابا عرصہ پہلے
تم نے مجھ سے پوچھا تھا
"بیٹا تم کیوں جاگ رہی ہو؟"
رات کی چادر اوڑھے دیکھو
سب کی آنکھ مے نیند ہے بیٹا
"تم کیوں نیند سے بھاگ رہی ہو؟"
اتنا سن کر
کالے بادل
رات اندھیری
پھر بھی تیری بات سے میری
آنکھیں بند سی ہو جاتی تھیں
بابا تیری پیاری بیٹی
گھوڑے بچ کے سو جاتی تھی
عرصہ گزرا
بابا اب وہ
نیند کی چادر
روز ہی رات کو کھو جاتی ہے
ساری دنیا سو جاتی ہے
بابا نیند سے پہلے میری
دنیا خواب سی ہو جاتی ہے
بابا میری
دنیا خواب سی ہو جاتی ہے
(فہد صدیقی)

Thursday, December 8, 2016

Clean Up Your Git Mess - 1

1. Want to stash uncommitted changes
git stash
2. No, the changes are not tracked (untracked changes)
git add . # all the changes in ./ directory (pwd)
git stash # now do this
3. Want to undo the last stash
git stash pop
4. Again?
git stash pop # its a stack, you got the idea
5. Want to clear the stack
git stash clear
6. Want to know more about stash? https://git-scm.com/docs/git-stash
7. You type password every time you need to push something on remote ref. It sucks.
git config --global credential.helper cache
8. Revert local head upto last nth commit
git reset --hard HEAD~nth
9. Take remote head to some commit because all the commits after this particular commit are wrong?
git push origin +:

Thursday, January 28, 2016

Scala Getter/Setter and BeanProperties

Scala provides automatic getter/setter functions for class data members After compiling this piece of code using Scala compiler scalac
scalac Foo.scala
Generates Foo.class file which we can disassemble using Java class file disassembler program javap https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javap.html
javap -private Foo.class
Disassembling class file shows
public class Foo {
  private int foo;
  public int foo();
  public void foo_$eq(int);
  public Foo();
}
Here we can see int foo() returns foo value and foo_$eq(int) assigns the value to private int foo (works like a setter). Which means we do not have to define private data member, getter and setter explicitly like;
private var _foo: Int = _
def foo_=(foo: Int) = _foo = foo    // setter
def foo = _foo    // getter
Instead, we can only declare
var foo: Int = _
On the other hand, Scala provides an annotation @BeanProperty which you can use to declare automatic getter/setter functions. To define a data member as a bean property you just have to write @BeanProperty before declaring member variable
import scala.reflect.BeanProperty
@BeanProperty var foo: Int = _
This should be implemented when you call Scala code from Java. Java libraries and APIs expect a class getter/setter function names as getMember/setMember. @BeanProperty generates these getter/setter functions too. That is why it is feasible to use @BeanProperty instead of simple public variable declaration when intermixing Java with Scala.

Monday, January 25, 2016

Playing with Scala - 1

Being a programmer, whats point in not learning a language that is a bit complex than others?

Being Scala developer from almost 4 months now. I admire its compact logic building and strong syntactical shortcuts. I didn't dive much into its functional part, but I would like to share some of it also.
  1. It has so many flavors; programmers having background in C, C++, Java, Python get easily familiar with its syntax
  2. Object-oriented functional language; unlike Haskell and LISP - that are purely functional and Java - that is purely object oriented language, Scala is everything! All in one
  3. Salient features of Scala are nicely described here http://www.scala-lang.org/what-is-scala.html
  4. Runs on JVM so Java classes in Scala can be freely mixed
  5. Highly scalable; works from your desktop PC to a thousand nodes cluster i-e; Intel, Twitter and LinkedIn use Scala in their clusters
  6. Unlike Kotlin and Ceylon programming languages, Scala decided to make "better Java" instead of staying close to Java and ultimately improving almost nothing in it except syntactic sugar

Monday, January 11, 2016

A Few Lessons Learned From 2015

I tried to sum up my mistakes I did last year. Some of them were pretty dumb, others made me embarrassed to the point I took decision to never repeat them ever. Some of them made me proud. Some of them made me think what do I have to be proud of? Some of the key points, I learned, are mentioned below;
  1. Being yourself doesn't hurt you
  2. Hurting people hurts you eventually
  3. Don't sleep too much
  4. Productivity increases late-night (after 1am)
  5. Trustworthy people never ask you to trust them
  6. People who want to be in your life wouldn't stay shut about it
  7. Don't focus on peoples' interests more than you feel like you should
  8. Work quietly and let your work speak
  9. Read books in isolation and feel them
  10. Stay sharp and ready for attacks other frame for you
  11. Don't get framed in others' problems, be smart to judge your surroundings
  12. Don't offer to help if you can't do it honestly
  13. Don't listen to those who want to be listened and never listen to you
  14. Don't be gender biased in public or group talks
  15. Select a few words and make up your wit-dictionary and use it over and over again till you make habit of staying away from slang
  16. Dislike what you don't like but never dislike what others want you to dislike. There is always something beneficial for you what others suggest you to dislike
  17. Don't talk unless you have a strong reason
  18. Don't change yourself to comfort others

Thursday, December 10, 2015

CSV Reading Error (Python)

Just encountered a very ambiguous error in Python while reading a .csv file using the csv library in Python.

The solution made me feel pretty dumb. That is why I am blogging this to remember. From: https://docs.python.org/2/library/csv.html This is the code snippet I was trying to execute to read csv file at path /home/superuser/Desktop/day.csv.
import csv
with open('./day.csv', 'rb') as csvfile:
  r = csv.reader(csvfile, delimiter=' ', quotechar='|')
  for row in r:
    print ', '.join(row)
Python shell was showing error,
AttributeError: 'module' object has no attribute 'read'
Which made me thing that I'm importing wrong csv library. May be this import csv isn't importing the correct CSV I need. I was correct.
But the solution was pretty awkward. I was saving my file as "csv.py" and my program "csv.py" itself was importing itself.
Renaming the script to some other name resolved this issue.
Thanks to bernie's answer here:
http://stackoverflow.com/questions/9711799/csv-module-attributeerror

Thursday, December 3, 2015

Raspbian on Raspberry Pi 2

Following are the steps you need to know before installation of Raspbian - a distribution of Linux for Raspberry Pi 2.
  1. Download image of Raspbian from https://www.raspberrypi.org/downloads/
  2. Linux
    If you are using Linux/Unix, you need to burn (copy contents from) this image file (.img) into the SD card using following sequence of commands,

    df -h

    To check the list of all the drives mounted into system. Figure out from this list what is the name of your device mounted into /dev/device_name. This device name usually ends with p0, p1 and so on, which indicates the partition indexing. Make sure your card has one partition, at the time of installation and configuration of Raspbian, it automatically partitions into necessary parts.

    Easiest way to figure out what is the newly mounted SD card name in /dev/*, simply df -h before mounting SD card into PC, and then plug and find the newly plugged entry record from df -h output.

    Make sure you unmount the card before burning image into it, by using

    umount /dev/

    Run following command

    sudo dd bs=1M if=[DISK IMAGE NAME] of=[FILESYSTEM]


    Here, in bs=1M means the size of read and write of the bytes at a time equals to 1 mega. Sometimes 1M works while burning the SD card. If this doesn't work for your SD card, try using 4M or some other sector size.
    Wait for a while and your card will be burned with OS.

    Windows
    Use Win32 Disk Imager software to burn the SD card .img.
  3. Plug SD card into Raspberry Pi and plug it to 5V power, plug LED on HDMI port, keyboard and mouse on USB ports
  4. You will be logged in to Raspbian
    Default username password combination is pi and raspberry respectively
  5. You can expand storage by using raspi-config on terminal after you log in to LDX

Monday, November 30, 2015

Display Bits of an Integer

To display bits of an integer you have to check each and every bit so if I have an integer i = 12, it has binary representation 0000 0000 0000 0000 0000 0000 0000 1100.

Lets do it with C++ code. C++ provides bitwise operators for but twiddling, you can simply perform bitwise OR, AND, XOR and other operations like bit shifting using builtin operators.

To check single bit of integer on bit level you need to access each of 32 bits in integer. This is achievable using & operator. & operator has property, the result comes 1 by applying it with two operand bits only if the two bits are 1.

This & is applied to all the bits individually in integer and answer is computed in form of another integer. So if you apply & operation between 2 and 3.

2 = 0000 0000 0000 0000 0000 0000 0000 0010
    &&&& &&&& &&&& &&&& &&&& &&&& &&&& &&&&
3 = 0000 0000 0000 0000 0000 0000 0000 0011
-------------------------------------------
2 = 0000 0000 0000 0000 0000 0000 0000 0010

By using same logic, we can create a mask to check if each bit is zero or 1. If mask is set to 1 and later on shifted on left on each bit check some of the mask check for a 4 bit number iterations are like 0001, 0010, 0100, 1000. So after 4 left shift operations and performing & operation on original number, this mask goes zero, which can be used as loop termination condition.

Non-recursive Solution in C++

    int number = 12, mask = 1;
    while (mask > 0) {
        if ((number & mask) == mask)
            cout << 1;
        else
            cout << 0;
        mask <<= 1;
    }


But there is an issue with this code, bit pattern will be printed in reverse.

    int number = 12, mask = 1;
    stack s;
    while (mask > 0) {
        if ((number & mask) == mask)
            s.push('1');
        else 

            s.push('0');
 
        mask <<= 1;
    }


    // print elements in stack

This way the bit pattern will be displayed correctly.

There is another efficient way to print in correct order by using an unsigned integer.

For this, consider the following code,

    int number = 12;
    unsigned int mask = INT_MAX + 1;

    while (mask > 0) {

        if ((number & mask) == mask)
            cout << 1;
        else

            cout << 0;
      

        mask >>= 1
    }

Now, INT_MAX gives 2,147,483,647 and by adding 1 to it make it equal to 2,147,483,648 that is equal to 2 ^ 31. That means the 32nd bit of the mask will be ON. Shifting it to the right till it becomes zero and performing & operation prints correct bit pattern of integer.

Note: INT_MAX is present in climit header file.

Recursive Solution in C++

void displayBitwise(int num, int mask = 1) {
    if (mask == 0) return;

    displayBitwise(num, mask << 1, ++count);
    cout << ((num & mask) ? 1 : 0);
}


To make this bit pattern more readable, make chunks by separating by space,

void displayBitwise(int num,
                    int mask = 1,
                    int count = 0) {
    if (mask == 0) return;

    displayBitwise(num, mask << 1, ++count);

    if (count != 32 && count % 4 == 0) cout << ' ';
    cout << ((num & mask) ? 1 : 0);
}


Here if count != 32 isn't checked, space will be printed after first backtrack call. count % 4 == 0 prints a space after every four characters. Good luck!

Friday, November 20, 2015

شگفتہ لوگ

شگفتہ لوگ بھی ٹوٹے ہوے ہوتے ہیں اندر سے 
بہت روتے ہیں وہ جن کو لطیفے یاد رہتے ہیں

Thursday, November 5, 2015

An Achievement!

Working on some embedded system modules that aren't touched by anyone in opensource community is a real pain in the ass. A few days ago, I was chewing nails over some failures in work. Problems that become hard obstacles are milestones for me. I seek pleasure solving problems because when you get successful solving a problem, it becomes clear to you that problem of such difficulty level can be resolved. After solving a few different problem sets from different domains, you start realizing that nothing seems impossible to you anymore. That is the lesson I learned from the recent work I am doing.

Main focus these days is embedding communication protocols in Arduino Yun (cloud in Chinese). I was stuck embedding C/C++ libraries with Arduino. Because I wasn't seeing the real picture and wasn't considering the fact that Yun is technically more capable than Uno (Arduino board I was previously working with in my college days).

Problem

Real problem arose when I started looking at the system as an incapable machine and tried to put responsibilities on myself rather exposing full functionality of board itself.

I wasn't been able to embed C/C++ libraries into Yun.

One thing to be considered while working with Arduino is concept of library. A library in Arduino is not some sort of embed-able unit with the binary file that is to be deployed in it. In Arduino, library is just a bunch of classes providing functionality. Not like .dll/.so (dynamic) or .lib/.a (static library) in C/C++.

Solution

By using the Arduino Yun's Leonardo side (a linux-based processor) running kernel of OpenWRT (an opensource light-weight distribution for Yun), you can use all functionalities of Linux system (almost).

There are multiple languages support in Linino (OpenWRT) like Python, PHP5, Bash (not a language after all).

So you can simple run Python scripts using python compiler inside Arduino, run Bash scripts, run C programs using yun-gcc package.

Use make to Makefile projects.

Then, by using Bridge you can simply use these scripts that reside inside Linino by creating Process(es) and running them on your ATmega processor in sketch file programs.

Hi five!

Monday, August 3, 2015

How to Check Your LOC?

[For Windows/cmd.exe]

So this question just popped up in mind while looking at an informational site http://www.informationisbeautiful.net/visualizations/million-lines-of-code/. What are the lines of code for the project in my company for a platform we've been writing.
I did some digging and created a batch file that tells line of code of all the code files inside your directory recursively.
The batch file has only one command and I redirected the output of that command in an out.txt file in the current folder.
Contents of this batch file are as follows
findstr /RN /s "^" .\\*.scala | find /c ":" 1>out.txt

What this command does?
It finds all the strings with \n inside the all the files ending with the extension .scala (you can change in your case, a simple use of commandline wildcards) and then redirects those lines into "find" that is another command. "find" program simply counts the lines and this output goes into the output stream connected to the out.txt file in the present working directory.

How I can calculate my project overall lines of code?
Simply copy the command mentioned above. Replace the .scala with your code extension (multiple extensions also can be added). Put this command inside some filename.bat and save that .bat file inside the root directory of your project. As you will run this batch file. Output will be generated at present working directory named out.txt as mentioned in the command containing your lines of code count.

Don't forget to provide your feedback. Stay tuned for more tweaks.

Saturday, July 4, 2015

Dr. Richard Teo

Below is the transcript of the talk of Dr. Richard Teo, who is a 40-year-old millionaire and cosmetic surgeon with a stage-4 lung cancer but selflessly came to share with the D1 class his life experience on 19-Jan-2012. He has just passed away few days ago on 18 October 2012.
Hi good morning to all of you. My voice is a bit hoarse, so please bear with me. I thought I'll just introduce myself. My name is Richard, I'm a medical doctor. And I thought I'll just share some thoughts of my life. It's my pleasure to be invited by Prof. hopefully, it can get you thinking about how. As you pursue this. Embarking on your training to become dental surgeons, to think about other things as well.
Since young, I am a typical product of today's society. Relatively successful product that society requires. From young, I came from a below average family. I was told by the media and people around me that happiness is about success. And that success is about being wealthy. With this mind-set, I've always be extremely competitive, since I was young.
Not only do I need to go to the top school, I need to have success in all fields. Uniform groups, track, everything. I needed to get trophies, needed to be successful, I needed to have colors award, national colors award, everything. So I was highly competitive since young. I went on to medical school, graduated as a doctor. Some of you may know that within the medical faculty, ophthalmology is one of the most highly sought after specialties. So I went after that as well. I was given a trainee-ship in ophthalmology, I was also given a research scholarship by NUS to develop lasers to treat the eye.
So in the process, I was given 2 patents, one for the medical devices, and another for the lasers. And you know what, all this academic achievements did not bring me any wealth. So once I completed my bond with MOH, I decided that this is taking too long, the training in eye surgery is just taking too long. And there's lots of money to be made in the private sector. If you're aware, in the last few years, there is this rise in aesthetic medicine. Tons of money to be made there. So I decided, well, enough of staying in institution, it's time to leave. So I quit my training halfway and I went on to set up my aesthetic clinic in town, together with a day surgery center.
You know the irony is that people do not make heroes out average GP (general practitioner), family physicians. They don't. They make heroes out of people who are rich and famous. People who are not happy to pay $20 to see a GP, the same person have no qualms paying ten thousand dollars for a liposuction, 15 thousand dollars for a breast augmentation, and so on and so forth. So it's a no-brainer isn't? Why do you want to be a GP? Become an aesthetic physician. So instead of healing the sick and ill, I decided that I'll become a glorified beautician. So, business was good, very good. It started off with waiting of one week, then became 3weeks, then one month, then 2 months, then 3 months. I was overwhelmed; there were just too many patients. Vanities are fantastic business. I employed one doctor, the second doctor, the 3rd doctor, the 4th doctor. And within the 1st year, we're already raking in millions. Just the 1st year. But never is enough because I was so obsessed with it. I started to expand into Indonesia to get all the rich Indonesian tai-tais who wouldn't blink an eye to have a procedure done. So life was really good.
So what do I do with the spare cash? How do I spend my weekends? Typically, I'll have car club gatherings. I take out my track car, with spare cash I got myself a track car. We have car club gatherings. We'll go up to Sepang in Malaysia. We'll go for car racing. And it was my life. With other spare cash, what do I do? I get myself a Ferrari. At that time, the 458 wasn't out, it's just a spider convertible, 430. This is a friend of mine, a schoolmate who is a forex trader, a banker. So he got a red one, he was wanting all along a red one, I was getting the silver one.
So what do I do after getting a car? It's time to buy a house, to build our own bungalows. So we go around looking for a land to build our own bungalows, we went around hunting. So how do i live my life? Well, we all think we have to mix around with the rich and famous. This is one of the Miss Universe. So we hang around with the beautiful, rich and famous. This by the way is an internet founder. So this is how we spend our lives, with dining and all the restaurants and Michelin Chefs you know.
So I reach a point in life that I got everything for my life. I was at the pinnacle of my career and all. That's me one year ago in the gym and I thought I was like, having everything under control and reaching the pinnacle.
Well, I was wrong. I didn't have everything under control. About last year March, I started to develop backache in the middle of nowhere. I thought maybe it was all the heavy squats I was doing. So I went to SGH, saw my classmate to do an MRI, to make sure it's not a slipped disc or anything. And that evening, he called me up and said that we found bone marrow replacement in your spine. I said, sorry what does that mean? I mean I know what it means, but I couldn't accept that. I was like “Are you serious?” I was still running around going to the gym you know. But we had more scans the next day, PET scans - positrons emission scans, they found that actually I have stage 4 terminal lung cancer. I was like "Whoa where did that come from?” It has already spread to the brain, the spine, the liver and the adrenals. And you know one moment I was there, totally thinking that I have everything under control, thinking that I've reached the pinnacle of my life. But the next moment, I have just lost it.
This is a CT scan of the lungs itself. If you look at it, every single dot there is a tumor. We call this “miliaries tumor”. And in fact, I have tens of thousands of them in the lungs. So, I was told that even with chemotherapy, that I'll have about 3-4months at most. Did my life come crushing on, of course it did, who wouldn't? I went into depression, of course, severe depression and I thought I had everything.
See the irony is that all these things that I have, the success, the trophies, my cars, my house and all. I thought that brought me happiness. But I was feeling really down, having severe depression. Having all these thoughts of my possessions, they brought me no joy. The thought of, you know, I can hug my Ferrari to sleep, no. No, it is not going to happen. It brought not a single comfort during my last ten months. And I thought they were, but they were not true happiness. But it wasn't. What really brought me joy in the last ten months was interaction with people, my loved ones, friends, people who genuinely care about me, they laugh and cry with me, and they are able to identify the pain and suffering I was going through. That brought joy to me, happiness. None of the things I have, all the possessions, and I thought those were supposed to bring me happiness. But it didn't, because if it did, I would have felt happy think about it, when I was feeling most down..
You know the classical Chinese New Year that is coming up. In the past, what do I do? Well, I will usually drive my flashy car to do my rounds, visit my relatives, to show it off to my friends. And I thought that was joy, you know. I thought that was really joy. But do you really think that my relatives and friends, whom some of them have difficulty trying to make ends meet, that will truly share the joy with me? Seeing me driving my flashy car and showing off to them? No, no way. They won’t be sharing joy with me. They were having problems trying to make ends meet, taking public transport. In fact i think, what I have done is more like you know, making them envious, jealous of all I have. In fact, sometimes even hatred.
Those are what we call objects of envy. I have them, I show them off to them and I feel it can fill my own pride and ego. That didn't bring any joy to these people, to my friends and relatives, and I thought they were real joy.
Well, let me just share another story with you. You know when I was about your age, I stayed in king Edward VII hall. I had this friend whom I thought was strange. Her name is Jennifer, we're still good friends. And as I walk along the path, she would, if she sees a snail, she would actually pick up the snail and put it along the grass patch. I was like why do you need to do that? Why dirty your hands? It’s just a snail. The truth is she could feel for the snail. The thought of being crushed to death is real to her, but to me it's just a snail. If you can't get out of the pathway of humans then you deserve to be crushed, its part of evolution isn't it? What an irony isn't it?
There I was being trained as a doctor, to be compassionate, to be able to empathize; but I couldn't. As a house officer, I graduated from medical school, posted to the oncology department at NUH. And, every day, every other day I witness death in the cancer department. When I see how they suffered, I see all the pain they went through. I see all the morphine they have to press every few minutes just to relieve their pain. I see them struggling with their oxygen breathing their last breath and all. But it was just a job. When I went to clinic every day, to the wards every day, take blood, give the medication but was the patient real to me? They weren't real to me. It was just a job, I do it, I get out of the ward, I can't wait to get home, and I do my own stuff.
Was the pain, was the suffering the patients went through real? No. Of course I know all the medical terms to describe how they feel, all the suffering they went through. But in truth, I did not know how they feel, not until I became a patient. It is until now; I truly understand how they feel. And, if you ask me, would I have been a very different doctor if I were to re-live my life now, I can tell you yes I will. Because I truly understand how the patients feel now. And sometimes, you have to learn it the hard way.
Even as you start just your first year, and you embark this journey to become dental surgeons, let me just challenge you on two fronts.
Inevitably, all of you here will start to go into private practice. You will start to accumulate wealth. I can guarantee you. Just doing an implant can bring you thousands of dollars, its fantastic money. And actually there is nothing wrong with being successful, with being rich or wealthy, absolutely nothing wrong. The only trouble is that a lot of us like myself couldn't handle it.
Why do I say that? Because when I start to accumulate, the more I have, the more I want. The more I wanted, the more obsessed I became. Like what I showed you earlier on, all I can was basically to get more possessions, to reach the pinnacle of what society did to us, of what society wants us to be. I became so obsessed that nothing else really mattered to me. Patients were just a source of income, and I tried to squeeze every single cent out of these patients.
A lot of times we forget, whom we are supposed to be serving. We become so lost that we serve nobody else but just ourselves. That was what happened to me. Whether it is in the medical, the dental fraternity, I can tell you, right now in the private practice, sometimes we just advise patients on treatment that is not indicated. Grey areas. And even though it is not necessary, we kind of advocate it. Even at this point, I know who my friends are and who genuinely cared for me and who the ones are who try to make money out of me by selling me "hope". We kind of lose our moral compass along the way. Because we just want to make money.
Worse, I can tell you, over the last few years, we bad mouth our fellow colleagues, our fellow competitors in the industry. We have no qualms about it. So if we can put them down to give ourselves an advantage, we do it. And that's what happening right now, medical, dental everywhere. My challenge to you is not to lose that moral compass. I learned it the hard way, I hope you don't ever have to do it.
Secondly, a lot of us will start to get numb to our patients as we start to practice. Whether is it government hospitals, private practice, I can tell you when I was in the hospital, with stacks of patient folders, I can't wait to get rid of those folders as soon as possible; I can't wait to get patients out of my consultation room as soon as possible because there is just so many, and that's a reality. Because it becomes a job, a very routine job. And this is just part of it. Do I truly know how the patient feels back then? No, I don't. The fears and anxiety and all, do I truly understand what they are going through? I don't, not until when this happens to me and I think that is one of the biggest flaws in our system.
We’re being trained to be healthcare providers, professional, and all and yet we don't know how exactly they feel. I'm not asking you to get involved emotionally, I don't think that is professional but do we actually make a real effort to understand their pain and all? Most of us won’t, alright, I can assure you. So don't lose it, my challenge to you is to always be able to put yourself in your patient's shoes.
Because the pain, the anxiety, the fear are very real even though it's not real to you, it's real to them. So don't lose it and you know, right now I'm in the midst of my 5th cycle of my chemotherapy. I can tell you it’s a terrible feeling. Chemotherapy is one of those things that you don't wish even your enemies to go through because it's just suffering, lousy feeling, throwing out, you don't even know if you can retain your meals or not. Terrible feeling! And even with whatever little energy now I have, I try to reach out to other cancer patients because I truly understand what pain and suffering is like. But it's kind of little too late and too little.
You guys have a bright future ahead of you with all the resource and energy, so I’m going to challenge you to go beyond your immediate patients. To understand that there are people out there who are truly in pain, truly in hardship. Don’t get the idea that only poor people suffer. It is not true. A lot of these poor people do not have much in the first place, they are easily contented. for all you know they are happier than you and me but there are out there, people who are suffering mentally, physically, hardship, emotionally, financially and so on and so forth, and they are real. We choose to ignore them or we just don't want to know that they exist.
So do think about it alright, even as you go on to become professionals and dental surgeons and all. That you can reach out to these people who are in need. Whatever you do can make a large difference to them. I'm now at the receiving end so I know how it feels, someone who genuinely care for you, encourage and all. It makes a lot of difference to me. That’s what happens after treatment. I had a treatment recently, but I’ll leave this for another day. A lot of things happened along the way, that's why I am still able to talk to you today.
I'll just end of with this quote here, it's from this book called Tuesdays with Morris, and some of you may have read it. Everyone knows that they are going to die; every one of us knows that. The truth is, none of us believe it because if we did, we will do things differently. When I faced death, when I had to, I stripped myself off all stuff totally and I focused only on what is essential. The irony is that a lot of times, only when we learn how to die then we learn how to live. I know it sounds very morbid for this morning but it's the truth, this is what I’m going through.
Don’t let society tell you how to live. Don’t let the media tell you what you're supposed to do. Those things happened to me. And I led this life thinking that these are going to bring me happiness. I hope that you will think about it and decide for yourself how you want to live your own life. Not according to what other people tell you to do, and you have to decide whether you want to serve yourself, whether you are going to make a difference in somebody else's life. Because true happiness doesn't come from serving yourself. I thought it was but it didn't turn out that way.
Also most importantly, I think true joy comes from knowing God. Not knowing about God – I mean, you can read the bible and know about God – but knowing God personally; getting a relationship with God. I think that’s the most important. That’s what I’ve learned.
So if I were to sum it up, I’d say that the earlier we sort out the priorities in our lives, the better it is. Don’t be like me – I had no other way. I had to learn it through the hard way. I had to come back to God to thank Him for this opportunity because I’ve had 3 major accidents in my past – car accidents. You know, these sports car accidents – I was always speeding, but somehow I always came out alive, even with the car almost being overturned. And I wouldn’t have had a chance. Who knows, I don’t know where else I’d be going to! Even though I was baptized it was just a show, but the fact that this has happened, it gave me a chance to come back to God.
Few things I’d learned though:
  1. Trust in the Lord your God with all your heart – this is so important.
  2. Is to love and serve others, not just ourselves.
There is nothing wrong with being rich or wealthy. I think it’s absolutely alright, because God has blessed. So many people are blessed with good wealth, but the trouble is I think a lot of us can’t handle it. The more we have, the more we want. I’ve gone through it, the deeper the hole we dig, the more we get sucked into it, so much so that we worship wealth and lose focus. Instead of worshiping God, we worship wealth. It’s just a human instinct. It’s just so difficult to get out of it.
We are all professionals, and when we go into private practice, we start to build up our wealth – inevitably. So my thought are, when you start to build up wealth and when the opportunity comes, do remember that all these things don’t belong to us. We don’t really own it nor have rights to this wealth. It’s actually God’s gift to us. Remember that it’s more important to further His Kingdom rather than to further ourselves.
Anyway I think that I’ve gone through it, and I know that wealth without God is empty. It is more important that you fill up the wealth, as you build it up subsequently, as professionals and all, you need to fill it up with the wealth of God.

Thursday, June 25, 2015

Graduated Today

This all starts from the day first in school.
I remember I used to cry for all that routine and loved to spend time in home in early days of my school life. Not because school scared me. I loved to spend all my day watching those 30 minutes Urdu dubbed episodes of cartoons I anxiously waited for whole week. PTV was the best channel and I used to follow-up schedule of each program. Regardless of quality of channel and bad pixel per inch of that old TV. I was more into stories and colours.
I used to make up stories at run time half an hour before school-time just to make sure I spend whole day watching cartoons and drinking soup to cure the disease I didn’t have. Somewhere, deep inside, I knew my mother and father know about my lies, and they ignored sometimes, sometimes not.
I grew up, went for matriculation, became more responsible and serious about my studies and isolated myself from these fragments of happiness that used to made my day.
Then I got admitted into college and became more belligerent in talks about different careers and highly paid jobs, well that is not something to worry about; life is more important than a piece of paper that wants to rule over you. Started answering myself the questions like, “What is the purpose of this studying and that will be the outcome? What I want to become? In what field I will pursue my career?” This all didn’t make sense sometimes because I didn’t fully trust my skills and I wasn’t fully guided.
God never plays dice. He knew where I had to go what I had to do so there is a thing named, a ripple effect; changing future completely into something else by the choices you take in present. We see things like they will happen and sometimes they happen exactly the same. That is a blessing of Allah not our ability to foresee.
I started studying computer sciences, though I was already doing that in intermediate. I wasn’t completely sure about my career in it that time. When I started doing CS. Every piece of puzzle happened to adjust itself in front of my eyes and I started to see the picture behind the puzzle. Days passed, weeks rushed and months went like some pages skipped when you want to reach a specific page number. The page number I wanted to reach on turned out very beautifully written. Each and every spell makes me happy. Every verse written on it makes sense now.
That’s where I stand today. Holding a bachelor’s degree (not so fast) of computer science. Having a job at a good place.
"Allah never makes you unsatisfied when you make an effort."
That is the lesson I learned from this short period of my life that changed way I used to live it.

Saturday, April 25, 2015

زندگی

ابھی تو تتلیوں میں ڈھیر سارا رنگ بھرنا تھا
ابھی تو زندگی نے چند لمحے ساتھ چلنا تھا
ابھی تو دن سے پہلے دن کا اک اغاز ہونا تھا
ابھی اس زندگی کے شور کو اک ساز ہونا تھا
ابھی ان کاغذوں کی کشتیوں نے دور جانا تھا
ابھی تو بادلوں کی اِس گرج کو تھم سا جانا تھا
نا جانے کیوں مرا دن رات سے پہٖلے نہیں آیا
نا جانے کیوں مرے کانوں میں ہے اس شور کا سایہ
نا جانے کیوں یہ کاغذ اتنی جلدی بھیگ جاتے ہیں
نا جانے کیوں ہماری زندگی میں موڑ آتے ہیں
نا جانے کیوں ہم دنیا اتنی جلدی چھوڑ جاتے ہیں
(فہد صدیقی)

Thursday, April 9, 2015

Good News

"Got a job!" - here is me declaring that I'm officially the part of Platalytics Inc. now. Just have signed an official contract regarding my position at Platalytics Inc. This is really a huge change in life since I'm one step already into professionalism, creating applications & games on my own, this would be a real challenge to solve.
Life comes up with such challenges you will always solve, you were meant to solve them. That is why they came in your path. Some challenges are solvable. Some, we think, are not solvable. But the truth is, human capacity is far more capable doing unthinkable.
This challenge, I mean managing job and life, might look very complicated. That's what I'm made up of. Complications. And I always solve the problem. That's what I am.