🕺 "There is power in being robbed & still choosing to dance." - Amanda Gorman
Hey friends!
We made it to the end of April! This month was definitely my busiest in a long time, but I'm on vacation now for a very welcome break. Let's surf the web.
Was this forwarded to you? You can subscribe here!
Web links of the week
An Interactive Cover Component
3 ways to store variables in React, and why you shouldn't sleep on useRef
I Made a Funny Game About Software Teams. It Turned Out to Be a Mirror
Godot Showcase – Xogot: Godot for iPad & iPhone
Something that interested me this week
I spoke at Codemotion Madrid this past week! It was a really great time, the conference was cool and I got to meet some lovely people. My talk was a keynote called, "Our Brains in the AI Era" and I'll be sure to share the recording as soon as it's up!
And now that that's done... I'm on vacation in Barcelona with my family! We've been eating delicious food and walking it off constantly, and it's been great to be mostly offline and just enjoying some brain space.
...I do get the "side project itch" though when I have time off, and have been tempted to start a new one. I shouldn't!! But it would be fun!!
Sponsor
No sponsor! Be free from capitalism!
...But also it'd be cool if your company would be down to sponsor, because though this newsletter is free to read, it's not free to make!
There's some info here if you wanna pass it along to decision-makers in your org.
Or, if you'd like to help support my work individually, you can use Patreon or GitHub Sponsors (both of which get you access to a very fun Discord group)!
Interview question of the week
Last week, I had you match characters to a pattern, and it was a sneakily tricky one! Nice work Christian, Shreya, Amine, George, Micah, Willy, Ten, Ridhwaan, Toni, Paul, Donato, and the console cowboys in the Ruby Users Forum!
This week's question:
You are given a 2D grid where 1 represents an intact tile and 0 represents a broken tile. A "broken region" is a group of connected 0s (connected horizontally or vertically). Find the minimum number of tiles you need to repair to ensure no broken region has an area larger than k.
Examples:
const grid = [
[1, 0, 0, 1],
[1, 0, 0, 1],
[1, 1, 0, 1],
[0, 1, 1, 1],
];
const k = 2;
let newGrid = [
[1, 0, 0, 1],
[1, 0, 0, 1],
[1, 1, 0, 1],
[0, 0, 1, 1],
];
let newK = 1;
minRepairs(grid, k)
> 2
minRepairs(newGrid, newK)
> 3
(you can submit your answers by replying to this email with a link to your solution, or share on Bluesky, Twitter, LinkedIn, or Mastodon)
Cool things from around the internet
Everyone should make music in some shape or form
Whose Story is it Okay To Tell?
Plants can sense the sound of rain, a new study finds
Custom keyboard with GMK WoB Katakana and DCS WoB
Joke
What's faster than an escalator?
An escasoonor!
That's all for now, folks! Have a great week. Be safe, make good choices, and stay hydrated!
Special thanks to Ben, Kinetic Labs, and Marta for supporting my Patreon and this newsletter!
cassidoo
website | blog | github | bluesky | youtube | twitch | twitter | patreon | codepen | mastodon