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

Clock, but its ORDER BY Hour DESC

infosec.pub

message-square
24
fedilink
311

Clock, but its ORDER BY Hour DESC

infosec.pub

cm0002@infosec.pub to Programmer Humor@programming.dev · 2 days ago
message-square
24
fedilink
alert-triangle
You must log in or register to comment.
  • Australis13@fedia.io
    link
    fedilink
    arrow-up
    5
    ·
    16 hours ago

    Somebody used the wrong data type for the Hour column…

    • AnotherPenguin@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      15 hours ago

      There are no wrong data types in javascript :D

      • YellowTraveller@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        3 hours ago

        There are no right data type in javascript*

  • jlow (he / him)@discuss.tchncs.de
    link
    fedilink
    arrow-up
    4
    ·
    20 hours ago

    Now do a clock version of the weird American date format, mm/dd/yyyy? Maybe it has to be digital?

    mm:ss:hh? But obviously dont use 24h

  • wischi@programming.dev
    link
    fedilink
    arrow-up
    15
    arrow-down
    1
    ·
    edit-2
    1 day 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
      ·
      1 day ago

      Your clock goes backwards.

      • wischi@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        1 day 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.

  • Sunoc@sh.itjust.works
    link
    fedilink
    arrow-up
    37
    ·
    edit-2
    2 days ago

    Still way better than the best LLMs can do

    • otacon239@lemmy.world
      link
      fedilink
      arrow-up
      14
      ·
      edit-2
      1 day 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
        ·
        1 day ago

        Click on the question mark for an explanation

  • zr0@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    1
    ·
    1 day 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

  • Senseless@feddit.org
    link
    fedilink
    arrow-up
    14
    ·
    1 day ago

    Thanks, I hate it.

    • Barbarian@sh.itjust.works
      link
      fedilink
      arrow-up
      6
      ·
      1 day 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
        ·
        1 day ago

        Yes.

      • llii@discuss.tchncs.de
        link
        fedilink
        arrow-up
        2
        ·
        1 day ago

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

  • Jeeve65@ttrpg.network
    link
    fedilink
    arrow-up
    24
    ·
    2 days ago

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

    • wischi@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

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

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

      It’s usually IIII on clocks

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

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

        • ulterno@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          18 hours ago

          It would, if it were:
          I II III IIII IIIII IIIIII IIIIIII IIIIIIII IIIIIIIII IIIIIIIIII IIIIIIIIIII IIIIIIIIIIII


          Also, if IX ended up being VIIII, it would end up sorting in numerical order.

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

          True!

  • MadhuGururajan@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 day ago

    I wonder how it would look with excel sort

    • sp3ctr4l@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day 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
    ·
    1 day 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.

  • 381 users / day
  • 3.94K users / week
  • 7.21K users / month
  • 15.1K users / 6 months
  • 1 local subscriber
  • 27.2K subscribers
  • 1.63K Posts
  • 41.2K 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