You need to read this book

read software carpentry 2nd edition