Hacker News new | past | comments | ask | show | jobs | submit login
Brian Kernighan on The Elements of Programming Style[video] (ias.edu)
35 points by b-man on April 4, 2010 | hide | past | favorite | 6 comments



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.


For those you who are nerdy enough like myself: if you stick around for the better part of the end, there a funny moment in which a buzzer goes off, and Brian shake like a female dog. I love the man, but that was unexpectedly hilarious. Hahaha


A louder version with actual slide content would be nice.


Well, about 4 or 5 minutes in they switch to a PIP view, with the majority of the screen showing the slides.


Warning: at 56 minutes or so a fire alarm goes off. You probably want to turn your volume down to compensate.


is there slides anywhere?




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

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

Search: