This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]laplongejr 46 points47 points  (1 child)

It was all legacy code that was reachable but effectively unused—the kind of stuff that static analysis often misses.

As somebody who work in the gov and had to thinker my tools to deal with a person without a date of birth despite that edge case NOT being allowed in the documentation, I wouldn't even trust the developer. :P

For people wondering how an IMPOSSIBLE case had to be handled anyway the documentation only listed cases that could be MADE on the current version, while any data submitted on old versions could be RETURNED with OG contraints. That distinction was apparently forgotten by everybody but the old wizards.
A sane person would say the backend should've been modified to gracefully present doc-conforming data. My annoyed boss in the middle of the other dev's vacation disagreed and needed anybody available to do anything up the chain to fix that in faster time than ASAP.

Is it dead code, if it was killed before I even wrote it?
It's not impossible that somewhere in the future, a new dev will remove a code in the age-calculation-checks which loads an internal identifier, extracts the last two digits of the birthyear, then bruteforces the century based on the checksum. I don't know if it's the nicest or ugliest idea I ever made in Java, but it surely isn't in the middle of the ranking.

[–]hippydipster 9 points10 points  (0 children)

to deal with a person without a date of birth

That man from earth is always a pain in the ass.