Examveda

What is the purpose of the "Law of Least Astonishment" in Ruby programming?

A. To minimize the number of lines of code in a program

B. To ensure that the behavior of code is intuitive and predictable

C. To prioritize the performance of code over its readability

D. None of the above

Answer: Option B


Join The Discussion

Related Questions on Best Practices and Code Conventions in Ruby