[노개북 1기] TIL (2022.02.08)

yourjin·2022년 2월 26일
0

read.log

목록 보기
20/37
post-thumbnail

TIL (2022.02.08)

DAY 17

🔖 MISSION4: QUUUUUUUUIZ


Chapter 7 & 9

Quiz is based on Clean Code Chapter 7 and 9 Good Luck!

💡 What is better, to throw Exceptions or return error codes? *10점

  • Error Codes
  • Exceptions

💡 When should we write try/catch/finally? *10점

  • First, before we write any code.
  • At the end, when cleaning the code.

💡 What kind of information should our error messages have? *10점

  • The stack trace only.
  • The operation that failed, type of failure, more information about the error.

💡 Why shouldn’t we return ‘null’ from methods/functions? *10점

  • We might forget to check for null and can easily have null pointer exceptions.
  • The code does not run.

💡 Is passing ‘null’ as an argument a good practice? *10점

  • Yes
  • No

💡 Having dirty tests can be worse than having no tests at all. *10점

  • True
  • False

💡 Test code is as important as production code. *10점

  • True
  • False

💡 How many concepts should a test function test? *10점

  • Multiple
  • One

💡 Should tests depend on each other *10점

  • Yes
  • No

💡 What output should a test have? *10점

  • Boolean
  • None, throw an error.

소감 3줄 요약

  • Quiz(10/10)
  • 만점이다~!
  • 벌써 종강회가 다가오고 있다. 끝까지 완주해보자 🙌
profile
make it mine, make it yours

0개의 댓글