Stunning actress girlfriend of Wimbledon's unluckiest loser sends touching message after his injury nightmare left him in tears and derailed upset against world No 1 Jannik Sinner
Diogo Jota's incredible legacy to his family: The huge sum set to be inherited by tragic Liverpool star's wife and their three small children after crash death
Why bungling cabin crew could have been reason behind terrifying evacuation of Ryanair jet in Majorca that left passengers with broken bones as they jumped from wing
Essex to be hotter than Ibiza this weekend as third heatwave could see temperatures climb to 30C in some areas
Daredevils are thrown into the air and smashed by bull as first person is gored by bull in this year's Running of the Bulls festival in Spain
Microsoft developer ported vector database coded in SAP’s ABAP to the ZX Spectrum
A Microsoft senior software engineer named Alice Vinogradova has ported a database she wrote in SAP’s ABAP language to the venerable Z80 processor that powered the Sinclair ZX Spectrum – and marveled at the results.…
Macron 'to vow tougher approach' on Channel migrants as he kicks off State Visit TODAY… but how much more will it cost the UK?
My dream £258,000 retirement flat in Spain went up in flames - and firefighters took 90 minutes to arrive: Devastated Brit, 78, left homeless after wildfire ravaged town
Denise Richards' ex Aaron Phypers spends $105K A MONTH despite 'zero income' as divorce battle begins
CHRISTOPHER STEVENS reviews Heatwaves: The New Normal? It used to be called 'summer', now a hot spell has the BBC in meltdown
Jessica Mulroney's life after being 'Markled' by Meghan: TV star who stole the show at the royal wedding is now reduced to selling content on Instagram - after 'rift' with BFF following 'white privilege' row
Massive Study Detects AI Fingerprints In Millions of Scientific Papers
Read more of this story at Slashdot.
How 's***house' Cam Norrie can beat Carlos Alcaraz: Last Brit standing is Wimbledon's big wind-up merchant... even if Tim Henman's writing him off
Counselor reveals heartbreaking sight after she delivered last surviving Camp Mystic children to parents... as those left realized the worst
I had fake eyelashes, bleach blonde hair and extensions - but I ditched it all for a glow-down and I'm happier than ever
Australian royal prank DJs claim their bosses MADE them phone the Princess of Wales's hospital and impersonate the late Queen before nurse's suicide
Common home mistake could be putting you at risk of deadly infection, warns top doctor
CodeSOD: Off Color
Carolyn inherited a somewhat old project that had been initiated by a "rockstar" developer, and then passed to developer after developer over the years. They burned through rockstars faster than Spinal Tap goes through drummers. The result is gems like this:
private void init(){ ResourceHelper rh = new ResourceHelper(); for ( int i = 0; i < 12; i++) { months[i] = rh.getResource("calendar."+monthkeys[i]+".long"); months_s[i] = rh.getResource("calendar."+monthkeys[i]+".short"); } StaticData data = SomeService.current().getStaticData(); this.bankHolidayList = data.getBankHolidayList(); colors.put("#dddddd", "#dddddd"); colors.put("#cccccc", "#cccccc"); colors.put("#e6e6e6", "#e6e6e6"); colors.put("#ff0000", "#ffcccc"); colors.put("#ffff00", "#ffffcc"); colors.put("#00ff00", "#ccffcc"); colors.put("#5050ff", "#ccccff"); colors.put("#aa0000", "#ff9999"); colors.put("#ff8000", "#ffcc99"); colors.put("#99ff99", "#ccffcc"); colors.put("#ffcc99", "#ffffcc"); colors.put("#ff9966", "#ffcc99"); colors.put("#00c040", "#99cc99"); colors.put("#aadddd", "#ccffff"); colors.put("#e0e040", "#ffff99"); colors.put("#6699ff", "#99ccff"); }There are plenty of things in this function that raise concerns- whatever is going on with the ResourceHelper and the monthkeys array, for example. But let's just breeze past that into that colors lookup table, because boy oh boy.
There's the obvious issue of using server-side code to manage colors instead of CSS, which is bad, sure. But this translation table which converts some colors (presumably already used in the display?) to some other colors (presumably to replace the display colors) is downright mystifying. How did this happen? Why did this happen? What happens when we attempt to apply a color not in the lookup table?
I want to say more mean things about this, but the more I stare at the original colors and what they get translated to, I think this lookup table is trying to tell me I should…
…
…
lighten up.