php-activerecord icon indicating copy to clipboard operation
php-activerecord copied to clipboard

Remove snake case

Open koenpunt opened this issue 8 years ago • 1 comments

This reenables two accidentally disabled tests. This also removes the OCD snake_case patch that once was introduced.

koenpunt avatar Jun 11 '17 21:06 koenpunt

Why would anyone ever want to disable snake case? It's far more readable than camel case. Try reading these two function names, and see which one allows your eyes to move more quickly:

testExtractAndValidateOptionsNopeBecauseWasntAtEnd()
test_extract_and_validate_options_nope_because_wasnt_at_end()

There's no contest. The first one requires you to move very slowly to find the (imaginary/invisible) word breaks. The second one is almost as fast as reading normal English text with spaces. Because we spend more time reading code more than we spend writing code, it makes sense to move to snake case and away from camel case as often as circumstances permit.

brandonzylstra avatar Jan 27 '23 20:01 brandonzylstra