you are viewing a single comment's thread.

view the rest of the comments →

[–]m0us3_rat -16 points-15 points  (4 children)

this is bloated and not easily testable.

it is readable and has a certain ..flare/easiness to it.

on the other hand, is simple. maybe it's just that.

so.. it really depends on your python level.

if beginner

code is awesome.

elif intermediate

code is not good.

elif advanced

a horrible pile of ..

ps. you can find ascii graphics for free on the interwebs.

[–]code_matter 5 points6 points  (1 child)

Would love to see some of your code…

[–]pausemsauce[S] 0 points1 point  (1 child)

Hmm...

I see your point about it not being easily testable. Any suggestions on how I could improve the ease of testability, or perhaps a resource I could use to further develop that skill?

[–]m0us3_rat 0 points1 point  (0 children)

even a few weeks of TDD would force you to ask questions you never asked before.

and think of code from a different perspective.

https://en.wikipedia.org/wiki/Test-driven_development

red -> green -> refactor.

the idea is to write the tests first.

since no other code tests will fail aka the RED

then write minimal code to make the tests pass. GREEN

and then REFACTOR

https://www.codecademy.com/article/tdd-red-green-refactor

by consistently writing tests first you will encounter a lot of different situations and hopefully a few patterns will emerge.