Interview Questions Of The Week
From the rendezvous with cassidoo, a weekly tech newsletter by Cassidy Williams.
-
GitHub: izkreny/cassidoo_QOTW
โน๏ธ NOTE
Answers under section Original answers are provided by me.
All other ones from various people (mostly from the Ruby Users Forum) are credited by prefixing method names with usernames or social handles, and with the link(s) to the web source.
Answers are tested against the latest stable version of Ruby programming language.
๐ก TIP
Maximum line lenght for oneline solution MUST not exceed 150 (columns).
Oneline solution MIGHT use abbreviated variable names.
Additional multiline solution SHOULD be provided if one-liner is too cryptic!
๐ข IMPORTANT
Unless otherwise noted, all Original answers are the result of my own mental capabilities and typed with my bare hands, with no AI interference whatsoever. ๐
โ ๏ธ WARNING
Ruby
Moduleclass is excessively used for namespace purposes in not so recommended/standard wayโmodules are in plural noun form and not in singular noun or adjective form. This is not how you SHOULD usually use them, but it is impeccably good enough for this little project, especially because it avoids clashing with the standard Ruby Benchmark module.
โ CAUTION
In some Questions metaprogramming is used inside
Minitest::Testsubclasses because it makes a perfect fit for the nature of this project (i.e. to easily test all provided Answers); but this level of DRYness is undoubtedly something that is NOT recommended (even FORBIDDEN!) in general testing practice, JFTR! ๐บ