It's more accurate to say "Of the set of all possible mistakes, including the mistakes you wouldn't make if you didn't deep dive into the set of extremely unlikely mistakes, enforce a no mistakes rule to mandate a complete lack of mistakes found in the original mistakes set gathered initially to ensure no mistakes may have been missed so you know all the mistakes you must not make."
Does JavaScript struggling to get integer number after dividing 9 by 3 count? One time UI element on the web page slid off the position cause goofy ass JS got 3.04 as a result somehow.
That’s not true at all lol wtf are you talking about? Computers have support for integer division built right into the ALU. It’s trash languages like JavaScript that choose to not use integers that are the problem.
No, it doesn’t. JS only has ieee floating point numbers. Floats happen to be able to represent ints up to 2^53 but you don’t get integer division, for example
I remember when someone was hypothesizing about a new coding language using an LLM as the compiler. The further down the rabbit hole they got about dealing with consistency, the closer they got to re-inventing traditional coding, but still less predictable and worse. So you comment only holds true so long as this hypothetical compiler is never born.
From a single programmer's perspective, it isn't really true. Libraries have bugs, dependent code has bugs, firmware has bugs and even sometimes, hardware has bugs. Fundamentally it's more or less all human error, but the code I write doesn't always give the expected or designed result.
To be fair, having 10% of your problems being outside of your controle tells me you are a really good programmer. I can almost never blame anything other than myself, because I'm bad
It's easy to blame more than 10% of your problems on stuff outside your control...just be bad enough that you can't comprehend where the bug in your own code could possibly be.
Looking at you, Object emptyCell = new Object(); // with a random hashcode that occasionaly causes unexpected collisions
It's still doing what's written, even when you include code that you didn't write yourself. Hardware bugs can happen of course, but they are pretty rare.
I've had this happen recently. On a microcontroller, I got 8 bytes of keyscan from USB, added a packet delimiter, sequence counter, CRC and dumped it over UART to another μC.
But the other μC still kept failing checksums, logging the packets showed seemingly absolute garbage data, despite the sends succeeding.
I was almost tearing my hair out when I finally stuck a logic analyser on the wire and found out... That despite meticulously preparing the CRC-enhanced 12-byte packet, I always ended up just sending the original 8-byte scancode because of passing the wrong array to the uart_send routine.
I'm a software developer and this is probably the first time I'm zoning out halfway through. This must be how it feels to be a product owner talking with a dev that does not summarize
Unless quantum fluctuations generated by thermal radiation interfere with the electrical charge of the transistors while their code is running, a 1 instead of a 0 can also make a tremendous difference in something
But then you realize the problem was with environment configuration or you triggered a weird bug in a library you used, and after you fixed these issues the code actually did what you wanted
I have the opposite problem with ai agents now, I give it exact instructions for a simple (but tedious to do by hand) code rewrite and it implements what it thinks I want instead of adhering exactly to my instructions
836
u/5up3rj Oct 09 '26 •
People often have the misconception that computers are very, very literal. No. They are 100% literal, and the difference is huge
2
u/NibblyPig Oct 09 '26
When I write some code and it works first time without any errors
355
u/Eastern_Equal_8191 Oct 09 '26 •
The cool thing about code is that it always does what's written.
The bad thing about code is that it always does what's written.
62
u/creeper6530 Oct 09 '26
I've had this happen recently. On a microcontroller, I got 8 bytes of keyscan from USB, added a packet delimiter, sequence counter, CRC and dumped it over UART to another μC.
But the other μC still kept failing checksums, logging the packets showed seemingly absolute garbage data, despite the sends succeeding.
I was almost tearing my hair out when I finally stuck a logic analyser on the wire and found out... That despite meticulously preparing the CRC-enhanced 12-byte packet, I always ended up just sending the original 8-byte scancode because of passing the wrong array to the uart_send routine.
21
u/Prudhvi2pac Oct 09 '26
10
u/WorstITTechnician Oct 09 '26
Unless quantum fluctuations generated by thermal radiation interfere with the electrical charge of the transistors while their code is running, a 1 instead of a 0 can also make a tremendous difference in something
9
u/sifatullahq1 Oct 09 '26
I don't know why it's showing error, I did everything right
7
u/Bhurmurtuzanin Oct 09 '26
But then you realize the problem was with environment configuration or you triggered a weird bug in a library you used, and after you fixed these issues the code actually did what you wanted
5
u/TheMcMcMcMcMc Oct 09 '26
<sad Charles Babbage noises>
4
u/f8tel Oct 09 '26
Nice ports!
1
u/CorrectBuffalo749 Oct 09 '26
This sub is long gone
2
u/the_dancing_squirel Oct 09 '26
The most frustrating thing about it is that computers do what you tell them to do. Not what you want them to do
2
u/Hjoerleif Oct 09 '26
I have the opposite problem with ai agents now, I give it exact instructions for a simple (but tedious to do by hand) code rewrite and it implements what it thinks I want instead of adhering exactly to my instructions
2
u/seaturtle_789 Oct 09 '26
when my code runs perfectly on the first try without any errors
2
u/DogmaticParadigm87 Oct 09 '26
The compiler is the only coworker who takes my requirements completely literally, and somehow it's still my fault.
2
u/bwwatr Oct 10 '26
If we let it get bad enough we can give the difference a legitimizing word like "alignment"
1
u/ompossible Oct 09 '26
The story of Everyday
1
u/Beginning_Book_2382 Oct 09 '26
I love it when the computer makes me feel stupid lol
1
u/XtraFlaminHotMachida Oct 09 '26
Ike Turner time on that mf.
1
u/The-Princess-Pinky Oct 09 '26
Yup, been here a few times!
1
u/[deleted] Oct 12 '26
I hate this damn machine I wish that they would sell it It never does quite what I want But only what I tell it -a programmers lament
1
u/SeesawGullible398 Oct 12 '26
0.1 + 0.2 entered the chat
1
u/astromagus Oct 13 '26
My college professor used to make this joke all the time
-3
u/JackNotOLantern Oct 09 '26
LLM was created exactly for those people