Skip to main content

CodeSOD: The John Cage Variable

1 month 1 week ago

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.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!
Remy Porter

Meta's New 'Personal AI Agent' Muse Beats ChatGPT in Downloads - and Get Blocked by Amazon

1 month 1 week ago
Meta's AI "personal agent" Muse overtook ChatGPT as the #1 iOS free app in the U.S. on Friday, reports CNBC — and it's still showing more downloads as of Monday night. Muse now has over 2.5 million downloads since its debut less than two weeks ago, according to analytics firm Sensor Tower... [Muse] is currently ahead of popular services like OpenAI's ChatGPT, Polymarket and Kashi... It's also ahead of rival AI apps like Anthropic's Claude and SpaceXAI's Grok AI, in addition to the Facebook-parent's own Meta AI app... Meta pitched the app as a way for consumers to manage and direct supercharged digital assistants that can perform a number of tasks across the web, like filling out electronic forms and organizing email inboxes... "I think up to this point most of the agentic use cases have not really been for normal people," Bernstein analyst Stacy Rasgon told CNBC in a "Squawk on the Street" interview on Monday. "Now you've got Meta's Muse and other agents out there that are starting to maybe get more potential for more broad-based adoption." The buzz around Meta was also reflected in the stock, which surged more than 11% on Monday. Amazon is already blocking Muse, reports GeekWire. Amazon first tried to get Meta to voluntarily exclude Amazon, but they were unsuccessful: The problem, Amazon says, is that it never agreed to any of it. Meta didn't tell Amazon that Muse would access its store, the agent doesn't identify itself when it browses, and it appears to capture and store customer credentials, which the company says could create privacy and security risks. As of Sunday night, people trying to use Muse to shop on Amazon were seeing the popup, "Continued access by an unauthorized AI agent violates Amazon's Conditions of Use, to which our customers have agreed..." Amazon has spent the past year trying to keep outside agents off its site, suing Perplexity over its Comet browser and moving to block shopping agents from Google and OpenAI. [Amazon won a preliminary injunction against Perplexity in March, the article poitns out, "then lost it on Aug. 4, when the Ninth Circuit ruled that the user — not the AI company — was the one accessing Amazon's computers under federal anti-hacking law. The court denied Amazon's petition for rehearing on Sept. 10."] On Sunday night, Amazon said it is in direct conversation with Meta about the issue. Asked whether it would consider taking legal action, the company declined to comment. The business stakes are high for Amazon. In addition to operating its flagship e-commerce site, Amazon generated more than $68 billion in ad revenue last year — a business that depends on people browsing its pages and seeing sponsored products. Muse also appears to scrape account data, reports CNBC. But Shopify, however, "is working with Meta on Muse access. Shopify CEO Tobias Lütke announced Monday that the e-commerce site was partnering with Muse to allow agentic checkout in its online stores."

Read more of this story at Slashdot.

EditorDavid