A small collection of WTF code snippets sorted by language.

    • Kacarott@aussie.zoneOP
      link
      fedilink
      arrow-up
      0
      ·
      20 days ago

      If you have some good PowerShell examples, feel free to contribute them, I’m sure they’d be welcome

  • SpaceNoodle@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    23 days ago

    Are we supposed to be able to scroll through the examples? Also, it’s odd to see expected behavior in there.

  • vithigar@lemmy.ca
    link
    fedilink
    arrow-up
    0
    ·
    23 days ago

    The WTF in the C# example seems to be that people don’t understand anonymous functions and closures?

    • r00ty@kbin.life
      link
      fedilink
      arrow-up
      0
      ·
      23 days ago

      Yeah. I didn’t understand what they meant by the wtf there. Seemed to me someone wondered if the Action would have a localised version of i (making this stay lowercase on a phone was harder than it should be) or if it used the same i. So made a simple test for it.

      Not really sure it’s a wtf unless they expected a different result.

    • Kacarott@aussie.zoneOP
      link
      fedilink
      arrow-up
      0
      ·
      23 days ago

      Some of the examples seem to be more “unintuitive for newbies”, but there are still some good ones in there

  • toastal@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    22 days ago

    I love that the contribute is just a mailto link. I want to see more of this & less “join the Discord chatroom & create a Microsoft GitHub account today”