First, we teach people variables, loops and conditions. Then we teach them procedures. Then we are horrified that newly minted "programmers" write code that is a giant mess of nested loops and conditionals, split across arbitrarily created procedures that manage bloated and fully mutable program state.
Mental models are important. Life would be better for everyone if people started learning programming with LISP, Smalltalk, or at least C#'s LINQ in LINQPad.
If you want to learn about functional programming, something like this could give you fun and relatively painless head start: http://www.4clojure.com/ . Also, you could try to download LINQPad and look at code examples.
If you want to learn about real OOP, I would recommend looking into Smalltalk, learning about design principles behind Xerox Alto/Star and listening to some OOP seminars from mid-80s.
If you want to learn about high-level system design, here are some intelligent people I would listen to: Alan Kay, Rich Hickey, Peter Norvig, Salvatore Sanfilippo.
I would also recommend every programmer to watch through at least one introductory AI class. Not because they necessarily need to work with AI algorithms, but because those classes teach to solve programming problems in a better way than just "write more logic and abstractions".
Depends on your background, if you are .Net maybe F#, Java maybe Kotlin, PHP (and I say this as someone who writes PHP as a day job) maybe any other language in existence.
Functional programming is a completely different conceptual model and even if you don't use it day to day it teaches you some important principles.
I have been badly taught Java at university (not sure if the course sucked, or I did, but I am a blunder) and have just found myself drawn into the JS world. I really enjoy the concepts of OO, but I feel like my knowledge is very shallow.
Is it good if I rebuild my foundation on JS? I feel like JS is a bit, uh, messy.
It’s a bit dated, but read “JavaScript, The Good Parts”. Also, check out the Ramda.js library, which brings quite a few good functional programming (FP) techniques to JS.
Function scope is good.
Closures are good.
Higher order functions are good.
Partial function application is good :-)
Warning: if you get too used to FP style programming in JS, Java will feel quite painful afterward.
Mental models are important. Life would be better for everyone if people started learning programming with LISP, Smalltalk, or at least C#'s LINQ in LINQPad.