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.

Friday, August 23, 2013

Intelligence is necessary, but it is not sufficient

When you’re young you need to appreciate the long-run repercussions of your actions.Your freshman-year grades impact your choice of colleges, which impacts your career trajectory and social network, and so forth.  You need to apply intelligence.
Smarts matter less than we would like. What often matters just as much, if not more, are soft skills. Things like building and maintaining relationships, or the way that you present yourself to others. Soft skills actually are more important than how smart you are. You must be socially fluent and naturally able to build rapport.
Finally, it’s not about what you know, but rather what you can do. If you cannot apply your knowledge, employers do not care about it.  An employer really wants to know: what skills do you have that apply directly to the narrow functions assigned to the job for which you’re applying?

Monday, June 24, 2013

Virtues of a Software Developer

"The three virtues of a programmer: laziness, impatience, and hubris" -- Larry Wall

Hubris means extreme pride or arrogance. Hubris often indicates a loss of contact with reality and an overestimation of one's own competence or capabilities, especially when the person exhibiting it is in a position of power.

Ability to minimize the amount of code you write. Code you don't write is code without bugs. this means either writing problem specific libraries or having them in the system.
Ability to minimize boilerplate. This is where dynamic languages often win.
Ability to change code easily and test or run frequently (not necessarily unit testing). Rewriting usually makes code more robust.

Tuesday, June 04, 2013

Developer Advise

It is important for a developer to be willing to work outside of their comfort zone. Technologies are constantly changing, and as developers we are often asked to do integrations or updates that we have never done before. By pushing yourself to try new things, you end up being exposed to more code and alternative ways of tackling issues. It's this drive to constantly learn and do new things that makes the difference between a good developer and a great developer.

Don't be afraid to break stuff. Breaking things is an important part of learning process. Why did it break? Where did it break? Even if it didn't break, was there a logical outcome? 

Sunday, May 05, 2013

General Advice

The time spent playing intramural sports, working on the school newspaper or just hanging with friends is important. Research indictes one of the most important causal factors associated with happiness and well-being is the meaningful connections with other human beings. One benchmark of your postgraduation success should be how many of these people are still your close friends in 10 or 20 years.

Marry someone smarter than you are.  You will do better in life if you have a second economic oar in the water.

Don't try to be great. Being great involves luck and other circumstances beyond your control. The less you think about being great, the more likely it is to happen. And if it doesn't, there is absolutely nothing wrong with being solid.

Saturday, April 20, 2013

Programmer duties

Programming is more than just writing code. Programmers must also assess tradeoffs, choose among design alternatives, debug and test, improve performance, and maintain software written by themselves and others. At the same time, they must be concerned with compatibility, robustness, and reliability, while meeting specifications.

Sunday, February 03, 2013

Praise For Failure

Failing earlier on in life gives us that ability to not freak out when it happens later on. Working on a hard mathematics problem is not to be afraid while feeling stupid. When you feel stupid, don't say to yourself, I'm stupid, but rather this problem is hard. I'll have to work hard on this, try out lots of different ways to figure this out, and not give up too soon. Just because you feel stupid doesn't mean you are stupid. Sometimes you have to be brave and endure feeling stupid for days, weeks, months, or even years, but if you keep working on the problem, you can break through and feel glad that you didn't give up. Feeling stupid is a sign you are working on a hard problem. It's not a reason to give up.

Monday, December 31, 2012


1. "Nibbles": Reach a general agreement (agree on a basic premise). Instead of instantly accepting the deal, push for one small concession at a time.

2. Before entering into a discussion, think about a 'BATNA' = Best Alternative To Negotiated Agreement. Are there other options? Is there a minimum you are willing to agree with?

3. "Expanding the pie": While certain points in contention may be very inflexible (salary, job position), "expand the pie" and seek out other areas which may be more flexible (vacation days, compensation). This also serves to clarify the central hinge of the negotiations.

4. Disarming Empathy. Essentially, the act of being empathetic (in a sort of self-deprecating way perhaps?) so that the other side bargains against themselves while you do not budge from your initial offer.

NB: Nibbles = get the other party to feel like this is a done deal, then push them for further small concessions. (nibbles are one-way) example: "gee, that job offer sounds great!! but there is one thing- just caught that I have to pay for parking. Can you do anything there to make up for that?" Expanding the pie = find a compromise that benefits both parties: "I understand you're extremely short on office space until the new office space is built out, and your office will be a painfully long commute for me until my lease runs out and I can move closer to the office. How about I work from home for a while?"

Sunday, November 04, 2012

Summer 2012 Compass draw result

Had very good matches and experiences in Summer 2012 compass draw. 2 losses to the same opponent  in the finals of the Seeding round and playoff round. Playoff round matchups: