I have been hired as a junior programmer to work on projects that extend existin
ID: 643256 • Letter: I
Question
I have been hired as a junior programmer to work on projects that extend existing functionality in a very large, complex solution. The code base consists of C#, ASP.NET, jQuery, javascript, html and xml.
I have some knowledge of all these in addition to fair knowledge of object-oriented programming and its fundamental concepts of inheritance, abstraction, polymorphism and encapsulation. I can follow code up through its base classes, interfaces, abstract classes and understand a large part of the code that I read while doing this.
However, this solution is so humongous and so many things get tied together whenever I navigate through the code that I feel absolutely overwhelmed. I often find myself unable to fully follow everything that is going on with objects being serialized, large amounts of C# and javascript operating on the same pages and methods being called from template files that consist mainly of markup.
I love learning about code, but trying to deal with this really stresses me out.
Additionally, I do know that a significant amount of unit testing has been done but I know nothing about unit testing or how to utilize it.
Any advice anyone could offer me regarding dealing with a large code base while using Visual Studio 2008 would be greatly appreciated. Are there tools that I can use to help get a handle on what is going on? Perhaps there are things even in Visual Studio that I am not aware of. How can I follow the code to low level functionality in order to get a better grasp of what is going on at a high level?
Explanation / Answer
Stepping through the code can be great at determining functionality. But I have found the more complex an application is, the more likely you are to be bounced around in the debugger and get completely lost.
I would focus on understanding the business rules of a particular piece of functionality of the application. Ideally, focus on the simplest part. For example, if your web site has users, focus on how the users are registered. What is required for them to register? Email? Zip Code? Blood type? If the code is not clear, then there is no harm in asking other developers specific questions about the business rules (well unless they are jerks).
Once you have a set of business rules nailed down, look at the code and determine how they are enforced. Is the input validated on the server? Client? Where is that validation stored? Then look how the data gets inserts/updated/delete/selected from the database/repository? What class libraries are invoked? The unit tests are also an excellent place to help figure out business rules.
Unless the other developers are insane, most of the other aspects of the applications will follow a similar process.
As for unit testing, one book that really helped me get a good grasp on unit testing is The Art of Unit Testing. It lays a good foundation and will give a good start on how to do it correctly. The best way to learn unit testing is to start doing it. As you read the book create a test application to try out some of the techniques.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.