Dorm Room
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
bigboismith@lemmy.world to Programming Horror@programming.dev · 8 months ago

Found this beauty in one of my old projects from school

lemmy.world

message-square
10
fedilink
58

Found this beauty in one of my old projects from school

lemmy.world

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

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

    • Deebster@programming.dev
      link
      fedilink
      English
      arrow-up
      12
      ·
      8 months 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
    15 days ago

    deleted by creator

    • PoolloverNathan@programming.dev
      link
      fedilink
      arrow-up
      7
      ·
      8 months 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
        ·
        8 months 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
          ·
          8 months 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
    ·
    8 months 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
    ·
    8 months 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
    ·
    8 months ago

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

    • SpicyLizards@reddthat.com
      link
      fedilink
      arrow-up
      5
      ·
      8 months ago

      The best code has the fewest lines.

      • Hello Hotel@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        6 months 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: [email protected]

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 @[email protected]

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
  • 49 users / month
  • 87 users / 6 months
  • 2 local subscribers
  • 2.13K subscribers
  • 37 Posts
  • 298 Comments
  • Modlog
  • mods:
  • Vacant@programming.dev
  • BE: 0.19.10
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org