Eric Chan's avatar image.

My name is Eric Chan, Senior Software Engineer @ SocialChorus

Anonymous profile image
  • How do you test new programs and systems to ensure that it operates satisfactorily?

    What are the rubrics of each testing process? How do you handle support and feedback?

    Eric Chan's avatar image.

    Unit tests. If you find a bug, write unit test(s) to make sure it fails, then fix the problem until it passes.

    Anonymous profile image
    Anonymous

    Hey Eric. What if the new team you joined doesn't believe in unit tests? They honestly hate it because they don't see the value in saving time...ahead of time. Any thoughts? Is it common for most teams to implement unit tests usually?

    Eric Chan's avatar image.

    It is common to have unit tests. My last job had an enormous product that had almost zero unit tests. As it grew in complexity, confidence lowers significantly with every little change. I spent 2 full weeks refactoring the import code so it's actually testable. It made the code easier to understand, faster to run, and easier to refactor (because there's confidence that you won't break stuff).

    You're going to have to try really hard to convince them, or do pair programming with them to show them how easy it is to write good unit tests. Also, if it's taking too long to write, the method is probably too complex in the first place.

    Unit tests actually help enforce better code through reducing complexity for easier testing. If it's hard, you're probably doing it wrong.