|
|
|
| Non-WTF Job: Junior .NET Developer at West Monroe Partners (Chicago, IL) |
| « Prev | Page 1 | Page 2 | Next » |
|
Comment c = "";
c = c + "What "; c = c + "The "; c = c + "Fuck?"; |
Syntax error. |
|
Wow.. that has to be one of the best WTFs in a long time... wow.
|
Re: Overflowing Style Sheets
2007-08-15 09:54
•
by
Mike
(unregistered)
|
|
Even better, holding the string in Session() while trying to concat the whole monstrosity together.
Ouch. |
|
Oof. Thats quite the... code.
|
Re: Overflowing Style Sheets
2007-08-15 10:00
•
by
A Fan
(unregistered)
|
|
Holy Cow! (RIP:)
|
|
My eyes!!! The goggles, they do NOTHING!!!
|
|
That needs to be up for an award.
|
|
Apparently someone
a) doesn't have write access to the style database, or doesn't know he has write access to the style database, b) was working on a system which Many Moons Ago had plans for users to set their own styles, but those plans have been scrapped, c) cannot create actual CSS files, d) doesn't believe in Join() or local variables. ... WTF? Captcha: doom (what I want to play with this person, my infammo chaingun against his 1-shot-per-clip pistol) |
Re: Overflowing Style Sheets
2007-08-15 10:09
•
by
Say What?
(unregistered)
|
|
Let's see, that's:
approx 100 string concatenations outside the main loop approx 10 string concatenations inside the main loop * numRows approx 8 string concatenations inside the inner loop * numFields in what should be a join for a grand total of waaay-too-many! *barfs* |
Re: Overflowing Style Sheets
2007-08-15 10:09
•
by
Kemp
(unregistered)
|
No syntax error if we assume C++ and class Comment : public std::string {}; |
|
Jesus. The code makes no sense, and even the CSS makes no sense - "tdWhiteBdr" and "tdBlackBdr" is exactly how style sheets are NOT intended to be used.
This is a true scrap-and-rewrite case, not even worth trying to salvage. |
|
There are so many things wrong here I don't know where to begin. Session variable to join the whole style together? UGH. What a disaster.
|
|
I've seen this before too, unfortunately. In this other case it was actually HTML, and they had the guts to not only put it into a database, but to concatenate it with ASP variables and document.write() calls before using Response.write to send the whole thing to the client.
Imagine, for a moment, if you will, trying to read HTML that is escaped for inclusion in Response.write AND document.write() all at the same time. :shudder: |
|
The thing is... I could see myself at one time thinking, "hey, wouldn't it be great if we could abstract away some of the CSS code. Maybe put the class names in a table."
I'm pretty sure I'd have stopped long before it got this bad, though. |
|
Oh My God!
|
|
Where the hell are my googles? Aaaah, no, this is not possible, I hope the man who wrote this is long dead.
|
|
Oh my! I hope the man who wrote this is long dead. Otherwise I would have him explained: What the f*ck?!
Captcha: waffles, yeas I could eat some! |
|
There is nothing good or redeemable in that code. Could you imagine coding out 10k worth of CSS using that mess? I would certainly want to be paid by the hour, and spend about 30 minutes drinking hard liqour in a decontamination tank trying to forget about the horrible abortion of code I'd just foisted on the world.
I think one of the more horribler things about the code is that it looks like they perhaps learned a little bit about CSS, but not enough to get away from a table-based layout (on non-tabular data). They also didn't take the time to learn any CSS shorthand. |
|
Nice, reminds me of the eComm/CRM app I was responsible for maintaining when I started my career as a web dev. We had a Styles table that had a field for every single CSS property, so every style created by a user was stored as a row with individual values set in each field.
Of course, this was the same app that would paste an entire form page's content in a <input type="hidden"> so you can store what the user had typed on the previous form page(s). |
|
It's possible that the development team got a new server and they were stress-testing it.
|
|
I really would rather die than work with CSS code that bad.
|
|
Whoever wrote this code is a <strong_language>Fucking</strong_language> Moron
|
Re: Overflowing Style Sheets
2007-08-15 11:07
•
by
Adam
(unregistered)
|
|
Maybe he overloaded the '+' operator in the Comment class
Captcha: ninjas - sweet |
|
All I said when I read that was "What the flippity??"
That's not just a monstrosity... it's a total aberration to the human brain because no one in their right mind would think that even remotely logical! -- Seejay |
|
Holy shit!
I can emphatize with the OP, I'm dealing with a similar situation. Only in my case, someone decided it was a good idea to write out the head and body tags and the go through the entire Control collection (ASP.NET) and add each Control manually. Ugh |
|
Cry. Delete. Rewrite.
|
|
I bet this code got past the reviewers because he "cool-cammed" it.
Hey why are you saving it in a server variable? Look at his nice font! Ohh. Ahh. |
|
I use the s = s + "..." ... some times in shell scripts when you need to build a path or whatever and when you might expect to need to change the order. And just for readibility, too.
That way, even in vi or notepad it's a simple edit to reorder: set CLASSPATH = %CLASSPATH%;c:\apps\xerces\bin... set CLASSPATH = %CLASSPATH%;c:\apps\xalan... etc. But clearly this dude was deranged. |
|
I read this site all the time but never comment.
That's the first post that's moved me to comment. Simply... wow. That just messes with your head far too much. |
+1 |
Shouldn't there be a colon between the name and value? So, aside from this being horrible (aka fantastic WTF!), it doesn't even produce a working style sheet! WOO! |
|
My god this is bad.
This is a good example of why separating code and content is a good idea. It's amazing that some people still haven't learnt about templating languages... |
|
haha, I did something similar a long, long time ago.
We had an admin section where admin users could change colors online. I stored the colors in a table on the SQL server and wrote out a big <style> block at the top of each page. Though the query to build the code was just a simple loop, and all the static CSS was in a separate file. |
|
Ugh. I agree with all of the afore mentioned reasons why this is just... ugh (bad use of css, misuse of session etc.)
Although I do admit to having produced something as mangled(but not as ... bad..) after I had to write perl-cgi output to generate an email newsletter. Not so hard eh? 2 hrs later it was done and had a nice css stylesheet to look purty. Then it was discovered that Lotus Notes (uh. internal newsletter and guess what our email system is?) likes ignoring most aspects of stylesheets. Back to inlines with all sorts of sticky conditionals (if value > 5 make table cell blue etc.) So perhaps this wasn't the intended design (if you can call it that) but rather what it ended up as after some "just get it working" hacking. Of course we all go back and fix it later right? :/ |
|
> set rsCSS = db1.execute("select * from tblCSSClasses")
... > if rsCSS("IsClass") then So tblCSSClasses contains CssClasses.. and other things! |
Re: Overflowing Style Sheets
2007-08-15 12:25
•
by
Diego
(unregistered)
|
C++ does not inherit constructors. Comment's constructor does not take parameters. Comment c = ""; will not compile read Stroustroup book before trying to be funny with C++ muhahaha :) |
Re: Overflowing Style Sheets
2007-08-15 12:34
•
by
Someone You Know
|
Even worse! |
Too soon. You should have waited for a more appropriate submission, but because you got impatient, the joke's not funny anymore. |
It'll contain styles assigned either to classes or Id's, at a guess. |
Or Comment::Comment(char *), Comment::operator+(char *) |
Yes, but if we assume a custom class that does not inherit from string then a constructor: Comment(const char *String) will compile this code just fine. |
|
Absolutely the best WTF we've seen lately...
|
|
Just saw this:
trim(rsCSSDetail("PropertyName") & " ") WTF!?!?! Append a space and then trim it? |
|
This is yet another reason why I occasionally fall on my knees and thank God that I do not develop Web applications.
|
Re: Overflowing Style Sheets
2007-08-15 14:00
•
by
Porpus
(unregistered)
|
This may be ignorance, but I have never understood how CSS and "table-based layout" are alternatives to each other. Even when using "table-based layout," I am likely still using CSS for something. To me, CSS seems to have one huge flaw. I do not understand why the styles are applied hierarchically. If I apply a green, 1px solid border to something, very rarely do I want that setting to "cascade" to that control's child controls. I like the ASP.NET 2.0 "themes" system, which allows one to apply named styles to server-side controls without causing any "cascading." I wish client-side styles were more like that. captcha: dubya (wtf?) |
Re: Overflowing Style Sheets
2007-08-15 14:11
•
by
otto
(unregistered)
|
|
regarding the tdWhiteBdr and tdBlackBdr classes...
aside from the fact that they could have just done the four border styles in one line why exactly is css "not intented to be used" this way? is it just that they don't lock it into the "td" element? |
And that's why people competent in CSS use the "class" attribute. |
Re: Overflowing Style Sheets
2007-08-15 14:51
•
by
Diego
(unregistered)
|
too late! he made an empty class. we can see it clearly! |
| « Prev | Page 1 | Page 2 | Next » |