Feed aggregator
AOL To Be Sold To Bending Spoons For Roughly $1.5 Billion
Read more of this story at Slashdot.
China Bars Influencers From Discussing Professional Topics Without Relevant Degrees
Read more of this story at Slashdot.
The Game Theory of How Algorithms Can Drive Up Prices
Read more of this story at Slashdot.
Nvidia Becomes World's First $5 Trillion Company
Read more of this story at Slashdot.
Gates Retreats From 'Doomsday' Climate View, Prioritizes Aid To Poorest Countries
Read more of this story at Slashdot.
Senator Blocks Trump-Backed Effort To Make Daylight Saving Time Permanent
Read more of this story at Slashdot.
Early Reports Indicate Nvidia DGX Spark May Be Suffering From Thermal Issues
Read more of this story at Slashdot.
China Pushes Boundaries With Animal Testing to Win Global Biotech Race
Read more of this story at Slashdot.
CodeSOD: A Basic Mistake
Way back in 1964, people were starting to recgonize that computers were going to have a large impact on the world. There was not, at the time, very much prepackaged software, which meant if you were going to use a computer to do work, you were likely going to have to write your own programs. The tools to do that weren't friendly to non-mathematicians.
Thus, in 1964, was BASIC created, a language derived from experiments with languages like DOPE (The Dartmouth Oversimplified Programming Experiment). The goal was to be something easy, something that anyone could use.
In 1977, the TRS-80, the Commodore PET, and the Apple II all launched, putting BASIC into the hands of end users. But it's important to note that BASIC had already been seeing wide use for a decade on "big iron" systems, or more hobbyist systems, like the Altair 8800.
Today's submitter, Coyne, was but a humble student in 1977, and despite studying at a decent university, brand spanking new computers were a bit out of reach. Coyne was working with professors to write code to support papers, and using some dialect of BASIC on some minicomputer.
One of Coyne's peers had written a pile of code, and one simple segment didn't work. As it was just a loop to print out a series of numbers, it seemed like it should work, and work quite easily. But the programmer writing it couldn't get it to work. They passed it around to other folks in the department, and those folks also couldn't get it to work. What could possibly be wrong with this code?
3010 O = 45 3020 FOR K = 1 TO O 3030 PRINT K 3040 NEXT KNow, it's worth noting, this particular dialect of BASIC didn't support long variable names- you could use a single letter, or you could use a letter and a number, and that was it. So the short variable names are not explicitly a problem here- that's just the stone tools which were available to programmers at the time.
For days, people kept staring at this block, trying to figure out what was wrong. Finally, Coyne took a glance, and in a moment was able to spot the problem.
I've done something nasty here, because I posted the correct block first. What the programmer had actually written was this:
3010 O = 45 3020 FOR K = 1 TO 0 3030 PRINT K 3040 NEXT KThe difference is subtle, especially when you're staring at a blurry CRT late at night in the computer lab, with too little coffee and too much overhead lighting. I don't know what device they were using for display; most terminals made sure to make O look different from 0, but I couldn't be bold enough to say all of them did. And, in this era, you'd frequently review code on printed paper, so who knows how it was getting printed out?
But that, in the end, was the problem- the programmer accidentally typed a zero where they meant the letter "O". And that one typo was enough to send an entire computer science department spinning for days when no one could figure it out.
In any case, it's interesting to see how an "easy" to use language once restricted variable names to such deep inscrutability.
[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!Westinghouse Is Claiming a Nuclear Deal Would See $80 Billion of New Reactors
Read more of this story at Slashdot.
Society Will Accept a Death Caused By a Robotaxi, Waymo Co-CEO Says
Read more of this story at Slashdot.
Nvidia's New Product Merges AI Supercomputing With Quantum
Read more of this story at Slashdot.
Ubuntu Unity Faces Possible Shutdown As Team Member Cries For Help
Read more of this story at Slashdot.
Senators Announce Bill That Would Ban AI Chatbot Companions For Minors
Read more of this story at Slashdot.
China's DeepSeek and Qwen AI Beat US Rivals In Crypto Trading Contest
Read more of this story at Slashdot.
Python Foundation Rejects Government Grant Over DEI Restrictions
Read more of this story at Slashdot.
AI News Anchor Debuts On UK's Channel 4
Read more of this story at Slashdot.
UK Cyclist Receives 3D-Printed Facial Prosthetic After Crash Left Him With Third-Degree Burns
Read more of this story at Slashdot.
Nearly 90% of Windows Games Now Run on Linux, Latest Data Shows
Read more of this story at Slashdot.
Humanity Has Missed 1.5C Climate Target, Says UN Head
Read more of this story at Slashdot.
