Did you get 4
, 5
, and 6
?
That makes sense — we’re applying an “add 1” function to 3 (which is 4
), an “add 2” function to 3
, (which is 5
)and an “add 3” function to 3 (6
).
You certainly wouldn’t be alone in assuming this behaviour but, perhaps surprisingly, that isn’t what happens.
Try running this code in a Python interpreter, and it will print out 6
, 6
, and 6
.
WAT…?
Lambda functions are closures. That means, that they “remember” how to access variables from the scope where they were defined.
For example, in lambda number…
There are a number of subtle ways to wreck the performance of your frontend code. Some of them are true of all JavaScript code, and some are specific to individual libraries.
Some of these pitfalls will be found automatically for you by your library (“Warning: Each child in an array or iterator should have a unique ‘key’ prop.”), but others you’ll need to find and fix yourself.
React is a high-performance library. It’s great. But that doesn’t stop you using it to write code that moves about as fast as a tired cow.
Getting bad performance from React typically means…
When I hired my first dev team, I ran into the same problem that every other startup CTO faces. Attracting great people without great budgets is tricky for a startup, in part thanks to competition from tech giants (👀 looking at you AppAmaGooFaceSoft). But growing — and retaining — your own tech folks requires a serious time investment — something I didn’t have. As a busy technical founder, all of that felt like a luxury to come back to later. I was wrong.
The 2018 HackerRank skills report asked ~39,000 developers what they want most in a job. The top…
In my previous essay, I wrote about how tech teams don’t learn. I don’t think it’s a secret that many training resources don’t work. So why do tech leaders put up with it, and pay for resources that they don’t value?
The answer started to become clear when I listened to how some CTOs, VPs of Engineering and other tech leaders talk about learning. Here are some quotes:
“Training isn’t a priority”
“My team doesn’t have time for training”
“Our team just need to read the documentation”
“It’s better to just learn things as you go”
“I don’t have time…
Co-Founder & CEO of Skiller Whale; published curriculum author and keen funk saxophonist.