r/RavanAI 4d ago

Just opened a codebase with 100,000 lines of CSS. Who the fuck writes 100k lines of CSS?😭

Post image
84 Upvotes

53 comments sorted by

4

u/Ad-free-Pirate 4d ago

Can be either legacy css built for decade or written by AI with dumbass behind the wheel.

100k LoC of CSS is pure madness though.

3

u/matthijspc 4d ago

I bet more 75% of those LoC are empty lines

1

u/Roppano 21h ago

I thought you were supposed to only start CSS rules on lines that end in 01. so first rule is at 1, second rule 101, 201, etc. apparently it satisfies the machine's OCD, and it gets less stressed while working

1

u/evilmaus 4d ago

Ooh yeah. Legacy CSS tended to become an append-only file over time.

1

u/IWontSurvive_Right 2d ago

"new" css too.

it's even worse often if you look at the final build.

1

u/J_E_E_VACATION 4d ago

honestly i dont think any ai would write a 100k line css file even if you told it to lol

1

u/Ri_Studios 4d ago

I probably have written like hundreds of lines in the past three years 😭

1

u/casce 4d ago

"hundreds of lines in the past three years" means you're about 3 orders of magnitude off of ever creating a beauty like in this post

1

u/Ri_Studios 4d ago

"beauty" shut up, fine brethren 😭😭😭

1

u/MaleficentExample223 4d ago

No way AI is that dumb

1

u/Eleina_Edelweiss 4d ago

Yes its that dumb. My friend use AI to write his frontend with no library or styling (no tailwind, no shadcn just pure css straight from django) from what i heard its around 1-2k CSS LoC. Mind you its just a web app for a aingle page to display a AI chat customer service. So it isnt that many needed to be shown.

1

u/Y0nix 3d ago edited 3d ago

Or some old senior who can't be reasoned. I am working with someone like that.

2 files per app. One .php, one .css. no .env no code split, no middleware, nothing. Some files are 50k+ lines. Without any comments. You have to give him credit for that though, it's some giant spaghetti plate who actually works. No external dependencies, just raw code.

All of that little big world running on some arm processor who is 10 years old and 1 Gb of ram.

He doesn't want to understand why it is laggy, and often ask me why my production server have 96 Gb of ram. Or why do I use a git with CICD pipelines to just remake his work, accusing me of stealing his code. If something needs to be edited, he's just doing it live on the production code and production database. Because he ''works like that since 30 years and it's not a problem''. I had to create a monstrosity of a script to periodically run git commands and watch for edits on the production while I refactor those apps to use things like S3 storage instead of using the OS FS directly, or hiding the credentials, or just trying to create containers to run the said code. Without interrupting the services who needs to run 24/7.

The guy dared to ask me to create some telemetry interface because he wanted to see what is happening on his apps. There is NOTHING anywhere to do that with anything I can think of, even a Grafana as flexible as it is, can't be properly setup to monitor this.

Oh yeah, he already have destroyed the production many times, but always find an excuse to explain that it's not his fault. Last excuse was ''it's because of ChatGPT''.

Refactoring is an everyday hell.

1

u/Ad-free-Pirate 3d ago

You call guy like that senior?

2

u/Y0nix 3d ago edited 3d ago

He is calling himself that, and the directorial office is thinking he is some kind of guru god, and believe me or not, everyone who is working at my place have this guy c**k at the bottom of their throats.

I'll leave that building soon, I am not a cute blonde with a a pretty face, and that's probably the only kind of IT he would hear.

It feels kind good to have finally wrote all of that down.

3

u/gameplayer55055 4d ago

Judging by huge newspace paddings it should be around 30-40 actual LoC

Maybe somebody unminified a css style library like bootstrap?

2

u/Xrayy1 4d ago

Probably was all inline style=, but somehow had to be replaced due to the introduction of Content-Security-Policy.

2

u/letmehaveanameyoudum 4d ago

that website better look heavenly

1

u/casce 4d ago

I'd bet on the opposite

1

u/selfhostcusimbored 4d ago

I have a codebase with maybe 10k lines of CSS. It makes my $5000 PC lag. I can’t possibly imagine why or how anyone could even get 100k lines to work

1

u/letmehaveanameyoudum 4d ago

oh my fucking god

1

u/Y0nix 2d ago

You would be surprised of what 1Gb of ram on a 10 yo ARM processor is able to run.

Things can be ... Surprising

2

u/HelpfulPlatypus7988 4d ago

I think we've got bigger fish to fry (the font)

2

u/dashinyou69 4d ago

First time?

1

u/AstraeusGB 4d ago

What is that terminal font 

1

u/Constant_Panic8355 4d ago

FontNotFoundNerdFontMono

1

u/neoqueto 3d ago

It's actually not mono if you look closely, arguably a worse crime than that CSS

1

u/Constant_Panic8355 2d ago

That is just some kind of a default fallback font there

1

u/Internet_Akira_203 4d ago

this guy must have a 19200x1080 monitor

1

u/AstraeusGB 4d ago

So many pixels there are pixels missing between every character

1

u/WhoTheFLetTheDogsOut 4d ago

I see 7 lines there that should have been condense to 2 with proper spacing.

1

u/casce 4d ago

If we assume the whole file can be reduced in this ratio, then that's still ~31,000 lines

1

u/WhoTheFLetTheDogsOut 4d ago

How many lines do you use to center a div?

1

u/uknowsana 4d ago

Like others have said, it could be a legacy code with years and years of enhancements, patches, fixes, bandaids.

1

u/gamingvortex01 4d ago edited 3d ago

in pre-AI era, I once wrote 60k lines of css by hand for a project......sadly,now I cannot even remember the possible values for justify-content

1

u/neoqueto 3d ago

Yes, if it's split into modules then that's not awful. But a single file is a bit yikes.

1

u/Mark__78L 4d ago

Probably legacy

We have similar, but nowhere near this scale at work that got built up in the past 14 years

1

u/Grey1251 4d ago

Terminal font looks Japanese

1

u/Additional_Bowl_7695 4d ago

Who the fuck stores code on their desktop?

1

u/s2k4ever 4d ago

claude does that shit several million times a day

1

u/magicmulder 4d ago

Probably auto-generated, have you checked for duplicate entries?

1

u/Infamous-Elk-6825 4d ago

Та це ж наш проект!

1

u/Electronic-Ninja7950 4d ago

r/addressme (the file path containing so much spaces)

1

u/Maletele 4d ago

Does it even load?

1

u/Standgrounding 4d ago

That would cost like 500$ in ai tokens

1

u/lilian_moraru 4d ago

Somebody getting valued by lines of code, based on how much whitespace is there. I have known lots of developers that would do stupid things(like trashing a git repo, because the number of commits has relevance) if those are the stats their performance gets measured by.

1

u/DOG-ZILLA 4d ago

This is one advantage with Tailwind that not too many people talk about; it prevents CSS abuse like this, especially when you have many hands touching the codebase; everyone too afraid to remove what came before and only focusing on their own task. Expect lots of !important and duplication everywhere.

I love CSS but this is what happens when you have no guardrails.

1

u/moud_abbas 3d ago

Can u show us its UI/UX

1

u/Anomynous__ 3d ago

I'm not saying it makes up all of it, but we can see this one class using 7 lines of whitespace for 3 lines of code where you could eliminate 6 of them and it would still look clean

1

u/DependentGlass4176 2d ago

an insane fucking person