This is a total puzzle to me. I rarely met the people that would pass the tests I did. More, most of the people I interviewed were very good. OTOH, I remember, one interviewee just refused to write any code during the interview. They still hired him. Later I found that he writes a pretty decent code (and there was no doubt about his IQ). But the majority...
The idea that you shouldn't use error messages to drive production logic is sane.
But enforcing that by being deliberately subversive?.. Language zealots impacting production code? No, thank you kindly.
They wasted 2 days of my time.
You see, I am very particular about testing. My negative test cases check that they are triggering an error condition in the right place (I've got impaled before, when the negative cases happened to all go through one branch of the code, so they didn't test the intended error handling properties of the code). The waste came from the fact that I couldn't understand why seemingly equal strings were not equal. Do I misunderstand how to compare strings?..
OK, it was a one off. Shit rays to those who wrote that code, and move on. But now let's consider that this was done everywhere, if this is such a revolutionary improvement in code writing practice. What then?
I'll tell you what. Then oncallers will be unable to diagnose issues, that's what. Because now you can't search for error strings anymore: you always find only a fraction of them.
I somehow thought that maybe this behavior was documented well enough and they wanted to enforce a particular workflow different from what you describe. I cannot tell you what this different workflow might be though.
So, yes, you are right and what they are doing does look both dumb and even a bit evil.
no subject
Date: 2024-06-20 09:59 am (UTC)no subject
Date: 2024-06-20 10:59 am (UTC)This is a total puzzle to me. I rarely met the people that would pass the tests I did. More, most of the people I interviewed were very good. OTOH, I remember, one interviewee just refused to write any code during the interview. They still hired him. Later I found that he writes a pretty decent code (and there was no doubt about his IQ). But the majority...
no subject
Date: 2024-06-21 05:26 am (UTC)https://github.com/protocolbuffers/protobuf-go/blob/master/internal/errors/errors.go#L26-L34
no subject
Date: 2024-06-21 09:52 pm (UTC)I can't immediately and confidently agree that it is bad though... Something to think about.
no subject
Date: 2024-06-22 04:04 am (UTC)But enforcing that by being deliberately subversive?.. Language zealots impacting production code? No, thank you kindly.
They wasted 2 days of my time.
You see, I am very particular about testing. My negative test cases check that they are triggering an error condition in the right place (I've got impaled before, when the negative cases happened to all go through one branch of the code, so they didn't test the intended error handling properties of the code). The waste came from the fact that I couldn't understand why seemingly equal strings were not equal. Do I misunderstand how to compare strings?..
OK, it was a one off. Shit rays to those who wrote that code, and move on. But now let's consider that this was done everywhere, if this is such a revolutionary improvement in code writing practice. What then?
I'll tell you what. Then oncallers will be unable to diagnose issues, that's what. Because now you can't search for error strings anymore: you always find only a fraction of them.
no subject
Date: 2024-06-22 12:59 pm (UTC)I somehow thought that maybe this behavior was documented well enough and they wanted to enforce a particular workflow different from what you describe. I cannot tell you what this different workflow might be though.
So, yes, you are right and what they are doing does look both dumb and even a bit evil.