michaelrmentele.com
23214 41st Ne Ln / Redmond, WA 98053
206 618 4282 / michaelrmentele@gmail.com
Former Associate Power Engineer at Fortune 100 embedded systems manufacturer/developer
michaelrmentele.com
23214 41st Ne Ln / Redmond, WA 98053
206 618 4282 / michaelrmentele@gmail.com
Former Associate Power Engineer at Fortune 100 embedded systems manufacturer/developer
<!doctype html> | |
<html lang="en-US"> | |
<head> | |
<title></title> | |
<meta charset="UTF-8" /> | |
</head> | |
<body> | |
</body> | |
</html> |
A function is pretty simple, right? It's just a reference to a block of code that get's executed when called...
Kind of, but not quite. You see, functions also remember scope and bind to that scope when called, even when the context has changed, they can remember their local context. This is called a closure.
What happens in the following code?
> ![preview](https://github.com/MichaelrMentele/css-projects/blob/master/nodebots/nodebots_preview.png) |
This was my initial reaction when introduced to prototypal inheritance. I was like, jeez, do you have to make it so awkward to instantiate objects? Why can't you just be like everyone else.
I feel vaguely guilty now, a little like that teacher who called young Einstein dumb. Turns out prototypal inheritance is awesome. Cue Highschool Musical and other stories of upsetting the status-quo.
So...
In a word it's delegation--not inheritance at all.
When I first learned about the DOM I was confused about how it was referred to as a 'thing' that could be accessed (false) and a representation of things (true). So, I thought I'd share this distinction.
The DOM is a way of representing a HTML document as a collection of objects. This collection is organized into a tree (nodes) based on how the HTML elements were nested. Everything is a node in the DOM. Each node contains, as properties, it's parent, siblings, and children nodes (among other properties).
It is important to note that the DOM is language agnostic. That is, it is a convention, with which any programming language can generate a tree of nodes that represents some mark up. Most commonly this is done with Javascript.
I've often heard new programmers ask why recursion is so useful. My brother, a successful IOS developer still doesn't see the value in recursion (at least I gather from our conversations).
So, is recursion some pointless 'book' knowledge without practical use?
Not at all!
I want to write a bit about how I've approached learning and how to learn effectively. I don't claim to be the world's foremost expert in learning but I've generalized my process to things like: