That colleges aren't teaching this as a first-rate topic is a real failure. This is, in my opinion, the most important skill any engineer should have.
That colleges aren't teaching this as a first-rate topic is a real failure. This is, in my opinion, the most important skill any engineer should have.
My main driver is Ruby - I have a good feeling about code that can be refactored to use Enumerable more effectively; but I also know that Enumerable offers so much that I might be expecting too much of it. So 80% of the time I point to a method that solves the exact problem and the rest of the time I know how to write it differently.
"Why do you know about filter_map?"
"Because people were confused about reduce and each_with_object and map and maybe you just want to loop through non-nil objects in one pass"
I agree. Especially knowing how to question and how to break problems down. I'm not sure intuition is a thing that can be taught, but it's a thing that emerges as a consequence of being curious and learning how to question and find answers to those questions.
That aspect is also why I think that being generally curious and having a broad base of knowledge makes you a better engineer. It's amazing how often apparently unrelated knowledge can give you an insight into solving programming problems. People who are laser-focused on "computer stuff" specifically often miss important insights.
And like you mention, when a problem arises and you query ur mental rolodex, there’s many more solutions/ideas to iterate over and consider
If you’re interested/havent already read: https://stenzelclinical.com/wp-content/uploads/2021/12/Kahne...
I think students at all levels tend to avoid this, and there isn’t stomach to fail them for it on the academic or family sides.
How to ask the best questions
How to find the answer to such questions
Totally undervalued skills everywhere