Chris Drifte's Avatar

Chris Drifte

@drifte.dev.bsky.social

Writing fast code. Living slow life. πŸ’» Typescript, React, NextJS ⛰️ Climbing, Running, Hiking

438 Followers  |  449 Following  |  167 Posts  |  Joined: 23.11.2024  |  1.6748

Latest posts by drifte.dev on Bluesky

PNG is back!Rec. 2020 and Rec. 709 comparison After 20 years, PNG is back with renewed vigor! A new PNG spec was just released.

PNG is back!

After over two decades, we released a new PNG spec.
www.programmax.net/articles/png...

24.06.2025 10:50 β€” πŸ‘ 30    πŸ” 14    πŸ’¬ 3    πŸ“Œ 2

For a percentage of your profits I will harshly mock all your ideas and any progress you make

20.02.2025 07:27 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Oh man, I've been using this and wondering why the creator sold out with banner ads that completely break the functionality of the page. Gotta remember which link to click next time.

18.02.2025 18:44 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I guess ES2025 didn't manage to incorporate algebraic effects after all...

18.02.2025 18:40 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Watch your thoughts for they become words etc.

26.01.2025 19:54 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Can everyone just agree to click β€œnot accept” on cookie consent from now on please.

23.01.2025 17:36 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

And why not have β€œ.” which is randomly prefixed on the cookie domain (only sometimes though). It has no effect on the handling of domain itself, but we should duplicate the cookie key (and let it have different values) just to be sure.

23.01.2025 17:33 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Want to access a cookie set in middleware in a server component in the same request? Guess you’re going to have to redirect (oh hi I’m the browser I assume you wanted that 307 cached so your users could enjoy a nice infinite loop)

23.01.2025 17:29 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Got spaces in that string? Let’s have PHP encode those as + so that JavaScript can’t decode them

23.01.2025 17:27 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Need to sign that hmac cookie? Sorry, NextJS middleware doesn’t support crypto

23.01.2025 17:26 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Ensuring that cookie logic is interoperable between PHP, NextJS middleware, server, and client components, as well as vanilla react and JavaScript is an absolute nightmare.

Gotchas upon gotchas upon gotchas.

23.01.2025 17:24 β€” πŸ‘ 7    πŸ” 0    πŸ’¬ 6    πŸ“Œ 0

Toying with the idea of telling my PO about document.designMode = β€œon”

Is this too much power for one man?

15.01.2025 07:52 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I used to copy-paste from those comments more often than stack overflow

14.01.2025 10:08 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I think this is a really neat and clean syntax, I’ve not written tests in storybook yet but this makes me interested to try

12.01.2025 16:11 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

While you’re at it, let’s switch to noun-adjective order for easier conceptualisation too.

β€œDog big black hairy”
Vs
β€œBig black hairy…”

12.01.2025 09:30 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I really appreciate you sharing this, it filled in a few more gaps in my understanding, thanks

12.01.2025 08:15 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

If you ever get back to it, figuring out webpack config is one area where chatGPT excels.

The crux is just defining a loader for each file type you plan to support, which is pretty standard across codebases.

11.01.2025 17:34 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I would love to be in this starter pack please! I’m mostly talking about transforming frontend performance in e-commerce.

11.01.2025 10:10 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

If you get frustrated with the β€œmagic” of nextjs, I highly recommend experimenting with building your own react server rendering framework.

All you need is webpack, ReactDOM.renderToString, and a couple of hours.

Probably the most effective activity for understanding why nextjs does what it does.

11.01.2025 10:04 β€” πŸ‘ 6    πŸ” 0    πŸ’¬ 3    πŸ“Œ 0

What about uploading files via ftp and sharing code via email? πŸ˜‚

01.01.2025 22:48 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

My 2025 predictions:

- Globally, things will seem really, really bad
- There will still be opportunities to grow as an individual and contribute to our communities

My goal is to make the second thing more important than the first.

#HappyNewYear

31.12.2024 17:25 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Honestly even when I find a good use for do-while I normally refactor to just while (with an air of slight disappointment) to keep life simple for the next person to come across the code.

31.12.2024 17:11 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

AI uses certain words more often than humans (see β€œdelve”) and they have become unconscious markers for us when reading texts.

So if you are using AI to diversify your language, the content definitely does risk coming across as generated unfortunately.

29.12.2024 09:43 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Huh, I honestly hadn’t noticed that… every game I wanted to play has been available so far. But you’re right.

29.12.2024 08:36 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

You do you! This was a post about how I am having fun with cloud gaming, not telling anyone else how to do things.

29.12.2024 08:31 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Right now I’ve forked out for the most expensive tier as a Christmas treat, but I’ve played on all 3 tiers quite happily for the last few months.

29.12.2024 08:28 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Don't worry, you're the third person to make this comment!

28.12.2024 22:57 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Let’s imagine you have a laptop, but it can’t play games (underpowered, or it’s a mac).

You could spent $500+ on a console or gaming laptop.

Or, you could spend less than $100 on this setup.

The cost of the laptop is irrelevant, you don’t have to buy something new.

28.12.2024 22:06 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

It’s hilarious that multiple people have commented this like it’s some kind of gotcha πŸ˜‚

28.12.2024 21:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I guess if you are nostalgic for younger brother mode

28.12.2024 20:46 β€” πŸ‘ 7    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@drifte.dev is following 20 prominent accounts