News for hackers. Stuff that matters.
Re:Reading Other People's Code (2012) by Silures on Wednesday September 04, 2013 @11:39AM (#6328301)
Maybe this says more about the quality of the code I have to work on or my own lack of ability.

Our legacy code often comes along with a large number of interfaces and dependency injection and it's difficult to find where the code actually 'does something'. So the only way I can understand what the code is doing is by stepping through it in a debugger.

If I just try to read it, I end up half a dozen classes away from the method I'm trying to understand in no time.

Re:Reading Other People's Code (2012) by mkramlich on Wednesday September 04, 2013 @12:26PM (#6328614)
Sounds like you encountered what I call an "Uh-O Architecture". It's basically OO but overdone. Too many classes, too fine-grained, too abstract, too many layers, too many designer patterns for the sake of design patterns, etc.
Re:Reading Other People's Code (2012) by RogerL on Wednesday September 04, 2013 @04:04PM (#6330092)
I like that! I'm appropriating that term!
Re:Reading Other People's Code (2012) by mietek on Wednesday September 04, 2013 @12:16PM (#6328560)
It's not you; it's a case of objectionably-oriented programming:

http://en.wikipedia.org/wiki/Spaghetti_code#Related_terms

Re:Reading Other People's Code (2012) by gnaritas on Wednesday September 04, 2013 @03:51PM (#6330001)
> So the only way I can understand what the code is doing is by stepping through it in a debugger.

If methods are factored and named well, the name tells you what it does and you shouldn't have to look at the implementation unless its not doing what it says.

I've found that good OO programs are understood by understanding the classes and messages between them, not by reading the implementations of those methods. Look for the big picture, not the details.

Re:Reading Other People's Code (2012) by lahwf on Wednesday September 04, 2013 @11:58AM (#6328435)
Sounds you are being hit with hard end of the OO code stick or Java.
Re:Reading Other People's Code (2012) by Osiris on Wednesday September 04, 2013 @04:11PM (#6330130)
I've been working with Zend Framework 2 (PHP) and it has a ServiceManager class that loads everything, but the configurations can be done in three different ways and it supports aliases and other things that make it really freaking hard to find out where a class came from. It's a huge learning curve. I understand using DI to make code testable but it also seems to make it a lot harder to follow.
Re:Reading Other People's Code (2012) by mattmanser on Wednesday September 04, 2013 @03:04PM (#6329682)
Yeah, the 'correct' way of DI, etc. is actually a complete recipe for disaster when it's overdone.

As it looks like you're using .Net, you might want to look into resharper as it implements a 'go to implementation' as well as a 'go to declaration':

http://www.jetbrains.com/resharper/webhelp/Navigation_and_Se...