Declarative programming is all the rage these days, but I wonder how many people understand that when they're writing in this style, they are writing to an abstraction layer. These two paradigms are not mutually exclusive, and understanding both will make you a better programmer.
As we all learned during our first forays into computers, they are just machines, and they only do exactly what you tell them to do, how you tell them to do it. I emphasize that last point, as that is what imperative programming is. Understand that imperative programming is the basis for everything built on top of it. Computers must be told exactly how to do anything you want them to do. Declarative programming is built on top of this foundation. Imperative programming deals with the nitty-gritty details of how to loop over an array, or IEnumerable. Declarative programming just says I want to loop over this thing (whatever it is). The declarative must at some layer betranslated to the imperative in order for computers to work.
Don't get me wrong, I love writing imperative code, who wants to write quicksort for the 10000th time, or a binary tree, etc. Declarative code makes all our lives as programmers easier, but understand that it's foundations are built upon imperative code. While it's great to write that declarative code for iterating over an array by just writing array.forEach(x=>x = x+1), understand that someone wrote the imperative code to actually do the looping over the array, and it would be great if we could inspect all the imperative code that we're depending on to make sure that it's well written and that we understand all the implications of the declarative code we're writing.
Thursday, April 26, 2018
Monday, April 2, 2018
Mindset
[A fixed mindset ] is the idea that your talents and abilities are just fixed. It's the idea that some people have a lot and some people have less and that's the way it's always going to be.
A growth mindset is the idea that talents and abilities can be further developed through hard work, good strategies, asking for help and input from others. It's not that everyone's the same, but it's that everyone can grow their abilities.
When you praise intelligence it backfires, it puts kids into a fixed mindset, and right away they don't want a challenging task. But if the adult praises the child's process, the effort or strategy, and ties it to the learning they've done or the success they've achieved, then we're putting kids into more of a growth mindset.
- Carol Dweck
Have a listen to this TED Talk
A growth mindset is the idea that talents and abilities can be further developed through hard work, good strategies, asking for help and input from others. It's not that everyone's the same, but it's that everyone can grow their abilities.
When you praise intelligence it backfires, it puts kids into a fixed mindset, and right away they don't want a challenging task. But if the adult praises the child's process, the effort or strategy, and ties it to the learning they've done or the success they've achieved, then we're putting kids into more of a growth mindset.
- Carol Dweck
Have a listen to this TED Talk
Subscribe to:
Comments (Atom)