Habit of forming an opinion == Habit of writting good code
A attribute that I have found common to most successful programmers is that they have an opinion on almost everything that matters(in everyday life other than programming topics). I think this helps them to think logically when they write code.
When u will try to have an opinion on some thing, u have to reason it out.Reasoning leads u to logical thinking and which is what programming is all about.So my advice to students studying programming is cultivate a habit to form an opinion .Not only will it lead to improvement in ur programming skills but u will see that it improves ur social life also as u will have topics to discuss with/speak to people in general.
Ramneek Maan Singh.