re: Towards zero bugs VIEW POST

re: You made a logic error in your code: if (hidden) { show(); } else { hide(); }. I think you meant the opposite. Also software that is decen...

Thanks for your very insightful comment!

Software, by default, grows complex and chaotic as it develops and evolves. Like a living organism, I think software requires constant action to maintain it and keep it functioning well.

One of my hopes is that we as developers will continue to build upon a body of wisdom and expertise grounded in real-world experience. This shared knowledge will boost every developer's ability to manage the complexity, reduce the chaos and (perhaps) one day eliminate all the bugs!


Hewwo, pwease change

- if (hidden) { show(); } else { hide(); }
+ if (hidden) { hide(); } else { show(); }`.

if hidden is the current state.
OR, if hidden is desired state, change

- if (!hidden) { show(); } else { hide(); }
+ if (!hidden) { hide(); } else { show(); }

You didn't flip the cases when negating the predicate.

Stylistically I would ofc prefer one of:

if (hidden) show()
else hide()


hidden ? show() : hide()

for a better signal/noise ratio (which makes bugs more evident)

code of conduct - report abuse