Up and Running with Git Transcripts
Chapter: Teamwork: Branches
Lecture: Reason #3 for branching: Experimentation

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Reason three for branching is experimentation. I opened this course by talking about source control being a superpower that lets you fearlessly
0:11 change and experiment with your application. Here's part of what I meant. So, again, we have our main branch and here we don't have version numbers
0:19 let's imagine. This is like a web application where you just sort of continuously release it as features are done and we want to try some new ideas.
0:28 So maybe we want to think about rewriting the front end, maybe it's an angular and like I'd really like to try to see how Vue Js
0:36 is going to work out. What if we rewrote that? It seems like that has more, more momentum and you know, in javascript,
0:42 you gotta rewrite everything every six months at a minimum, right? There's a rule for that here,
0:47 what we might do is we might say we're going to fork off a branch, whatever the current stable version is,
0:55 and we're going to completely rewrite the front end in Vue js and then we're going to decide, did that go well,
1:02 do we really want to do this or do we not want to? So we might make some changes,
1:06 you know, because it's a branch other people could contribute and look at it and we might decide, you know what? It's not necessarily that much better.
1:15 So let's just stick with what it is now. So in this case we're not going to merge those changes back,
1:20 We're just going to kind of abandon it for now and if we want to pick it up later. Sure, we can do that.
1:25 Maybe another idea. We want to talk about using an asynchronous ORM. Maybe we want to talk about using SQLalchemy 2,
1:33 and async and await and see if we can get a lot better scalability and support more users on the same hardware and the same code base.
1:40 So we might experiment with that will create another branch, then we're going to change everything over in the data layer and guess what?
1:48 This worked out, awesome. We're super psyched about it. We're like, yeah, this is definitely the path forward.
1:53 So in this case we merged those changes back into the main branch for experimentation. Sometimes experiments work out sometimes they don't,
2:02 but it allows us it's great flexibility. Nothing that we did with the view, experimentation broke the app or derail development or anything like that.
2:11 And we were able to just leave it in the branch.
2:13 The async stuff worked out and we're able to bring that in to go forward and now everyone has that async feature to work with. The reason no3 is experimentation.

Talk Python's Mastodon Michael Kennedy's Mastodon