Friday, October 03, 2014

Nice quote

    闻不若闻之,      Not having heard is not as good as having heard,
    闻之不若见之,      having heard is not as good as having seen,
    见之不若知之,      having seen is not as good as mentally knowing,
    知之不若行之;      mentally knowing is not as good as putting into action;
    学至于行之而止矣    true learning is complete only when action has been put forth
           -- 荀子                                    -- Xunzi

Sunday, September 07, 2014


Wednesday, August 27, 2014

Reasons why Math/Statistics losing to ComputerScience

From one of the comments:

Here is a math major's perspective (I also have a C.S. master's from Stanford, a decent school for computer science).
The real reason statistics is losing to machine learning is M&M: money and marketing.
Money is a huge factor when kids choose majors in college. Many of them have student loans to pay off, and for many of them, getting a high-paying job post college is a serious consideration. In this regard, statistics is a great major, but computer science is flat-out ridiculous. When big tech companies are offering a Stanford graduate with only a few summers of programming internships under the belt for 150k/year, naturally a lot of kids are lured into computer science.
Then, once they start studying computer science, they discover this thing called machine learning. While I do think there is a difference in emphasis between stats and machine learning, the fundamentals are same, except the nomenclature sounds much cooler in machine learning. Nonparametric inference sounds esoteric and cryptic, but unsupervised learning sounds futuristic and cool.
The biggest problem with both statistics and machine learning education, I would say, is their lack of emphasis on mathematical foundations. When I was in college, CS229 (Introduction to Machine Learning) was touted to be the hardest class at Stanford. Having helped my friends wade through CS229 problems (a lot of which comes down to wading through linear algebra and multi-variable differential calculus), I do not think this is remotely true: CS229 is hard because it attracts students who do not have the requisite mathematical maturity to learn statistics/machine learning in a serious way (I am not even talking about the real-analytic foundation of probability and calculus but rudimentary linear algebra and chain rules).
Also, I do think CS229@Stanford is a great class that brings theory and practice together =)
As for R/Python/Matlab/etc., I will let the zealots argue what's best. To me, they are like statistics and machine learning: similar with different emphasis.

1971genocide 15 hours ago | link

I agree with your points so much.
I am a applied Maths student (currently) and when looking for internships I noticed 80% of them are for CS related stuff. Imagine being me ( 19 years old ), offered a 15K/year job in my first year in university. My best job up until then was cleaning the floor at a mall. I have studied insane amount of mathematics all my life ( proofs after proofs ), how much longer do I need to wait until I am able to something of value in society ?
Compared that to the amazing 14 weeks internship I did at a startup churning out frontend javascript. Those 14 weeks were the best weeks of my life, I never felt more confident and of value. My depression vanished overnight, I found a new aim in life, I treated coding the same way nations treat nuclear weapons.
I learnt more things of value in those 14 weeks then I did in the previous 19 years, I didn't need to set up an alarm clock to wake up in the morning. There was no hand holding, because I was getting paid. I spent the rest of my waking hour churing code with no need for external motivation.
I got really angry at society for misleading me for such a long time because of how easy it was for me to do something useful, finally. I see my friends struggling with the same problems and feel so much of young ppl's time is wasted, In my mind its a crime.
I think as always mathematicians fail to grasp the human side of the argument, why are they complaining about lack of interest in statistics ? its their own fault this problem exists. There is no Neil Degrasse Tyson for statistics, there is no mark zuckerberg for stats, you don't need to hire a PR department. Just show us the wonderful magic that you speak of and we are smart enough to figure out why we should dedicate our lives to your cause.
This is why if some statistical axiom/theory doesn't have a CS applied part I became really skeptical of doing that course.

Thursday, August 21, 2014

Thursday, August 07, 2014

Timeless stuff

Focus on the company's bottom line and customer satisfaction. That is your job, not making pretty code.
To get a [good] job, you have to literally put your foot in a door; you must be connected to some person who works at that company.
The amount of money you get is based on the size of the company and your perceived worth. Ask for more than you think you're worth.
Make yourself look good. Talk up your cool projects, wax philosophical about your ideal development methodology, then hammer home how you're focused on the customer, efficiency, and the business's bottom line.
Focus on the key elements in any situation, don't get distracted by minutia, be assertive. Your motto is "restrained, confident professionalism."
"people are hilariously easy to hack" in the way you present yourself, so use all the hacks available. Be the James Bond of CRUD apps.
things not mentioned in the post:
Startups will hire you for positions you might not be qualified for and pay you peanuts for it, but it'll create experience/value/resume filler.
Academic achievement is only significant to people who prize intelligence over productivity. Just know how to get the work they need done and show them that.
Networking in person isn't necessary. Just build relationships.
If you're new, add [real] stuff to your resume to make it seem like you have relevant business experience, and be able to back up whatever you put down.
Don't "work your way up" through some corporate ladder. Just apply for the job you want. At some point you'll get it.

Wednesday, July 09, 2014

How to be a great software developer

Start with something ugly but functional and then apply and reapply yourself to that ugly and misshapen solution and refactor it back into its simplest form. Simplicity comes far more reliably from work than from brilliance. It comes more predictably from code written, than from thought expended. It comes from effort.

Name your functions and variables well


Tuesday, May 13, 2014

Coding Style

Legibility and long term readability is the most dominating factor out of any coding style. This is really subjective, but saving on characters you have to type, only to make the code a lot harder to read seems like penny wise pound foolish.
Its a lot easier to review because there is no hidden features (eg: operator overloading) that prevent comprehension.

Sunday, March 30, 2014

Wednesday, March 19, 2014

Java: Pass By Value notes

The Java Spec says that everything in java is pass-by-value. There is no such thing as "pass-by-reference" in java.

Dog myDog;
is not a Dog; it's actually a pointer to a Dog.

What that means, is when you have

Dog myDog = new Dog("Rover");
you're essentially passing the address of the created Dog object to the foo method.

Suppose the Dog object resides at memory address 42. This means we pass 42 to the method.

If the  foo Method were defined as

public void foo(Dog someDog) {
    someDog.setName("Max");     // AAA
    someDog = new Dog("Fifi");  // BBB
    someDog.setName("Rowlf");   // CCC

the parameter someDog is set to the value 42

at line "AAA"
someDog is followed to the Dog it points to (the Dog object at address 42) that Dog (the one at address 42) is asked to change his name to Max
at line "BBB"
a new Dog is created. Let's say he's at address 74 we assign the parameter someDog to 74
at line "CCC"
someDog is followed to the Dog it points to (the Dog object at address 74) that Dog (the one at address 74) is asked to change his name to Rowlf then, we return.

What happens outside the method:

Did myDog change?

Keeping in mind that myDog is a pointer, and not an actual Dog, the answer is NO. myDog still has the value 42; it's still pointing to the original Dog.

It's perfectly valid to follow an address and change what's at the end of it; that does not change the variable, however.

Monday, March 10, 2014

Who is a developer?

A developer. Not a C programmer, not a Rubyist, or any subset of software development. Know how to program, know how to solve problems, and know how to learn new languages, libraries or frameworks. Sticking to your guns in an industry as ever-changing, for better or worse, as Software engineering, is a bad idea.

Wednesday, January 22, 2014

Creditcard ChargeBack vs. Disputing a charge

In order to get a chargeback for a charge that you did not authorize, you have to tell your credit card company that you specifically want a chargeback. Do not tell them that you are disputing the charge. If you do not use the term "chargeback" they will merely contact the vendor who will then advise that the charge is valid. Under Visa/MC rules, if you ask for a chargeback using that language they have to give it to you.

Tuesday, January 07, 2014

Human beings capability

Line from Robert A. Heinlein’s books:
“A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”

Friday, December 20, 2013

Why do we study History ?

"not repeating the same mistakes" : NO
"not re-inventing the wheel": NO
"learning from the past": NO
We study the past or History to learn about our present.
How did we get here?
Why are we here?
Things we accept as "natural" or "permanent", or "optimal" are just a result of decisions and events that occurred long ago in very different context.

Tuesday, December 17, 2013

How to Win Friends and Influence People Summary

How to Win Friends and Influence People

This is Dale Carnegie's summary of his book, from 1936

Part One

Fundamental Techniques in Handling People

  1. Don't criticize, condemn or complain.
  2. Give honest and sincere appreciation.
  3. Arouse in the other person an eager want.

Part Two

Six ways to make people like you

  1. Become genuinely interested in other people.
  2. Smile.
  3. Remember that a person's name is to that person the sweetest and most important sound in any language.
  4. Be a good listener. Encourage others to talk about themselves.
  5. Talk in terms of the other person's interests.
  6. Make the other person feel important - and do it sincerely.

Part Three

Win people to your way of thinking

  1. The only way to get the best of an argument is to avoid it.
  2. Show respect for the other person's opinions. Never say, "You're wrong."
  3. If you are wrong, admit it quickly and emphatically.
  4. Begin in a friendly way.
  5. Get the other person saying "yes, yes" immediately.
  6. Let the other person do a great deal of the talking.
  7. Let the other person feel that the idea is his or hers.
  8. Try honestly to see things from the other person's point of view.
  9. Be sympathetic with the other person's ideas and desires.
  10. Appeal to the nobler motives.
  11. Dramatize your ideas.
  12. Throw down a challenge.

Part Four

Be a Leader: How to Change People Without Giving Offense or Arousing Resentment

A leader's job often includes changing your people's attitudes and behavior. Some suggestions to accomplish this:
  1. Begin with praise and honest appreciation.
  2. Call attention to people's mistakes indirectly.
  3. Talk about your own mistakes before criticizing the other person.
  4. Ask questions instead of giving direct orders.
  5. Let the other person save face.
  6. Praise the slightest improvement and praise every improvement. Be "hearty in your approbation and lavish in your praise."
  7. Give the other person a fine reputation to live up to.
  8. Use encouragement. Make the fault seem easy to correct.
  9. Make the other person happy about doing the thing you suggest.