Max

Max

@headlessheretic.com

Headless heretic 🔱 I talk about headless development, e-commerce and freelancing

32 followers48 following81 posts

Dream: being a freelancer means I can work whenever and wherever I want. Reality: being a freelancer means I work in bed at 11 pm because I'm stupid

I discovered Anthropic were double billing me today, both taking from my session/weekly usage and from my extra usage credits with every message. And no, I was not above my session/weekly usage limit. Is that a new strategy to improve their numbers ahead of the IPO? #anthropic #claudecode

Maybe I'm weird, but I've always preferred learning by doing over learning by watching a tutorial video. I don't think I've ever followed a tutorial from start to finish.

Apparently a hot take: If you're already paying an agency a lot of money to do custom development on your theme, you're better off with Hydrogen.

Date strikes again. Though I was surprised by this one because it was using a historical timestamp. But the `toLocaleDateString` apparently behaved differently in server/client even though the locale was defined.

Figured out a solution to this. In the GROQ query, you can concatenate the string with an empty string, seems to throw stega off so it doesn't get appended. E.g. 'alignment': '' + alignment

Max@headlessheretic.com

Could you opt out of stega encoding on subfields? This value never needs to be mapped to the studio. Or should I just not use a string in the first place and work out a different solution?

I split my weeks between headless and theme development, and let me tell you, they're polar opposites. One has a great DX and allows for modern dev practices, while the other is extremely error-prone and leads to many headaches. I would quit ecom if I had to work in themes exclusively 1/2

The poor DX in theme dev leads to high attrition. Talented devs stay clear of ecom, or get out as soon as they can. Talk to recruiters for other dev fields and you'll soon find out how the industry sees ecom. This needs to change. 2/2

View full thread

So now I'm stuck with either adding a dependency to stegaClean from @sanity/client/stega or hoping that this regex covers all possible issues: /[\u200B-\u200D\uFEFF]/g Inspecting the source for stegaClean, it in turn has a dependency to a vercel package with a much more complex regex

Could you opt out of stega encoding on subfields? This value never needs to be mapped to the studio. Or should I just not use a string in the first place and work out a different solution?

So turns out it's because the alignment value has *a lot* of zero-width-space characters appended to it. I thought maybe copilot was playing tricks on me. So I deleted the values from the Sanity schema and entered it manually. Nope, still getting it.

Trying to see how fast I can rebuild a site with Hydrogen using my recipe collection. The site is already headless, so I can reuse a fair bit. But it uses Chakra and Gatsby on the frontend, and I'm all in on Tailwind. Plus the Sanity schema is a mess and the Studio is V2, so an upgrade is in order

Having lots of fun doing it and getting to try all the latest Sanity features in the process. Presenting the proof of concept on Tuesday to sell the full project. Wish me luck! Worst case scenario I've wasted a week and a half. Best case I walk out of there with some more $$$ and a happy client

View full thread

Ah I got it showing up. But for some reason it's only showing up for the parent, not the array items, so I can't move anything around since the only spot available is right where it sits

Headless provides a better experience for everyone. Why is it even an argument? Sure, there's some a lack of housekeeping, but this screenshot highlights the disparity between modern systems and whatever this is

A few months ago I found a Shopify plugin for Vite and thought it would be awesome. But it just made me realise that the problem with themes is not the tech, it's the DX The plugin doesn't fix any of the underlying issues which makes theme dev such a bad experience

Why would you use a private npm package if you're building for a client? You're only creating problems for everyone, including yourself, down the road.

Another underappreciated bonus of Hydrogen+Oxygen is that you get hosting included. There is no need to sell merchants an additional monthly hosting cost.

I'm a big advocate for using the frameworks and starters developed by the platforms (Hydrogen for Shopify, Catalyst for BigCommerce, etc) because they provide a standard, at least as a starting point, that can be handed over to other devs. Tear down the walls, make headless more accessible

Why did Lorna Jane use Next.js instead of Hydrogen? Genuinely curious. I hope it's not because the agency they contacted used their in-house framework with years of tech debt to deliver a brand-new site

When you build for a client, you're also building for other devs. You don't want to be saddled with an unhappy client that can't go anywhere else because you built a wall around their garden. It will eventually hurt your reputation

Max@headlessheretic.com

If you're building for a client: use the most popular tech If you're building for yourself: use whatever you want

New headless site with tech debt story of the day. Client got a new site last year. Need to migrate from checkout to cart API by April 1. Cart API had been the main API for hydrogen for I don't know how long. In-house frameworks need to go the way of the dodo

I freaked out this morning because the laptop compartment on my backpack was open, and the laptop wasn't there. I didn't take it out at home, so I thought, "Great, now I need to buy a new laptop." I went into my office to dig up an old Mac mini. I found the laptop on my desk 🫣

Agency headless starters, or in-house frameworks are bad for clients. They've often been built over several years, leaving clients with a brand new site stuck with years of tech debt

I feel like Grammarly has made me worse at writing. Kinda the opposite of what I'd hoped. But most of the time, I write sloppily knowing the big green G will take care of it.

Closing in on the one year mark since I was made redundant and decided to go back to freelancing Gave myself 10 weeks as a PoC. Got some gigs in that time. Then everything happened at once. Took about 3-4 months to get some stability. The rest of the year to build on it. Key this year: diversify

One of the first things I do with most starters is to rip out most things. I like that the Hydrogen starter is very bare-bones style-wise. But it would be even better if, when I select Tailwind during setup, the existing styles are all Tailwind utility classes (please not the @apply directive).

AI saves me time with menial tasks, then wastes it on complex tasks. Computers are still dumb, but with the advent of English level abstraction, they're just getting dumber

Do you use copilot? If so, how often do you find yourself stuck in a loop with that PoS telling it that what it just spit out doesn't work, only for it to repeat the last bit of garbage that didn't work, so you say it again and it's back to the other one? Happens to me ad nauseum

Just realised @sanity.io studio ships with their own icons now. I'm probably late to the party, it used to be react-icons, but this keeps the studio look uniform. It's the little things.

e-commerce (theme) development: 🥴 develop with production data 🤷‍♂️ accidentally overwrite content on theme publish 🫣 lose scripts on theme publish 😰 struggle to get proper preview deployment automation The list goes on. There is a (much) better way