If you’re adding code you don’t understand to a production system you should be fired
Edit: I assumed it was obvious from context that I’m referring to copy-pasting code from stack overflow or an LLM or whatever without knowing what it does but apparently that needs to be said explicitly.
If you are submitting work, you should understand how the code you’re submitting works. Sure, you don’t have to know exactly how the code it calls works, but if you’re submitting code and there’s a block of code and you have no clue how that block works, that’s a problem.
There’s a huge difference between copy-pasting code you don’t understand and using a library with the assumption that the library does what it says on the tin. At the very least there’s a clear boundary between your code and not-your-code.
I really like to build from zero, but some things are better copied, no matter if you fully understand them or fall short. :)
For example, I’m not qualified to check if Hamilton and Euler were correct - I only do as they explained, and later double-check the output against input.
I didn’t say never copy and paste. I’m saying when you push a commit you should understand what all the LOC in that commit do (not counting vendored dependencies). If you don’t understand how something works, like crypto (not sure what Hamilton or Euler refers to in this context), ideally you would use a library. If you can’t, you should still understand the code sufficiently well to be able to explain how it implements the underlying algorithm. For example if you’re writing a CRC function you should be able to explain how your function implements the CRC operations, even if you don’t have a clue why those operations work.
Same here. Assembly is a little too high level for me. I don’t like the assembler guessing what I meant. I like telling processors exactly what to do.
Honestly, modern CISC processors are also a little high level if you think about it. I don’t want the processor guessing what I meant to tell it. I like telling them exactly what to do.
Are you seriously trying to equate “I don’t know which instructions this code is using” to “I copied code I don’t understand”? Are you seriously trying to say that someone who doesn’t know how to write x = a + b in assembly doesn’t understand that code?
I said you need to understand what the code you wrote (as in, LOC that git blame will blame on you) does. Not that you need to fully understand what the code it calls does. It should be pretty obvious from context that I’m referring to copy-pasting code from stack overflow or an LLM or whatever without knowing what it does.
If you’re adding code you don’t understand to a production system you should be fired
Edit: I assumed it was obvious from context that I’m referring to copy-pasting code from stack overflow or an LLM or whatever without knowing what it does but apparently that needs to be said explicitly.
Many times the code we work on is built in abstractions we don’t know about from top to bottom.
If you are submitting work, you should understand how the code you’re submitting works. Sure, you don’t have to know exactly how the code it calls works, but if you’re submitting code and there’s a block of code and you have no clue how that block works, that’s a problem.
Never use libraries you don’t contribute to in Production
There’s a huge difference between copy-pasting code you don’t understand and using a library with the assumption that the library does what it says on the tin. At the very least there’s a clear boundary between your code and not-your-code.
I really like to build from zero, but some things are better copied, no matter if you fully understand them or fall short. :)
For example, I’m not qualified to check if Hamilton and Euler were correct - I only do as they explained, and later double-check the output against input.
I didn’t say never copy and paste. I’m saying when you push a commit you should understand what all the LOC in that commit do (not counting vendored dependencies). If you don’t understand how something works, like crypto (not sure what Hamilton or Euler refers to in this context), ideally you would use a library. If you can’t, you should still understand the code sufficiently well to be able to explain how it implements the underlying algorithm. For example if you’re writing a CRC function you should be able to explain how your function implements the CRC operations, even if you don’t have a clue why those operations work.
So you code everything in Assembly from scratch?
No I just read the stack overflow guy’s explanation and the other small comments around and they explain it.
Closed as duplicate
I don’t understand Assembly. Straight up binary only for me.
Same here. Assembly is a little too high level for me. I don’t like the assembler guessing what I meant. I like telling processors exactly what to do.
Honestly, modern CISC processors are also a little high level if you think about it. I don’t want the processor guessing what I meant to tell it. I like telling them exactly what to do.
The processor is just going to guess wrong and might occasionally waste a few cycles!
In what world is assembly more readable or easier to understand?
Are you seriously trying to equate “I don’t know which instructions this code is using” to “I copied code I don’t understand”? Are you seriously trying to say that someone who doesn’t know how to write
x = a + b
in assembly doesn’t understand that code?No, they’re pointing out that it’s a little silly to expect everyone to understand each and every later of abstraction fully before deploying code.
I said you need to understand what the code you wrote (as in, LOC that git blame will blame on you) does. Not that you need to fully understand what the code it calls does. It should be pretty obvious from context that I’m referring to copy-pasting code from stack overflow or an LLM or whatever without knowing what it does.