We Give a F*** How the Site Loads

4 min read

Deviation Actions

dt's avatar
Developers can be angry people sometimes. This is actually quite the understatement and dt is no exception to that assessment. With web development in particular, there are several moments during the day where we are astounded, perplexed, and irritated by why something works the way it does--often over things beyond our control like lack of uniform web standards. Abe Stanway, the creator of Commit Logs from Last Night, actually gives a pretty compelling, and serious, Ignite talk on the functionality of profanity for developers here:

(It has several cool histograms and visualizations of how developers use profanity and which languages it's most prevalent in--surprise ending: Javascript generates the most profanity)

Last week, we received a very interesting, if not amusing, bug report:

"I just wanted to let you know that the reason why deviantART's CSS isn't loading properly for some people is because one of your CSS files has f*** in a stylesheet comment."

That's right. The almighty F-word was breaking how some stylesheets were loading for deviants who were accessing the site from computers with overly sensitive system-wide profanity filters installed. These users' browsers likely stopped parsing the stylesheet entirely upon reaching the word in the stylesheet, leading to a fairly ugly and/or broken page.

The irony here is that we didn't have to do anything to fix this bug (well, we did have to rename an image file that had a vulgar name!).

Why didn't we have to do anything?

Last week, we made a pretty big switch in how we build stylesheets on deviantART. We started using LESS with the CSS rollup files that we build (deviantART has hundreds of stylesheets--we combine these into single rollup files to reduce the number of requests your browser has to make).  One of the outcomes of this switch was that we no longer serve stylesheets with developer comments left in.

Oops. We're sorry, everyone. We can't promise we'll never swear again. But we can promise if you're browsing deviantART at the public library, our swearing won't stop you from using the site. :)

© 2013 - 2021 dt
Join the community to add your comment. Already a deviant? Log In
SwordTiger8888's avatar

just randomly came across this. I had no idea a vulgar word could cause this kind of problem...0_o;

Sonikkudrawings's avatar
:lol: I never comment on finished stylesheets. :XD:
oidoperfecto's avatar
3.times do
  print "Ha"
Hormesis's avatar
Lovely. Now let's see if we can get the "your browser is not a *-nightly" warning to go away.

Love, an Opera user on Ubuntu (yeah, there's newer Blink-based Operas out there but I still haven't found what doesn't work on DA on Opera. So to access the top menu without constantly closing the thing, I had to write my own rule in the browser's user stylesheet).

Hah, I'm no fan of LESS but it certainly is an advantage that I can swear more in development knowing someone won't see those comments when accessing the .css file via the website.

LabLayers's avatar
Confession: it was me who complained, because I couldn't access deviantART from school. Thanks for the epic follow-up! :C

Storm-Engineer's avatar
/me rolls on the floor laughing crazily

I used to do web development... I feel you guys. Totally. XDDD
Storm-Engineer's avatar
p.s.: And I used to have some of the most insane comments in my code occasionally. Or writing comments in haiku form... *rolls eyes*
KnightAR's avatar
I only just now realized that the CSS is also now minifyed ... I love how it has saved almost 100KB in just 4 CSS files on the main page, It's truly nice. Should help out with the mobile side of things too. :)
AKLP's avatar
Why wouldn't you minify your css files anyway?
That's rather ridiculous coming from a huge website like da
KnightAR's avatar
I don't know why, but it was just never done. (Speaking as a ex-web developer at dA) I don't know why we never put the effort into changing that but I do know it wasn't just a simple "ok lets turn this on" sort of change. I do know there was talk multiple times to change it but it just never happened.
AKLP's avatar
How come it's not just a "turn it on" sort of change? all you have to do is minify your assets before you commit the changes. Hell there are so many tools out there to do it for you (like for example save for autominification).
banks's avatar
It wasn't just 'turn it on' because no CSS minifiers handle the many IE6 hacks we had throughout our CSS.

i.e. we tried 'just turning it on' and tons of stuff either failed to compile or broke and until recently we didn't make the effort to go and strip out all those old hacks (mostly because we don't support IE6 anymore and don't need many of them).
KnightAR's avatar
That's the low-tech manual way of doing it and it's not suitable for large codebases with a lot of CSS/JS such as dA. They have have two systems called DWait & Jenny Craig (Read more on the systems here) which takes a list of CSS/JS and combines them into a single file instead of serving manny. It's easier to work on a bunch of separate files (which allows more flexibility) then to work on a single massive file. A CSS file (in this instance) is committed unminifyed and after the system combines the files, it minifys it and stores it separately. This allows the developers to develop on a unminifyed version of the CSS/JS to debug problems but still serve the minifyed version out to users. This is the system that dA pretty much has in place, the missing component until recently was the CSS being minifyed also.
AKLP's avatar
That's what I'm saying.
Once the system prepares the final combined CSS file, all you have to do is minify it...
xooxu's avatar
This is pretty hilarious. Especially that profanity filters check the areas like CSS files, where it's fairly hard (I think impossible?) for normal users to even find, let alone read through. But, if I may, why on earth is that quote image a picture of a roulette board??
namenotrequired's avatar
CSS can be used to add visible content on the page though, so that's probably why.
CoryZ40's avatar

It's not hard, and it is certainly not impossible.
isavedlatin2x's avatar
True, but highly unlikely, wouldn't you say?
CoryZ40's avatar
yeah, the average use doesn't go looking through someone else's CSS. I do from time to time, but the majority of web users probably don't.
exarobibliologist's avatar
I completely sympathize with the emotion, if not the occasional word when getting all the little details and programs to work together. But I still laughed my head off that a developer comment would generate a bug. I didn't think that the system that parsed the CSS was supposed to read or parse comments...
LadyFoxling's avatar
Did anyone get fired over this?
StevenRoy's avatar
Ah, leave it to an art site... Truly putting the style in stylesh***s!
Join the community to add your comment. Already a deviant? Log In