Reading code is not an easy task. I'm irritated or overwhelmed in some situations.<p>For example, a method needs multiple files to trace the flow when reading the code. Start to read line 50-55 in file A and then jump to line 30-40 in file B and then line 5-10 in file C and then... When I face this type of code, I often get lost and forget what to do. So, I'm irritated.<p>In other case, hundreds or thousands lines of code in a file always overwhelms me. Honestly speaking, I want to escape the huge code in such a situation.<p>What type of code irritates you or what situations you get in trouble while reading code?
It takes discipline.<p>Any piece of code lives in at least two worlds, usually more. It depends on other code, and other code depends on it. It is also relevant to requirements, objects and processes in the "real world".<p>Get over the fear that you will "lose" the content of open browser and IDE tabs; more likely you will have a hard time navigating and get distracted. Close applications that you are not using. Disable notifications in your operating system. Delete breakpoints regularly. Develop a single "highly effective" strategy to find code that you're looking for and apply it consistently. (e.g. go down through the hierarchy of the "Project" view.)<p>Eclipse has a "working set" feature that shows only selected code in the "Project" and similar views. It's a lifesaver.<p>Adding a second or third screen helps (if you use it with discipline), as does pulling individual editors out of your IDE to float in their own windows you can tile. Notes on a piece of paper (I have huge numbers of 'reject' 4x6 and 5x7 cards around thanks to my printing hobby) are great because they live entirely outside the computer and won't add to the problem of finding things on the screen.
I think it's hard to have reusable code the longer it is. So, I feel your pain on breaking it into really small parts but sometimes it might be necessary for re-usability.<p>for me it's initializers. we do a lot of transforms for integrations. so we have to convert from one object model to another. And we use alot of object initializers. sometimes object initializers inside other initializers. usually embedded in some kind of lambda expression. it looks cool. but the debugger won't let you step into an individual field. so good luck figuring out which line of code is broke.