Computer
80% of Software Engineers Must Upskill For AI Era By 2027, Gartner Warns
Read more of this story at Slashdot.
After Winning Nobel Prize, Geoffrey Hinton Said He Was Proud Ilya Sutskever 'Fired Sam Altman'
Read more of this story at Slashdot.
How the US Lost the Solar Power Race To China
Read more of this story at Slashdot.
Eating Less Can Lead To a Longer Life: Massive Study in Mice Shows Why
Read more of this story at Slashdot.
Bitcoin Creator Suspect Says He is Not Bitcoin Creator Suspect
Read more of this story at Slashdot.
Zoom Will Let AI Avatars Talk To Your Team For You
Read more of this story at Slashdot.
Unreleased M4 MacBook Pro Offered For Sale on Russian Site
Read more of this story at Slashdot.
Wimbledon Abolishes Line Judges in Favor of Automated Technology After 147 Years
Read more of this story at Slashdot.
Nintendo Announces New Hardware: a $100 Alarm Clock
Read more of this story at Slashdot.
OpenAI Says China-Linked Group Tried to Phish Its Employees
Read more of this story at Slashdot.
How a UK Treaty Could Spell the End of the<nobr> <wbr></nobr>.io Domain
Read more of this story at Slashdot.
Google DeepMind Scientists Win Nobel Chemistry Prize for Work on Proteins
Read more of this story at Slashdot.
DOJ Indicates It's Considering Google Breakup Following Monopoly Ruling
Read more of this story at Slashdot.
CodeSOD: JaphpaScript
Let's say you have a web application, and you need to transfer some data that exists in your backend, server-side, down to the front-end, client-side. If you're a normal person, you have the client do an HTTP request and return the data in something like a JSON format.
You could certainly do that. Or, you could do what Alicia's predecessor did.
<script> var i; var j; var grpID; var group_Arr_<?php echo $varNamePrefix;?>= new Array(); var user_Arr_<?php echo $varNamePrefix;?>= new Array(); <?php $i = 0; if(is_array($groupArr)) { foreach($groupArr as $groupData) { $t_groupID = $groupData[0]; if(is_array($userArr[$t_groupID] ?? null)) { ?> i = '<?php echo $i; ?>'; grpID = '<?php echo $t_groupID; ?>'; group_Arr_<?php echo $varNamePrefix;?>[i] = '<?php echo $t_groupID; ?>'; user_Arr_<?php echo $varNamePrefix;?>[grpID] = new Array(); <?php for($j = 0,$jMax = count($userArr[$t_groupID]); $j < $jMax; $j++) { ?> j = '<?php echo $j; ?>'; user_Arr_<?php echo $varNamePrefix;?>[grpID][j] = '<?php echo $userArr[$t_groupID][$j][0]; ?>'; <?php } $i++; } } } ?> </script>Here, we have PHP and JavaScript mixed together, like chocolate and peanut butter, except neither is chocolate or peanut butter and neither represents something you'd want to be eating.
Here we have loop unrolling taken to a new, ridiculous extent. The loop is executed in PHP, and "rendered" in JavaScript, outputting a huge pile of array assignments.
Worse than that, even the name of the variable is generated in PHP- group_Arr_<?php echo $varNamePrefix;?>.
This pattern was used everywhere, and sometimes I wouldn't even call it a pattern- huge blocks of code were copy/pasted with minor modifications.
This pile of spaghetti was, as you can imagine, difficult to understand or modify. But here's the scary part: it was remarkably bug free. The developer responsible for this had managed to do this everywhere, and it worked. Reliably. Any other developer who tried to change it ended up causing a cascade of failures that meant weeks of debugging to make what felt like should be minor changes, but in the state which ALicia inherited it, everything worked. Somehow.
[Advertisement] Picking up NuGet is easy. Getting good at it takes time. ProGet costs less than half of Artifactory and is just as good. Our easy-to-read comparison page lays out the editions, features, and pricing of the different editions of ProGet and Artifactory.Learn More.Researchers Claim New Technique Slashes AI Energy Use By 95%
Read more of this story at Slashdot.
Bitcoin Creator Is Peter Todd, HBO Film Says
Read more of this story at Slashdot.
Foxconn Building Nvidia Superchip Facility In Mexico
Read more of this story at Slashdot.
Apple Potentially Facing Worst Leak Since iPhone 4 Was Left In a Bar
Read more of this story at Slashdot.
KDE Plasma 6.2 Released
Read more of this story at Slashdot.
Teen Achieves First NES Tetris 'Rebirth,' Proves Endless Play Is Possible
Read more of this story at Slashdot.