r/programming • u/Ok_Stomach6651 • 14d ago
Formatting an entire 25 million line codebase overnight: the rubyfmt story
https://stripe.dev/blog/formatting-an-entire-25-million-line-codebase-overnight-the-rubyfmt-story
196
Upvotes
95
u/EvaristeGalois11 14d ago
Am I missing something about how a formatter works internally? Like I'm expecting to just read a file, format it, flush it out and move on to the next one. Why should it matter the codebase size?
186
u/VictoryMotel 14d ago
Articles bragging about performance in ruby are always wild. I always wonder what they would think when they see a native program that runs 100x faster and then an optimized native program that runs 100x faster than the naive native program.
104
u/sweetno 14d ago
Is this, like, an achievement?..
19
u/jmbenfield 13d ago
"doing something one person could do while watching Judge Judy but with the bureaucracy and performance of a failing third world country"
8
u/harsh183 14d ago
I remember first seeing rubyfmt in your talk in Alt Brighton Ruby 2020 when the big Rust port had just happened. It's so nice to see the project going so strong and continuing forward.
As I struggle with
rubocoptaking so long to run, despite caching and multithreading, I wonder if it's time for rubyfmt.11
u/jess-sch 14d ago
A saturday? I don't personally tend to merge by friday. The only appropriate time for a formatter change in my mind is christmas. Two weeks of barely anyone working.
7
u/blobjim 13d ago
That just makes me wonder what why Stripe needs 25 million lines of code. As much code as the Linux kernel? Maybe code for integration with specific customers?
6
u/Sdmf195 14d ago
25 million lines overnight...
sweet christmas...
0
u/captain_obvious_here 13d ago
I honestly thought this was an old article someone was reposting.
Optimizing Ruby's performances is...well...if you ever used Ruby, you know what I mean.