The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Really pretty hard, or so it seems.
So I'm still working on this early 90's standard, which is pretty impossible to read.
It's basically like this:
You have a code being a certain data field, like 123456 for weight and 654321 for quality.
This goes in a header with two leading zeroes and the fields length (two digits) and precision (one digit).
So a part of a header could be: "0012345605200654321020".
Then comes the value lines, which is just the values, like "00322A ".
The complete (simplified) document would look like:
So taking the header and values we get the C# values of 3.22m for weight and "A" for quality.
I've got documentation with all fields, their lengths, possible values, and which fields are mandatory and optional or conditional.
So now I've got this entire document which is completely according to the specs, which must be read by some third party application.
And it fails with an ACCESS VIOLATION EXCEPTION!?
No "failed to parse value 'x' for field 'y'" or "missing mandatory field 'z'", just an access violation.
So I've got some example files that I know that work, so I decide to look at one and dissect the header and fields one by one (I've written a little program for that) and see if I can spot a difference.
I can spot two differences, the sample file has a lot of optional fields with invalid values and it's missing 20 characters in the value line.
We decided to add those optional fields to our own document, including the invalid values (but with correct length) and it works
Why on earth is an invalid document read without issues and does a valid document fail with an access violation?
You can bet your ass that's not the only thing wrong with this application
Anyway, I'm now waiting on a reply from someone who's on a vacation for the next two weeks or so.
The best I've ever heard was "I'm quite busy today, but can you call back tomorrow?"
When I called back the other day I got the receptionist telling me today was the first day of his three week vacation
It wasn't important, I only needed access to their systems so I could do my work.
So that meant my three week vacation started that day as well
A friend of mine recently started at a company.
His job was to streamline their AWS resources and deployments... Except it took months for him to get the access he needed to do his job
He's been "doing research" and writing blogs for two months until he could finally do his job.
I should mention he's a pretty expensive external consultant.
If I were his boss' boss I'd fire him on the spot for wasting my money and my friends time like that
That said, most managers I've worked under would get that treatment if I were their boss...
I even have a test where it takes erroneus inputs and even with errors its expected to be able to complete the parse *AND* reconstruct the entire document based on the nodes therein. I compare that reconstruction with the original input so it's very demanding in terms of precision. Everything has to be reported even in worst case scenarios.
The LALR(1) parser does not pass these tests, but the LL(1) parser does.
Still, I'm satisfied enough with it for now. The error handling in the LALR(1) parser is going to be dodgy until i get my copy of the dragon book and can look at what they recommend.
This isn't standard error handling. This is being able to handle a situation where the input does not meet the expected format, and yet you have to continue parsing. It can be challenging.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
Last Visit: 27-Feb-20 1:51 Last Update: 27-Feb-20 1:51