Reading Code & Exploring Unfamiliar Codebases
15 minutesYou'll explore the Spring PetClinic application, a real world codebase that may be in a language you've never used before. This is intentional! The goal is to practice reading and understanding unfamiliar code, one of the most important skills in software engineering.
Repository
https://github.com/spring-projects/spring-petclinicClone the repository:
git clone https://github.com/spring-projects/spring-petclinic Important: No AI Tools for This Exercise
Please do not use AI assistants (ChatGPT, GitHub Copilot, etc.) for this exercise. We want to build the muscle of reading and navigating code on our own first. Once you have that foundation, AI tools become much more effective.
Initial Orientation
- •Without running the app, what technologies and frameworks can you identify from the project files (pom.xml, package structure)?
- •Locate the main application class. What annotations do you see?
- •Based on folder structure alone, what architectural pattern does this app follow?
Code Navigation
- •Pick one entity (like "Owner" or "Pet") and trace it through the codebase. Find its model, repository, service, and controller.
- •Without looking at documentation, can you sketch the database schema based on the entity classes?
- •Where and how is the database configured?
Pattern Recognition
- •Find examples of design patterns being used (Repository, MVC, dependency injection)
- •What naming conventions do you notice for classes, methods, and packages?
- •Given a URL like /owners/{ownerId}/pets/new, trace what happens when someone submits the form
Reflection
- •What made this codebase easier or harder to understand?
- •What strategies did you use to navigate the code?
- •How long did it take to understand the basic flow?
- •What could you apply to your own projects?
