Just because you run through every line of code while testing, doesn't mean at all these are bug free. Most tests in TDD are positive tests ("Putting A into function B results in behaviour C"), confining undefined behaviour especially in dynamicly typed languages, is a very different beast :D
The simple line:
result = input + 1
in JS has some many potential results, that you have to cover this line multiple times :D
@ru Ah, thanks :) It’s the Pencil theme on Black Box terminal.
Black Box has built-in support for GNOME’s dark and light (oops, I mean “mixed” mode – ar.al/2022/08/17/lipstick-on-a…) mode and it supports themes for each.
I just released a little tool called Lipstick on a Pig that helps keep the visual appearance of supported command-line applications in sync with the current light/dark mode setting (colour scheme) of your system in GNOME.
@zladuric This is the perfect approach. Writing a test to prove things work right now is useless (duh, you know what use case you designed it for, of course it will work). Defending your project against the future idiot who is going to f things up (most likely yourself) is the right attitude and will lead to proper tests. Love it!
@flip1 @zladuric Exactly. The value of the tests is that as I fix this, I know that there are 309 previous assumptions that I know I’m not violating. Tests are a safety net.
FiXato
in reply to Aral Balkan • • •Aral Balkan
in reply to FiXato • • •Sheogorath
in reply to Aral Balkan • • •Just because you run through every line of code while testing, doesn't mean at all these are bug free. Most tests in TDD are positive tests ("Putting A into function B results in behaviour C"), confining undefined behaviour especially in dynamicly typed languages, is a very different beast :D
The simple line:
result = input + 1
in JS has some many potential results, that you have to cover this line multiple times :D
Aral Balkan
in reply to Sheogorath • • •flip1
in reply to Aral Balkan • • •Aral Balkan
in reply to flip1 • • •flip1
in reply to Aral Balkan • • •Ru (Tech)
in reply to Aral Balkan • • •Aral Balkan
in reply to Ru (Tech) • • •@ru Ah, thanks :) It’s the Pencil theme on Black Box terminal.
Black Box has built-in support for GNOME’s dark and light (oops, I mean “mixed” mode – ar.al/2022/08/17/lipstick-on-a…) mode and it supports themes for each.
#BlackBox #terminal #GNOME #colourSchemes
Lipstick on a Pig: learning the most important lesson in design
Aral Balkanflip1
Unknown parent • • •Aral Balkan
in reply to flip1 • • •