Logic in programming language is related with common login. For this, you have to focus on real life situations and think as end user customer with no idea about the program you are building.
If you are able to think as in that way, you can always produce much error as you can and apply code-logic to prevent that situation.
If you try to say something else by Logic, please illustrate bit more.
Glad to be,
Editor - DNS Forums
Definitely you can't get all the logic's in one split. Its like the more you code the more you get.
Implementing logic's according to the requirement will make you write less amount of code, if you are not specific about what you are doing programmatically then it costs you large amount of code even the requirement is simple.
I recommend you to do more and more practice by doing logical sample applications.
Editor: DNS Forum.