Threads for n8

    1. 5

      This is something I really struggle with. On one hand it is good that there is a possibility that other people can read what I wrote. It helps me to make that extra step to verify my thoughts. Almost always this causes me to learn something, because I had sort of the right idea, but also missed aspects.

      On the other hand it can go too far. That I hold things back because of the reasons outlined. I start to think too much about the format and whether I will be able to keep it up.

      What has helped me so far to keep a good balance between the two is to get rid of all trackers, counters and logs that could indicate if there is an audience. Avoid any risks of developing some kind of vanity. Now the expectation is that nothing will happen with what I write. Except for that person that explicitly was searching for something I wrote about. And I want to take inspiration from a more “shotgun” approach like Rubenerd has. Sometimes I come across someone that references a post of mine, and all is good.

      1. 1

        What has helped me so far to keep a good balance between the two is to get rid of all trackers, counters and logs that could indicate if there is an audience.

        I completely agree. I’ve posted two relatively popular blog posts using GitHub pages (mainly because I trusted it wouldn’t go down and I didn’t want any cookie warnings), and have no view counts to show for it. Sometimes I wish I had, because it would have been a nice reminder during some low points that I can actually provide something useful to the world, but overall I’d rather focus on the actual fun of finding things out than the societal validation of view counts.

      2. 1

        Great point. And funny, was thinking about this topic too as soon as I published this post and on my run today listening to Malcolm Gladwell’s podcast. He mentioned how a recent podcast episode of theirs didn’t land like they wanted to. It came off as being too much of a sponsored post. I think what really helps about avoiding worrying about the impact size (or lack thereof) is committing to the cadence of it all. Like Malcolm, some things just aren’t gonna land, but if you commit to some kind of cadence: episodes per season, post per week, whatever. It helps remove the worry about what impact the last thing had if you know you are just going to show up anyways next week regardless.

        Thanks for mentioning this.

    2. 3

      I did some benchmarking of various Redis locking gems years ago.

      You can improve your gem in two ways:

      1. Allow N lockers, not just 1.
      2. Don’t (sleep and poll) but rather block, up to the acquire_timeout.

      Note: I wrote and sell my own commercial version as part of Sidekiq Enterprise.

      1. 1

        Ah! interesting. Thanks for the feedback. Will look at incorporating.

    3. 1

      Anecdotes about stolen backpacks in high school are cute, but how is this different from the many other redis-backed locks on, or at least the most popular, redlock?

      1. 2

        Redlock is distributed. You use multiple Redi’ to decide who gets the lock, similar to Paxos or Raft. Most people don’t need this complexity.

        Simple mutexes like this one use a single Redis and aren’t fault tolerant if Redis dies.

        1. 1

          Thanks Mike, that’s exactly what the decision was here. I needed a simple mutex to reach for, didn’t want to manage multiple Redi for this. Wasn’t something I was worried about it the single Redis went down, etc. So made something I thought was easy to grok and maintain.

    4. 6

      These things are so basic (and not even specific to Ruby) it makes me want to cry :)

      1. 1

        These are mistakes we were shamed for, in a previously PHP-based career, literally 15 years ago.

      2. 1

        I’m with you. :/ But yeah, the user_id was one I just corrected on StackOverflow yesterday. I’ve seen super-senior people completely botch scoping their queries and still string interpolating parts of queries.