I’d be remiss if I didn’t mention that most people in the tech industry have one asset which is orders of magnitude larger than all their others: the present value of their future career.
Patrick's advice is awesome, and is worth understanding if you're new to – or want to get started – investing. The quote above from the last section is a particularly acute way of keeping things in perspective as you approach an investing strategy, especially given the temptation to optimize for marginal increases in return.
Also remember the rule of 72 – the doubling rate of your money (relative to a 7-11% annual return) will be between 7 and 10 years. This means that if you're in your early 20s, anything you invest today essentially gets an extra doubling period before retirement versus someone just starting to invest in their 30s. Think:
$5k invested at 20 years old, given an annual return of ~9%, will double roughly every 8 years.
$10k at 28, $20k at 36, $40k at 44, $80k at 52, $160k at 60.
Play with those numbers accordingly, but never forget the power of compounding interest and the insane value of starting early. Even through high and low markets, the power of dollar-cost averaging means that one of the best things you can do right is to set up a recurring investment in an index, automatically withdrawn from your bank account. This will generally adjust risk in your favor through the inevitably tough years at some point in the future.