SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
bigboismith@lemmy.world to Programming Horror@programming.dev · 1 year ago

Found this beauty in one of my old projects from school

lemmy.world

message-square
10
link
fedilink
60

Found this beauty in one of my old projects from school

lemmy.world

bigboismith@lemmy.world to Programming Horror@programming.dev · 1 year ago
message-square
10
link
fedilink
alert-triangle
You must log in or register to comment.
  • Python@programming.dev
    link
    fedilink
    arrow-up
    20
    ·
    1 year ago

    smh, could have used the short form ()=>{ instead of function 😤

    • Deebster@programming.dev
      link
      fedilink
      English
      arrow-up
      12
      ·
      1 year ago

      I’ve been coding long enough that I still think of that as a fairly new thing in JS.

  • Rin@lemm.ee
    link
    fedilink
    arrow-up
    12
    ·
    edit-2
    9 months ago

    deleted by creator

    • PoolloverNathan@programming.dev
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      Someone’s handed me nested base-64 encoded JSON before and to this day I am moderately annoyed at them.

      • MinekPo1 [it/she]@lemmygrad.ml
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        unity kinda does this ! there is a json file wirh a base-64 encoded string (UTF-16 encoding) and is a completely different data structure with embedded json

        • PoolloverNathan@programming.dev
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          I just had to add URL-encoded TOML to something due to a certain Rust crate’s constraints.

  • zygo_histo_morpheus@programming.dev
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago

    Why settle on cammel case (“saveGame”) or upper cammel case (“SaveGame”) when you can have one of each?

  • Kissaki@programming.dev
    link
    fedilink
    English
    arrow-up
    11
    ·
    1 year ago

    In German we say “doppelt hält besser”. Is there an English saying like that? “Twice is stronger/more stable/holds better.”

  • GBU_28@lemm.ee
    link
    fedilink
    English
    arrow-up
    10
    ·
    1 year ago

    I WILL NOT USE ANOTHER LINE. I DON’T NEED IT

    • SpicyLizards@reddthat.com
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      The best code has the fewest lines.

      • Hello Hotel@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 year ago

        This is just as easy to write, just as sloppy but hopefully way easier to read.

        Game.onload = (data)=>{
        let a = data;
        a = JSON.decode(a)["saveGame"][0];
        a = JSON.decode(a)["SaveGame"];
        return a;
        }
        

Programming Horror@programming.dev

programming_horror@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: !programming_horror@programming.dev

Welcome to Programming Horror!

This is a place to share strange or terrible code you come across.

For more general memes about programming there’s also Programmer Humor.

Looking for mods. If youre interested in moderating the community feel free to dm @Ategon@programming.dev

Rules

  • Keep content in english
  • No advertisements (this includes both code in advertisements and advertisement in posts)
  • No generated code (a person has to have made it)

Credits

  • Icon base made by Lorc under CC BY 3.0 with modifications to add a gradient
Visibility: Public
globe

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

  • 1 user / day
  • 1 user / week
  • 20 users / month
  • 146 users / 6 months
  • 25 local subscribers
  • 2.33K subscribers
  • 46 Posts
  • 320 Comments
  • Modlog
  • mods:
  • Vacant@programming.dev
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org