MTGZone
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@infosec.pub to Programmer Humor@programming.dev · 19 hours ago

Clock, but its ORDER BY Hour DESC

infosec.pub

message-square
31
fedilink
295

Clock, but its ORDER BY Hour DESC

infosec.pub

cm0002@infosec.pub to Programmer Humor@programming.dev · 19 hours ago
message-square
31
fedilink
alert-triangle
You must log in or register to comment.
  • gwl@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    6
    ·
    7 hours ago

    Makes me wonder if there’s an equivalent of /r/BadUXBattles loved that Reddit

    • ForeverComical@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      41 minutes ago

      Then you’ll love this video https://youtu.be/TOzEnwl7LkA

  • wischi@programming.dev
    link
    fedilink
    arrow-up
    14
    ·
    edit-2
    5 hours ago

    Because an image is a bit to lazy IMHO for “prgrammer” humor. I programmed a clock that actually works. Have fun 🤣

    https://jsfiddle.net/gjpwf5oq/2/

    Btw: you can change the order of the clock-face if you want.

    Update: Supports arbitrary text now (example roman numerals): https://jsfiddle.net/2o97k6vz/6/

    Update: And with Months because why not 🤣 https://jsfiddle.net/2o97k6vz/7/

    • RiQuY@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      5 hours ago

      Your clock goes backwards.

      • wischi@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        That’s intended. Look at the second hand for a minute. It goes 1, 2, 3, etc. like on a real clock but the numbers are distributed differently. That’s also why the hands sometimes have to move faster to reach their target in time. It goes (backwards) if it’s closer.

  • zr0@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    12
    ·
    13 hours ago

    Order by string desc would be Z-A ordering, or 9-0

    ORDER BY str(Hour) DESC: 9, 8, 7, 6, 5, 4, 3, 2, 12, 11, 10, 1

    ORDER BY int(Hour) DESC: 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1

    • gwl@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 hours ago

      That depends on language

      • optissima@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        7 hours ago

        Finally a truly localised time

        • gwl@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 hours ago

          I meant programming language, but yeah also true

  • Senseless@feddit.org
    link
    fedilink
    arrow-up
    15
    ·
    14 hours ago

    Thanks, I hate it.

    • Barbarian@sh.itjust.works
      link
      fedilink
      arrow-up
      6
      ·
      14 hours ago

      Came to the comments to add exactly this. Am I predictable, or is this just the natural reaction to this image?

      • Senseless@feddit.org
        link
        fedilink
        arrow-up
        6
        ·
        14 hours ago

        Yes.

      • llii@discuss.tchncs.de
        link
        fedilink
        arrow-up
        2
        ·
        13 hours ago

        It is, I wanted to post this exact comment, too.

  • RogueBanana@piefed.zip
    link
    fedilink
    English
    arrow-up
    36
    ·
    18 hours ago

    Isn’t it ascending? Alphabetically I mean.

  • Sunoc@sh.itjust.works
    link
    fedilink
    arrow-up
    39
    ·
    edit-2
    19 hours ago

    Still way better than the best LLMs can do

    • otacon239@lemmy.world
      link
      fedilink
      arrow-up
      13
      ·
      edit-2
      14 hours ago

      Kimi and Deepseek both seem to do a decent job.

      Something funky is going on. They’re somewhat random each time I refresh. Sometimes they work, sometimes they don’t.

      • kambusha@sh.itjust.works
        link
        fedilink
        arrow-up
        8
        ·
        13 hours ago

        Click on the question mark for an explanation

  • Jeeve65@ttrpg.network
    link
    fedilink
    arrow-up
    24
    ·
    19 hours ago

    You mean I, II, III, IV, IX, V, VI, VII, VIII, X, XI, XII

    • wischi@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      5 hours ago

      Here you are: https://jsfiddle.net/2o97k6vz/6/

    • smeg@feddit.uk
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 hours ago

      It’s usually IIII on clocks

      • ChaoticNeutralCzech@feddit.org
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        50 minutes ago

        Depends on where and when it’s from, it’s rare where I live. Also, makes no difference in terms of alphabetical sorting.

        • smeg@feddit.uk
          link
          fedilink
          English
          arrow-up
          1
          ·
          7 hours ago

          True!

  • jet@hackertalks.com
    link
    fedilink
    English
    arrow-up
    4
    ·
    13 hours ago

    This is why the military uses 03 hundred hours… Makes things clear, and sortable regardless of your algorithm

    • zr0@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      12 hours ago

      Sure. No one ever in this entire world ever did a int(“0200”), because it is insane to represent numbers as actual numbers. I am so glad that military invented a standard working with any algorithm.

      • sp3ctr4l@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        11 hours ago

        I mean, I hear you, but to be fair, I think the military has been using that kind of a timing convention since before computing even really existed.

        … We did more or less invent modern computers, initially, to compute artillery ranging tables.

        I’m pretty sure that predates even the concept of … a string vs int data type.

        • Frezik@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          6 hours ago

          Depends on what you call a “computer”. The first electronic calculating machine sold by the company now known as IBM was for the census, and it was prior to WWI.

          Edit: we need to fight back on this idea that the military drives technological innovation. That’s only true because of the shitty values our society has.

          • optissima@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            7 hours ago

            The German one?

            • Frezik@lemmy.blahaj.zone
              link
              fedilink
              English
              arrow-up
              1
              ·
              6 hours ago

              Hollerith was American-born to German immigrants. The census in question was also the 1890 US census.

              It’s a cool story. With the rise in population, the 1890 census was not predicted to be completed before they had to start the 1900 census. With Hollerith’s machine, it was instead done in record time.

  • MadhuGururajan@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    15 hours ago

    I wonder how it would look with excel sort

    • sp3ctr4l@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 hours ago

      Probably a bunch of error messages relating to improperly executed macro scripts, failed external api calls, and maybe copilot demanding you put all your documents into one drive… and also somehow the same ‘hey, do you have a moment?’ Teams message from one person, but somehow on 2 or 3 different versions of Teams, simultaneously.

  • getFrog@piefed.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    12 hours ago

    Print that header onto the dial in a monospace font and you’ve got yourself an extremely marketable product. Perfect thing to bring to a white elephant gift exchange at an IT Company!

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.02K users / day
  • 5.2K users / week
  • 8.96K users / month
  • 19.4K users / 6 months
  • 5 local subscribers
  • 27.2K subscribers
  • 1.88K Posts
  • 70.7K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org