- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I think the loop with the
ResourceHelper
might be a frist attempt at localization of the month names. Probably not the best way to do it, but not nearly as much of a WTF as the colors.Admin
I'm with @Dragnslcr on the
ResourceHelper
stuff, both for what it's trying to be for and for its suboptimality.As for the
colors
stuff, I'm leaning toward it being a way to "pale out" ("grey out" using very pale colours) deactivated/disabled things.Note: not a good way of doing that (one should trust the browser to do something intelligent, or if the browser can't be trusted, one should use different CSS style IDs to indicate it(1)...), but just a way.
(1) And go for reduction-to-more-greyish rather than fade-to-pale, but ...
Admin
If this is Java, the best way would be to use DateFormatSymbols (https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/text/DateFormatSymbols.html). After all, why reinvent the wheel?
Admin
That doesn't look like JavaScript to me.
Admin
That's not JavaScript... Probably Java.
Admin
Sometimes rockstars just explode.
Admin
I agree this is probably Java. Which means no browser to trust to do things. And I agree with Steve that this is greying out stuff, and I'll add that it's probably an afterthought to the original design. Good, no. Horrible, probably not.
Admin
Rock star developers were more rock stars (drinking and partying hard) than developers, which explains everything.
Admin
"After all, why reinvent the wheel?" Because the wheel wasn't invented here of course.
Admin
What's terrifying is that there must be code somewhere that does colors.get("#6699ff") to set something's color.
Admin
The thing that worries me the most is why is there one single object that does some month stuff, gets a bank holiday list, and has a bunch of color conversions? What in the world is this object?
Admin
It's Java. Looks like they're generating the list of colors server-side.
Admin
Maybe there is some code somewhere defining styling = { titles: '#6699ff', etc } and then doing colors.get(styling.titles)? People happily worked with the constants on the top layers, and at some stage there was a mixup in the deeper layers. So when they changed the title color to #99ccff, they couldn't change the constants. It would also explain why there is no concern about "applying colors that are not in the table", also avoids the absurdity of something like colors.get("#6699ff").
Admin
So your code gets published to a world-wide audience, of course. Who cares if it's TDWTF, it's still world-wide audience!
Admin
Maybe he was going for a whiter shade of pale.
Admin
Ouch. Well played, sir.
Admin
Well its not the Rockstar language for sure
https://codewithrockstar.com/