Good morning, afternoon, or evening, whenever, or wherever you are!
I hope you had a great week. I personally was off visiting the new in-laws this week, and we had a pretty delicious Thanksgiving dinner. But alas, now it's back to the real world. Let's surf.
Â
Web links of the week
Chartkick.js
G2: The Grammar of Graphics in JavaScript
Pass Data Between Routes In A Vue.js Web Application
Web Frameworks: Conclusions
Â
Something that interested me this week
This week I decided to make a goal of learning how to 3D model more by the end of the year. My ultimate goal is to 3D print parts for board games and keyboards, but that might not be feasible for a little bit.
My plans to practice are as follows:
- Research softwares (currently leaning towards Blender because it's free, but Autodesk has free trials for their products so I might try that too)
- Take an online class to learn the basic tools and shortcuts (I found a few on sale for Black Friday, so I nabbed some of those)
- Try to recreate some existing pieces in board games I have (obviously going to start simple like coins, then hopefully work my way up to houses, animals, and maybe trays for the sets)
- Design my own board game with pieces
- Profit
...well, I probably won't profit. I think there was an Onion article once about someone taking years and years to make their own board game. That'll probably be me. Oh well. Anyway, hopefully I'll have something to show by the end of December!
Â
Interview question of the week
Last week, I had you write a function that takes in text, and returns a 2D array where the larger array is broken up by sentences, and the inner arrays are broken up by words.
Here's my solution:
function s(str) {
let sentences = str.replace(/([.?!])\s*(?=[A-Z])/g, '$1~').split('~');
let ret = [];
sentences.forEach(r => {
ret.push(r.split(" "));
});
return ret;
}
I got carried away with the regex after realizing that sentences can have numbers in them. So what this does is capture a punctuation mark, checks that a capital letter happens after it, and if so, it replaces it with a ~. Then I split the sentences based on the ~, and then split each of the words in the sentence by a space. Woo hoo!
This week's question:
Assume you are given an unsorted list of numbers where everything is duplicated twice except for one number. Find and return that one number! How many solutions can you think of?
Example input:
[1,2,3,6,4,9,9,2,1,4,6]
Example output:
3
Â
Cool things from around the internet
I'm in a keyboard mood today. So all of these are keyboards. Deal with it.
Cardboard mechanical keyboard build log
Little Planck x Honeywell​
Origami keyboard (made with actual paper!)
TX1800 Cold River Hydro
SA Camping on Mechmini 2
VE.A with SA Ashen
Â
Joke
Most people are shocked when they find out how bad I am as an electrician.
Â
Alrighty friends! Hope this next week for you is a bundle of fun. Be safe, make good choices, and get ready for December!
cassidoo