r2zsQe1uuyo β
Let's learn how to use GitHub
Transcript β
[00:00] I'm the co-founder of an AI software company called bump ups and let me show you a hidden cost that happens as you grow as a software company welcome back youall in this video I'm going to be going over a hidden cost that basically you wouldn't even know about until you reach the point of growing as a software company I always do videos like this as I want to give you real world perspective of everything I'm going through when building out this software company to help you and your journey when trying to achieve the same thing now here's a hidden cost that became apparent to us as we got employees for the company I made another video talking about as you scale as a company you need
[00:32] to go from a monor repo when I say monor repo I'm referring to all the code the front end the back end everything is just in one repository this way of structuring your architecture comparative to a poly repo I'm going to leave a video in the description down below and a card right there that shows you why as you scale as a software company you'll need to go from a monor repo to a poly repo and kind of explain more of what that even means but the purpose of this video shows you one of the drawbacks of becoming a poly repo in
[01:02] development and just for context a poly repo rather than having all the code in one repository then we are fragmenting it so we have the UI in one repo maybe the purchase backend logic in one repo and kind of proceed in that manner regardless there are implications when you take all your code and split it up in order to effectively scale as a software company so one of the Hidden costs that became apparent to us which is how we're going to have to approach frontend coding logic from here out so when you're a mono repo in order to get
[01:32] going it's very simple right we have one code directory therefore all we really need to do for a front-end developer is simply get us in Local Host 3000 and run our emulator for our backend EG Firebase emulator start therefore for us to make changes in local and our little pseudo Firebase emulator back in 4000 it's instantaneous right away you make a change in the code it changes in local we already know the situation here when doing coding eg home.js it instantly
[02:04] changes into the Local Host 3000 Port that's simple that's easy and what's great about that is in a monor repo you basically have access to all the backend functions so that you can logically go from start zero to start all the way done very fast in development therefore When developing in aor repo you have access to everything the unof version of the website when you sign in the off version of the website where the user can just kind of jump through upload everything like this and accessibility to different functions within the website such as creating a workspace
[02:36] generating shortcuts generating prompt outputs when doing a monor repo this is easy this is done when doing a poly repo though this is where it gets a little bit more complex so that leaves the question of okay that sounds great Corbin I get it mono's cool what is this hidden cost when it comes to poly the hidden cost when it comes to poly is that now When approaching frontend development there are going to be three levels of access so so the first level here is going to be level one level one is a developer that only has access to the repository that has all the front
[03:06] end code so we'll just say like the UI repository what this means at level one is this individual will only be able to edit the code in unauthenticated Pages EG the user has not logged in yet so they can edit code here that's fine they goe pricing that's fine anything that's just on like the Lany page and all the different web pages they can edit which works in many different us cases level one access is very much similar to the old monor repo way of developing where npm start Local Host 3000 get
[03:38] instantaneous changes because you are completely in on off so that's level one though so what's level two level two we need to include another repo here that gives us the ability to even log in that's the big thing to understand here the reason I can't log in as level one is because I only have access to the front end code therefore when I do backend logic it's just going to break you need to actually launch the Firebase emulator or whatever your version of a pseudo emulator is therefore level two would be UI plus some type of
[04:10] infrastructure so we'll assume that maybe there's going to be an off repo where its entire purpose is just a code for authentication so at level two here then we're good to go still instantaneous changes so nothing really changes there so we can log in sign in and everything looks good right so we can now make changes here in the UI such as this little box right here if I go to the Links Page I can make changes here I open the popup I can make changes there that's all good so then you might be asking Corbin okay but that's the same as monor repo though still instantaneous changes still Local Host 2000 so where
[04:43] does this hidden cost incur the hidden cost then occurs at stage three stage three the developer only needs access to the UI and this is because authentication isn't relevant anymore because they don't need to even log in to the Local Host 3000 is because when they perform tasks like creating a workspace uploading a video getting shortcuts when they are developing in this user interface the workflow then switches to pushing to QA and before I jump a little further here let me explain QA so we got Local Host 3000 so
[05:14] we'll put l then we got QA and then we got prod L for local is what we've always known that's just local in your computer that's just running code no internet required Etc in development before we take code that we change in local and just go straight to prod and prod is production which is the live website bump ups.com prro we push our changes to QA which is a staging environment that allows us to make sure that the code we're working with actually works if it works in QA then we push the prob this is like our insurance this is making sure that we're not
[05:45] pushing broken code to production so therefore the workflow when doing this in a poly repo is very much that the UI front-end developer will still make changes in the UI repo but when they want to see their changes reflect reflected in the front end they need to actually go to QA rather than Local Host 3000 and this delay right here is what causes development processes to go slower because of the fact that when you have to push to QA rather than an instantaneous change like set of bump
[06:16] shortcuts we put bump short that would instantly change on the local 3000 but now because we have to push a QA we're looking at a delay of 7 to 12 seconds which may not sound like a lot but over time that 7 to 12 seconds is going to add up and essentially this is just one of the pitfalls of doing a poly repo and as I described in that video in the description down below you might be like Corbin if this is a pitfall and it causes development times to actually take slower why are we doing poly repos watch that video tldr security
[06:48] scalability employees therefore level one developer is going to be in the UI unof Local Host 3000 we all good this is L environment and then level three developer is going to be BAS the same thing UI but QA environment to see their live reflection before I end this video let me make this Crystal Clear of why this happens it's because of fact that for the level three developer that needs to do the bump shortcuts changes or the prompt outputs or the shortcut output UI changes in order for them to do this it
[07:19] would have required them to have access to basically six seven a good amount of the repos associated with the project but one really big thing here when it comes to QA de development is a lot of situations with your local machine and its ability to run on ports right so we have Local Host 4000 which is our Firebase emulator port and then every single thing past that you're associating for example your functions 50001 functions 55 you can't simultaneously run two different code repos on the same port when it comes to
[07:51] functions therefore there is a conflict there essentially this is a long way of me saying when you do a poly repo it basically is near impossible to effectively render everything you'd want to render in a local environment when you separate the code bases so the drawback there is basically the deployment time and development time associated with a level three developer is going to take longer than it would have if it was a mono repo because in a mono repo if I made a change to bump short it would have been instantly
[08:21] changed because everything is Under One Roof but now I have to separately push to a poly repo for my specific code I realized this might be a little confusing let me just leave you with one sentence monor repo faster development poly repo slower development so I'll see you in the next video mono poly hidden cost two random videos that's my face I'll see you in the next video