blog-image

Pipes, Parsing, and Perspective

September 15, 2023

What I'm Listening To

'A dream of where you want to be...'

Story From The Week

Every Friday, I have coffee with my best friend at Whole Foods at 7:30a. And this morning when I got in my car to drive there, I realized that I hadn’t been in my car (or any car, train, or bus) since Sunday. That's almost five days of doing pretty much nothing but working, running, eating, reading, watching Netflix, and sleeping.

I’m an introvert, so this realization isn't new to me… But today, a sense of relief washed over me as I acknowledged that I was emerging from my hermit shell. Sometimes I get so cozy in my solitude that I forget how unhealthy it is to not engage with the outside world.

Remote work is tricky that way. It reels you in by promising you can roll out of bed without bothering to wash your hair or put on makeup. It keeps you all comfy and content, totally cut off from the outside world, until you realize that there IS a world out there — a world where happy hour drinks flow freely, and movies are played at parks, and friends listen to you blab about the ridiculous outfits featured on Selling Sunset!

My advice: Leave the house often if you work remotely. Remind yourself of humanity. Take part in the real world.

What Did I Learn?

Working with the fs module in Javascript this week brought some clarity on piping and streaming. These concepts have always been abstract, but I understand them more concretely now.

Basically, data flows through a pipeline when we connect streams together. There are a few different types of streams available for handling data in Javascript (Readable Stream, Writable Stream, etc…), and we can think of these data streams as water being poured into a bucket. Instead of dumping the water into the bucket all at once, we carefully pour the water in small amounts in a controlled way. And these different streams can be connected together to create a pipeline.

So it’s all about moving and processing data a little at a time, so that we don’t overwhelm our programs.

What Made Me Confused...

There’s a saying in our industry, “There are only two hard things in Computer Science: cache invalidation and naming things.”

I’d like to propose an addendum to this truth: date parsing.

I mean, does anything make your head spin more than converting dates from UTC to local time? Maybe it’s just me, but I often find myself dumbfounded, staring at my computer screen with my mouth gaping open when it comes to dates.

Today I had to solve a bug in which the server was returning one date and the client was displaying another. I’ve solved this type of bug many times, yet I still found myself utterly confused and second-guessing myself.

An Interesting Link From The Internet

When you need the perfect color scheme.