I try whenever possible to do "programming by intention." This is where you write code "as if" other methods and member variables you need to use already exist, and then go back and define those other methods. An
IDE like IDEA helps a lot with this, as you can generate a skeleton of an undefined method with just a keystroke.
Just now I was writing a client of a second class that maintains an internal collection that grows and shrinks at the end. I wrote the client, then went to the other class to define the methods I had called. I did the implementations of those by intention too, all using a single member variable that held a collection. The code called add(), get(), and removeLast() on this undefined member. I then hit the keystroke to define the member, and poof! It appeared, and
it was a LinkedList! The perfect data structure for the application, with all the necessary methods already defined.
IDEs are so smart these days it's scary.