Threads for observator

  1. 2

    Is it considered bad form to make each of those methods return an object and define the methods on each of those objects? If you set up like so:

    class Message
      attr_accessor :message_string
    
      # returns a DecodedMessage object
      def decode
        ...
      end
    end
    

    …and so on, you’d be able to end up with message.decode.build_event.process. You have to create explicit objects for each of those intermediate steps so those methods have somewhere to live, so it’s more verbose and indirect overall, but you get some very readable code.

    1. 2

      A better way to do this generically is with dry-monads and the Result type. If each function returns a Result, you can easily compose them together:

      decode(message).bind(build_event).bind(process)
      
      1. 2

        You might think so, because it embraces ruby’s OO spirit, but in practice this solution would be far worse: the overhead of three abstractions, the bulkiness of having to create 3 classes, the way it breaks locality of behavior – the cure would be far worse than the disease.

        1. 1

          My only concern would be whether those objects are good abstractions.

        1. 1

          Not surprised and a little sad that the politics and non-explicitness seems to be just as bad as in other big projects. Also maybe a relief that they’re not doing it better than the rest of us…

          Great post though!

          1. 5

            See also The Tyranny of Structurelessness, originally written about 1960s anarcho-feminist collectives but very applicable to open source projects. Skip down to ‘Formal and Informal Structures’ if you want to go straight to the relevant parts. TLDR: groups of people seeking to do things will always develop hierarchies and rules, so you’d better make them explicit if you want to keep them from being harmful.

            Github’s explicit permissions help avoid some of the structureless pitfalls - you either have the ability to merge a commit or you don’t - but not all of them. Schneems thought he could ignore an objection to a merge from a particular person, but it turns out there were unwritten rules about whose opinions counted and what ownership of a particular piece meant.

            1. 3

              It involves people, so politics is not far away :)

              1. 1

                What I meant was mostly under-the-radar inofficial structures and not, for example, “to be eligible to join the core group, someone inside must champion your entry and then we will vote. 2/3 yes -> in. Also the core members currently are x,y,z and these are their responsibilites and sole privileges: a,b,c”

            1. 3

              Great podcast, great episode, and I already started using its lessons.

              For a report that takes a while to load, I made a percent-complete bar graph that ticks up to an upper-end estimated completion time. It’s basically fake - the loader doesn’t know anything about the report’s progress or when it’ll be done. But people like it! They’re much happier to sit and wait and less likely to click on something else out of impatience.

              Since I aim high on the time estimate, it usually finishes and displays the report before the loader graph fills completely. Seems bad, right? The loader’s not accurate, after all. But instead, people are happy it finished early. Under promise and over deliver.

              1. 1

                Do your users know that you’re intentionally lying to them? Wouldn’t a simple statement like, “please hang on, this will take a little bit” be more honest and just as effective? Are there any other ways of achieving the same thing possible without deceiving anyone?

                1. 1

                  To me this doesn’t seem like a lie, but rather like an effective form of visual communication. It wouldn’t be a lie to display a hardcoded message saying “please wait, this usually takes about X time.” @observator’s loading bar has essentially the same informational content, the only difference being that the hardcoded “X” estimate is presented graphically, along with a helpful timer indicating how much of “X” has already elapsed.

              1. 4

                I love the concept being discussed here and it’s something I have been practicing for a number of years utilising a variety of tools from note pads through to “bespoke solutions” (a textbox with a 50LOC backend that saves to a txt file.)

                whatgotdone looks like a nifty solution although I don’t much like the idea that all posts seem to be public - that opens it up as a source for leaked information.

                For my public projects I tend to use wordsmith.social to post updates publicly using its journal format while for internal stuff that should never see public eyes due to NDA’s, etc I either use the company internal wiki or our internal install of WriteFreely as a method of distribution.

                1. 4

                  I use jrnl to keep a similar list. Works from the command line, so you can enter:

                  jrnl today 9am: Wrote an extremely valuable comment on Lobsters.
                  

                  …which lets you keep notes while interrupting your flow as little as possible. It writes to a local text file that you can easily transfer, back up, grep, etc.

                1. -10

                  We know that hostile environments are often generated where harassment and uncomfortable situations make women and minorities step aside. It is important to generate a space where everybody, no matter what gender, ethnicity, religion or ideology, is able to share knowledge in a friendly, pleasant environment with a collaboration spirit. There are several ways to achieve this. One of them is to work along gender and minority technology groups, which are doing an excellent work in promoting bigger diversity, and cooperate with them. Giving discounts to those minorities that have less resources is another way. It is also necessary to be attentive towards potential conflict situations that may occur so we can solve them by following a code of conduct.

                  I am not 100% sure that it’s actually illegal for a public event of the sort that a tech conference is to explicitly price-discriminate on the basis of ethnic background. If an organizer tried to do this for a conference I was interested in attending however, I would absolutely look into the possibility of bringing legal action against the organizers, and encourage people I knew to boycott the conference. The organizer, if they thought like the OP, would probably view this as an additional headache - but, frankly, to hell with them. I see no reason to be charitable to people who think it’s righteous to formally discriminate against white people.

                  1. 17

                    formally discriminate against white people.

                    How in the world do you draw that conclusion from the text you quoted?

                    1. -1

                      “Minorities” usually refers to people who aren’t white, since most people who talk about minority representation (in English) come from political entities that are currently majority-white.

                      1. 1

                        I missed that you specifically called out this passage:

                        Giving discounts to those minorities that have less resources is another way.

                        I thought you were implying that “white people”, in your phrasing, had a legal right to harass women and minorities, given the first sentence in the quote:

                        We know that hostile environments are often generated where harassment and uncomfortable situations make women and minorities step aside.

                    2. 9

                      Seeing as the conference is in Argentina, you may not have the correct assumptions about who counts as a minority there or what the laws might be. Anyway, no one’s being excluded based on ethnicity. If the conference organizers have a set of free or discounted passes they want to give to people who aren’t likely to show up otherwise, I don’t see why other attendees should have a problem with that unless they don’t want those people there.

                      1. -10

                        Should Ashkenazi Jews object to a conference pricing structure that checks whether or not you’re Jewish so they can give a discount to gentiles only, on the grounds that there’s too many Jews in the conference and Jews have money anyway?

                        1. 10

                          If you spent more time arguing in the positive than in the negative, I think people would take your line of reasoning more seriously. I think you’ve identified a gap in current race and gender focused advocacy, that could be solved by advocating for some additional scholarships for conferences based on financial need, done via FIFO and double blind review of criteria. I think that’s valuable as someone who was very very poor when they first started showing interest in technical careers, and god knows there’s enough money floating around that it would be trivial.

                          Of course, my hunch is that the scholarship recipients in the US at least will skew towards minorities, because that’s who the statistically significant chunk of poor people in the US are by percentage. That’s not discrimination.

                          1. 5

                            It’s interesting that you mention ‘Ashkenazi Jews’ specifically, when your argument only requires ‘Jews’. That shows that you clearly understand the existence of minorities with their specific (dis)advantages. Now combine that with the knowledge that discrimination based on age (discounts for children and the elderly), gender (ladies free on ladies night), nationality and ethnicity (in many countries locals, or those of specific ethnicities, pay less for access to certain touristic locations) are common and considered normal. Do you then not see how giving discounts to specific minority groups (as opposed to your example, which is giving discounts to the majority) can be both ethically and legally sound?

                            1. 1

                              This requires a group to remain a minority. Are there actually fewer women than men? In any case, I agree that venues should be allowed to set prices for any reason they like. Tan Shirt day. Ladies night. Whatever floats your boat (so long as you are not a government, that’s where it becomes evil).

                            2. 4

                              This analogy is offensive.

                              This phrasing especially is very unfortunate: “Jews have money anyway”. I’m being charitable here and assuming your are waxing satirical, but I urge you to reconsider your choice of words in the future.

                              1. 1

                                Antisemitic memes phrased in the hypothetical form are still antisemitic. I hope the mods will remove this post.

                          1. 8

                            Two good reasons not to deploy on Fridays, at least in my environment (in-house tool development):

                            • Your deploy can be absolutely perfect technologically speaking and still break someone’s experience by making a seemingly minor change. You do not want the director, already cranky because they’ve stayed late on a Friday, unable to figure out that the button for that thing is over there now.
                            • You should have some time every week to try out ideas that might not work, experiment with that new library, and do other speculative things that may or may not pay off. If you don’t deploy your main products on Fridays anyway, that creates space for that kind of work.
                            1. 3

                              Are we all supposed to be saying ‘a11y’ instead of ‘accessibility’ now? That seems especially ironic.

                              1. 4

                                ‘a11y’ is a common term in the accessibility space, so it’s fine.

                                1. 4

                                  I frequently see it argued (on the fediverse) that a11y is not fine, and that it is less accessible than “accessibility”. I personally have no dog in the fight, but I default to believing the people who say it’s not.

                                  1. 1

                                    What is the argument? That it’s easily misread using some fonts?

                                    The term is an analog of i18n for “internationalization”, and l10n for “localization”. The fact that it seems to spell out a positive term is a bonus.

                                    As I am the husband of a blind spouse I’m especially interested in the space…

                                2. 1

                                  It is some american meme. They like to make up these kind of nonsensical expressions. I guess it is not that strange for them as they are accustomed to English language, which is not a phonetic language.

                                  My favourite is PPPoE (Point to Point Protocol over Ethernet) pronounced as poppy, but take SQL pronounced as sequel.

                                  Also this leet-speek transcript of ally is meant to be somehow supportive I guess, but I personally find it non inclusive as it also carries the meaning that we are with you but we are not totally like you. So to sum up I think this expression defeats its purpose in multiple ways.

                                1. 8

                                  That and it’s been phased out in favor of the more-widely-usable magic link log in process.

                                  1. 5

                                    That’s almost universally used for resetting passwords. I’m not sure I’ve ever seen it used for just logging in in the first place. It’s not a bad idea though. There are sites I don’t use very often where I have to reset my password every time I use them anyway. I’m thinking primarily of things like the New Zealand Inland Revenue Department website. Once a year I log in, press the ‘calculate my tax refund for me automatically’ button and then the ‘transfer that amount to my bank account please’ button. But I do it once a year, I don’t remember my password. I’d rather not even have a password to it to be honest.

                                    1. 8

                                      We’re thinking about using it as the login system for a site we’re putting together at my workplace. We’ve got a big set of users who will only use the site once or twice a year at most, and we’ve already got emails for them. Sending them a magic link that expires after a time skips the part where they feel bad that they forgot their password or feel annoyed that we insist they remember it.

                                      1. 4

                                        Yep! Our system has two sets of users – extremely actively daily+ users, and the outside clients they work with who login probably a few times over the course of a project which can be multiple years long. Looking at ‘magic links’ for those users.

                                      2. 4

                                        It is hugely on the upswing since Slack started using it. It has existed for years on a few mobile apps, “click here to get magic login link”, but it is getting very popular now.

                                        I’d rather not even have a password to it to be honest.

                                        This is actually becoming an option in some systems as well – just went to a meetup where a local startup was talking about exactly that – an option their users could click for ‘no password logins’.

                                        1. 4

                                          Yeah, I mean I certainly prefer ‘email me a password reset’ to ‘let me change my password with no email confirmation if you have my mother’s maiden name (which happens to be her last name and which I have given countless websites and businesses)’. So ‘email me a link to log in’ is really just the logical next step in increasing security while not actually making things any less convenient. It’s definitely easier to keep one password secure than dozens. Even with a password manager, changing a lot of passwords regularly is a hassle. But I change my email password every week.

                                          1. 2

                                            I’d describe it the opposite way: “just the logical next step in making things more convenient while not actually making them any less secure.”

                                      3. 4

                                        I have had a couple logins that used this method, and have suffered from waiting minutes for an E-mail to arrive. Sometimes I haven’t received it for hours. This has been my experience waiting for 2-factor SMS as well.

                                        SMS as 2-factor is OK security to me, but is a pretty crummy login method. I think it’s easier and sensible to consider “login by E-mail” as similar to “login by SMS”.

                                        1. 3

                                          As this ridiculous trend increases, expect to see more and more attacks that aim to get access to a user’s mailbox.

                                          And the beauty (for them) is that if they succeed, they can often get in, do what they want, and the end-user will know nothing about it, because they aren’t getting a “wrong password” prompt either.

                                          Every proponent I’ve seen of “magic link” auth systems conveniently ignores all the security and usability downsides.

                                          Password managers are a thing, and they can work amazingly well. Making users rely on emailed links to login because some users have a shit/no password manager, is like banning sales of raw chicken meat because someone occasionally gets salmonella from undercooked chicken.

                                          1. 2

                                            expect to see more and more attacks that aim to get access to a user’s mailbox.

                                            Getting into a users mailbox is already effectively the universal in, as most of the time that is how they “reset” a password. There are a few systems that will also ask them like “What was your favorite baseball team?” or some other security question before sending the reset link, but that isn’t the norm.

                                            1. 1

                                              There are a huge number of user account/password pairs in the wild, not to mention just known passwords (as opposed to just trying dictionary words, and sequential 6-8 digit alphanumeric combinations).

                                              While mailboxes are no doubt currently a target, if you break in via a password reset, it’s a known event - the user will know about the event, and it’s quite common to log extra details for actions like e.g. submitting a password reset, as opposed to a regular login.

                                              What I’m saying is - this behaviour (automatic login links sent to a mailbox) will increase the focus put on mailbox breaches - because not only do they have a vector to access your account without your knowledge, they also likely have hints about where you have accounts (from previous login link emails in your deleted items/inbox).

                                        1. 1

                                          Sad to hear it, he was one of a kind. Is there any effort to archive his work and preserve the site? His family might not want to keep paying the hosting bill forever.

                                          1. 2

                                            archive.org has a large collection of his videos and a lot of TempleOS isos.

                                            I have some of his videos, curated, missing most livestreams. I prefer the more in-depth videos about TOS.

                                          1. 9

                                            I don’t think the analogy holds. Most of the reason things end up getting off-track or getting out of hand are because the problem statement evolves and/or multiple people are working on the same codebase simultaneously. Cooking is a much better analogy for software, especially if the eater keeps changing their mind about what they want to eat. We all know what happens when there are too many cooks…

                                            1. 8

                                              That’s indeed another very good analogy.

                                              Anyway no analogy holds because programming is programming and by definition, analogies are just approximations. It’s just a way to capture parts of the reality we live everyday and the gardener, as much as the cook, cannot possibly capture all of it. Probably the cook for you works so much better because it looks more like your reality.

                                              1. 2

                                                I think the analogy’s just slightly off target. The part that’s organic and alive and unpredictable isn’t the code that we directly build, it’s what the users do with it. We build structures, add fertilizer, and try to guide the plants into particular forms or directions.

                                                Sometimes you spend a lot of time on some part of a project that people never end up using - nothing’s growing in that part of the garden. So you have to figure out whether that spot needs more light, or it’s too dry, or it’s too wet. Sometimes some part of an application that you threw together as an afterthought gets tons of use - wonderful, let’s expand that part of the garden and see what else we can get to grow there.

                                                Maybe there’s some crappy part of your codebase that lots of people nonetheless depend on - this is like an old stone arch that’s crumbling, but has well-established vines growing up it. Now you have to decide whether to reinforce the arch and leave the vines alone, or build a better one and try to retrain the vines to grow on the new one.

                                              1. 6

                                                This is all just makeup and PR stunt. All I see is another Linux distro with Gnome and flat icons and themes… How hard is it for developer to install wanted software or install Arch (or even other OS like BSDs or illumos ones)

                                                1. 2

                                                  This is potentially interesting, but I need more than a single screenshot before I’m going to bother doing a test install. Maybe this could be reposted when there’s something more to go on?

                                                1. 7

                                                  I’m cringing pretty hard at the guy walking through puddles right next to racks and racks of exposed power cords.

                                                  1. 1

                                                    All they ever needed was to ask their grandma or go to amazon for high end device.

                                                    1. 2

                                                      Yeah, dunno why they decided they need to press the entire surface of the bag at once instead of just running a roller from top to bottom.

                                                      I mean, it would still be silly, but maybe it would be $200 of silly instead of $400 - $700.

                                                    1. 5

                                                      Real color theory is very complex, however this author just gave up and dealt with the HSL colorwheel, further teaching another generation that we should not look beyond RGB color spaces, which in my opinion is a fallacy once display technology gets better.

                                                      1. 4

                                                        What resources do you recommend as an alternative? I’m interested in color theory and alternate color spaces, but haven’t really found any accessible resources for learning about it.

                                                        1. 13

                                                          I would recommend to get your hands dirty and dive into the theory. There’s lots of handwaving in most sources available. Try to understand what the motivation behind the XYZ primaries is (to keep it short, they are three imaginary colors that, combined linearily, can create any perceivable colour), which followed from the fact that there are colours which cannot be “mixed” from RGB. I found the video series “Color Vision” by Craig Blackwell 1 2 3 4 5 to be very helpful and enlightening.

                                                          Now, once you’ve understood that, you have to understand that the “perfect” spectral colors (which means monochromatic light of different wavelengths) are the “boundaries” of human vision, so to say the convex hull of the XYZ-coordinates of all visible spectral colours (modulo lightness) is the realm of human vision. You can get those coordinates here. It turns out, these “coordinates” X(lambda), Y(lambda), Z(lambda) are called color matching functions (you can get them there as CSV’s).

                                                          The final piece in the puzzle is to convert these XYZ coordinates to common normalized formats like xyY or even CIELab or CIELuv, or even polar coordinate forms like HCL(uv). All these formulas can be found here, an excellent resource of transformation functions between all kinds of different formats, including XYZ <-> xyY and so on, by Bruce Lindbloom. He is a really awesome guy. Now the only thing left to do is plot the xyY data in ParaView or something and if you look at just the xy-plot you’ll see the familiar horseshoe. :)

                                                          If you look at the color transformations from RGB to XYZ, you’ll see that RGB data includes a lot of implicit information, including the reference white and which RGB primaries you actually choose. Most people, talking about RGB, are talking about sRGB, but you can “invent” an RGB color space easily by just defining three primaries. If you manage to convert an RGB coordinate to an XYZ, Luv or Lab coordinate, the latter are all “universal” in describing color perception. These spaces allow you to express any visible colour. With RGB, they over the years defined new colour spaces (Adobe RGB, ProPhoto RGB and so on), moving the primaries a bit to make the range of colours bigger, but in the end there are still quite a lot of colours left which just cannot be expressed within currently “popular” RGB colour spaces. There are drawbacks to working with anything other than sRGB coordinates (imaginary colours, no good software backing, lots of superfluous nomenclature, …), but you gain a lot of things. For instance, CIELuv is perceptually uniform, which means that if you select equidistant colors on a “line” within the uv-diagram, these colours will all be equidistant with regard to perception. If you work with HSL based on RGB, this does not work, which is very cumbersome if you want to select nice colours for diagrams and such. The reason for that is for instance that sRGB has a nonlinear gamma curve. You might want to work with Linear RGB then, but if you do any of that stuff on your data, you might as well work with the real thing.

                                                          I hope this introduction was sufficient to get you started. Send me a mail if you want to see some code. I might give a talk about it this year, but it takes some preparation.

                                                          1. 1

                                                            Woah, thanks for the intro - I remember seeing your slcon talk a few months ago on color spaces and farbfeld, which is initially what got me interested. I’ll probably dive into all of it a bit more soon when I start fiddling with 3D graphics again. Thanks for the resources - I’ll definitely check them out :D

                                                          2. 4

                                                            not OP, but https://www.handprint.com/HP/WCL/wcolor.html is probably the most accessible treatment I’ve found.

                                                            1. 1

                                                              Cool I’ll definitely take a look at this - thanks :)

                                                            2. 3

                                                              Color theory is interesting, but (I feel) a bit of a rabbit hole. I learned a little about color spaces a few years back while writing a blog post about how the difference in color space and gamma value between older Mac and Windows computers might have influenced some of the popular color themes.

                                                              I found Danny Pascale’s “A Review of RGB Color Spaces” a useful (if somewhat terse) source of information about computer color spaces.

                                                              1. 1

                                                                Neat, I’ll have to read that paper, thanks for pointing it out

                                                            3. 6

                                                              Are there non-RBG displays coming down the pipeline? It makes sense to design for the displays that exist rather than the ones that might. I think this article is, as the title says, going for practical color theory rather than comprehensive color theory.

                                                              1. 1

                                                                I assume you are referring to displays that can display colours beyond sRGB. Yes, these displays exist already. In fact, the current iPhone and most AMOLED displays fall within that group.

                                                              2. 3

                                                                Real color theory is very complex

                                                                I think the issue here isn’t really about “real color” theory as in “all there is no know about color” but “i am making a blog what color what I make all the stuff in it?” and choosing 2 colors then making a light and dark version of each is a solid strategy for an otherwise ‘design-illiterate’ developer.