A Sofware Engineer's Notes
Short Notes on Software, Life, Distributed Computing

Richard Feynman Problem-Solving Algorithm

  1. Write down the problem
  2. Think very hard
  3. Write down the solution

High Performance Software Requirements

What do I need to have to develop high performance software?

  1. Fast, concurrent programming langugages
  2. Exotic, high performance data structures
  3. Efficient algorithms
  4. Modular Architecture
  5. Fast and reliable messaging framework
  6. Caching

Notes: John Cleese on Creativity

Creativity is not a talent. It is a way of operating.

Creativity is not an ability you either have or do not have. It is unrelated to IQ.

Creative people in a child like mood, can play with ideas for their own sake, not for immediate practical purposes.

People operate/function in two modes:

  • Open
  • Closed
Read all Source: YouTube video

Design for all 5 senses

"Good design looks great, yes — but why shouldn't it also feel great, smell great and sound great?"

"Great sex is almost the perfect 5 senses experience [...]"

  • Visual
  • Auditory
  • Tactile
  • Olfactory
  • Gustatory
Source: TED

Scientist vs Engineer – Tony Hoare

long term short-term
idealism compromise
certainty risk
perfection adequacy
generality specificity
separation amalgamation
unification diversity
originality best practice
formality intuition
correctness dependability
Source: code monk

Are you HALTed?

Don't make important decisions (hiring, school, etc) when you are in any of the HALT states

  • H – Hungry
  • A – Angry
  • L – Lonely
  • T – Tired

Fallacies of Distributed Computing

  1. The network is reliable.
  2. Latency is zero.
  3. Bandwidth is infinite.
  4. The network is secure.
  5. Topology doesn't change.
  6. There is one administrator.
  7. Transport cost is zero.
  8. The network is homogeneous.

Five Principles to Improve Your Fluid Intelligence

  1. Seek Novelty
  2. Challenge Yourself
  3. Think Creatively
  4. Do Things The Hard Way
  5. Network

10 Simple Things You Can Do Today That Will Make You Happier, Backed By Science

  1. Exercise more - 7 minutes might be enough
  2. Sleep more - you'll be less sensitive to negative emotions
  3. Move closer to work - a short commute is worth more than a big house
  4. Spend time with friends and family - don't regret it on your deathbed
  5. Go outside - happiness is maximized at 13.9 C
  6. Help others - 100 hours a year is the magical number
  7. Practice smiling - it can alleviate pain
  8. Plan a trip - but don't take one
  9. Meditate - rewire your brain for happiness
  10. Practice gratitude

Linux/Unix Commands

  • top htop iotop
  • lsof
  • free
  • ps
  • vmstat
  • uptime
  • w
  • netstat
  • tcpdump
  • nmap
  • cat /proc/(cpuinfo | meminfo | zoneinfo | mounts)
  • iostat
  • pidof

OS X DTrace Commands

  • iosnoop
  • execsnoop
  • opensnoop
  • iotop
  • errinfo

Numbers Everyone Should Know

L1 cache reference 0.5 ns
Branch miss-predict 5 ns
L2 cache reference 7 ns
Mutex lock/unlock 25 ns
Main memory reference 100 ns
Compress 1K bytes with Zippy 3,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
Round trip within same datacenter 500,000 ns
Disk seek 10,000,000 ns
Read 1 MB sequentially from disk 20,000,000 ns
Send packet CA->Netherlands->CA 150,000,000 ns