#homesteading book draft 2:
* wrote 3,000 words (12 pages)
* revised 14,000 words (48 pages)
* book is now > 500,000 words (1,667 pages)
* on schedule for completion on 28 Feb
ok, this is very cool the line you're look at starts with the variable 'sections', which is defined previously sections is a data type called a hash ; it associates values, like two columns in a spreadsheet - each row forms a pair Monday: 3 Tuesday: 12 Wednesday: 99 etc so
-
-
we then say http://sections.select select is a method that gets invoked on sections, and at a high level is says "inspect every element of this, and winnow down to a subset that matches certain conditions" the conditions are specified inside the squiggle brackets { ... }
-
the code inside those brackets is EFFECTIVELY a miniature function. It takes as input each "row" (in the spreadsheet analogy), and it evaluates it to a boolean - should this "row" be selected ? the rows in the spreadsheet analogy each have two elements in them we can call >>>
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.