Re:Python's Type Checking Renaissance
by mpweiher on Wednesday January 27, 2021 @03:56AM
(#25925813)
Hmm...the basic development cycle described is horribly broken:
Write a bunch of new code.
Repeat 4-6 times, in rapid succession:
Run program to manually test.
Find basic error (like a missing import).
Fix basic error.
Debug/fix deeper errors in the new code
With this, just about anything will help, including static typing.
The problem is the following line
Run program to manually test.
You should avoid manual testing at (almost) all cost. Write an automated test instead. It is effort your are expending anyway, why throw it away?? And while you're there, write the test beforehand, to clarify the specification of the code you're trying to write.
With such a TDD cycle, those problems wouldn't have happened.
Repeat
Write a test
Make it pass
[Commit]
Refactor
Commit
Mind you, static typing can still help in this scenario, but not in getting the code to work and helping it remain functional. It helps as verified documentation that eases understanding when reading the code.
The problem is the following line
You should avoid manual testing at (almost) all cost. Write an automated test instead. It is effort your are expending anyway, why throw it away?? And while you're there, write the test beforehand, to clarify the specification of the code you're trying to write.With such a TDD cycle, those problems wouldn't have happened.
Mind you, static typing can still help in this scenario, but not in getting the code to work and helping it remain functional. It helps as verified documentation that eases understanding when reading the code.