Stanford Technologies Ventures Program

 My notes on the 2004 Guy Kawasaki video lectures.

Make meaning in your company

Companies that succeed are those that make meaning. If you set out to make money you probably won’t succeed.

Key motivations to start a great organization:

  • Increase the quality of life
  • Right a wrong
  • Prevent the end of something good

Don’t write a mission statement

Make a mantra – three or four words that capture the essence of your organization.

E.g.
Wendy’s “healthy fast food”
FedeEx “Peace of mind”
Nike “Authentic athletic performance”
Mary Kay “Enriching women’s lives”
Kawasaki “Empowering entrepreneurs”

Dilbert mission statement generator website for mission statements.

Get up and get going

Think different, build the product/service that you love.
The best source of entrepreneurial spirit are people under 30 years old and solving a personal problem.
Think different.

Do not be afraid to polarize people. Ideally some people love your product, some people hate your product.

Find a few soul mates. When one person is down, you need the other person to pick you up and help you. Keep you warm.

The new business model

A specific person. Not “we’ll capture millions of eyeballs”. Not “enterprise software”, but “what size, who, and what they do”.

Keep it simple. We want innovate products/technologies.
Fundamentally, you make something, you sell it, you make money — that’s the model a VC can handle.

Ask women. Men has the “killer gene”. Start company to kill another company. Men are predisposed to want to kill things. Women don’t have this predisposition. Don’t waste your time asking men.

Continue reading Stanford Technologies Ventures Program

What Really Happens When We Visit a Web Page

What Really Happens When We Visit a Web Page

The journey down the protocol stack for a perspective of the many, many protocols that are involved in a simple request: downloading a web page.

Our setting consists of: a student, Bob, connecting his laptop to his school’s Ethernet switch and downloads a web page (www.google.com).

Getting Started: DHCP, UDP, IP, and Ethernet

Bob boots up his laptop and then connects it to an Ethernet cable connected to the school’s Ethernet switch, which in turn is connected to the school’s router. The school’s router is connected to an ISP, comcast.net. Comcast.net is providing the DNS service for the school; thus, the DNS server resides in the Comcast network rather than the school network. We’ll assume that the DHCP server is running within the router, as is often the case. When Bob first connects his laptop to the network, he can’t do anything (e.g. visit a web page) without an IP address. Thus, the first network-related action taken by Bob’s laptop is to run the DHCP protocol to obtain an IP address, as well as other information, from the local DHCP server:

1. The operating system on Bob’s laptop creates a DHCP request message and puts this message within a UDP segment with destination port 67 (DHCP server) and source port 68 (DHCP client). The UDP segment is then placed within an IP datagram with a broadcast IP destination address (255.255.255.255) and a source IP address of 0.0.0.0, since Bob’s laptop doesn’t yet have an IP address.

2. The IP datagram containing the DHCP request message is then placed within an Ethernet frame. The Ethernet frame has a destination MAC addresses of FF:FF:FF:FF:FF:FF so that the frame will be broadcast to all devices connected to the switch (hopefully including a DHCP server); the frame’s source MAC address is that of Bob’s laptop, 00:16:D3:23:68:8A.
Continue reading What Really Happens When We Visit a Web Page

Xmonad not regaining focus for IntelliJ

When using GUIs designed with Java Swing, like IntelliJ Idea, the once the focus changes it is lost and cannot be regained. I.e. you can’t type again.

In xmonad.hs you need to add these:

import XMonad.Hooks.SetWMName
import XMonad.Hooks.ICCCMFocus
...
setWMName "LG3D"
...
logHook = takeTopFocus <+> dynamicLogWithPP xmobarPP {

Refer to my xmonad on github.

Programming Languages

Low level programs contain a lot of ad hoc, buggy, and slow implementation of higher level languages. Paul Graham described an excellent idea in “Hackers and Painters”

If you solve a hard problem, the question is not whether you will use a powerful enough language, but whether you will (a) use a powerful enough language, (b) write a defacto interpreter for one, or (c) yourself become a human compiler for one.”
[…]
For example in the OO world you hear a good deal about “patterns.” I wonder if these patterns are not sometimes of case (c), the human compiler, at work.”

In short, as developers we like concise, unbloated languages that is sufficient for what we need.

In-list functions

I was reading Peter Norvig’s spell correct and discovered python had in-list comprehensions. It’s a nice feature which allows you to easily construct a list.


>>> [ x**2 for x in range(1,11) if x % 2 == 0 ]
[0, 4, 16, 36, 64]

It looks very readable. Now, ruby being my favourite language over python, I wanted to see if ruby had a similar feature. The best I can come up with is this:


2.0.0-p247 :017 > (1..10).to_a.map{|x| x**2 if x%2 == 0 }.compact
=> [4, 16, 36, 64, 100]

This isn’t as easy to comprehend. For instance, why is it necessary to have .compact?
Why do we need to call .to_a? Python wins in this case. I’m now a lesser fan of ruby and more of python.
Lastly, I checked this out in haskell – which many consider to be a dense language. It’s also a language I’m looking to do some coding in.


Prelude> [ x^2 | x [4,16,36,64,100]

Not bad. I’d argue that this is as easy as pythons – provided that you understand haskell syntax. Syntax wise, I suspect python is more wordy than haskell.

Ruby lambda vs. procs

In ruby, lambda and procs are pretty much the same, but not quite. Syntactically, they are similar.


lambda_larger_than_4 = lambda { |num| num if num > 4 }
proc_larger_than_4 = Proc.new { |num| num if num > 4 }
(-1..8).to_a.collect &lambda_larger_than_4
=> [nil, nil, nil, nil, nil, nil, 5, 6, 7, 8]
(-1..8).to_a.collect &proc_larger_than_4
=> [nil, nil, nil, nil, nil, nil, 5, 6, 7, 8]

However, there are two main differences.

    Lambda checks number of arguments passed to it and throws error. Proc ignores unexpected arguments and assigns nil to any missing.
    When lambda returns, control is passed to caller. When proc returns, control does not get passed back to caller.