• tetris11@feddit.uk
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    4 hours ago

    Genuine Question:

    if you could split the month names into 3, how would you split them to maximise their choice overlap?

    • “em” is a good overlap for nov/sept/dec
    • “uar” is good for jan/febr
      • tetris11@feddit.uk
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        1 hour ago

        hierarchical letter clustering would be my guess, or graph-based clustering using ngrams of 2-4 as nodes and maximising for connections.

        Or using an optimized Regex and printing out the DFA?

        Edit: Quick N-gram analysis (min=3, max=num letters in that month)

        R-code
        library(ngram)
        
        tmonths = c("january", "february", "march",
                   "april", "may", "june", "july",
                   "august", "september", "october",
                   "november", "december")
        
        zzz = lapply(tmonths, function(mon){
          ng = ngram::ngram_asweka(paste(unlist(strsplit(mon, split="")), collapse=" "), min=3, max=nchar(mon))
          return(gsub(" ", "", ng))
        })
        res = sort(table(unlist(zzz)))
        res[res > 1]
        

        This gives the following 9 ngram frequencies greater than 1:

          ary   uar  uary   emb  embe ember   mbe  mber   ber 
            2     2     2     3     3     3     3     3     4 
        

        As you can see two longest most common motifs are “em-ber” and “uar-y”

        Using this I propose the following graph

        Mermaid
        stateDiagram
            direction LR
            sept --> em
            nov --> em
            dec --> em
            em --> ber
            oc --> to
            to --> ber
            feb --> uar
            uar --> y
            jan --> uar
            ju --> ne
            ju --> l
            l --> y
            ma --> r
            ma --> y
            r --> ch
            
            a --> p 
            p --> r
            r --> il
            a --> u
            u --> gust
        
        

          • tetris11@feddit.uk
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 hour ago

            I’m really disappointed by June, April and August. Without these months, everything would be so neat and orderly

        • tetris11@feddit.uk
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          2 hours ago

          Interestingly

          • Aprch
          • Maril

          are the only two hallucinations, everything else is always a legit month

    • codapine@lemmy.zip
      link
      fedilink
      arrow-up
      7
      ·
      8 hours ago

      Sounds like a medicine I shouldn’t take before asking my doctor if it’s right for me.

  • gerryflap@feddit.nl
    link
    fedilink
    arrow-up
    2
    ·
    5 hours ago

    We can clearly see that this design is silly, because it allows for so many invalid states. Yet when we represent some type, let’s say in Java, were so often forced to do this exact same thing. Have variables in a container of which only a certain combination is valid. And then have at most a comment saying “this number is only valid if X is also set” or “if the validity boolean is true”. Luckily Java finally has some ability for the so-called sum types now, just like Haskell’s data types or Rust’s enum types. Imo any language should have this.

    • Fiery@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      Having data dependent on each other in a type means that either you have redundant data (so one of the fields should be computed) or that your container tries to be too generic (you should in this case prefer an ‘Apple’ class over a ‘Fruit’ class with an enum field ‘Type’)

  • eronth@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    7
    ·
    9 hours ago

    I understand that bad ui is a fun meme and all, but how did this one even cross their mind as an idea for a bad UI? This is a new level of convoluted I would not have even considered.

      • lugal@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        1
        ·
        3 hours ago

        It’s too unregular and too good to be a coincidence. Unless they threw an algorithm on it that was intended for whatever