Should I take an year drop to prepare for JEE so that I can join BTech in IIT? I have admit offer from a decent college now. I am interested in ML specialization.

This is a common question which many students ask. So, here are my views. My views need not be correct for all situations for all students. So, please use your discretion.

By this time, you should have a general appreciation for the field of computer science. You should like working with computers. Your reading comprehension and general aptitude must be reasonable. Given these pre-requisites, you are good to start your undergraduate program.

A million-dollar question is about how to use the time effectively. Let me give the long answer first.

The purpose of BTech program is not to earn too many accomplishments that can enter your resume. Many students go for a mad run behind industry internships, summer programs and so on. None of these are necessary. Firstly, summer programs are usually focused and advanced. These are not suitable for BTechs. It will be a waste of your time. Industry internships for BTechs are usually designed to get nasty work done by you which the full-time employees do not wish to do. Again, a total waste of your time. One can argue that you will get industry exposure. My usual answer is that you would any way get your exposure when you join a proper job or intern after your BTech.

Getting the first job depends more on 1) having necessary GPA to sit for placements, and 2) clearing their placement test. To do this, you need to have solid grasp of concepts. So, spend all your time on studies. Improve your English, reading comprehension and general aptitude in your free time. At the end of BTech, people will ask you, “what is your favorite subject?”. Keep an answer ready. Be strong in this subject. Go beyond the classroom tests. Solve GATE problems. You missed to top JEE. Now, focus on topping GATE. You have full four years ahead of you.

Most students underestimate the need to develop strong study habits. You should spend 25% time reading, 25% practicing and 50% time thinking about the topic you read or practiced. Mindless study will take you nowhere. Good note-taking habits such as making short and shorter notes, timely revision, and regular problem solving are essential skills to develop. Invest in your personality. Join a public speaking course. Go and give speeches. Make presentations. These skills will come with you for life. Read one page of “What best college students do?” book every morning as first thing once you wake up. Take as much time as you need. Digest and try to remember the contents of that page for the entire day. You will be a very different person, altogether.

You are paid for your knowledge, skills and attitude (KSA). When two people of equal KSA compete, that is the only time when brand matters. There is nothing much to worry. 85% students can’t communicate.10% may communicate but can’t think. If you do these two things correctly, you are already in the 95th percentile of graduates at the end of your BTech. 4% students do not have a favorite subject. They are not the best in the country for that subject. If you take one subject and keep working on it beyond a semester, you will be the best. It is that easy. This will take you to the 99th percentile. Once this practice becomes a habit, you will invariably end up doing this for few more subjects. Thus, you become the best BTech graduate in CS.

BTech is a breadth-oriented course. Theory of computation is as important as Linear Algebra and Computer Networks. Do not develop an affinity to depth at this stage. It could turn dangerous. Most students have no understanding of ML. For someone who is extremely passionate about cricket will know what a googly means. Similarly, someone who is extremely passionate about ML will know what a sigmoid function is. They know who Christopher Bishop is and what happens in ICML. If these things sound new to you, you are not yet passionate about ML. The ML that people talk about is like a trailer of a movie. It always looks nice. When you work, you understand that it is a very different beast. I am not against ML but my comments apply to any other specialization. First, you need to spend time acquiring breadth. Learn everything with same passion. Then, with some knowledge, decide which specialization will work for you. Designing programming languages, mining repositories, pattern recognition, information retrieval, approximation algorithms, and the list of specialization options goes on. The world is huge. Do not marry ML this early.

Finally, I will leave you with the short answer which is the secret of success. It is not how much you earn. It is about how much capacity you have “to give” that matters. So, invest in your skills. When you talk, people should want to listen to you. When you write, people should stop to read it. There must be a problem which you can solve the best. There must be a job which you can do well. Do not invest in brands. It is not IIT. It is “you” that matters more. So, do not worry where you do it. Just do it. Go, rock. Become somebody whom the world looks up to. All the best!

Well, one more important thing. Do not forget to smile. Life can be stressful. You may have several priorities. But, take a few minutes to enjoy life. One smile a day is worth it. Make it a habit. Have fun. 


What is the size of int in DOS?

This is a common question that arises in so many minds who are learning to program in any high level language such as C. Thanks for asking. While programming, we need a way to make our program “remember” values. So, we use “variables”. For example, the statement, “int i = 10;” defines an int variable and assigns the value 10 to it. Further, this allows to manipulate the value in statements like “i = i + 20;” or “i = i * 2;”. Thus we are able to build on this idea and write more complicated programs. When we go for placements, or even for GATE kind of exams, the concept of space complexity is of utmost importance. Space complexity denotes the amount of memory our program will occupy. Based on this, programs are sometimes classified as good or bad. Sorting is an example. You can sort in-place i.e., without significant additional memory! The variables we declare and use are the primary reasons for memory usage. More variables you declare, your programs need more memory (RAM). Let us assume you have one program which uses 100 bit type variables and 100 strings. It is a no-brainer to claim that the latter program needs more memory than the former. Each data type, uses a defined amount of memory. Now that we understand the background of variables, data types and the space occupied by them, let us get to this question.

How much memory does int occupy on a DOS system? Let me assume for now that we are talking about C programming. DOS is a family of disk operating systems. There are multiple flavors of DOS namely MS DOS, FreeDOS, AppleDOS and so on. Refer to the wikipedia page of DOS for more detailed discussion on DOS. For this discussion, let us consider MS-DOS, the microsoft DOS that we know better. Interestingly, there are different flavors of DOS based on the underlying system architecture. Here comes the notion of “32-bit” machine. This means that the registers and addresses are 32-bits wide. Even FAT uses 32-bits. So, you cannot store one single file which is more than 4GB on your USB drive even if the drive is say 16 GB in size. Anyways, that was just a side-detail.

An Integer is a primitive data type. To learn about the memory occupied by integer, we refer to the C99 or any such standard. The standard only requires size relations between the data types and minimum sizes for each data type. C wants compiler designers to be only ensure that int is capable of containing at least the [−32,767, +32,767] range. Therefore, it is at least 16 bits in size. But, if we use 32 bit registers, we cannot allocate half register. So, nowadays, it is 32 bits. Earlier, when most C books were written, we had 16 bit processors. So, they stuck to the standard and provided 16 bits to int. Nowadays, it depends on the processor architecture. If you are on a 64-bit machine, you are even worse. You need 8 bytes or 64 bits! You can check this by yourself by using sizeof() in C.

So, the final answer is, assuming the version of MS DOS uses a 32-bit architecture, the sizeof() is very likely to give 4 as result (i.e., 4 bytes = 32 bits) for the size of int. Note the word, “likely”. It means that the compiler designer can come up with a different size. As long as it is more than 16 bits and adheres to the size ratios, they are allowed to do so. If no information such as DOS, or system architecture is given, we go with the C99 standard which requires an int to be at least 16 bits i.e., 2 bytes. Hope this answers your question.

One final bit to add here is that do not memorize these sizes. It is not required. Remember the ideas but not the exact number of bits occupied by each data type. That is not necessary and is often incorrect as I have explained above.

Things not going your way? Feeling depressed?

When the goals are shallow, depression is a typical consequence. Define success in such a way that it keeps you occupied for life. Do not keep a deadline for success.

Let me elaborate. Ask yourself, what is that you want to achieve in life. Look around. Understand the problem that attracts you. You come from financially deprived family. You perhaps want to eradicate poverty, or at least ensure that there are no more youth like you who is suffering for wrong reasons. Start thinking what you could do to solve this issue. It is a journey. It is not one step that you need to take. Commit your life for one such goal. In the meanwhile, you need to do a variety of things. You need to sustain yourself first. You need a job. You need a family. You need to keep your family safe and happy. You need good friends. For this to happen, you need to be mentally and physically strong. So, invest your time in all these things. You will quickly realize that getting a job is a small piece of a much bigger problem. The nature of the job only matters if it is somehow connected to the problem you want to solve.

Alright, having a goal for life and the pursuit to achieve it will keep us away from depression. It will keep us busy. It will bring joy and prosperity. But, this is not all. We need to deal with the intermediate small problems. The problem at hand is to find a job that helps you to stay healthy and reasonably wealthy. The mantra here is to be a good thinker, actor and producer.

Let me elaborate again. The common mistake we do when we look out for jobs is to see where the crowd is moving towards. Everyone is going to a call center does not mean that is the only place available for work. For example, consider teaching in a small school. It will pay you at least 20k and will help you lead a good life. It will force you to be a good communicator. It will keep you active by standing and walking for most parts of your day. There are many such jobs – administrative jobs in colleges and companies are another option. We have been trained to stop thinking from our early school days. For example, one of my teachers used to reprimand me for asking questions. She does not like anybody to ask question. So, gradually, students became 1) memorization machines and 2) follow-the-crowd ants. Get out of this mode. Find the right job. Do not spoil your life to get into one wrong job which is not working for you. Thinking deserves at least two more pages of writing. But, let us now move towards acting. I do not mean the cinama kind of acting. This is to “work”. Act. Put effort. Everyday, make a small plan on how you want to progress towards a goal. Execute that plan. Without thinking, acting will only waste your time in the wrong direction. This is what is happening with you in your UPSC and GATE preparations. You need counselling on how to prepare. Stop cramming all topics and memorizing formulae. Stop studing everything in the world. Other members here can give tips on how to study. Same applies to interviews. Write a great resume, apply to the right places and know how to ace interviews. With the commitment to work hard, there is nothing we cannot achieve. Finally, just thinking and acting is insufficient to a happy life. Start producing results. If you are not producing results, make smaller objectives (towards the same big or intermediate goal). Try to achieve them. If you still cannot, make it even smaller. If you cannot achieve anything, there is something wrong with you. Go back to the first step. Think.

We have one life. One opportunity to experience. Your situation is unique. Your experience will be unique. Make it useful, not only to yourself but to everyone around. Cheers and good luck.

I’m unable to think of a solution within the allotted time. I can solve them, but it takes too much time. This way, I won’t score well in the actual exam. Can someone tell me a way to improve?

Well, I can only say that you are not alone. I too am very slow in my thinking. Am sure there is nothing wrong with my comprehension or application skills. But, I need my time. To put it better with an example, if I have huge amount of time, I know how to find the best move in a chess match. But, there are millions around who will find that best move much faster. When I asked around the same question, I found these interesting points.

Firstly, almost everyone said, practice more. Perhaps, practice improved their speed. I had a hard time memorizing 8 * 7 in my childhood. I used to do 8 * 5 = 40 first. Then add 8 twice to it. But over a period, I realized that if I have to calculate it 100 times in a week, I will eventually remember it. So, I did accept the point. Yes, practice does matter.

But, this still did not answer my question. How come, the other kids could do 8 * 7 in the first attempt? This is when I realized the second and bigger secret. Pay attention to this. First time, I memorized the 8th Table, I took a shortcut. I studied till 8 * 5 and then I knew that I can always use addition trick to answer. That one day of laziness had cultivated this bad habit. Now, my brain refuses to memorize it. Again, I can take a chess example here. In chess notation, a1 is the left bottom square from where white plays. b2 is diagonally above a. So, you go one step right and one step upwards from a1 to reach b2 and so on. Fairly easy stuff. Now, when I learned this notation, I used to calculate from a and 1 and then narrate the square. It just became the habit. While some kids memorized the squares, I was calculating it. A bad habit. It led to humongous cost. I was so slow in taking notes during a game.

Alright, now I understand what slows me down. But, how to improve it. Breaking these unhealthy habits is not easy. Luckily, there are several ways we have known already. Know your habits, target them with training. Nowadays, I spend several minutes just visualizing and thinking differently about notations. Another thing you could do, is try a bit of meditation. Am not joking here. In a way, we are addicts of compulsive behavior. Our mind knows that it must change but refuses to change. The best solution is to take some time, give our mind a rest. Clear it off. Then, try again. This works. I spend around 15 minutes whenever I get time, to just stay still and relax. Finally, the best of all ways, is to find a purpose or a passion. The stronger your passion is, you will find innovative ways to circumvent your problems. If nothing works, only one thing can save you, God! Really, I am not kidding. Transcendental purpose has supernatural powers. For me, helping students is my way to find a spot in heaven. It is my dharma, my duty. It gives me transcendental satisfaction and fulfillment. I have conditioned my mind to believe that my purpose of life is to find a smile in a student, promote computer science and play chess. You may have different purpose; but if you believe in God, then all the above can be sidestepped and you can still win.

Good luck!

PhD Life

PhD life is like a train that takes you to a new station every day. You look through the window in anxiety for whether you will find something new, something novel as we say it! Moreover, the taste of the same tea but from different hands in different stations, is so different! This is what happens to us when we find the same solution for the same problem through a different route.