Just a guy doing stuff.

  • 0 Posts
  • 33 Comments
Joined 2 years ago
cake
Cake day: June 14th, 2023

help-circle

  • Whoops, I flubbed that message hard and didn’t catch it at the time: Meant to say “don’t use centralized databases.” They definitely use databases lmao. No idea how I screwed that message up so hard. I blame ADHD for not proofreading.

    Just so we’re on the same page, let me be more specific. I’m saying the individuals in the article were making terrible decisions. Lots of them.

    I am also saying that UUIDs are good primary keys for very specific purposes: Large, distributed systems that handle large amounts of small data, powered by databases like Cassandra that are designed to handle millions of record insertions per hour across several hundred nodes, to the point where inserts are very likely to happen at the exact same time on two different replicas of the same schema.

    Hope that makes more sense than my previous flub. lol









  • Tailwind is an unrelated project, that’s just used by this one.

    Basically, TailwindCSS is a combination of two things:

    1. A huge set of “utility” CSS classes that apply consistent, basic styles, with tons of handy conventions for stuff like colors, shadows, border-radii, spacing - and it even lets you target them to hover state, active state, disabled state, users with prefers-color-scheme set to dark, etc.
    2. A JIT-compiled system of creating one-off CSS by just writing the name of a not-yet-existent utility class.

    The main benefits, I find, are mostly:

    • Keeping your style controls directly present in the HTML, without needing to remember conventions or arbitrary “semantic” names for things.
    • Consistency in convention. Need a color? There’s a set (configurable) list of them. text-green-500 and you suddenly have green text with a middle-of-the-road luminosity. Need spacing? Use one of the padding or margin utilities, and you’ll have consistent spacing based on a convention. py-4 and you know you get “level 4” padding without having to care what the exact pixel amount is. But! You know it’s the same as everywhere else you’ve done py-4. No need to go fiddle with a stylesheet.

    Tailwind focuses on coupling your styling to your HTML by using tiny, focused, glanceable utility classes (<div></div>) rather than by needing to create a ton of potentially-confusing “semantic” classes[1] (<div></div>).

    There are tons of classes in it, and I’ve found it to be super useful. Want to center something, horizontally and vertically? Here’s how in Tailwind:

    <div>
        <div>I'm centered!</div>
    </div>
    

    And if you need a one-off specific setup - something like display: grid; grid-template-columns: 30px 1fr 1fr 20px, you can do it with the JIT as such: `











  • If your dev documentation includes your devs running docker build, you’re doing docker wrong.

    The whole point is that you can build a working container image and then ship it to a registry (including private registries) so that your other developers/users/etc don’t have to build them and can just run the existing image.

    Then for development, you simply use a bind mount to ensure your local copy of the code is available in the container instead of the copy the container was built with.

    That doesn’t solve the performance issues on Windows and Mac, but it does prevent the “my environment is broke” issues that docker is designed to solve