this post was submitted on 02 Feb 2024
1031 points (98.3% liked)

Programmer Humor

32453 readers
317 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] magic_lobster_party@kbin.social 0 points 9 months ago (1 children)

I shouldn’t need to do unit tests for quick one off scripts

[–] c0mbatbag3l@lemmy.world 0 points 9 months ago (1 children)

Shouldn't be forgetting for one off scripts either, if that's the logic you want to go with.

The tool exists, either you do it or you don't and end up getting an error until the interpreter hits that line. It's just the nature of being compiled at runtime.

[–] magic_lobster_party@kbin.social 0 points 9 months ago (1 children)

“Ohh, I got all these numbers I want to crunch using numpy or pandas and plot it using matplotlib. Hold on, I just need to write unit tests first.”

[–] cyborganism@lemmy.ca 0 points 9 months ago (1 children)

Well. Yeah. That's test-driven development. It's a very good practice.

[–] magic_lobster_party@kbin.social 1 points 9 months ago

TDD only works well if the problem is clearly specified before the first line of code has been written, which is rarely the case when I need Python for something.