30 November 2012

ruby day five

by mo

“RAILS is crap.” This statement wouldn’t hurt so much if you understand it’s short comings. That doesn’t mean you shouldn’t use it, but it important to understand where it can help you succeed and where it can hurt you.

Read the RFC for HTTP, SMTP etc.

Build a light rack implementation.

  • install the rack gem.
  • create a config.ru
    • create something that response to call() and take in a single parameter and returns an array.
    • “A Rack application is an Ruby object (not a class) that responds to call. It takes exactly one argument, the environment and returns an Array of exactly three values: The status, the headers, and the body.” - rake spec
  • call rackup to start the server.

Avoid constraining your thinking to tools. Focus on things that can get you engaged. (Use your brain)

  • languages and tools don’t matter.
  • tools enable us but dont make or replace us.
  • Google generation: do we know how to problem solve any more?
  • the people who are having fun are the ones putting up the answers to problems that they solved. The rest of us are googling for their answers.
  • Patiently work towards something greater.

If you get lost in the mechanics then you lose the big picture.

  • Respect TDD as a design tool not just a testing tool.
  • “Who am I being that my childrens eyes are not shining.” - Benjamin Zander
  • Test driven designers have fluidity.
  • identify responsibilities and design by contract.
  • consider the reversibility factor.
  • fight the need to see what the end game looks like.
  • OO systems are a compositional web of behaviour.
    • you are not meant to follow an oo system in a linear way.
  • pseudocode helps to think at a higher level
  • study the GRASP patterns
  • A lego house is built up by a bunch of smaller pieces.
  • interaction is behaviour based testing.
  • how would a client component want to consume the api of a collaborator.
  • stop carrying the whole mental map of the system in your head.

Don’t mistake EASY for SIMPLE.

  • mindset of the expert is bad, maintain the beginners mind.
  • attack yourself mercilessly daily to become a master.

To those who are given much, much is required.

Choose to be the change you wish to see in your environment.

  • show people how much you love what you do.
  • go forward with the intention of mastery in mind, not the attainment of master.
  • it’s about the will to act.

The tool should support a design.

daily katas


  • inspirational videos
  • tony robbins video

Learn protocols

  • TDS - protocol for streaming data to and from sql server.

Discussion on algorithms and data structures

  • B Tree
  • OctTree
  • Trie