“But in the end, none of that matters as much as the simple fact that software does not work the way we think, and until it does, it is not worth trying to perfect.
— Scott Rosenberg, Dreaming in Code
“But in the end, none of that matters as much as the simple fact that software does not work the way we think, and until it does, it is not worth trying to perfect.
— Scott Rosenberg, Dreaming in Code
“Refactoring isn’t about removing code, its about providing coherency to your metaphors. The story you were telling has changed, and while many of the symbols will remain the same (wicked step mother, dark woods, prince) others will change (dwarves, and bramble bracket, ditched for updated concepts of self determinism and midnight balls). Code is symbol manipulation, programming is narrative construction, and refactoring is editing for sense, clarity, and pronoun agreement now that you’ve changed your protagonists gender.
— kellan
class Integer
def d6
Array.new(self){1 + rand(6)}.sort
end
end
4.d6 #=> [1, 3, 3, 5]
(Written in ruby, by me.)