Hey friends!
I'm married! Ahhhh! Hope you all had a splendid week. I definitely did. Last weekend was the first week I didn't send out a letter since starting this newsletter thing, and it felt so wrong. But then again, I had a decent excuse.
Now let's get back at it, and let's get groovin.
Â
Web links of the week
Seamless loop SVG stroke animations
js2flowchart
Essential Image Optimization
Integrating React and Vue Components in One Application
Frappé Charts​
Â
Something that interested me this week
Phew, between my wedding and
my Udemy course and a couple side projects, I have had 0 free time in the past couple months. It's weird being able to have the freedom to watch TV (just finished Stranger Things 2!) and just have a few nights of not doing anything super productive. I almost feel guilty about it. There was a
good thread about this on Twitter the other day. Learning to be okay with not being productive all the time is something that has taken me a long time to grasp, and I'm still working on that.
All that being said, for those who don't feel like taking any nights off, coming up next week is the beginning of December, which means it's
24 Pull Requests season! If you don't know what that is, it's an initiative that's like an advent calendar of pull requests to benefit the open source community. Consider giving back to the tech community with your coding skills this season!
Â
Interview question of the week
Last time, I had you write a function addg that adds from many invocations, until it sees an empty invocation.
Here's my solution!
function addg(a) {
if(a === undefined) return a;
return function g(b) {
if(b !== undefined) {
return addg(a+b);
}
return a;
};
}
This week's question:Â
Write a program that takes in a text file of sentences, and returns a 2D array where the larger array is broken up by sentences, and the inner arrays are broken up by words.
For example, if the text file contents are:
I find fire to be dangerous and wild. It destroys all things in its wake. It can't be tamed. Like me.
The output would be:
[["I", "find", "fire", "to", "be", "dangerous", "and", "wild.",],
["It", "destroys", "all", "things", "in", "its", "wake."],
["It", "can't", "be", "tamed."],
["Like", "me."]]
Â