#thisweekilearned — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #thisweekilearned, aggregated by home.social.
-
This Week I Learned: It is much harder to get to the Sun than it is to Mars #ThisWeekILearned #TWIL
https://dltj.org/article/issue-108-educational-technology#twil
-
When you use the block syntax with Hash.new to define a default value, you lock yourself to only using the square bracket syntax for value lookup. The fetch method ignores the block, default, and default_proc.
This bit me hard this week, and my pair, @gd, got to watch me flounder on why fetch wasn’t getting the default value.
By the way, the Hash.new with a block is great for memoization of calculated or network lookup data.