Do python projects and enforce pep8 so that you can justify your lines wrapping before you reach 79 characters, but the use Java so that your lines will always be at least 80 characters. Every line is now 2. I just doubled your productivity.

There are may known patterns in industry that you can apply.
Try this loop-switch pattern, dot get too crazy with it.
Use really descriptive names; prefix and postfix Hungarian notation is a must here.
Apply clone & modify pattern to cut/past/clone modify code instead of placing it in one place.
Nesting, very important. Instead of having if(a and b) {..} have if(a) { if(b){}} structure.