News for hackers. Stuff that matters.
Re:Ask HN: Is my code any good? by cFire on Sunday May 03, 2015 @04:15AM (#9480465)
Valid point. In this case a separate function would be better. It's not always an option though.

Edit: Rather I should say; It's not always an option that makes things better.

If you're writing a comment for a block of code is definitely a good time to think "Should this not be a separate function?" (I clearly need to do this more myself too.)

Re:Ask HN: Is my code any good? by kyberias on Sunday May 03, 2015 @04:34AM (#9480496)
One good resource for learning and inspiration is Robert C. Martin's book Clean Code. Opinionated, yes, but a good read none the less.