I highly recommend (to everyone here for that matter) the book Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin.
It deals specifically with the mistakes you've mentioned in your post, such as hardcoding and naming functions.
Great easy read. Cheers