Hey y'all👋🏻
Ways to stay in touch when the 🛳 sinks completely
kyleshevlin.com - has link for my email address
mastodon.social/@kyleshevlin - new hang out
I'm on Instagram . I rarely post, but it's good for DMs
Kyle Shevlin
@kyleshevlin
Software engineer, toxic positivity disruptor & anti-grifter. Enjoys #JavaScript, #React & more. ADHD AF. He/him. For golf content:
Kyle Shevlin’s Tweets
Honestly, learning that my father is emotionally immature has moved my anger/hatred of him to indifference.
I still don’t care to have anything to do with him, but the reason is totally different now.
10
Show this thread
Yes.
Quote Tweet
Seeing your parents for who they are and understanding their level of maturity will allow you to stop seeking from them what they aren’t able to give.
1
1
12
Show this thread
Been putting off buying a small truck because I don’t need a 2nd vehicle 99% of the time. Might be the year to finally do that.
2
1
Show this thread
Was hoping it would be a solution for getting plywood home from the store that didn’t involve shipping or renting a truck. It’s holding me back from doing a long list of projects.
1
1
Show this thread
I ain't gonna lie day 22 pt 2 just feels like a lot of work, so I decided to skip it for now after doing some of it.
Then I went to day 23 pt 1, and honestly same. Totally doable. Lots of work.
I'm just gonna break from this for now. If I come back, I come back.
1
Show this thread
Big bummer that the universal roof racks I bought for our car don't seem to be universal at all.
1
2
Show this thread
It was easy enough to make a function that did that functionality, but I was baffled. WHAT DO YOU MEAN THIS METHOD ISN'T A FUNCTION?! lol
1
3
Show this thread
I forgot to mention, pt1 got me when I learned that node 16 doesn't have `findLastIndex` yet (it's in v18). I was confused why my test passed but the code failed, only to realize the test never went down a branch where it used findLastIndex, ha.
1
1
Show this thread
I don't think I'll even bother with trying to figure out how to programmatically map the cube's faces. I think I'll just do it by hand and tell it which faces connect with which.
1
Show this thread
Just got day 22's part 1, which was quite a bit of code, but fairly straight forward.
But fuck me, part 2. I gotta fold this thing into a cube! Are you kidding me?!
I mean, I _think_ I can figure this out, but fuck... still.
1
1
Show this thread
My original approach was to try and do it like you would algebra. I inverted the whole tree's equations to solve for `humn`, but wasn't quite getting it right. Disappointed it didn't work because I thought it was clever.
1
1
Show this thread
So I finally got pt 2 doing something I've never done: a brute force binary search. Input values too big and too small and incrementally adjust them til you find the one that works. Pretty brilliant:
1
2
Show this thread
If you’re not feeling it this year, I just want you to know you’re not alone.
Holidays are really hard for some of us. That’s alright. Just try to have the best one you can manage. That’s more than good enough.
3
10
67
Well, now my most common activity on Twitter is no longer doomscrolling.
It’s blocking ads & their accounts.
1
2
22
Pt 2 will be a different story. I don't think I can brute force it, passing in values til it passes. My guess is it's an astronomical number. Gonna have to find a way to reverse engineer the solution.
1
Show this thread
Solved day 21 pt1 easily. Didn't bother making a dependency tree, instead I did it dirty. Literally.
Used a while loop with a dirty bit, solving what I could until the dirty bit came back clean. It's a neat pattern to have in your back pocket.
2
1
Show this thread
One neat thing about having a cyclical list was knowing any search through it could be infinite, so how do we only go through the list once?
do..while
let node = zeroNode
do {
if (predicate(node)) return node
node = node.next
} while (node !== zeroNode)
1
1
Show this thread
one thing I did was get rid of head/tail for my list. The key to the puzzle was the "zero node", so I just tracked it instead. Saved me from having to keep the head/tail correct.
1
Show this thread
Ok, I got it! Little Reddit research helped. I was getting the wrong insertion point because the list was N - 1 after deletion.
Might be one of the few uses of a Linked List I'll ever do in my career lol
1
3
Show this thread
I sang this out loud. It was fun 😂
Quote Tweet
Show this thread
3
Ok, I really enjoyed Wednesday (the show), but in ep. 1, her use of a nail file on the window to escape the therapist is completely gratuitous. Literally, just turn the lock. It’s not meant to keep you in. It’s meant to keep people out. 🤦🏼♂️
1
10
Here's my code. The linked list is slow to traverse, but it's really nice for the deletions and insertions. Just change a few pointers and we're good.
Also, the do/whiles are fun:
github.com/kyleshevlin/ad
I'll get this eventually.
1
2
Show this thread
I've tried several ways, but the one I've landed on is a very elegant, doubly linked cyclical list (I call it an ouroboros). I'm honestly impressed I remembered how to write it.
Of course, all tests pass, but my answer ain't right.
I need a more rigorous test to expose the bug.
1
Show this thread
So I honestly don't know where to begin to write the graphs for day 19, so I jumped to day 20, and something seemingly so simple has stumped me ALL DAY.
1
Show this thread
Glass Onion was fun! Hope they keep making more of those.
4
2
25
Love spending a fuck ton of money on a new heat pump only to have the Energy Trust of Oregon require we have it setup so that it can’t draw heat if it’s below 35F (it can be set to handle much lower temps)
It is 59F in my home right now and there’s nothing we can do.
10
1
13
Most of the people I feel close to don’t live in Portland ☹️
Quote Tweet
pretty fucked up that by the time you reach 40 there are basically only like five people on the planet who really understand you and they probably live in a different city
6
How is it only 7:30pm?! Winter is the absolute worst.
2
8
Also, I’m just gonna say it because the joke’s right there, always love me some positive lookbehind 🍑👀
2
6
Show this thread
Also, #AdventOfCode has made me significantly better at regexes. I do a lot of the input parsing with split()s and replace()s, but sometimes a regex is much more elegant. Just used positive lookbehinds and named groups to parse the input of day 19 succinctly.
2
3
Show this thread
Wanna add this to the thread
Quote Tweet
An #AdventOfCode puzzle helped me realize something about generator functions I hadn't realized before.
Because you're yielding a value 1 at a time, you can iterate through very large collections without having to allocate space for every item up front.
Show this thread
1
1
Show this thread
I don’t know why I’ve never thought of this before, but I changed the difficulty of HFW to Story while doing some grinding upgrades. Effortless. Literal game changer.
2
7
What is the point of having the view count on the tweet?
“Oh Twitter showed me this after showing it to N people. This doesn’t change my desire to engage with the tweet at all. If anything, it just shows me how shit the algorithm is, but now for every tweet”
Wtf?
2
1
22
There's definitely more for me to think about, research and learn here, but it was just a neat realization.
I've been meaning to learn transducers for a few years now, and from what I understand, these two ideas are related.
Maybe I should get on that.
2
3
Show this thread
You can do the same amount of work, but you can do so in a way where you can manage space better when you have an N so large that space is a factor.
1
1
Show this thread
The use case I had that made me realize this was:
Given a set of size N items, give me every unique subset of items of size N / 2.
For a large N, this is a BIG list, but by using a generator, I could get the next subset without having to store ALL subsets at once.
1
1
Show this thread
An #AdventOfCode puzzle helped me realize something about generator functions I hadn't realized before.
Because you're yielding a value 1 at a time, you can iterate through very large collections without having to allocate space for every item up front.
7
3
23
Show this thread
There be times I'm dropping doubly, even triply, nested parentheses on y'all.
It's honestly why I made that `Footnote` component for my blog. Add that context in a less disruptive way.
Quote Tweet
i love when ADHD people use parentheses because it’s like oooooh bonus context
7
Just read day 19. Lol.
Yeah, we gonna close this for today. This is another brute force, graph algorithm similar to the vents from the other day.
2
2
Show this thread




