5 tips to quickly understand a new code base - FunFunFunction #7
Skills:
Systems Design Basics70%
Key Takeaways
Provides tips for quickly understanding a new code base, including strategies for navigating and comprehending unfamiliar code
Full Transcript
I have to I have to make a video coffee Swedish [Music] JavaScript you need water this is probably not the right way to do it but it's the way I do it oh [Music] when you work as a programmer it's only a very small part of your day that is spent on actually writing code the vast majority of your time is spent trying to understand code that was already written either it's somebody else's code or it's some code that you wrote yourself a year ago it is especially tricky to get into a completely new code base it might be uh a new job or a code base that your team takes over from another team at work I've done this a few times during my career and I've developed a sort of process for it and I figured it would be interesting to a couple of people to hear about it that is what we are going to talk about today in case you are new you are watching fun fun function it's a weekly show where we try to become more excited and confident about programming by exploring old wisdom wild ideas and having fun at the end of this episode I will customarily ask you to subscribe without further Ado my fstep process to understand finding a new code basee is find a mentor get an overview do a small Quest have a don't get stuck Rule and use code review so step one find a mentor find a programmer that is already familiar with the codebase and ask them if they are willing to be peppered with your silly questions over the coming weeks it's also a bonus if you can arrange so that the Project Lead is aware of this relationship so that they can ease off a bit on your Mentor during this period I should say that in some cases it's going to be a challenge to find a meure the code base that you're trying to get into might be an open-source project or um your workplace culture might just be crap and people might not be very interested in helping others out even so I think that you should make an effort to try to find a menure uh if that is at all remotely possible because I don't think it's really realistic to become familiar with a code base without talking to an actual person that works in it without Aid you're basically just doing some kind of weird archaeology and that is going to take you 10 times longer than if you're doing it yourself find a mentor that is step one step two get an overview ask your mentor to give you a high level lever ask your mentor to give you a highlevel overview of the system it's uh philosophy its architecture its style or lack of it ask your Mentor what third party tools and Frameworks and libraries are being used and uh make a list of them it will really help you to study the documentation and tutorials of these uh tools and Frameworks and libraries in isolation before exposing yourself to them when they are in tangle together in a big system that you're unfamiliar with it's also helpful if you can ask your mentor to give you a sort of History lesson on why and how this system or application came to be and uh its predecessor if there was one and that is step two get an overview step three do a small Quest simply ask your mentor to assign you a small task that they would think is approp for a beginner in the code base it's usually a small bug or a tiny tiny feature do a small Quest that is step three step four have a don't get stuck rule you should sit down and try to fix the quest on your own but as soon as you get stuck for more than 15 20 minutes or so you should ask your Mentor for help you should always try to solve the problem on your own for a bit but only for a bit in my experience if you get stuck you can figure most things out in 15 minutes but if you don't if you you haven't been unstuck uh in 15 minutes it's most likely going to take you hours to get unstuck and that is just wasting time the don't get stuck rule is really really important but it is surprisingly hard to follow because when you get stuck you feel like you should be able to fix the problem on your own try to remember that it is a bad thing a really really bad thing to be a lone wolf great software is built by great teams not great developers I recommend using an actual timer to keep yourself from going into Lone Wolf mode I personally use break time for Mac have a don't get stuck rule that is step four final step five code review use code review when you have completed your quest and have a fix submit your code for review by your Mentor they will point out changes that you can make to reuse existing parts of the codebase instead of writing your own and uh how to make your change fit more holistically into the project while we're at it I'd like to make a shout out to code review in general because it is amazing if your team does not already code review on every change today adding that to your process is a single s Le best quality improvement that you can make I'm completely serious about that it improves code quality it improves knowledge sharing it improves consistency and most importantly it makes your team feel a shared ownership of the code make use of code review that is step five recap find a mentor get an overview do a small Quest have a don't get stuck Rule and use code review and then you just repeat you go back to step three and pick another small Quest and so on this will get you familiar with a new code base really quickly and that's it for this episode of fun fun function make sure that you don't miss out on the next episode on Monday click the button to subscribe until next Monday please stay tuned
Original Description
💖 Support the show by becoming a Patreon
https://www.patreon.com/funfunfunction
Full script here (https://medium.com/@mpjme/a578b08f3593)
Breaktime, the app I mention: http://breaktimeapp.com/
When you work as a programmer, it’s only a small percentage of your time that is spent on writing code. The vast majority of your time is spent trying to understand code that is already written. Either code of others, or code that you yourself wrote a last year.
It’s especially tricky to get into a completely new codebase. You might when you start a new job or perhaps your team takes ownership of a new system.
I have done this a couple of times now, and I have a process for it now, and I figure that it might be interesting to some people to hear about it, and that is what we are going to explore today.
💛 Follow on Twitch and support by becoming a Subscriber
We record the show live Mondays 7 AM PT
https://twitch.tv/funfunfunction
💛 Fun Fun Forum
Private discussion forum with other viewers in between shows. https://www.funfunforum.com. Available to patron members, become one at https://www.patreon.com/funfunfunction
💛 mpj on Twitter
https://twitter.com/mpjme
💛 CircleCI (Show sponsor)
Robust and sleek Docker-based Continuous Integration as a service. I used CircleCI prior to them becoming a sponsor and I love that their free tier is powerful enough for small personal projects, even if they are private. Use this link when you sign up to let them know you came from here:
https://circleci.funfunfunction.com
💛 Quokka (Show sponsor)
Wonder how MPJ evaluates JavaScript inline his editor. Quokka is the answer - use this link when you buy to let them know you came from here:
http://quokka.funfunfunction.com
💛 FUN FUN FUNCTION
Since 2015, Fun Fun Function (FFF) is one of the longest running weekly YouTube shows on programming 🏅 thanks to its consistency and quality reaching 200,000+ developers.
🤦♂️ The Failing Together concept is what makes FFF unique. Most coding con
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Fun Fun Function · Fun Fun Function · 19 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
▶
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Higher-order functions - Part 1 of Functional Programming in JavaScript
Fun Fun Function
Map - Part 2 of Functional Programming in JavaScript
Fun Fun Function
Reduce basics - Part 3 of Functional Programming in JavaScript
Fun Fun Function
Destructuring: What, Why and How - Part 1 of ES6 JavaScript Features
Fun Fun Function
Reduce Advanced - Part 4 of Functional Programming in JavaScript
Fun Fun Function
Closures - Part 5 of Functional Programming in JavaScript
Fun Fun Function
Too many tools and frameworks!
Fun Fun Function
Currying - Part 6 of Functional Programming in JavaScript
Fun Fun Function
Recursion - Part 7 of Functional Programming in JavaScript
Fun Fun Function
Promises - Part 8 of Functional Programming in JavaScript
Fun Fun Function
Staying relevant as a programmer
Fun Fun Function
Factory Functions in JavaScript
Fun Fun Function
Composition over Inheritance
Fun Fun Function
Software needs to be better - FunFunFunction #1
Fun Fun Function
Unit testing: How to get your team started - FunFunFunction #2
Fun Fun Function
Straight-line code over functions - FunFunFunction #3
Fun Fun Function
Clojure - FunFunFunction #5
Fun Fun Function
The growth stages of a programmer - FunFunFunction #6
Fun Fun Function
5 tips to quickly understand a new code base - FunFunFunction #7
Fun Fun Function
Semicolons cannot save you! - FunFunFunction #9
Fun Fun Function
Functors - FunFunFunction #10
Fun Fun Function
Functors: I was WRONG! - FunFunFunction #11
Fun Fun Function
Questions and Answers - FunFunFunction #12
Fun Fun Function
Streams - FunFunFunction #13
Fun Fun Function
Prototypes in JavaScript - FunFunFunction #16
Fun Fun Function
Fast or Flexible? - FunFunFunction #17
Fun Fun Function
Coders are herd animals - FunFunFunction #18
Fun Fun Function
Weekend Kubernetes Shenanigans - FunFunFunction #19
Fun Fun Function
Monad - FunFunFunction #21
Fun Fun Function
Moar Weekend Shenanigans - FunFunFunction #23
Fun Fun Function
Questions and Answers - FunFunFunction #24
Fun Fun Function
Losing motivation - FunFunFunction #25
Fun Fun Function
LONGEST KUBERNETES SHENANIGANS! - FunFunFunction #26
Fun Fun Function
Fast code is NOT important - FunFunFunction #27
Fun Fun Function
Pair Programming a Facebook Messenger Bot - FunFunFunction #28
Fun Fun Function
Writing unit tests for personal projects? - FunFunFunction #29
Fun Fun Function
Let's Code a Pomodoro Button - FunFunFunction #30
Fun Fun Function
What editor do you use? - FunFunFunction #31
Fun Fun Function
Arrow functions in JavaScript - What, Why and How - FunFunFunction #32
Fun Fun Function
Is Programming Art? - MPJ's Musings - FunFunFunction #33
Fun Fun Function
Generators in JavaScript - What, Why and How - FunFunFunction #34
Fun Fun Function
Haskell Basics - FunFunFunction #35
Fun Fun Function
Haskell - Baby's first functions - FunFunFunction #36
Fun Fun Function
Is Big O relevant to you? - Q&A Part 1 - FunFunFunction #37
Fun Fun Function
How much are you allowed to Google? - Q&A Part 2 - FunFunFunction #38
Fun Fun Function
Haskell lists - FunFunFunction #39
Fun Fun Function
var, let and const - What, why and how - ES6 JavaScript Features
Fun Fun Function
Why are some programming languages popular? - MPJ's Musings - FunFunFunction #41
Fun Fun Function
Does a developer need to be nice? - MPJ's Musings - FunFunFunction #42
Fun Fun Function
bind and this - Object Creation in JavaScript P1 - FunFunFunction #43
Fun Fun Function
Examples of this and bind - Object Creation in JavaScript P2 - FunFunFunction #44
Fun Fun Function
Prototype basics - Object Creation in JavaScript P3 - FunFunFunction #46
Fun Fun Function
Separation of concerns RANT - MPJ's Musings - FunFunFunction #47
Fun Fun Function
Cellular Automata - Pair Programming - FunFunFunction #49
Fun Fun Function
The 'new' keyword - Object Creation in JavaScript P4 - FunFunFunction #50
Fun Fun Function
__proto__ vs prototype - Object Creation in JavaScript P5 - FunFunFunction #52
Fun Fun Function
Unity game pair programming - Let's code - FunFunFunction #53
Fun Fun Function
Throw out your tools - MPJ's Musings - FunFunFunction #54
Fun Fun Function
Unit tests vs. Integration tests - MPJ's Musings - FunFunFunction #55
Fun Fun Function
Object.create - Object Creation in JavaScript P6 - FunFunFunction #57
Fun Fun Function
More on: Systems Design Basics
View skill →Related Reads
📰
📰
📰
📰
Groovy Open source tools Worth Your Weekend
Medium · DevOps
🚀 MyZubster is Live! From Zero to Production on a VPS
Dev.to AI
MCP Ecosystem Week 30: When Your Developers' AI Tools Connect to Everything—What's in Your Allowlist?
Dev.to AI
Receipts, not labels: what cron trust hand-offs get wrong about provenance
Dev.to · Aloya
🎓
Tutor Explanation
DeepCamp AI