Earlier quoted context omitted.
Things can always be worse. It could be PHP, for example.
Facebook runs in it, so I think the language itself is probably a fine choice.
Formatting a 25M-line codebase overnight
31–40 of 115 posts
Re: Formatting a 25M-line codebase overnight
#32One of my first jobs was a small software company writing software for a small number of clients, in MS basic PDS. The lead developer didn't like to bother with formatting code, so I wrote a tool called makenice to format his nasty spaghetti gibberish into something with good indents and layout to make it easier for us normal people to parse. He was furious, literally spun in circles about it right in the office in f…
There are often limitations (like manually added indentation/spacing for alignment) but as long as you're very intentional about what changes you'll allow and have a good understanding of the language it can be an extremely safe operation.
Re: Formatting a 25M-line codebase overnight
#33That insight might seem obvious - but if you stay cognizant of it as you work, you can invent some pretty amazing tooling for yourself & your team.
Re: Formatting a 25M-line codebase overnight
#34Earlier quoted context omitted.
They're up to 42 million now, as per the article
That sounds even more insane to me, but I guess most of that code does not really touch financial transactions, otherwise it would be a nightmare being responsible to verify that.
PCI-related/vaulting code lived in its own locked-down repo. I think that was a mix of Go and Ruby.
Once you have the foundations in place for account balances and the ledger, processing a payment isn’t that daunting. Those foundations, however, took a lot to build and evolve.
Re: Formatting a 25M-line codebase overnight
#35Earlier quoted context omitted.
The systems have to be written in some kind of programming language, and I think Ruby is a perfectly fine choice.
Not denying that Ruby is a perfectly fine choice but within the article itself it says that Stripe runs the world's largest Ruby codebase so certainly it might be testing the constraints of the language. The thing I am interested is that I don't suppose that Stripe always had these many LOC's and so I would be curious to know if at any point as the codebase was increasing, were they looking at other new languages whi…
Stripe has dabbled in Golang. There is also a growing Java monorepo.
Re: Formatting a 25M-line codebase overnight
#36One of my first jobs was a small software company writing software for a small number of clients, in MS basic PDS. The lead developer didn't like to bother with formatting code, so I wrote a tool called makenice to format his nasty spaghetti gibberish into something with good indents and layout to make it easier for us normal people to parse. He was furious, literally spun in circles about it right in the office in f…
Re: Formatting a 25M-line codebase overnight
#37One of my first jobs was a small software company writing software for a small number of clients, in MS basic PDS. The lead developer didn't like to bother with formatting code, so I wrote a tool called makenice to format his nasty spaghetti gibberish into something with good indents and layout to make it easier for us normal people to parse. He was furious, literally spun in circles about it right in the office in f…
If he didn't bother formatting code, it would seem impossible to create a tool that formatted code the way he preferred.
Re: Formatting a 25M-line codebase overnight
#38Always nice to see. I've seen people fall into the trap of designing for the common case, not realizing most of the code will be to deal with the less common cases.
Re: Formatting a 25M-line codebase overnight
#39Re: Formatting a 25M-line codebase overnight
#40I'm surprised they went with a all-at-once reformat. Even when doing it over a weekend this is bound to mess with a lot of open PRs at their scale. I had to introduce a formatter in a few sizeable codebases in the past (few 100k to few million LOC), and I always did it incrementally via a script that reformatted all files that are not touched in any open PR. The initial run reformatted 95% of all files. Then I ran th…
[1] https://github.com/diffplug/spotless/tree/main/plugin-gradle...
[2] https://git-scm.com/docs/git-blame#Documentation/git-blame.t...