Wednesday, September 23, 2009
Meta-PhD
When Chris asked me to do PhD, I was dead sure about one thing: I want to be in US for at least next 4-5 years of my life. So, I had two choices in front of me: either accept the SDE job offer from Microsoft SQL Server Data Mining team or accept Chris' PhD offer. Somewhere in back of my mind, I wanted to do a PhD after 3-4 years of my job. Also, Microsoft SQL Server Data Mining team was a dream job at that time. However, I decided to go for PhD for following reasons (ranked in the order of importance):
1. Why PhD?: For rest of my life, (except the daily chores and some personal issues), I want to THINK and DO certain work. I believe PhD sharpens (if not develops) the unbiased factual decision making process. It also helps you identify and enumerate some choices which you probably would not had thought of. (To be brutally honest, you don't need to do PhD for this, you just need to spent some time regularly acquiring this skills. PhD is one of the well-known an hopefully the simplest way to acquire them.)
2. Why Chris?:
a. I don't think I would find a better advisor than Chris (for "me"). There are two reasons for it. First, I am very comfortable communicating my ideas with him (both technical as well as non-technical). Second, Chris is an "awesome" researcher and I will learn a lot (and not just Database Research topics) from him.
3. Why PhD then and not afterwards?: If I jumped into job, I don't think I would ever return to PhD. (May be I think once I am settled down with good income, I would not have the motivation to start studying).
Though I have talked about skills that I would like to acquire in general, I would like to break it into my so-called mini-goals. The list below is a result of an hour long discussion with Ravi Jampani.
Mini-Goals for PhD (ranked in the order of importance):
1. Problem Identification Skills: Before I complete my PhD, this is the most important skill that I would like to acquire. For example, I should be able to identify potential problems in a given area after doing critical literature study.
2. Critical Literature Study or Building your base: This includes accumulation, simplification, contextual categorization (eg: Mindmap with Mnemonics) of the knowledge in my research field. This skill should also facilitate a way of frequently revisiting this knowledge base and also doing periodic "Lateral thinking" on it.
3. Multi-domain expertise: This means iterating skill 2 for multiple fields. It will also help for skill 1. The fields that I am interested in are Database, Data Mining & Machine Learning, Algorithms(with emphasis on Approximation and Randomization) and Mathematics (with emphasis on Statistics).
4. Indexing: Finding out who are good researchers in your field and always knowing what they are working on (kind of like fan-following).
5. Improve my communication skills and then writing skills. As of now, I ramble a lot and am almost never articulate in any discussion (though I believe that I am very persistent and continue the discussion atleast until I have communicated my ideas).
6. Collaboration of research with other people: This is least important skill as of now.
Useful advice from different researchers for new graduate students:
1. Chris:
- Indexing skill (i.e skill 4)
- Do not do exactly what the good researchers are doing.
2. Steven Weinberg:
- Start doing research (instead of writing this blog post ;) ), and pick up what you needed to know as you went along.
- Forgive yourself for wasting time. As you will never be sure which are the right problems to work on, most of the time that you spend at your desk will be wasted.
3. Richard Hamming:
- What are the most important problems in your field?, Are you working on one of them? and Why not?
- 'Knowledge and productivity are like compound interest.' Given two people of approximately the same ability and one person who works ten percent more than the other, the latter will more than twice outproduce the former. The more you know, the more you learn it is very much like compound interest.
- Luck favours the prepared mind (originally for Louis Pasteur). This essentially means that acquire skill 2 and 3 and you will soon find an opportunity to identify a 'good' potential problem and may be even solve it.
3. Others:
- There is not substitute for hard work. (Most important of all the advices)
- Be Persistent: "I have not failed. I've just found 10,000 ways that won't work" - Thomas A. Edison
- Explore as many areas as you can find. Read papers from different areas, not just your area.
4. Self:
- Be modest. The ego destroys the process of learning. Never disregard anyone who does not agree with you. Hear what he/she has to say and then try to think it through.
- Be committed to your problem. even if you think its not important. Finish it first and then start working on what you think is important.
- Think clearly, write clearly and talk clearly. Always talk with right amount of abstraction.
Thursday, July 23, 2009
Mistakes you can make in your first job
Eg: If you are expected to write C++ program, first learn C++. Take time to understand classes, inheritance, composition, etc. By understand, I mean you not only need to know the syntax, but also imagine the scenarios in which they are useful (an which they are not). If you don't know STL or smart pointers, believe me you would be re-inventing some of its code inefficiently :) and your code might be prone to bugs.
2. Google search before you ask your team lead or team members. This protects you from asking stupid questions or worse committing stupid mistakes.
3. Under-estimating the importance of "requirement gathering" and "design" phase aka Start coding immediately. A good programmer always takes time to understand the problem and create a big picture of the project in his/her head.
4. Trying too hard to present what you are not. It is extremely difficult to live a lie. Remember honesty should be coupled with extreme desire to improve yourself and also hard-work.
5. Blaming others to improve your chances of staying in the job. Believe me nobody likes a snitch. If you commit a mistake, be brave and accept the responsibility. Be proactive and ask the mentor for what you can do to improve your chances instead.
6. Disregarding "Murphy's law" and not clearing your expectations with team members.
If you think there is slightest possiblity of any team member to commit certain mistake or make certain wrong assumption, clarify it.
7. Delving into details without getting the big picture (kind of re-statement of point 3). But this is so common that I need to mention it again.
8. While using new software library, not differentiating the interface part and core problem part of the project.
9. Ignoring the coding standards of company. If you company does not have one, try to follow the coding standards given in the book C++ Coding Standards: 101 Rules, Guidelines, and Best Practices.
10. Reinventing the wheel in your design aka not knowing what are design patterns. If you don't know what design pattern mean read Head First Design Pattern. If you have already taken course in design patterns, then revising Gang of Four book won't hurt.
11. Not using a version control. Chances are that you would break the working code when you are trying to add new functionality. If you are using a version control, then remember to add messages like "Working version 1.4", etc. and learn how to revert back to certain version. If you are not allowed to use version control, make copies whenever you implement and test new functionality.
12. Not discussing your design with others aka school-children syndrome. Think of it this way rather than sharing your trade-secrets; by explaining or helping others, you improve your knowledge base.
13. Not respecting chain of command. Always give credits to your mentors, even if you think they have not helped you in it. It is even worse, if you complain against your mentors to their managers. Remember habit 4 (Think Win-win) of 7 habits of highly effective people.
Two books you must read and re-read before joining the job,
1. 7 habits of highly successful people by Stephen Covey. (Summary)
2. Getting things done by David Allen. (Summary)
Sunday, July 05, 2009
Why are Indians targetted ?
Let us first enumerate what could be the major reasons why Indians are targeted:
- Racism and jealousy
- Cultural and Behavioral habits (the "Herd" mentality)
- Serenity Prayer
- My experience in Gainesville, Florida suggests that most people are comfortable with working in a multi-cultural society. Some people may not like some sect of people, but it is usually due to personal preference rather than racism (It is important to note there is a difference. Just because I am from different race or ethinicity doesnot mean the other person has to like me. It is only when the other person starts humiliating you, it is racism).
- Whenever there is a inter-relationship problem, it is better to start identifying the problem in yourself first and try to improve it rather than finding problems in others and blaming them for the situation.
- We do not want to put extra effort to understand the cultural diversity and to come up with a harmony of both Indian cultural system and the host cultural system. For example, most jokes we share with our "Indian" friends might not be funny when we share it with people from different race.
- Fear of rejection/intrusion: We do not take up the initiative to talk to a "non-Indian" colleague and bond with him/her. By bonding, I mean come up with a level of comfortableness, where both you and him/her can enjoy daily discussions (say sports, politics, family, etc ..). Usually, people take this initiative only when both parties have to spend a lot of time with each other as colleagues.
- And many more ...
This article does not in any way suggest changing your value system. I am proud to be an Indian, and I will never change by values (eg. respecting elders, praying, helping others, etc ..). But it doesnot mean only the Indian value system is the best and all others are inferior. I think I could learn a lot from US and it is necessary to put effort to learn the host culture.
Sunday, June 21, 2009
Shuffle functions
Almost all of them treat the set of cards as a list and write the program to shuffle the list.
One approach is to emulate the human shuffling:
Hindu Shuffle; Riffle shuffle
Other techniques are discussed in more details in wikipedia
Here is an interesting but not optimal way(O(n lgn)) to shuffle a list:
In Ocaml:
let shuffle l1 =
let sortComparator x y =
(
match (Random.int 3) with
0 -> 0
| 1 -> -1
| 2 -> 1
| _ -> failwith "Error in shuffle"
)
in
List.sort sortComparator l1
;;
C++ Code:
template < class T >
bool sortComparator(T x, T y){
if(rand % 2 == 0)
true;
else
false
}
template < class T >
vector < t > shuffle(vector < t > cards) {
sort(cards.begin(), cards.end(), sortComparator);
return cards;
}
Friday, June 19, 2009
Kindle DX review
1. PDF capability:
For pdf documents, treat Kindle DX as a READING device and nothing else.
Does not Support: Note-taking, highlighting, zooming(both the document and font ) capability and has bad searching capability. Also there is no dictionary for PDFs
But it serves the purpose of READING - Resolution is good, it does not strain your eyes, and landscape view is good enough for most of my documents. Also, I prefer to take active notes rather than just higlight, it's not a big deal for me.
Transferring PDF - very easy ... just connect to USB and copy your PDFs to Kindle.
Steve Bain has more critical review on it.
2. Weight:
Extremely light atleast for me.
3. Durability:
Though material looks good, please don't expect it to be extremely sturdy. Hence I recommend using cover(either leather or neophryne) while traveling.
4. Battery life:
Extremely good. I haven't tested it very much but just turn off whispernet and you should expect 4 weeks of battery life
5. Choices of Books:
Amazon is undoubtedly the best choice.
6. Awesome feature:
Wikipedia is free .... anywhere in US !!!
7. Cost:
If you think $359 is OK for Kindle 2, Kindle DX is definitely worth $489.
If you donot like to read research papers on computer, you will save on great deal of printing and "trees" :)
As an engineering student, you will save a huge amount of money and space on printed books if you chose to buy Kindle DX.
Bottom line:
If you cannot live without highlighting and note-taking, DON'T BUY KINDLE DX ... go for Sony PRS-700(if you like text notes) or iRex Iliad(if you absolutely cannot live without handwritten notes)
If you think iRex is too costly (apart from the fact it has no support in US, you have to ship iRex to Germany) and it you want to READ pdfs without straining you eyes, definetely go for Kindle DX.