RSSAmplifier

Blog

spiffytech

spiffytech's blog

spiffy.techRSS feed ↗20 posts

Latest posts

Art

Art I once lucked into a private tour of a Monet gallery. I asked the curator, "these paintings just don't look great, why should I be impressed?" The curator responded that Monet, and impressionism in general, were a reaction to the then-new invention of paint sold in tubes. Previously a painter had to mix pigment powder right when they painted. So they usually couldn't paint outdoors where the…

Sort by Newest

Sort by Newest Life pro tip: Google Maps thinks restaurant reviews from years ago are the "most relevant" reviews. Things change. Restaurants decline, get new owners, etc. Sorting by Newest has proven much more informative for me.

LLMs: The standard is not perfection

LLMs: The standard is not perfection Right now, LLMs are shaking up the way we live life and access information. There's a lot of debate around how useful they can be if they'll lie to you. Everything lies to you When I get info from an LLM, I affectionately tell folks "the hallucination box says..." But this isn't unique to LLMs! Google searches are full of incorrect or inapplicable information.…

A better sentiment rating scale

A better sentiment rating scale How do you rate a board game? A movie? A restaurant? You want a scale with consistency and clear communication. What do people normally do? There are two main scales: A, B, C, D, F 1–5, 1–10, 1–100 These both have the same problem: ambiguity. Everyone has a different idea of which values map to good / bad / meh / average. Is a C "average", or is it falling short of…

How to waterproof a level 1 EV charging cord

How to waterproof a level 1 EV charging cord I charge my EV at home, but for ✨reasons✨ I use a level 1 charger that's outdoors and exposed to the elements. There are quite a few waterproof chargers , all of which require a plug adapter that's not waterproof. (Not that any of the product listings spell that out, so I'll bet someone's burned their house down thinking the entire product was…

How NOT to connect a well pump to an IBC tote

How NOT to connect a well pump to an IBC tote My brother & his partner are up near Asheville, caught in the aftereffects of hurricane Helene. Most pressing for them is that Helene destroyed most of the city's water infrastructure, and it'll be weeks before even non-potable water starts flowing in most parts of the city. They have access to an in-ground well with a limited water supply, but it's…

How many SIMs can my Pixel 8 have?

How many SIMs can my Pixel 8 have? I've only ever used a single SIM in my phone at once because I live in a well-covered city, but I was recently on a trip to the Michigan U.P., which is… not well-covered. AT&T's coverage map (blue) is a LIE! My Android phone (a Pixel 8) supports eSIMs, which are just pretend SIMs you download from The Internet™. I've never used one before — the last time I…

I tried out the Vision Pro

I tried out the Vision Pro This morning I went down to the Apple store at opening so I could do a demo. I was 50/50 on whether it'd be just me, or a line around the block. An hour ahead of opening there was one other guy there. At quarter-til, when they started taking names, 11 people. The 20 Apple employees applauded and cheered as we entered the store. It was very surreal. TL;DR lots of good,…

🫴🦋 Is this an emoji?

🫴🦋 Is this an emoji? ReadStuffLater uses emojis to tag content † . It's simple, it's fun, and it affords basic content organization without encouraging users to spiral into reinvent-Dewey-Decimal territory. Yeah, the aesthetics need work There's just one problem: data validation. When the client tells my server to tag a record, how can the server confirm the tag is actually an emoji? I mean, I…

Audit log ALL the things?

Audit log ALL the things? My app ReadStuffLater fundamentally revolves around scraping web pages with the Microlink API. Sometimes that goes wrong: the target web page has a problem. Or Microlink does. Or the target throws up a captcha or blocks data center IPs or something. I thought I'd done an alright job of handling all the cases that could go wrong. API errors are retried, website errors…

A Framework laptop success story

A Framework laptop success story I was recently on my way out the door when I knocked over a glass of water, spilling it across my Framework laptop. I panicked and tried to dab it up, but saw that water had seeped under the keyboard and was leaking out the bottom of the laptop. The screen began to flicker. I held down the power button and began disassembling the laptop. In minutes I had the laptop…

Preserve an element's position in the viewport after a layout shift

Preserve an element's position in the viewport after a layout shift My app includes content areas that expand and collapse. A lot like accordions, except they take up the whole page and can be huge. When you open one, whatever's open gets closed, and that makes whatever you just clicked on jump around as the previous content area stops taking up space on the page. Here's a code snippet I put…

I used a Monte Carlo simulation to pick my health insurance plan

I used a Monte Carlo simulation to pick my health insurance plan We have to pick a new health insurance plan this month, and we've had a tough time making the decision. You can't just add up what you'll spend - what each thing costs depends on how much you've already spent! And some things are inherently probabilistic - will I go through procedure X this year? How many visits will I need for…

Dokku with Let's Encrypt behind Cloudflare

Dokku with Let's Encrypt behind Cloudflare Dokku has a Let's Encrypt plugin which works behind Cloudflare. There's just a little bit of chicken-and-egg setup involved. Let's Encrypt needs to connect back to your server to validate ownership of your domain. You can't have Cloudflare's "full" TLS mode enabled when you're doing first-time validation, because in "full" mode Cloudflare will error out,…

Creating a type from nested interface properties in TypeScript

Creating a type from nested interface properties in TypeScript While at work I was upgrading graphql-code-generator , and found that the generated code no longer exports the type for a query node. Instead, the type of the whole query response was exported. But I had code that relied on having the node type available. To solve this, I created a new type by reading attributes from deep in the…

A lazy-loading higher-order component for Svelte

A lazy-loading higher-order component for Svelte Recently, while building a simple Reddit clone, I wanted to lazy-load images and comments. That is, rather that loading all of the images and comments the instant I added a component to the DOM, I wanted to wait until the component was actually visible. This spreads out the impact of loading a page, both for the client and the server. To do this, I…

Creating a bottom nav with CSS Flexbox

Creating a bottom nav with CSS Flexbox I needed to create a bottom nav (like what's used in many mobile apps) in CSS. Here's how I did it. ( CodePen ) <div class="container"> <div class="content"> <p>bar</p> <p>bar</p> <p>bar</p> </div> <nav> <p>foo</p> <p>foo</p> <p>foo</p> <p>foo</p> </nav> </div> <style> .container { height: 100vh; display: flex; flex-direction: column; } .content { flex: 1 1…

Setting up Sapper with Netlify CMS

Setting up Sapper with Netlify CMS What are Sapper and Netlify CMS? Sapper Sapper is Svelte's answer to Next.js/Nuxt.js. It's a way of rendering Svelte code on the server so your site is compatible with JavaScript-free devices, and so it renders immediately instead of waiting for a JS blob to download, parse, and run. Sapper ordinarily runs as a full server application, but using the sapper export…

GraphQL Subscriptions with Vanilla JS

GraphQL Subscriptions with Vanilla JS I've been working on a project that uses GraphQL via Hasura. Using Subscriptions (real-time updates to queries) is a key feature for my project, but it's one that most of the simpler GraphQL client libraries don't support. That leaves me looking at heavyweight tools Apollo. Apollo is pretty complicated to configure (I'm paying for a lot of features I don't…

A Minimal Svelte Router

A Minimal Svelte Router Here is a minimal router for Svelte v3 using Page.js. Whenever the route changes, Page.js sets a variable that holds the component that should be rendered for the route. <script> import page from 'page'; import Home from './views/Home.svelte'; let route; let routeParams; function setRoute(r) { return function({ params }) { route = r; routeParams = params; }; } page("/",…