How To Code in A Large Codebase

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
a lot of self-taught devs wonder if working in a big company is the same or similar to when they work on projects on their own I can tell you right now that the answer is straight up no now this isn't because uh devs who work on their own projects can't provide quality code like a big tech company can it's actually quite the opposite working on a code base where there might be hundreds or even thousands of people working on it as well is very different it requires a lot of Corporation skills that in my opinion can't really be replicated in a project that you're building on your own however there's a lot of things you can learn and practice in order to make your first job experience or the first time you're working with a big code base be easier so in this video this is exactly what I'm going to be talking about I'll go over my own opinion and my tips on how to work on a big coaches [Music] [Applause] [Music] thank you [Music] [Applause] foreign before we get into the video let me take some time to talk about the sponsor of today's video skillshare now as you might know skillshare is an amazing online learning platform where people from any kind of skill level can go in and learn more about their interests in my case with my audience I know that a lot of you guys are either learning programming or sharpening your skills and I believe that skillshare is the perfect platform to help you with this they have thousands of courses on a variety of topics that you can have access to by only signing up on the link in the description the great thing is that they have courses for any kind of level right so if you're a complete beginner and you're watching my videos to try to get into the programming World there are a bunch of courses out there for you for example imagine you are someone who wants to just learn JavaScript you could go into skillshare type JavaScript for beginners and I guarantee there would be a bunch of courses directly targeted towards you now like I said skillshare is also great for people who are already experienced programmers but when I sharpen their skills in different parts of the industry so for example example you might know that in my videos I personally don't do any CSS and the reason for that is because I'm not that good with CSS and I don't want to spend time with it on my videos however on my own time I took this amazing course on CSS on skillshare called modern CSS writing better cleaner and more scalable code by Harry Roberts and in this course I was able to not only relearn some of the stuff that I learned way back when I was learning CSS for the first time but also learn new tricks and things that I had never learned before that definitely improved my efficiency while working in CSS on my own projects the best part of all of this is that I'm I'm talking about this only from the perspective of a programmer because I know a lot of my audience are programmers too but I also know that most programmers also have a lot of interests in other topics like entrepreneurship and art and skillshare won't limit you to just one specific topic if you sign up for the platform you'll have access to courses and interests that you might want to work on and the coolest part of all of this is that the first 1000 people to use the link in the description will get a one month free trial of skillshare so make sure to check that link out in the description so you can try this out I recommend you all to just sign up check it out try it for yourself for one month and see if you feel like you have a match with the platform and I can guarantee you will get a positive experience out of it now thank you again skillshare for sponsoring this video now let's get into how to work with a large code base so the first thing you need to know is that you don't need to know everything chances are that if the code base is massive its parts are probably divided uh between teams so for example if you are part of a team in your company uh you probably own a portion or a group of files inside of a repository and obviously you can edit and change the other files but probably when you do so it will require a review from the teams that own that file now if you're working on the files that are owned by your team your team is the only one that will need to review and improve your own changes however at least in my experience most of the time you will be working on files that are from your own team so that means that if you have a really large code base you can be working at a at a code base or repository for over five years without even touching 40 of it so here is kind of a breakdown of the steps I would take if I had just arrived at a company and I was trying to understand the code base so first of all I would check out the files and the folder structure and spend really a good amount of time doing that because remember every a lot of you guys ask me what's the best folder structure for an advanced react project or what's a folder structure you would use for this use case well it depends it depends a lot first of all companies organize their structure in a way that is different from how you do and also different from each other not to mention that even inside they're like a huge code base there might be different ways to organize the code obviously you want it all to be synchronized but trust me it doesn't work like that all the time trust me perfect collaboration and synchronicity is something that we strive for but it's not always perfectly achievable so definitely spend some time looking at the code base look at the files how each where everything goes where are your tests where are your I don't know your if you're working with react where are your components how you structure it all of that I remember when I had my first internship at twitch it was over two years ago now and it and I remember how I felt when I first took a look at that code base I was extremely excited because I I literally had no idea how a large code base looked like like I had worked at a started before but startups are in my opinion very similar to uh like a self-developed project because you're trying to move fast right you're not really thinking as much as you would at a large big tech company now this part of the process can become extremely overwhelming because I know that that's how I felt looking at all those files and wondering how will you ever be able to understand all of that is definitely part of the journey but as the model of my channel says just trust the process and know that in the end it will work out now for some actually actionable tips I would first recommend you getting good at searching for files in vs code this can be a massive Time Saver especially when you get used to shortcuts like the command click shortcut that I love to use whenever I want to see uh where the origin of a specific component or a file actually is so for example if I'm working on a react project right let's just picture that and I want to build a component and see kind of like how other components are structured and what kind of props they're passing in the code base to kind of model my own code based on that so I keep it very similar now to do that I'll probably import an external component that someone else wrote it and then I can command click on that and keep clicking on it to get to the bottom of whatever component or whatever structure I want to take a look at I specifically do this to find reusable components that I can just adding to my code another team worked on so that I don't have to rewrite the same code when there's probably been use cases of whatever I'm dealing with previously in the code base and that's something I forgot even to say which is the fact that since it's a large code base people have probably dealt with same problems and bugs as you're probably currently dealing with so it's even better because if you're getting good at searching for code you're getting good at actually finding solutions for your own bugs now the second thing I want to talk about is related to installing the necessary extensions and how to set up your own environment now whenever I personally switch jobs or start working again uh one of the first things I have to do and it's one of the most dreaded steps in my opinion is setting up my Dev environment this involves everything from setting up all the permissions you need in the company to actually installing all of the software required for you to code this part is the most annoying in my opinion because always without a single exception I've ran into problems setting it up don't get me wrong documentation is is great it's always great but I find it hard for it to not lack something because all everyone is different and people not always have the same Hardware so my tip is to first of all try to follow the dogs as like as close to it as possible and whenever you run into an issue don't hesitate to ask your team that's part of what I'm going to talk later about asking questions but in this part specifically don't worry it's probably your first week at the job ask help from your team and if they can't help you asked help from the I.T department at your company and they are willing to help you as well now when you're done with that it will be kind of the fun part of signing up which is actually setting up uh probably your code editor and the extensions you're going to be using now this is a hundred percent up to you but here's a list of the extensions that I personally always install no matter what obviously I tweak it a little bit depending on what kind of project I'm working on and what company I'm working on but honestly for visual Aesthetics I always have a folder theme and a like a text theme I keep switching those so I'm not going to recommend of them but for actually working on it working on my code I will always have prettier and eslint installed those two are basically standard in the industry you definitely have to have those will save you a lot of time but other extensions I do have videos where I talk about them if you're interested in checking that out you can do so as well now the third thing I want to talk about is actually one of the most important ones and one of the ones where most people have the most difficulties with which is learning how to use effectively Version Control Systems so I'm talking about git I'm talking about anything that can help you or provide you with the ability to share your code with your co-workers and work on a project at the same time as them now in my opinion knowing the basics of git is easy like we've all learned git commit with low learn how to push even you've made have worked on how to create a PR and how to merge a PR into a different branch but to be honest when you're when you get to the point where you're working with thousands of other people that's where it gets hard now I'm not saying this to get you overwhelmed I'm not saying this to get you stressed I'm saying this so that you can start early the process of starting to understand the hard order commands that you have to know with Git before working with any large code base I never had the experience or had the ability to experience resolving very complex merge conflicts or using complicated commands like get stash rebase or cherry pick like comments that you probably will never have to use if you're working alone but can be really useful if you're working in a company and honestly it took forever for me to get used to those and for a very long time I would always need help from my mentor or anyone who was in my team by the way if you guys want me to create a video on everything about git or the more complicated gig commands I can definitely do that because I think it could be really useful as well also be prepared to embarrass yourself that's definitely something that you have to get used to making embarrassing and dumb mistakes is part of the process and the quicker you get used to it the quicker you will realize that it doesn't really matter in the end because everyone goes through this now I'm not saying you should bring down production every single week that would be definitely cause for concern but doing it once in a while or doing it like because you're you've never done it before at least once in your life that's definitely part of the process and I think you shouldn't get overwhelmed and you have to learn how to deal with the stress and deal with this kind of situations unfortunately anxiety and stress is almost guaranteed when you're starting out in the dev industry and every single person feels dumb and feels like an imposter more specifically everyone goes through the phase of being scared of asking questions which in my opinion nowadays is one of the dumbest things you can do I personally went through this and I would say that you just have to know that with time you'll get comfortable with time you you'll get used to everything and with time you'll get used to actually collaborating with your team and suggesting stuff for example I'm gonna list out some of the dumb mistakes I personally made while working on Twitch and I don't care I'm if I'm saying this because at the end of the day there are are there mistakes that I learned after it and it helped me grow as a developer so for example I I remember I pushed a couple PRS where I had like comments that weren't supposed to be there or console logs commenting like dumb stuff that wasn't supposed to be there and then my team saw it it it's part of it you know and then my team saw it but it didn't really matter because it's part of it I I saw it and now every time I push a PR I check for any comments I always commend F to find uh something in the file and I searched for console log and see if I forgot anything there another thing is I worked on a file or made a change accidentally to a file I don't even remember how I did that but I did a change to a file that was technically owned by every single team at twitch so when I pushed the pr it triggered a review from every single team meaning that every single team kind of got a notification of it and I felt extremely embarrassed because I was like damn they're gonna look at my my PR they're gonna they're gonna see oh they're gonna notice the mistake I made but to be honest who cares like I remember if someone mistakenly did a asked my team for a for a review none of us would think anything of it so it's it's not that big of a deal to make a mistake like that and finally I also pushed bugs into and tried to demo um like a project where there was bugs and my team quickly pointed out and I had to fix later but I think by that point I was already used to the idea of getting embarrassed and making mistakes because getting embarrassed and making mistakes is part of it and that's how you actually learn the final thing I want to talk about in this video is a little bit about code quality because it's definitely something I know a lot of people wonder they think oh because it's a big company the code has to be perfect they probably think oh I'm I'm not that good of a developer to be writing code at a company like Amazon or Google or whatever like there's a lot of people who think the code there is perfect but I'm telling you it depends on what you mean by quality code and what you mean by perfect if you're the kind of person who thinks quality code is when you write uh the smallest amount of code possible so you write a bunch of like one-liner functions in Python then I don't think you would think the code in large code bases uh is actually good you have to keep them to account that a lot of people will be working with you so a lot of people will be looking at your code so the code you write can be seen by people years later so you have to prioritize collaboration and efficiency over actually writing the best code ever a lot of times in big tech companies we need to prioritize um actually making the code readable and actually making pushing the code faster than um focusing on like I said writing one-liners and and worrying about every single small efficiency booster that we can have in our code so keep in mind that you always want to write code that you would love to read if you didn't actually write it so that's my less tip that I would like to give to this video but yeah that's that's basically it I really hope you guys enjoyed this video If you enjoyed it please leave a like down below and comment what you want to see next subscribe because I'm posting twice a week and I'll massively appreciate it and yeah that's that's basically it really hope you guys enjoyed it and I see you guys next time [Music] [Applause] [Music] [Applause] thank you [Music]
Info
Channel: PedroTech
Views: 7,937
Rating: undefined out of 5
Keywords: computer science, crud, javascript, learn reactjs, mysql, nodejs, programming, react tutorial, reactjs, reactjs beginner, reactjs tutorial, typescript, react js crash course, react js, node js, express js, pedrotech, traversy media, traversymedia, clever programmer, tech with tim, freecodecamp, deved, pedro tech, large codebase, faang, how to faang, how to code in large projects, how to code in faang, big codebase, large project, advanced project, advanced codebase, skillshare
Id: 36aiUIbIAJ0
Channel Id: undefined
Length: 15min 36sec (936 seconds)
Published: Tue Jul 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.