As a freelance developer, I have been involved in numerous Django projects. Moving from smaller projects with only a few apps to complex larger projects is difficult to do. In most cases, I have to get my hands dirty, work on a few bug fixes to familiarize myself with the codebase. Before that though, it's important to set the proper groundwork by establishing expectations with the client and analyzing the code from a higher level.
Obviously, the steps you take will vary greatly depending on what you're hired to do (i.e., adding features, fixing bugs, creating documentation, etc.) as well as how the Django project itself is setup. There's numerous ways to structure a project, which can make it difficult at first to understand the logic.
When approaching a project, I focus on the following areas to quickly get up to speed with the codebase and determine the unknowns.
Resist the temptation to set any expectations during the initial call with regard to development time and basic price points. Take the time to go over the codebase first to see how complex the project is and to determine how long it will take for you to become familiar with their specific project setup.
If both parties decide to move forward, make sure you request login credentials for the superuser, shell access, and their repository. Ideally, you will want to obtain these credentials for the development, staging, and production environments.
Once you have cloned their repository, and begin the first pass of their codebase-
Finally, when going through the code review, address these issues:
pip freeze > requirements.txt. Familiarize yourself with the project's dependencies. Have you worked with a specific third-party application before? If not, go read the documentation.
I focus my code review on whether I can (a) get an overall sense of the project (e.g., what are they trying to do), and (b) whether I am qualified to take on the project in the first place. If the project has too many unique/non-standard components, it may not be worth taking on.
In the end, all apps have a models.py and a views.py file. Larger projects should also include the urls.py file and tests.py in each application. If this is not the case, it will take longer to document.
Documentation and testing are big red flags. I tend to avoid projects where testing and/or proper documentation are not priorities.
Start at a high-level, reviewing the URLconfs and documenting the basic logic/structure/workflow, then work your way down through the templates, unittests, views, and finally the models. Models tend to hold the most complexity, so having a basic understanding of the project first, will help you greatly when you encounter the models.
Document all unknowns. Ask yourself what else you need to do or know before you can make a reasonable decision about whether you can complete the job, as well as the how long it will take.
Be honest and direct with your next communication with the client. Don't be afraid to pass on a project. There's plenty of work out there. Focus on the projects that you can reasonably handle and, above all, make sure you feel comfortable with not only the codebase but your employers as well. Good luck.
We match top developers with high-quality freelance and full-time jobs. Post a job.
Pssst.. do you want to write for gun.io? Or, do you have a blog you'd like to see syndicated here?
Get in touch email@example.com.