▲ 1058 ▼ All of IT in one image (lemmy.ml) submitted 1 year ago by cm0002@lemmy.world to c/programmer_humor@programming.dev 48 comments fedilink hide all child comments
[–] blackn1ght@feddit.uk 12 points 1 year ago (5 children) This isn't the languages fault, it's the developers. permalink fedilink source parent hideshow 5 child comments replies: [–] sukhmel@programming.dev 6 points 1 year ago (1 child) Albeit true, I want to note that some languages encourage such practices way more than others do. Also, when you've got a hammer everything looks like a string nail. permalink fedilink source parent hideshow 1 child comment replies: [–] blackn1ght@feddit.uk 0 points 1 year ago In my mind a simple unit test should have caught this. Mock out the call to the service that sends the message and verify that it's been called with the correct message, and cover the possible failure scenarios. That said I hate loosely typed languages lol. permalink fedilink source parent [–] copd@lemmy.world 5 points 1 year ago besides NaN actually being a number, this could completely and easily be avoided with typescript. permalink fedilink source parent [–] CanadaPlus@lemmy.sdf.org 2 points 1 year ago It's both. permalink fedilink source parent [–] Scoopta@programming.dev 2 points 1 year ago I'm assuming by this you mean the developers of JS /s permalink fedilink source parent
[–] sukhmel@programming.dev 6 points 1 year ago (1 child) Albeit true, I want to note that some languages encourage such practices way more than others do. Also, when you've got a hammer everything looks like a string nail. permalink fedilink source parent hideshow 1 child comment replies: [–] blackn1ght@feddit.uk 0 points 1 year ago In my mind a simple unit test should have caught this. Mock out the call to the service that sends the message and verify that it's been called with the correct message, and cover the possible failure scenarios. That said I hate loosely typed languages lol. permalink fedilink source parent
[–] blackn1ght@feddit.uk 0 points 1 year ago In my mind a simple unit test should have caught this. Mock out the call to the service that sends the message and verify that it's been called with the correct message, and cover the possible failure scenarios. That said I hate loosely typed languages lol. permalink fedilink source parent
[–] copd@lemmy.world 5 points 1 year ago besides NaN actually being a number, this could completely and easily be avoided with typescript. permalink fedilink source parent
[–] Scoopta@programming.dev 2 points 1 year ago I'm assuming by this you mean the developers of JS /s permalink fedilink source parent