Threads for stig

  1.  

    Fun sail, and packing for a two week family trip! Not looking forward to three flights in each direction, but excited to see family and friends in the flesh for the first time since the pandemic. My parents are keen to see their grandchild again as well, of course.

    In gaps of free time I’m learning The Wind Cries Mary on guitar, and since the weather is ace I took the boy (10) for ice cream.

    1. 3

      Putting personally identifiable information (PII) in identifiers seem like a recipe for a world of hurt when GDPR requests starts coming in. You’re likely to have these identifiers in all sorts of logs that might otherwise not have been in scope for scrubbing. (HTTP access logs, for example.)

      The problem becomes even worse if you use these ids as keys in a db and you can’t simply delete the whole record. Maybe you have to clear the PII portion but retain the rest. I imagine this could get really tricky if there are foreign key constraints.

      Moreover UUIDs, when stored in a suitably typed UUID column, take up only 16 bytes (128 bits) and with the new UUID formats coming out should index quite well. This matters if you have a lot of data and lots of indices.

      Monotonically increasing integers are even shorter, but it can be hard to generate unique and unguessable ids quickly in a distributed system.

      You may want to base6X encode ids, and maybe give them type-prefixes, for the double-clickyness when presenting a slice of the data to users, but I wouldn’t store them in the DB that way.

      I guess that’s a long-winded way to say I agree with using UUIDs. But perhaps not for the same reason as the poster.

      1. 2

        Came back from a day at the beach to find that FedEx had left my new 16” MacBook Pro propped up against my front door. I would have stayed at home to sign for it, except they told me they wouldn’t deliver it until Thursday. Setting that up for work will be first order of the day tomorrow.

        1. 18

          Doubling-down on better support for nix-shell for development is smart. I think that would be a gateway drug for introducing more people to Nix.

          I use darwin-nix for most of my dev environment and some simple shell.nix files for project-specific configuration. I would love to have an easy & supported way to start services from shell.nix, so I could migrate away from docker-compose to run auxiliary services my app needs; e.g. Pg, MongoDB, Redis, & RabbitMQ. (Thinking about it, I might resort to just running the services always, but using shell.nix to set up user accounts/dbs the way our apps expect.)

          Every time I start Docker for Mac my Macbook Pro’s fan starts howling—we refer to this as the “Docker noise” in my company. I prefer running services natively, avoiding using Docker when I can, but the process of using nix-shell for this is not quite slick enough for me to advocate for my team to make that the preferred & default supported process. Hopefully one day!

          Somewhat unrelated, I’ve had much positive feedback from changing our default process to run our Clojure service outside Docker. First and foremost the service start time is measured in double-digit seconds rather than double-digit minutes, but secondly IDE integration works so much better! I really don’t understand why people do development inside Docker. 🤷‍♂️

          1. 5

            You can use the shellHook attribute in mkShell, and have it run any shell code you want. Combined with trap for the shutdown aspect and you can get pretty far. An example for Elixir/Phoenix with PostgreSQL.

            1. 1

              I would love to have an easy & supported way to start services from shell.nix, so I could migrate away from docker-compose to run auxiliary services my app needs; e.g. Pg, MongoDB, Redis, & RabbitMQ. (Thinking about it, I might resort to just running the services always, but using shell.nix to set up user accounts/dbs the way our apps expect.)

              That’s a good point and I agree that’s an area where nix needs some work.

              I haven’t tried it yet, but https://github.com/svanderburg/nix-processmgmt seemed somewhat promising for offering cross-platform service definitions for a shared subset while still allowing to add platform-specific code.

            1. 4

              Hopefully continuing out Simple Pac-Man in Java with my son (10). Last weekend we just managed to get a screen up and play with the background colours before he got bored. This time we shouldn’t have to set up his development environment (Eclipse), so maybe we manage to draw a ghost or something.

              1. 1

                Hopefully starting to code a very simple Pacman in Java with my 10yo son. I’ve tried to start him on Python, but he’s struggling to connect with that, because his ultimate goal is making Minecraft Mods and so he wants to learn Java. Any tips? I’ve never done graphics programming, so could use pointers!

                Sunday I’m helping out in the rescue boat at my sailing club, which is hosting a bunch of windsurfers this weekend.

                1. 2

                  Processing is a library and IDE for making graphics, its based on Java but is a nice, curated experience and a lot more beginner friendly. Here’s a bunch of examples https://processing.org/examples/

                  I don’t know anything about minecraft modding, but since Processing also uses Java, it might be a gentle and fun introduction.

                  1. 2

                    Tip 1: Essentially any graphics programming is done through a GPU, the days of sticking pixels directly into a frame buffer are gone. I think there’s Windows API’s that still let you do that, and I’m sure old Java GUI API’s as well, but you may well be happier not dealing with them.

                    Tip 2: Thus, don’t feel bad at all about using a game library that gives you some higher-level tools. Low-level GPU programming through OpenGL or Vulkan is certainly doable, but IMO is a pretty thankless task when it’s not something you’re fundamentally interested in. (DirectX 11 may be better? I don’t know.) For Java, I recommend libGDX (higher level) or LWJGL (lower level), or maybe there’s a good Java binding for Raylib out there.

                    1. 1

                      LibGDX looks just about perfect for what I had in mind, thank you! I wasn’t planning to do anything more complicated than moving around some sprites we load from PNGs.

                      1. 2

                        If you haven’t already, you might want to try Godot. It provides a rich set of APIs for defining scenes and lets you focus on the code for the game logic, not the boilerplate for the GUI parts.

                    2. 1

                      his ultimate goal is making Minecraft Mods

                      Awesome! I remember I first got into coding when I was ~12 by modding Minecraft. I thought it was a really great (and fun!) way to learn programming. Learning programming is definitely not a one-size-fits-all kind of thing, but personally I found writing small and silly server-side mods to be a good entry point. At the time, the community made an API called Bukkit for doing this, though I’m not sure if it still exists. There was very little complexity you had to handle within each mod, because it used an event-based system with a huge amount of methods accessible through the API. For the simpler mods, you could just implement one or two functions and have something that compiled and worked, which was very important for a child looking for easy gratification. :)

                      I would note that the graphics programming involved in making Pacman from scratch, while fun, isn’t really a prerequisite to Minecraft (or most other game) modding. You can directly manipulate the game objects from your code while the already built engine does all of the rendering for you. If your son has the interest, you could encourage him to jump into modding directly – I learned by watching copying some tutorials on youtube and changing bits of the code until I (very) slowly figured out how it worked.

                      1. 2

                        I would note that the graphics programming involved in making Pacman from scratch, while fun, isn’t really a prerequisite to Minecraft (or most other game) modding.

                        Acknowledged. I expect to be doing the lion’s share of the graphics stuff, but I thought Pacman would be a gentler introduction to Java than diving straight into Minecraft. He’s been telling me about how Pacman’s ghosts have different names and behaviours (I hesitate to call them “AIs”, though he does ;-) ) and my idea was we could try to implement those together.

                        1. 2

                          At the time, the community made an API called Bukkit for doing this

                          It still exists, but now basically everyone I know of has their fork-distance-from-Bukkit >1 (s, ps)

                          If your son has the interest, you could encourage him to jump into modding directly

                          +1 for this, but the ingame command blocks are also worth mentioning. They’re turing complete, mildly annoying, very easy to get started with and just require the game itself (:

                          (afterwards you do need some creativity to abuse the mechanisms they give you in order to create more complicated things, but for pacman they should be plenty; you can build a little “screen” out of black concrete, spawn a pig or something and add some buttons with command blocks to teleport the pig around… Later you can make the pig invisible and think of something else to use)

                          1. 1

                            Ah, he’s already played with command blocks a fair bit but he’s got his heart set on creating mods in Java.

                            The mind boggles at creating Pac-Man inside Minecraft. That never occurred to me!

                      1. 3

                        Nice! Back in 2015 I too wanted this behaviour, but I didn’t know enough about Emacs to get to where you did. Somebody pointed me to M-x toggle-input-method (or C-\ for short) and who knows – it might be useful to you too.

                        With input-method set to “latin-postfix” you get “à” by typing “a`”. It works for all sorts of accents, and more. For example I can get the last three letters of the Norwegian alphabet, “æøå”, by typing “e/o/a/”.

                        1. 2

                          I also like the TeX input method; if you’re already familiar with (La)TeX, most common special characters can be entered simply by typing the TeX sequence, for example \'a gives you á and \alpha gives you α.

                          Sometimes I “need” to enter some emoji; in those situations I just use M-x insert-char and then type in the Unicode name. With swiper’s autocompletion I can type any part of the name without having to know the exact full name and it shortens the list to something manageable.

                        1. 2

                          Preparing for a fortnight in Greece sailing. Lots to do around the house that needs doing before I go, along with some bits and pieces for other people (computer setup mostly.)

                          Hopefully make it to the pub to watch the F1 qualifying and catch up with a friend I haven’t seen for a few weeks too.

                          1. 1

                            Ooh, jealous of that fortnight in Greece sailing!

                          1. 2

                            Mother-in-law managed to source chicken feet for us, so we’re taking a stab at making Phoenix Claws for the first time in years.

                            Also going to move the needle on the next part of my personal project, a board game in Clojure. I’m using Malli rather than Spec for defining shapes of entities, and liking it so far. It’s not quite as powerful as spec, particularly at generation, but for simple things it’s superb to have the specs as data.

                            Also spent this morning sorting amendments to travel next month, as the airline cancelled one of our flights. Instead of a mid-afternoon flight we now have a 6am flight, and additionally have to pay for a night of hotel at the airport because I refuse to set off at 2am for a 2 hour drive to the airport. It’s super annoying because we paid extra to avoid early morning flights when we booked the trip (in April), but now we get that at higher cost. I can’t really not go either, because it’s my mother’s 70th birthday and we haven’t seen them in person for 2.5 years because of the pandemic.

                            1. 2

                              Declaring allotment bankruptcy and evacuating our stuff before telling the owner we won’t be back. We moved into a new house and now we have a large garden at home we don’t manage to keep up with—so driving to an allotment for more gardening has lost a lot of its appeal.

                              Also I’ve started a personal project (implementing a board game I like) in Clojure using Malli. Never used it before, but I use Clojure Spec at work so thought I’d check out the competition. Clojure is the first language I’ve used in anger (I.e. at work) for more than 2 years and still would use for personal projects.

                              Dinghy racing on Sunday.

                              1. 9

                                or switch to internet gateways and go zero trust.

                                1. 3

                                  That’s probably the best course of action. You’ll want identity based authentication/authorization soon enough anyways.

                                  1. 1

                                    Wouldn’t that increase bandwidth charges, among other things?

                                    1. 1

                                      no. https://aws.amazon.com/vpc/faqs/#Billing

                                      Data transfer charges are not incurred when accessing Amazon Web Services, such as Amazon S3, via your VPC’s Internet gateway.

                                  1. 2

                                    Four-day weekend due to my company observing Juneteenth.

                                    Today I’m building my wife a sit/stand desk so she doesn’t have to work from the dining table. It’s inconvenient for her to tidy away everything for every meal. Also building two mini greenhouses (from kits) so our seedlings can move out of the potting shed.

                                    Tomorrow is Father’s Day in the UK and I’m cooking steak for my father-in-law. (It’s not Father’s Day where my dad lives.)

                                    Monday and Tuesday still unallocated. Hoping to do something with my son, and also play guitar a lot. Probably read a bit too.

                                    1. 1

                                      I’ve got the week off, and currently driving from east coast to west coast—about three hours—to visit a friend. It’s my first overnight stay away from family since early 2020 & I’ve forgotten how to pack for overnight stays. Thankfully I can fit my entire wardrobe in my camper van 😅

                                      1. 1

                                        I’m proud of my record for following SemVer in SBJson. For the first 4 major versions I targeted RFC 4627. For version 5 I switched to targeting RFC 4627, which changed to recommend allowing scalar values at the top level. As this was a change in behaviour (at least if you relied on “naked” scalars being disallowed) I chose to bump the major version.

                                        I didn’t worry about it being tedious to adopt a new major version, as years earlier I had made the decision that I wanted to simplify upgrading SBJson in your application incrementally. For a large app you can use several major version of SBJson in your application at various stages of migration. To support this I renamed all classes and public symbols to include the major version. This was tedious in Objective-C – but worked.

                                        I started doing that as Facebook included SBJson in their SDK, which was very popular. This was a double-edged sword for me. A lot of users probably ended up using SBJson because they got it “for free” with their Facebook SDK. But Objective-C being what it was, that meant it was impossible for people to use the Facebook SDK and a different version of SBJson than FB shipped: you’d end up with a version conflict. I never had any luck with getting Facebook to upgrade the version of SBJson they shipped, so I had to work around it with the tools at my disposal.

                                        1. 1

                                          I’m on call, so staying close to home.

                                          Doing some work around the house. Most importantly ripping up carpets and trying to sort out creaky chipboard floor boards before new floor arrives on Monday.

                                          1. 3

                                            I like this. Using something like Jira it’s far too easy to end up in a situation where the top of the “ready” column/backlog is blocked by stuff that are still in progress.

                                            1. 13

                                              I’ve always found it weird that Jira has “blocked by” as a built-in concept but then doesn’t make much use of it. Mostly the only way to see if a ticket blocks or is blocked is to go into the full ticket view. The compact views (the ones you usually use in planning mode) don’t provide any indication. It especially stands out to me because the core of Jira is a user-definable state machine, and “blocked” should be fully-integrated into that, but it’s not. And I don’t think there’s any option to make it more visible.

                                              1. 3

                                                We even had to use the Automation features to email people when a blocking issue was resolved. This is definitely a place where Jira’s infinitely flexible workflow system is not as good as something that would be a bit more opinionated.

                                            1. 6

                                              Disclaimer: I work for CircleCI.

                                              I wonder if the reason GitHub ran the benchmarks faster is because they don’t run the brainfuck benchmark as part of the build job, like their CircleCI implementation does for some reason? (Edit: Oh, I misread: CircleCI is already faster in this case, it was the Earthly checks where GitHub Actions won out.)

                                              (I also wonder if the CircleCI solution could be speeded up further by using the special support for building docker images, rather than the machine executor – but that’s pure speculation on my part.)

                                              1. 2

                                                I work for CircleCI.

                                                Do you know the cause of disk corruption on CircleCI? I am worried whether switching the Docker version here just incidentally fixed the issue, since it may also have invalidated some cache keys.

                                                Is it related to how caches above 500 mb are not checked for corruption?

                                                These are the reasons why I am trying to switch to GitHub Actions. For any SaaS option, reliability should be part of the package. I don’t want to have to worry about whether I exceed the 500 mb mark. I’d prefer to just be billed more and keep getting the corruption checks. I cannot fathom how the docs seem to implicitly waive guarantees based on an arbitrary limit like 500 mb.

                                                1. 4

                                                  Do you know the cause of disk corruption on CircleCI? […]
                                                  Is it related to how caches above 500 mb are not checked for corruption?

                                                  No. The corruption check you refer to here is only relevant for caches you explicitly create with save_cache and restore with restore_cache, intended for caching dependencies. This cache is stored in tar, and I would expect any corruption to lead to the failure to unpack the archive, and thus failing the cache restore. Your code should then proceed as if there was no cache hit at all, and re-generate the dependencies.

                                                  If I read the code that implements that correctly, that corruption check for caches under 500 MB appears to be solely so we can abort early without even attempting to unpack the tar archive if the cache is deemed to be corrupted. In light of that the note in the docs regarding the corruption check you’re referring to may be misleading, which is an issue I’ll raise internally.

                                                  I am worried whether switching the Docker version here just incidentally fixed the issue, since it may also have invalidated some cache keys.

                                                  I doubt it. It looks (though I haven’t verified) like the package is simply broken in Docker 17, but fixed in Docker 20. A lot could happen in 3 major versions. I’m not a Docker expert, but I’m sure our support team would be happy to help you if you contact them.

                                                  As for why version 17.* is default still, as you asked in the linked SO post, I expect Hyrum’s Law applies: people don’t like it when defaults change without their say-so. We support a few different versions of Docker, and pinning one that supports the operations you want to perform would seem to be the natural path forward.

                                              1. 1

                                                I’m on call and interrupts this week. Thankfully we rarely have issues outside hours, so being on call is not an issue—but interrupts can be exhausting. However, my colleagues have reported a dip in issues in recent weeks, which means our stability focus is paying off. Hopefully quiet enough that I can complete my hack week project from last week—I was tantalisingly close.

                                                At home I’m ripping up old carpets before floorers arrive next week.

                                                1. 1

                                                  I bought a pile of programming-related books and hope to continue to make progress in them. Right now, I’m a couple chapters into Clojure Applied and liking it a lot. It shows it’s age (relying heavily on records, using Schema and Leiningen instead of clojure.spec and deps.edn, etc), but the core ideas are really sound and instructive.

                                                  1. 2

                                                    I remember liking it. I can’t find my copy right now (we recently moved) but ISTR I got a mention in the acknowledgments after wrestling with an early version of their core.async example :-)

                                                  1. 8

                                                    My skip-level manager at work expressed concern last week that I’m not taking enough vacation time, so now I’m trying (and not succeeding) to figure out some sort of vacation plan.

                                                    Before January, I had never taken a vacation before in my entire work career. Instead, I just did long weekends for tech/furry conventions here and there. In January I took a week off because of burnout from conducting too many interviews as an introvert. I also took a few days in March to visit my grandma before she died.

                                                    I’m very bad at this.

                                                    1. 4

                                                      Doesn’t help that current epidemiological events make it hard to justify anything other than sitting at home.

                                                      1. 3

                                                        “I’m in this picture and I don’t like it.”

                                                        1. 2

                                                          We travelled to a wedding weekend before last which, while fun, has led to a few confirmed cases (and more probables that are refusing to test). I’m going a bit stircrazy.

                                                          1. 1

                                                            Extremely true.

                                                            Maybe I’ll spend a week in VRChat.

                                                            1. 2

                                                              If you do that lemme know so I can join at some point and we can talk memes

                                                          2. 1

                                                            Take more long weekends, but not for conventions, just for funsies

                                                            1. 1

                                                              Are there any places you would like to visit during a vacation period? Or maybe you can take a break from work to simply relax and catch up on household duties? I’m not very travel oriented but a week break from work to simply relax and hang out with local friends is a perfectly ideal vacation for me.

                                                              1. 3

                                                                I’m not a traveler, but staycations tend to lead to me working on side projects since my home lab is right there.

                                                                1. 4

                                                                  If travel is not your thing, consider staying at a hotel nearby to avoid “falling into” the home lab. Bring a suitcase of books (or a kindle) and enjoy not doing any chores for a week.

                                                                  1. 1

                                                                    Is there perhaps a (potential) side project that would require you to do some research somewhere else? That might be a reason to travel. Maybe the travel itself can be (part of) a side project. For instance, if you like building hardware you could build a gps tracker. And then travel to the north pole to see if it works.

                                                                    In the past I had great fun to travel to visit confrences in another country. Book some more days and discover the city, etc.

                                                                2. 1

                                                                  Just wondering what “skip-level” means?

                                                                  1. 2

                                                                    Manager’s manager

                                                                    1. 1

                                                                      I use first-line manager, second-line manager, etc. The first-line is your direct manager, the second-line manager their manager, and so on. I picked this up at IBM..

                                                                      1. 1

                                                                        Skip-level (or just “skip”) is a term I picked up from an Amazonian a few years back.