Hacker News new | past | comments | ask | show | jobs | submit login

A fairly minor point of the video, but interesting for me, was when he spoke about paranoia and bound checking. I often cannot decide if I should check if strings are NULL, numbers are negative, files are open/closed, etc, etc. I'm often unsure if I should spend, often long stretches of, time worrying about every possible boundary condition of all my variables, which is no simple task when dealing with constructs more complex than integers. When I do this it becomes apparent my functions are getting larger and larger, however; more return values, more if clauses, etc, etc. He offers no solution, but suggests there's a tradeoff, which is strangely reassuring. The problem doesn't make me feel so bad, now I hear that from him. More and more I'm coming to the conclusion it's best to transfer all that checking to a wrapper function, or leave it to the function's user, which will have to become, in effect, the wrapper function.



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: