Quotes

Two quotes on failure:

“Failure is the opportunity to begin again more intelligently.”

Henry Ford

The greatest mistake you can make in life is to be continually fearing you will make one.

Elbert Hubbard

Also there’s an excellent post on Hacker News titled What has been your biggest mistake? Some of the ones I like are:

“Getting a degree. Honestly, I didn’t need it. Contentious subject I know, but from the Hacker perspective, I have always relied on self learning in concentrated bursts to get me through – want a thorough understanding of TCP/IP? Spend 3 weekends going through the documentation and then playing around. Not 6 months in rigidly structured classes with no leeway for progression above and beyond what is in the curriculum. I could have got a job that paid my pocket money, whilst learning more and coming out with less debt. “but would this have paid off?” I hear everyone say. My degree or time in education has absolutely no standing of where I am now, apart from the fact that I feel I could have been here by early twenties instead of mid twenties”

Jobeyonekenobi

“Spending the first half of my twenties working my guts out for a big corporation where my efforts went largely unnoticed outside of my immediate sphere. I’m certain that if I put that time into a start-up I would be much better off today — even if it failed.”

Cubix

and I laughed at this, which is probably deeper than I currently appreciate:

I’m kinda curious – is there anyone who doesn’t regret their twenties? We’ve got three posts regretting working for the wrong startup (mine, menloparkbum, and gscott), one working for a big company (yours), one going to grad school (timcederman), one getting a degree (jobeyonekenobi), and one doing nothing (johnyzee). So apparently working for a small company is bad, working for a big company is bad, not working is bad, and getting educated is bad. What should one be doing?

nostrademons

Not focusing on ideas that interested me, but rather ones that interested others.

qhoxie

Biggest Regret: Waiting too long.

mybwong

My worst mistakes were in doing what was expected of me, rather than what I wanted to do.

icky

Lastly, I’ve been listening to Randy Pausch’s Last Lecture and I encourage anyone who hasn’t to check it out.

Backwards Learning

Per Marc Andreessen’s recommendation, I’ve been perusing the Wall Street Journal the last few weeks. To say there’s a lot I don’t understand would be an understatement. There are a lot of fundamental things I don’t understand about the world, the stock market, finance, and business. For example, what exactly does the Dow Jones Industrial Average measure? How is it calculated? How does a company get added to that average? What causes stock prices to change? I don’t even understand the concept of buying and trading shares of a company anyway.

Realizing that I need to back up a few steps, I picked up The Guide to Financial Statements which I’m slowly making my way through. Last night I picked up Investing for Dummies. Finally a book written for me!

In retrospect, I’m not sure I’d do it differently. By working backwards and starting at the deep end I have a better idea of what to focus on now that I’m learning the basics. It’s a pleasure getting those “Aha! Now that makes sense” moments. Given that I read a quarter of Investing for Dummies a few years ago and don’t remember any of it, I think this method will help me connect the dots in a more practical, memorable way.

Ajax Lab: Draggable w/ Memory

Added position saving to yesterday’s Prototype example: you can see it here. When you move the box around it will save the position where you drop it, then when you reload the page it’ll start out in that position. Pretty nifty, eh?

I ran into some more syntax issues where I kept switching PHP and JavaScript syntax. That’s mostly an experience issue which should erode with time.

One important concern is that anyone can POST data to the page’s accompanying PHP file. I tested this by posting a position of 1000000px,1000000px and sure enough, when I loaded the page the green box jumped to that spot. Firefox was not too fond of this. To remedy the problem, I added a conditional to the JavaScript which adjusts negative and high values but in retrospect, I should check them in the PHP file before they are saved in the database.

I asked John whether there was a way to check that a POST was coming from my site and he said yeah, with $_SERVER['HTTP_REFERER']. At first this seemed like it would solve the problem, but I realized that you can use FireBug to modify the source code on any page. That means that someone can visit any page on this site, edit the HTML to POST to the PHP file, and it would treat it the same as code I had written.

I think the best solution is to validate the data before inputting it into the database. That way if someone does try to set the position to 1000000px, 1000000px it won’t cause any problems.

Two more helpful sites:

JavaScript – Converting Strings to Numbers

JavaScript – Conditional Statement Syntax

On an unrelated note, I added a “Recommended Books” section to the sidebar, which is something I wish other tech writers did more often.

An Investing Principles Checklist

This is taken verbatim from Poor Charlie’s Almanac, a compilation of Charlie Munger’s thoughts and wisdom. I encourage anyone who finds value these words to purchase the book, which is full of excellent pieces like this.

An Investing Principles Checklist

Risk – All investment evaluations should begin by measuring risk, especially reputational

  • Incorporate an appropriate margin of safety
  • Avoid dealing with people of questionable character
  • Insist upon proper compensation for risk assumed
  • Always beware of inflation and interest rate exposures
  • Avoid big mistakes; shun permanent capital loss

Independence – “Only in fairy tales are emperors told they are naked”

  • Objectivity and rationality require independence of thought
  • Remember that just because other people agree or disagree with you doesn’t make you right or wrong – the only thing that matters is the correctness of your analysis and judgment
  • Mimicking the herd invites regression to the mean (merely average performance)

Preparation – “The only way to win is to work, work, work, work, and hope to have a few insights”

  • Develop into a lifelong self-learner through voracious readings; cultivate curiosity and strive to become a little wiser every day
  • More important than the will to win is the will to prepare
  • Develop fluency in mental models from the major academic disciplines
  • If you want ot get smart, the question you have to keep asking is “why, why, why?”

Intellectual humility – Acknowledging what you don’t know is the dawning of wisdom

  • Stay within a well-defined circle of competence
  • Identify and reconcile disconfirming evidence
  • Resist the craving for false precision, false certainties, etc.
  • Above all, never fool yourself, and remember that you are the easiest person to fool

Analytic rigor – Use of the scientific method and effective checklists minimizes errors and omissions

  • Determine value apart from price; progress apart from activity; wealth apart from size
  • It is better to remember the obvious than to grasp the esoteric
  • Be a business analyst, not a market, macroeconomic, or security analyst
  • Consider totality of risk and effect; look always at potential second order and higher level impacts
  • Think forward and backwards – Invert, always invert

Allocation – Proper allocation of capital is an investor’s number one job

  • Remember that highest and best use is always measured by the next best use (opportunity cost)
  • Good ideas are rare – when the odds are greatly in your favor, bet (allocate) heavily
  • Don’t “fall in love” with an investment – be situation-dependent an opportunity-driven

Patience – Resist the natural human bias to act

  • “Compound interest is the eighth wonder of the world” (Einstein); never interrupt it unnecessarily
  • Avoid unnecessary transactional taxes and frictional costs; never take action for its own sake
  • Be alert for the arrival of luck
  • Enjoy the process along with the proceeds, because the process is where you live

Decisiveness – When proper circumstances present themselves, act with decisiveness and conviction

  • Be fearful when others are greedy, and greedy when others are fearful
  • Opportunity doesn’t come often, so seize it when it does
  • Opportunity meeting the prepared mind: that’s the game

Change – Live with change and accept unremovable complexity

  • Recognize and adapt to the true nature of the world around you; don’t expect it to adapt to you
  • Continually challenge and willingly amend your “best-loved ideas”
  • Recognize reality even when you don’t like it – especially when you don’t like it

Focus – Keep things simple and remember what you set out to do

  • Remember that reputation and integrity are your most valuable assets – and can be lost in a heartbeat
  • Guard against the effects of hubris and boredom
  • Don’t overlook the obvious by drowning in the minutiae
  • Be careful to exclude unneeded information or slop: “A small leak can sink a great ship”
  • Face your big troubles; don’t sweep them under the rug