Presley Gerber, 27, died from suspected overdose as new information emerges about LA rehab star spent his final days in
Nadiya Hussain shares video accusing Ed Sheeran of shedding 'white tears' after he broke down on stage saying his family had 'abandoned him' while addressing Israel-Palestine row
Luxury camp to open on the world's largest salt flat - with Bolivian blue marble interiors and surrounded by 12,000sqkm of silver-white wilderness
Rosie Huntington-Whiteley wows in a sexy leather trench coat as she joins leggy Lila Moss and Jodie-Turner Smith at London Fashion Week's star-studded Burberry show
CodeSOD: The John Cage Variable
David C sends us a true confession.
For my job, I write C++ code as if it was a scripting language (long story) to produce programmatic animations for videos. Given that these are "write-and-run-once-and-never-look-at-it-again" programs, I tend to not try as hard to make my code good. But once I wrote this line of code, I had to take a step back and reevaluate my life choices.
fade_out(scene, length4->range(0, 3), length4_3_3, length4[4], length4[5]->range(0, 3));This is a natural consequence of passing parameters as arrays, it seems; instead of having meaningful named values in a struct or similar, we have all these things packed into arrays. We can see a long ago attempt at using variable, badly, in the John Cage variable: length4_3_3. John Cage's (in)famous composition, "4:33" calls into question what precisely even is music, just like this variable calls into question what even is a variable name- because this is clearly a range expression of size 1. length4->range(3,1), or more reasonably, probably length4[3].
Where a normal variable name might give us some indication about what its contents mean, this gives us none of that, just a statement of how we could acquire those contents if we ever wanted them again.
For disposable code, this is hardly the worst thing I've ever seen, but is any code truly disposable? You always find yourself wanting to pull some piece of it forward into the next project, inevitably. Read the third chapter of Structure and Interpretation of Computer Programs and consider yourself absolved. Go forth and sin no more.
Coronation Street sweeps the board at the Inside Soap Awards with EIGHT wins as Todd's domestic abuse ordeal is honoured with four gongs
Can toothpaste with 'good' bacteria prevent fillings?
Brentwood's only town centre post office to shut
Alibaba Cloud plans six-year stroll to 20GW of datacenters, reveals chip to power them
White House launches 'Trump TV' in extraordinary step to dodge official news channels amid broadcaster ban
'Young and fit' girl, 19, suddenly dies after 'serious failure' of Basildon Hospital
RICHARD EDEN: 'Lefties' stop Toby Young's bid to join Savile club
Smirking driver who ruined grandfather's life after ploughing into him head-on at high speed is jailed for five years
Julian Assange, 55, set to become a father again as wife Stella shares pregnancy news
Ke Huy Quan reveals eye-watering sum of first residuals check as a teenager after starring in Indiana Jones and the Temple of Doom
One in five working-age adults are now receiving Universal Credit, official figures show
Minute-by-minute, what would happen if the Yellowstone SUPERVOLCANO erupted
Meta's New 'Personal AI Agent' Muse Beats ChatGPT in Downloads - and Get Blocked by Amazon
Read more of this story at Slashdot.