←back to thread

180 points beryilma | 3 comments | | HN request time: 0.603s | source
Show context
ctz ◴[] No.41908126[source]

  Runtime errors surface when a program
  runs into an unexpected condition or situation
  such as dividing by zero, memory overflow, or
  addressing a wrong or unauthorized memory
  location or device, or when a program tries to
  perform an illegitimate or unauthorized operation
  or tries to access a library, for example.
  The programs must be thoroughly tested for
  various types of inputs (valid data sets, invalid
  data sets and boundary value data sets) and
  conditions to identify these errors. Once identified,
  runtime errors are easy to fix.
Embarrassing horseshit.
replies(4): >>41908241 #>>41909426 #>>41909473 #>>41910499 #
1. wakawaka28 ◴[] No.41909473[source]
What exactly is wrong with it? That is a definition fit for someone who does not have prior knowledge of what a runtime error is. It might be boring to us, and I might word it a little different, but it's fine.
replies(1): >>41910082 #
2. miffy900 ◴[] No.41910082[source]
For me it's the last sentence: "Once identified, runtime errors are easy to fix." Well no not really - it depends on the issue; sometimes a solution isn't 'fixing' it, sometimes choosing what to do next after identifying the root cause is it's own task. Maybe it's working around it, like amending the return value with amended data, or patching the API itself by wrapping it in an intermediate API and swallowing exceptions. Guidance on addressing runtime errors should never presuppose that 'fixing' it will be easy - it will always depend on the context. Just get rid of that last sentence and it's a better statement.

Imagine instead it's for criminal defense lawyers: re-word it to be advice for attorneys defending their client against a prosecution. "Once [all exculpatory evidence against your client] is identified, defending them against a guilty verdict is easy to do"

It sounds like it's written by someone who has never practiced in the real world.

replies(1): >>41910258 #
3. wakawaka28 ◴[] No.41910258[source]
I think it should say runtime errors "are usually easy to fix" because they are usually a result of simple logical errors or technical issues. But you're right, it does not account for all possibilities.