Migrating 3.7 Million Lines Of Code

preview_player
Показать описание
Recorded live on twitch, GET IN

Become a backend engineer. Its my favorite site

This is also the best way to support me is to support yourself becoming a better backend engineer.

MY MAIN YT CHANNEL: Has well edited engineering videos

Discord

Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
Рекомендации по теме
Комментарии
Автор

The fact that 3.7 million lines of JavaScript exist in a project scares me

atiedebee
Автор

1:43 We still use Cobol at my current job (it's also my first soft dev job). When I have to work with it, I feel like an archeologist digging through fossils of the past

vladventura
Автор

The other day I ordered two burritos from a local shop and the guy behind the counter stuffed fillings for both into same wrap. He tried to fold it but made a complete mess. It just overflowed everywhere. I asked what's up with that. He replied, "Don't ask me. I'm just an endofunctor following arrows." Lesson learned: don't go to Mona D's Burritos.

NuncNuncNuncNunc
Автор

21:34 "What's a monad? A monad is a burrito."

Thanks for leaving this in 😂

dereklugowski
Автор

One minor reason to order imports is to reduce merge problems.

e.g. if you add an import in one place and someone else adds the same import somewhere else in the same file you might end up with it there twice after a merge, but if you both add it in the same place it just disappears from the diff.

It should always be the work of a tool though, nobody should ever have to think about it.

georgehelyar
Автор

Re-ordering imports (or anything) listed alphabetically is super helpful when scanning code to ensure no duplicates or just to see if something you expect to be imported is or not

jp
Автор

3.7 millions lines of code happens when developers within a company don’t leverage each other tools and likely end up reinventing the wheel every project. smh

martybando
Автор

One of my favorite parts of using Go with nvim is the golines formatter which uses goimports/gofmt to automatically remove and organize imports for me. I like that it's organized in a consistent way, but above all that, I like that I don't have to think about organizing them at all.

For those curious, goimports is gofmt with the additional import stuff. Golines is goimports but it limits lines to a certain size

awesomedavid
Автор

bro does the jest test memory thing every chance he gets

JaredFL
Автор

11:11 about function declaration with const and arrow

1) there is an option to use const declaration for function without arrow function syntax

2) const declaration benefits on part of type definition: instead of declaring a function with its argument types and its return types separately, you just write const Component: FunctionComponent<Props> = function(props) { ... } and all arguments with return type are inferred correctly and more important together

vorant
Автор

16:24 So that no one removes an import, adds it to the bottom and now git recognizes that as a change. It makes git gistory more consistent

antonpieper
Автор

10:38 "this" binding in Javascript function and arrow function are difference, in arrow function it does not have it's own "this" so the "this" in arrow function inherit from enclosing lexical (surrounding) scope. I write Python btw, but I have to work with Javascript lately and I found this in MDN arrow function section.

keenoogodlike
Автор

16:35 reordering imports' purpose is to help Git not create conflicts just because two people added their imports at the end of the list, even though one starts with b and the other with u. Keeping them ordered avoids such conflicts.

eduantech
Автор

About arrow function personally i use arrow function to indicate functions that live for a certain amount of time ex : arr.map(x => x+1 ) but also when a function return a function the inner one is a arrow function to clearly distinguish the two types of function

erfrzds
Автор

ThePrimeagen, you just inspired me to rediscover being more hands-on technically again after 3 years of being an engineering manager.

edoyak
Автор

16:23 reordering imports etc. can help reduce merge conflicts and PR noise, since added or remove + restored lines are consistently placed.

mudscuffer
Автор

I always organize my imports, but not alphabetically.

First comes the imports from dependencies, like 'react', 'react-native', 'expo-whatever', etc
Second comes imports from global stuff and services created inside the repo itself.
Third comes imports from reusable components
And last comes imports from local components

And all these groups are split by a blank line, to visualize better.

I feel really happy with this system of my.

LoneDWispOfficial
Автор

F# has this kind of file and function declaration order. It has the benefit of removing circle dependencies even inside of projects. Also it provides tools for mutually recursive types.

somebody_on_the_internetz
Автор

20:01 — lol, I hear that! Coming from mostly C / C# / go, I started a job where I think we’ve got ~12-13m lines of ObjC…? (That’s been churned out at breakneck speeds for the last ~20 years) That was fun. Plus we deploy on Linux so we gotta deal with differences between the Apple and GNUStep implementations….

It was a little rough to get used to the different syntax. But now I’m deep in, and mostly impressed with how well objc supports writing safely threaded code (granted, you need to use the correct patterns to do it safe, but ‘-performSelector:… onThread:…‘ to send data across threads is super easy).

tekneinINC
Автор

10:53 arrow function is unscoped (eg. able to access 'this' of parent object) whereas non-arrow is scoped. There is a functional difference.

OM-bsof