We’ve all heard about how unit testing is really about creating code before actually creating the code that actually runs the code you’re writing.
I just found that I’m thinking more OOPly by using a feature of Eclipse called “Show source of selected element only”.
What this does is it allows you to move all complexity of a code file and focus on 1 element at a time, however to actually create code you need to do 2 things:
1/ In the class outline, click on the class name in order to show the whole class and then from there on make your variable or whatnot.
2/ Ctrl-1! Design before coding backend then proceed to ctrl-1 everything because it will all be underlined in red.
Doing things this way(option 2) even ensures that I write documentation for my variables.
I never did this before because the complexity of a class explodes exponentially cough Swing code cough.
Using this feature makes me concentrate on the single task at hand and not code multiple methods simultaneously.
Anyway I solved my multi-coding issues and it’s made me a hell of a lot more productive thanks to this feature.
Anyone have any other tips which is helpful for coding?