ruby day two

Posted on November 27, 2012 school

Starting with leveling up our brains using Lumosity.


  • use it or lose it with respect to neural nets
  • isolate focus on deep skill to build neural nets as an adult.
  • retrain visual cortex for audio processing.
  • code kata for a habit of daily practice.
  • if you dont have a moment every day where you feel out of your league.

The Brain that changes itself book

Small daily practice sessions

  • code katas
  • daily brain exercises

Complete context switch.

  • don’t let background thoughts continue to linger on problems not currently under your focus.
  • divergent thinking.
  • see 20-30 different ways to attack a problem. not just one.

Code Katas to complete


certain methods like ` backtick are actually methods on Kernel which gets mixed into the heierarchy somewhere.

If you tell a Proc to return it will exit the enclosing method. do
    p 'blah'

if you tell a lambda to return it will only exit the scope of the lambda not the enclosing method.

  lambda {
    p 'blah'

  def do_something(&block)

  def do_something(&block)
  • lambda
  • procs
  • blocks do item end
  • method object method :say_hi

  • open up Proc and add a memoize method to cache calls.
  class Proc
    def memoize(*args)
      lambda { @result ||= call(args) }

Brain melted x4