Example: 1 hour
N/A
If you are an early career SE, you will most likely navigate code databases that you may not be familar with. That is ok - it happens! This lesson is to help you quickly become familar with new codebases.
Web development frameworks for programming languages are created to ease the process for simpler and faster coding. Popular programming languages examples and their major frameworks in parenthesis include:
Ruby (Ruby on Rails) Python (Django, Flask, Pylons) PHP (Larvel) Java (Spring) Scala (Play)
Companies such as GitHub and Airbnb uses Ruby on Rails whereas Instagram, Dropbox, and Spotify use Django. Most, if not all, of the source code has already been written - as a web developer, you will need to quickly interpret the code and either add to the code or debug any issues associated with the code.
Participants will be able to:
- Learn how to explore and understand code that you do not know
- Help contribute to open source projects
- Be comfortable with trying to understand different popular web development frameworks
- Add a feature to an existing codebase (that you are unfamilar with)
See below.
Read the article and watch the youtube video here: https://medium.com/humans-create-software/5-tips-to-quickly-understand-a-new-code-base-a578b08f3593
More information:
8 tips on getting started on an existing codebase: https://quickleft.com/blog/8-tips-get-started-existing-codebase/
Reddit forum containing additional resources: https://www.reddit.com/r/learnprogramming/comments/3ebgy3/how_do_i_start_understanding_a_humongous_codebase/
How do you handle diving into an existing codebase?: https://code.likeagirl.io/how-do-you-handle-diving-into-an-existing-codebase-6510b22b3c07
List things that apprentices might not realize, might assume at first, or should avoid.
- Do not assume that the verison of the framework or language is the same that you know or have.
- Always ask other fellow SE for help. It is the best way to understand something that may be confusing or needs clarification.
Generally, most web development frameworks can be used to create simple applications, such as a todo-list. Find a Github repo that creates a todo-list app and uses a framework that you are not familar with. Would you be able to understand the codebase? Why or why not? Discuss with a peer.
For the same project repo, look at the code and a draw a diagram of the file tree of the project (e.g., top-level directory, 1st level, 2nd level, etc). This will help you visualize the file hierarchy. After, take a look at the docstrings, or comments that were made when the code was written and see whether you can understand it. You will most likely need to improve the docstring so think about whether the information is useful for your future self and other SEs.
Using the same repo you found, clone it, try to add an additional feature (e.g., search field/form) to their code following the tips described.
Explain to a peer how you were able to add the feature to the codebase using the framework that you were once unfamiliar with.