On Tue, 06 Aug 2013 09:27:10 -0400, Burak Arslan
<burak.ars...@arskom.com.tr> wrote:
First, let's get over the fact that, with dynamic typing, code fails at
runtime. Irrespective of language, you just shouldn't ship untested
code, so I say that's not an argument against dynamic typing.
It's not so much shipping untested code as not having or unable to test
all the pathways in the code shipped. I ran into this problem with a
server I built. I ended up solving the problem by building a testing
scaffolding that let me control all inputs. It would've been much easier
with static typing to make sure all the pieces lined up.
The other technique I've used is a properly set up exception handling
environment. Do it right and you can log all of the errors so that you
have useful information. Part of "doing it right" includes a system that
tells you when exceptions happened right away so the server doesn't run
for days or more failing at random but nobody notices because your
exceptions keep the system for failing completely.
I guess this is a long way of saying instrument your software so that it
can be tested and or give you enough information about the internal state.
This is sort of like building a specialized integrated circuit. You need
to design it so it can be tested/observed after it's been embedded in
epoxy and not just count on being able to probe the wafer in the lab.
--
http://mail.python.org/mailman/listinfo/python-list