Complete Rewrite In Go!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
we rewrote our product and go from scratch this blows my mind that you could write a back end in scratch why on Earth would anyone do that yeah why on Earth would anyone write a back end in scratch okay this makes no sense uh chances are if that was the first thought you had after reading the title it's shockingly isn't uh if you're if you've been building software long enough you know that a full rewrite is generally a bad idea this is such good advice right here already this is a great post just like this post alone could be nothing but blankness or lorem ipsum after this this is such a good thing I have I would worked at a company where a CEO got fired because of a rewrite um I have worked at I I was at Netflix during the Great rewrite it rewrites are awful rewrites hands down always screw everything up Progressive refactoring is the way unless if you are doing the full language change if you're doing the full language change guess what that's different that's just different uh and and of course so someone said Elon Twitter the thing about Twitter though the thing about Netflix the thing about backends is often their micro service just cluster uh cluster and so that means you can rewrite from scratch but it's like a small service and so the the rewriting doesn't it's not the effort is much much smaller you know what I mean uh so that's okay because you're rewriting a few hundred line a few you know a couple thousand line applications from one to another that's that's a simple rewrite that's a simple simple rewrite uh the hard part's really the infrastructure honestly when it comes to microservices and all that the microservice is the easy part it's the logging it's the messages it's the debugging it's the Productions it's the canaries it's the staging environment versus production environment it's like the the ancillary issues is insane versus the actual like the thing right the thing is not that hard holy cow I'm not convinced microservices are the greatest thing in the universe anyways uh wow did we detract uh let's see it looks tempting because you think it's going to be quick and solve multiple structural problems at once I've done this and every time I'm wrong however it's almost always becomes a never-ending time sync that creates many more structural problems that you didn't even know existed because the original version had solved them from day one yep every time you know the best part about this you look at someone's code and go why would you even do that five hours into the rewrite you go oh that's why you do that duh every dime goodness gracious you also probably know that companies who did it often uh feel obliged to write a blog post justifying why they're used or their case is different and wasn't a mistake at all this leads to Growing number of pro rewrite blog posts and that tense even more companies into doing it [Music] what an irony but hear me out our case is different loving the start of this this is so good this is so good all right is your tool and go link this is literally the question we uh we got asked several times by users not even what is it written in straight up is it in go apparently people not only care what Digger is written in they care specifically well I don't know what is digger I don't I don't know this product what is this thing uh they care specifically whether or not it is in go is this is this like some old it's a gold it's for gold oh Link in paragraph two okay oh is it okay okay okay okay okay hold on and on let's see they care specifically whether or not it is written in go and unfortunately it was python sorry for all the pythonistas out there nothing wrong with it by the way pythonistas are some of the easiest crowds on stack Overflow to trick into getting stack Overflow Karma one of my best uh stack Overflow questions ever was which one is more pythonic and then just put some out there and you'll get hundreds of responses people jumping in upvotes all over the place your question will be edited like 16 times for clarifications it's it's beautiful always bet on the pythonist is getting after it okay always do always do so let's see it just so happens that golang is the go-to language in devops tooling pun intended and we didn't know that before we didn't know that before starting the latest iteration of digger naturally we use the same language that the previous four iterations were written in Python it turns out that sub-optimal for CLI first tools yeah agreed uh especially if the tool is meant for automation yeah okay so this makes perfect sense why you'd have to do a full rewrite if you're doing a an open source an open source alternative to uh terraform Enterprise this makes perfect sense right everyone has all this tooling and go so they just want to be able to use your tool in go right uh it's probably time to tell you what uh Digger is an open source alternative to terraform Enterprise Digger runs uh terraform plan and apply in your existing CI system unlike terraform cloud and equivalents that are effectively dedicated full stack CI CD platforms with compute and jobs and logs and everything we thought there's got to be a better way to run terraform than duplicating your entire CI stack so Digger is a thin wrapper slash orchestrator that seamlessly integrates with your CI toolkit like GitHub actions gitlab or azoir devops okay a single brain works everywhere command line tool written in Python may look small but it has implicit dependencies on The Interpreter even if it ships with all the dependencies you of course could build you of course could bundle a python distribution with the tool but that makes the package super heavy and if you don't do that there's no guarantee that everything will work as intended on the host platform goodness gracious is this not the truth is this not the truth uh every every or I see dude the amount of time I've spent in the exceptionally limited amount of time I've spent using python has been hey guess what wrong oh matplotlib more like matplot that's on your face it's just like dude okay I have I'm going to just use Anaconda from here on out you're using Anaconda I use Anaconda and then it doesn't work you're like damn it why is my anaconda not like your anaconda it's just it's just it's just just frustrating a single binary on the other hand will always work because it has no external dependencies yep faster means cheaper uh statically compiled binary is much smaller and faster to run that is not about performance optimizations modern applications don't need anything fancy in terms of algorithm slash data structures That Could You could argue differently about that for certain things uh but I guess they do say the word most modern okay I can I could buy that okay I could buy it uh but even then fast versus slow boot time is a huge differentiator yep go just starts python you got a whole environment you need you know what I mean especially if the tool is a part of CI CD pipeline faster means cheaper a single binary not only uses less CPU Cycles or minutes got them python it also uses much less Ram Gotham python which means you need less VMS to handle your parallel runs got them python uh is this does that mean update or does that uh is that just a misspelling of you UDP you get the ecosystem of tooling uh of the tool is using this is true thanks to this person for pointing this out we haven't thought of this as a potential reason but it makes so much sense indeed it's the only natural to know what language that the tool is written is because if it's node then it'll let's see then it'll make you use npm gems for gems who's doing gyms a standalone binary on the other hand doesn't enforce the opinion of the ecosystem very very true this is very very beautiful this is very very beautiful we did it in two weeks yes the whole thing in 10 uh in 10 working days wow that's really fast how's this possible that's really fast it must have been a small project then is it really that small of a project because 10 days there's there's two ways this could happen one you have deep familiarity with the language you're gonna write it in and you have deep familiarity with the entire code base so therefore you can just write it super fast or two or there's like some I don't know there's some spectrum of that to the other side which is like you're not as familiar but you hear it's better slash the project super small could have done it in Rust in 12 days could have done it could have done it in Rust in 12 days it's true it's true I guess the whole thing in 10 working days how's that possible well I have a dirty secret to tell there wasn't much uh there wasn't that much to rewrite we started Digger as an alternative UI for AWS AWS that auto-generated and ran terraform behind the scenes for every scenario you'd expect as a piece of sh wait no wait hold on a pass like Heroku to do like uh like deploy a container a database however we have quickly learned that this is too big a problem to tackle for a startup simply too many edge cases yeah we just we just want we wanted to just do impossible Under the Sun is that too much just all of it that's all just like Heroku just like a little quick Heroku clone that's all we're gonna do a little Huracan clone uh so we zoomed in to focus on only infrastructure okay uh then we also dropped the terraform generation part and focused exclusively on terraform deployment which led us to realizing that we're essentially duplicating a CI CD stack so why don't we use uh reuse existing CI infrastructure this is why the python code base we decided to rewrite and golang wasn't that huge it essentially is a wrapper on top of terraform that also is aware of state and S3 and stored metadata in dynamodb back then we didn't have an orchestrator backend or an API or UI of any kind we plan to do it in a week and we kind of did but we were new to go so it took another week to get into the production ready State and move early adopters over to the new version Oh interesting okay so they weren't even familiar with go I think this also speaks volumes to just goes a simple language I know it's not sexy it's not something like goes like eating vegetables you know what I mean it's probably just good for you you know it's just that's all there is to it it's just good for you that's all there is to it go is not go is uh it's just an exceptionally simple language and I always have this problem uh where it's not like python Python's more complicated than go go is like literally the dumbest language possible it's about as dumb as it gets uh yeah if Air does not equal nil is still better than throwing errors what you like raising exceptions what are you a dummy that's like the worst possible of them all that's I mean I like go but it's boring if that's why I don't want to do go that's why I don't do go inside projects because I want to have something that I feel like is exciting I like rust but I can't love it as much because go just feels like you can always win and go despite no matter what it just somehow always gets I get things done every single time I take GO error handling uh of Errors any time of the day I'd rather use go than typescript you know how much go doesn't support almond dude wait hold on you put your squirrely brace on a new line what hold on you won't use go because you program like this yeah get out Get Out gross gross oh who would want that yes c-sharp user uh Microsoft outed let him cook instaband MacBook off the roof dude macbook's going off the roof unfriend syntax uh let's see let's see uh syntax dialing behind uh being a deal breaker is insane the only thing uh the only thing that's worse okay so I'll give you one thing that I think is really dumb about go Lane is that it aligns types and everything according to the length of the name so all the types are right here and the names are on the other side of the struct you have to put a new line to make it stop doing that I hate that for me I understand that not all of you know syntax is whatever but that is that's it's not readable you start getting into these stupid things where you have to like you have like space in between okay my dumb brain can't be following a Gap a big old thigh gap of of white space I can't do that I'm gonna miss the whole thing okay I can't do that I I ain't doing that all right here we go uh the switch happened in the 20th of March uh in this PR with an unassuming name copy files nice uh back then we didn't have much traction and we didn't even uh know for sure that was the right thing to be building three months and 700 get starbs later GitHub Stars later man I can't read this morning of course we are now following much stricter PR naming guidelines contributions welcome oh this is actually really cool real talk this was actually super cool that I'm surprised uh that you could really get something up and running and being quote unquote production ready in 10 days even if the scope's not huge but being unfamiliar with the language but familiar with the problem and being able to translate everything you have into another language again I think that just speaks volume of just how simple go really is uh again not a huge fan of go again I'm a leptos guy I'm a rust leptos guy okay this is what I want that's what I want this is what I want okay I'm not used to this non version of that uh no one hears love and go okay we use it because it just it's just a it's just a language that is successful that's all it is it's just a very easy language to get something right in try maintaining a huge code base and go yeah I've seen many I I my previous company was all about it and my current company is all about it I contribute to go at my current company um it's not that bad at all uh anyways hey guess what the name is I don't really love go but I'm always intrigued by how productive people are in it and sometimes I wonder if my choice is about rust given how crappy the foundation is maybe I should have chosen go and just eaten vegetables instead of this wild delicious Boutique food I choose called rust a jet
Info
Channel: ThePrimeTime
Views: 202,944
Rating: undefined out of 5
Keywords: programming, computer, software, software engineer, software engineering, program, development, developing, developer, developers, web design, web developer, web development, programmer humor, humor, memes, software memes, engineer, engineering, Regex, regexs, regexes, netflix, vscode, vscode engineer, vscode plugins, Lenovo, customer service
Id: FV_DVvfA90Q
Channel Id: undefined
Length: 14min 43sec (883 seconds)
Published: Sat Jul 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.