Message from JavaScript discussions

November 2020

— ++


My boss asked me to propose how we can effectively fight bugs in our software and avoid to have bugs appear again.
These are the three main counter measures I want to establish:
* automated tests
* functional programming where it makes sense (separate pure functions from side effects to reduce load on mind what has to be checked)
* types
* More honest exceptions (don't swallow errors as console.log)

I am sure different scenarios require different measures, but I think these are the most effective we can take to reduce debugging time when something happens.

— Code reviews might help a long way

— Point no.4 I always do that 'cause I'm lazy to write exceptions I would write them in worst cases

— With very experienced programmers handling code review

— We already do that, but not so well performing it.

— The problem is, what do you expect from a code review? that they actually checked out the branch and test it? :S

Message permanent page

— With.. given that we may use TypeScript in the future, helps a lot more to check the code in the editor, than in any online platform like bitbucket or gitlab etc

Message permanent page

— Code review seems to be a time and energy consuming process.

— Code review by experienced devs can cover. Code duplication checks, performance checks in terms of Big O, optimization needs, side effects where not necessary. etc

Message permanent page

— The branch is only merged after everything is approved by the reviewer.

— So if there are problems then, reviewers know exactly where to fix the bug. So patches and repair code need not to be used

Message permanent page