Sunday, March 21, 2010
The rabbit hole of abstraction
So, I've really been digging abstraction and interfaces lately. I'm like, "Hmm, I'll probably want more than one way to do this in the future, so I'll abstract that bit out so I can inject the dependency or whatever." Because I've been so focused on writing tests lately, I wasted a few hours today. I got to this point where I was confused as to which Interface/class I was injecting into another class, and I realized I'd abstracted the same thing about three levels deep. I kept being like, "I'll handle it with this next abstraction," but I never actually was like, "The buck stops here."
Anyway, just a bit of frustration, mostly because I felt so productive yesterday and most of my coding today seemed for naught. Though, I think I learned a valuable lesson about making sure I don't lose sight of the bigger picture.
I think I'll start using EclEmma pretty soon to help keep track of what I'm doing with my tests.