lonestar-lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Wats0ns@sh.itjust.works to Programmer Humor@programming.dev · 2 years ago

Inm looking at you Typescript dev

sh.itjust.works

message-square
49
link
fedilink
520

Inm looking at you Typescript dev

sh.itjust.works

Wats0ns@sh.itjust.works to Programmer Humor@programming.dev · 2 years ago
message-square
49
link
fedilink
  • stevecrox@kbin.social
    link
    fedilink
    arrow-up
    55
    ·
    2 years ago

    I am currently teaching python and JavaScript devs Typescript. Everytime they hit a problem they switch to any

    Sigh

    • jubilationtcornpone@sh.itjust.works
      link
      fedilink
      arrow-up
      17
      ·
      2 years ago

      Must be the same people who just comment out failing unit tests.

      • OsrsNeedsF2P@lemmy.ml
        link
        fedilink
        arrow-up
        6
        ·
        2 years ago

        “Your crappy tests are failing again on my branch. I’ve commented them out until you fix them.”

        • Hudell@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          2
          ·
          2 years ago

          Sadly that sort of thing got so common where I work that I’ll run the tests three times before considering looking into the error message to see if it is something I broke.

          From time to time we take some days just to fix tests with inconsistent results, but there’s always more popping up.

          • Darorad@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            7 days ago

            deleted by creator

          • OsrsNeedsF2P@lemmy.ml
            link
            fedilink
            arrow-up
            2
            arrow-down
            3
            ·
            2 years ago

            Serious answer: You can’t write tests for untestable code. Your code needs to be pure if you want reliable tests: https://en.m.wikipedia.org/wiki/Pure_function

            For integration tests, they should handle retries themselves

      • mark@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        2 years ago

        …or skip em

    • fiah@discuss.tchncs.de
      link
      fedilink
      arrow-up
      8
      ·
      2 years ago

      the beatings will continue until typing improves

    • hubobes@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      2 years ago

      Eslint is your friend :)

    • Uplink@programming.dev
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      2 years ago

      That’s why I kinda don’t like Python and JavaScript anymore. Every time I want types for a library it’s gonna take me time to get it working. For every serious project I do, I use a strongly typed language.

    • jflorez@sh.itjust.works
      link
      fedilink
      arrow-up
      6
      ·
      2 years ago

      Just create a al Inter rule that rejects Any types and a pre-commit hook that refuses the commit if the linter fails. Sometimes the brute force approach is the best way to teach

    • jibz@burggit.moe
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      You told them not to?

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.28K users / day
  • 4.6K users / week
  • 8.46K users / month
  • 17.9K users / 6 months
  • 2 local subscribers
  • 23.5K subscribers
  • 1.43K Posts
  • 52.2K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org