
Is it important to write tests when you're coding for yourself? - osopanda
https://www.rubysteps.com/articles/2016/is-it-important-to-write-tests-when-coding-for-yourself/
======
Jaruzel
Not a Ruby response per-se, but I tend to be very function orientated when I
code. On completion of each new (as in never written it before) function I add
a test call to the function at the top of my main module followed by an
'exit/end' statement. I then compile and run, and ensure the function works
with test data. If it passes I then use the function in the code flow as
normal and comment out the test call, if it doesn't pass, I tweak it until it
does.

I guess this is a form of unit testing, although I never seen anyone talk
about it in this way.

------
egor666
Importance of writing tests doesn't depends on whom you are writing this code.
If we are talking about unit tests, they helps you to write your code faster
and make it more scalable. Also it's a good discipline exercise to write tests
on all your code, in future it becomes a part of code for you. Good way to
become a better developer

