Thursday, September 29, 2011

Day 8295

Making Better Decisions


I can trace all my problems back to a decision I made while tired and unfocused. This is exactly what former-President Clinton talked about before.

“In my long political career, most of the mistakes I made, I made when I was too tired, because I tried too hard and worked too hard,” he told Rao. “You make better decisions when you're not too tired. So that would be my only advice.”[1]

That isn't a call not too forgo sleep once in a while to work hard. It means you should be rested when making important decisions. Unfortunately, you make important decisions in your life every day. I have no solution to that. I will say, though, that this applies all the way, to my relationships when I've going through rough times, to the ebay seller I said I would buy from. Before you pull a trigger, catch some shut-eye.

At the very least, it'll save you a bullet.

[1] Source: Sleep Eduction Blog

Tuesday, September 27, 2011

Day: 8293

Negotiation: Because you're worth it


Before signing my contract for some part-time work while I do my M.S., I called for a wage increase. Comparable TA and RA positions pay tuition plus a stipend that comes out to $40 per hour, presumably non-taxed. Since I was getting slightly under that before taxes, I tried to make things work.
The person on the other end asked for a number. I recalculated to be 40 after tax, but it came out to be 50. Which was a bit of a jump for her. In retrospect, I should have gotten her "number". However, I let her get back to me. A few tactics would be better:
  • Presenting your BATNA in clear comparable terms. Here it was $80/hour, but I presented it as "XX wage, plus a stipend"
  • Getting information in return for information. Don't walk away without some idea what they want.
  • Clarity. Work together, without timidness, but directness. Everyone will benefit as a result

Anyway, ended up with a pinch of an increase. I'm glad I asked, for the practice.

Simplicity


Too many things in our lives. Too meta. Look at the path, and look for the shortest path. Then the clearest path. So that soon you see nothing but your goal. My goal: To solve social problems with technology, and technical problems with society, and then receive recognition for it.

First day as a Grad Student

How do you feel about this?

In my last few years, it's hard to tell what I've learned. Just a bunch of facts, but nothing amazing conceptually. From now on, I plan on reflecting upon/ remembering what I learn each day; what I learn each week; each quarter; each year. The key lies with actually learning something, conceptually speaking -- not just facts, although those are good too.

Today I learned a bit about machine learning:

  • Supervised Learning -- train an algorithm with data, which consists of "inputs" and "outputs"

    • Regression analysis used with continuous variables

    • Classification used with discrete variables

  • Learning Theory -- the theory of machine learning

  • Unsupervised learning -- using an algorithm to identify "groups" of variables, without prior training or criteria

  • Reinforcement learning -- identifying "good" and "bad" behavior, allowing the machine to adapt

Thursday, September 22, 2011

MSCS Orientation

There's Stanford. Then there's the computer science at Stanford. Then there's the graduate computer science programme at Stanford.

See, what you have now is the Nerdiness3. And then there's orientation, where these fine souls come together. At our luncheon table, we had a nail-biting, hard-glaring, strongly-opinionated Jewish nerd on my right; on my left, there was my roommate, the friendly, well-spoken, positive, humorous American fellow; and on his left, quiet, subdued, Indian from Dehli.

I can only imagine how everyone would classify me. But there you have it. Some of the finest computer scientists in the world (minus myself).

Tomorrow, we get to meet Google nerds...

Wednesday, September 14, 2011

How I handle VBA

How to handle any task in VBA:

1. Open up 30 google search tabs like: "how to " + QUERY + " VBA?"

2. Profit.

Monday, September 12, 2011

Change the date on your computer

Some dangerous lack of soft modularity in VBA.

Forgetting that Date was a datatype, I went ahead and used this little code in VBA for an excel app.


Date = Now()
countdown = Date - 20
...
Date = Date - 20


I started getting inconsistent values for Date every time I ran the program, and realized Date was actually decreasing over time. I checked my system clock and was fooled at first since the system date (on the Windows toolbar) matched the same date as Date.

Didn't take a while to realize that the system clock was wrong too!

So I suppose I was changing the value of Now(), Date, and the system date itself by modifying it! ridiculous!

To fix this, I just added back the missing days to the Date variable.

Bloomberg calls

How do you handle Bloomberg XLS values that aren't complete?


Sub Something()

If Application.WorksheetFunction.CountIf(Range(Cells(5, 5), Cells(lastRow, 8)), "#N/A Requesting Data...") > 0 Then
Application.OnTime Now + TimeValue("00:00:30"), "Something"
Exit Sub
End If

End Sub



The code as is keeps delaying until all values specified are done loading from Bloomberg.

Source: Bloomberg API best practices

Sunday, September 11, 2011

How bad do you want it?

Sitting outside with HC. It was his last day in SF. We decided to go on a fast food binge -- one his favorite things to do. With an hour left to kill before had to head out on the bart to SFO back to Chicago, we decided to drink some brews on market. Finding a 6-pack of.. (what, exactly?) for 3 bucks, we drained the first while waxing philosophical.

Our thoughts kept returning to -- How Bad Do You Want It?.

How bad do you want it?

How bad do these coders on cocaine want it? How bad do these super ambitious bankers want it?

Am I lucky enough? Am I good enough?

Only one way to find out.

Saturday, September 10, 2011

JW's advice

JW told me to write this down (as accurate as I can be):

You're 22 right now. You don't want to be married for another 10 years at least. Marrying early is right for some people. But remember, I told you, don't marry early. And I know in ten years you will not have listened and I will punch you in the face for not doing so. But also, never do something you'll regret. If she's the right one, well then...

Thursday, September 8, 2011

One year challenge

JC said:

"It's like something clicked
one year to excise the bulls***tery from my life
i challenge you to the same"

Thursday, September 1, 2011

Copy and paste from remote desktop

This trick is for windows, mind you.

Since I was remoting into a Windows 7 machine from an XP, I had to do this trick on my older XP and then disconnect. When I reconnected (make sure you have the "Clipboard" option selected) everything worked fine.


Follow the following instruction in both local and remote computers.

Go to Start->Control Panel->Administrative Tools->Services. Enable and start the following services in the order shown below:

1. Network DDE DSDM 2. Network DDE 3. ClipBook

If you want to see the clipboard action in live:

You can go to Start->Run and type clipbrd and click OK to run clip board viewer. You will be shown current clipboard objects in this viewer.

Now you can use standard copy/paste menu options of the applications in both the computers to exchange the data.