I’ve always flunked at math; and knowing how intertwined programming is with math, I’m skeptical of my ability to learn how to code. Can someone be too dumb to learn programming? If it helps, I’m mostly interested in learning Common Lisp.
I’ve always flunked at math; and knowing how intertwined programming is with math, I’m skeptical of my ability to learn how to code. Can someone be too dumb to learn programming? If it helps, I’m mostly interested in learning Common Lisp.
I’m starting to believe I am. Been at this for a year and I still don’t understand how to use methods like .filter() or .map() despite reading and practicing, it’s all just smashing the keyboard until it works. I know some other devs will come in and joke they do the same thing but no, I feel truly lost when trying to figure this out.
It took me a long time to really grok iterative methods like this, but once it clicks, you will absolutely know and feel like you have unlocked a new super power.
It starts with completely understanding that you are just passing functions as arguments, and those functions are being invoked, in a loop, for each item in the collection. Once you have that concept internalized, you should then learn the difference between filter, map, reduce, etc. The general difference boils down to: 1. How the iterator function changes the value being iterated over (most don’t) 2. What does the iterator function itself return (i.e. map itself, not the function passed into map. map and filter both return a new list, reduce returns the data structure being reduced into)
I would skip trying to understand reduce at first, though it’s the method you can implement all other such iterative functions with. The derivations like map and filter are just easier to start with.
And again, seriously, it took me like 2 years to completely internalize all of this, even after CS classes.
I have over a dozen years of experience as a software engineer and I started learning Scala and monads recently for a new job. I’ve come to the conclusion that monads are terrible and make things more difficult despite the on-paper description. Don’t worry about it, you’re much more competent than you think.
I’d like to believe that, I really would but I can’t when it takes the better part of 2-3 hours of frustration just trying to figure out how to reverse a string before just doing a for loop and going over each individual character, only to find out all I had to do was something stupid simple like str.split().reverse().join()
But now you know for next time! Everything is a mystery, until you figure it out.
It will come in time, promise. I had a REALLY hard time understanding recursion until I started using it more
I’ve mostly reached a point where I’m not always having to go back a look up documentation, but for some reason array methods still get me.
Every. Single. Time.