Feed aggregator
Representative Line: Identifying the Representative
Kate inherited a system where Java code generates JavaScript (by good old fashioned string concatenation) and embeds it into an output template. The Java code was written by someone who didn't fully understand Java, but JavaScript was also a language they didn't understand, and the resulting unholy mess was buggy and difficult to maintain.
Why trying to debug the JavaScript, Kate had to dig through the generated code, which led to this little representative line:
dojo.byId('html;------sites------fileadmin------en------fileadmin------index.html;;12').setAttribute('isLocked','true');The byId function is an alias to the browser's document.getElementById function. The ID on display here is clearly generated by the Java code, resulting in an absolutely cursed ID for an element in the page. The semicolons are field separators, which means you can parse the ID to get other information about it. I have no idea what the 12 means, but it clearly means something. Then there's that long kebab-looking string. It seems like maybe some sort of hierarchy information? But maybe not, because fileadmin appears twice? Why are there so many dashes? If I got an answer to that question, would I survive it? Would I be able to navigate the world if I understood the dark secret of those dashes? Or would I have to give myself over to our Dark Lords and dedicate my life to bringing about the end of all things?
Like all good representative lines, this one hints at darker, deeper evils in the codebase- the code that generates (or parses) this ID must be especially cursed.
The only element which needs to have its isLocked attribute set to true is the developer responsible for this: they must be locked away before they harm the rest of us.
[Advertisement] ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.Since 2022 Nuclear Fusion Breakthrough, US Researchers Have More Than Doubled Its Power Output
Read more of this story at Slashdot.
Why We're Unlikely to Get Artificial General Intelligence Any Time Soon
Read more of this story at Slashdot.
Bungie Blames Stolen 'Marathon' Art On Former Developer
Read more of this story at Slashdot.
'The People Stuck Using Ancient Windows Computers'
Read more of this story at Slashdot.
Why Two Amazon Drones Crashed at a Test Facility in a December
Read more of this story at Slashdot.
When a Company Does Job Interviews with a Malfunctioning AI - and Then Rejects You
Read more of this story at Slashdot.
'Rust is So Good You Can Get Paid $20K to Make It as Fast as C'
Read more of this story at Slashdot.
Taiwan Shuts Down Its Last Nuclear Reactor
Read more of this story at Slashdot.
Firefox Announces Same-Day Update After Two Minor Pwn2Own Exploits
Read more of this story at Slashdot.
OSU's Open Source Lab Eyes Infrastructure Upgrades and Sustainability After Recent Funding Success
Read more of this story at Slashdot.
YouTube Announces Gemini AI Feature to Target Ads When Viewers are Most Engaged
Read more of this story at Slashdot.
9 Months Later, Microsoft Finally Fixes Linux Dual-Booting Bug
Read more of this story at Slashdot.
Ask Slashdot: Would You Consider a Low-Latency JavaScript Runtime For Your Workflow?
Read more of this story at Slashdot.
Google Restores Nextcloud Users' File Access on Android
Read more of this story at Slashdot.
Stack Overflow Seeks Realignment 'To Support the Builders of the Future in an AI World'
Read more of this story at Slashdot.
Intel Struggles To Reverse AMD's Share Gains In x86 CPU Market
Read more of this story at Slashdot.
Is the Altruistic OpenAI Gone?
Read more of this story at Slashdot.
Researchers Finally Link Long Covid 'Brain Fog' to Inflammation
Read more of this story at Slashdot.
The Most Promising Ways to Destroy 'Forever Chemicals'
Read more of this story at Slashdot.