Skip to main content

GitHub Thumbs Nose At Sony's Controversial End to Physical Media With Its Introduction of Repo CDs

2 days 1 hour ago
GitHub is offering a limited run of 1,000 CD-ROM copies of public repositories as a pro-physical-media jab at Sony's plan to stop producing PlayStation game discs in 2028. Tom's Hardware reports: The coding and collaboration platform, owned by Microsoft, states that "In light of recent developments in physical media, GitHub is proud to announce that you can now obtain your public repo on CD-ROM." Moreover, it appeals to the human side of computing, adding the emotive line "Keep it. Lend it to friends. Pass it on to your children." It isn't April 1st, so thankfully this is no joke. However, if you check out the above-linked GitHub Your Code, On a CD offer page, it quickly becomes clear this is a very limited in time/scope stunt. "Order a burned CD of your own public GitHub repo. Yes, a real physical disc you can hold in your hands, no download required," begins the spiel. But this is a very limited run of 1,000 discs, with applications required between July 2 and July 6 (inclusive). Limit one per person, with availability varying between country/region. "Your code is physically yours, forever. Until you lose it, let's be real," says GitHub. At best, these CDs will be framed and put on a wall, some becoming collector's items or eBay money spinners (discs like 0001 or 0888 would be good ones, if they are numbered). Also, many will be lost or eventually/accidentally discarded, as GitHub seems to know. So this 'protest' is arguably 1,000 doses of expensively shipped e-waste.

Read more of this story at Slashdot.

BeauHD

CodeSOD: On Hold

2 days 2 hours ago

"Dragoncoder" supports a web application that has a "wait time" for access. I hate that that's a thing, but I recognize that there are real-world constraints where this might make sense. Still, I hate it. But that's not the WTF.

var minutes = parseInt( 12 , 10); var time = document.getElementById('waitTime'); if ( minutes < 2) { time.innerText = "Your estimated wait time is 12 minute." } else if (minutes < 60) { time.innerText = "Your estimated wait time is 12 minutes." } else if (minutes === 60) { time.innerText = "Your estimated wait time is 0 hour." } else if (minutes < 120 && (minutes % 60 === 1)) { time.innerText = "Your estimated wait time is 0 hour and 12 minute." } else if (minutes < 120) { time.innerText = "Your estimated wait time is 0 hour and 12 minutes." } else if (minutes > (60 * 4)) { time.innerText = "Your estimated wait time is more than 4 hours." } else if (minutes % 60 === 0) { time.innerText = "Your estimated wait time is 0 hours." } else { time.innerText = "Your estimated wait time is 0 hours and 12 minutes." }

This wait time page is initially rendered by their backend, but after that point, gets served up by a cache at the edge of their CDN. That makes sense, since "have the users hammer your backend while they're waiting" is a bad idea.

Note the line var minutes = parseInt( 12 , 10);. This is rendered from the backend, which is of course my least favorite way to send data from the server side to the client side.

But that's not the core problem here. The core problem is: what the hell are they outputting?

If your wait time is less than 2, or less than 60, we tell you that your wait time is 12 minutes. Or "12 minute", because who cares about pluralization? If your wait time is exactly 60 minutes, we tell you that your wait time is "0 hour", which I assume means you'll have enough time to watch the classic airplane disaster movie, Zero Hour, which you surely know Airplane! is a remake of.

I can only think that the text is also being generated by logic on the server side- though our submitter doesn't suggest that's the case. Though they do wonder why the code couldn't be something like: Your estimated wait time is: ${Math.floor(wait_time_minutes / 60)} hours and ${wait_time_minutes % 60} minutes, which is both fewer bytes to send from your cache and more useful to the end user.

Or maybe we just make this wait time go away. Again, I don't know why it's there, there may be a good real-world constraint that requires it, but… is there? Is there really?

[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!
Remy Porter