Do you know that ruby method you’d use to parse an iso datetime string? You know, that one?
Forgetting the precise name of a method or the most idiomatic way to solve some simple task can happen to you quite often, specially when you keep changing programming languages. When this happens, my first step is usually to open an interactive session of whatever language I’m using, like ruby’s
pry, and try to remember the method or strategy needed while frenetically pressing
tab and praying to the autocomplete gods. The reason I do this is because 90% of the time I find out what I was looking for quite quickly, without having to context switch out that much of my workflow (poor me if I was doing (ouch) PHP and have no decent interactive REPL to play with).
But it *seems* my problems are over now. I just found out about this amazing tool called how2. It basically puts StackOverflow in your bash. I can now find much quicker that the method used to parse ISO8601 datetime strings is, well, DateTime::iso8601. ;D
Pro tip: create a super alias for each programming language you use, like I did for ruby
alias how2r='how2 -l ruby' and save yourself some precious keystrokes!