|
|
|
|
|
by ed_balls
1253 days ago
|
|
Quite often I rewrite the code from ``` return validate(get_response(value)) ``` or ``` value = get_response(value) value = validate(value) return value ``` into ``` res = get_response(value) new_res = validate(res) return new_res ``` Why? Easier to read and when Sentry throws an error I have each value from the call stack. Much easer to debug. In the example 2 you can accidentally move a line and not notice the error. |
|