Settings

Theme

“Prime Testable” Code

powerfulpython.com

1 points by redsymbol 4 years ago · 1 comment

Reader

bumbread 4 years ago

It basically seems to advocate using functional programming, or at least writing pure functions for the code that you want to be testable.

Got a little bit disappointed in the content of the article. In fact, the whole article amounts to the three sentences of information "Write functional code. If it doesn't work, reorganize. Try it and let me know". I wish the author at least pointed how to convert the code to the testable state. Not to mention the "reorganization part" totally blows all the meaning out of all previous sentences -- if writing pure functions may not work, does what you say even matter?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection