- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Anthony? Can you help?
Admin
Contact me. You know my hourly rate.
Admin
Without the context, nobody can say if it is wrong or right. There's a reason some languages have
unreachable()
pseudoinstruction (or something similar to it), and the presented code seems like C's implementation of that concept. I could bet some compiler can take this as a guide for optimization.Seeing
assert(false,...)
in code - the first thought that springs into my mind is a guard for non-exhaustiveswitch
in a language that doesn't check/enforce it. A guard unreachable in the present code, but a safety net for further editions. One who never forgotbreak
inswitch
let first throw his spacebar.Admin
If I had a nickel for every time a code base got migrated from one VCS to another without importing the full commit history, I'd have a lot of nickels. All too often the git blame terminates with some crazy commit that adds a thousand files and everything gits attributed to that lucky importer.
Or maybe this company imported from Visual Source Safe, or worse.
Admin
Whose words these are I think I know They're ANTHONY's.
Admin
This was clearly in code written for Cleopatra.
Admin
If I were the programmer who wrote that assert(), I wouldn't use my real name. Which explains why no one remembers an employee by that name.
Admin
Ah the new inverse Spartacus
I ain't taking the blame or owning it EVER
Admin
Clearly an advertising gimmick for Anthony's pizza. Actually, this makes me wonder if it would be a type of justice if such a thing got into web developers' code... (or Oculus these days, I hear).
Admin
We imported a ton of stuff from VSS and actually managed to get a decent git history out of it. Takes a bit of fine tuning as VSS does its versioning per file instead of per repository but there are some good scripts out there.
Admin
It's wrong. There is no context where leaving out the actual error is correct.
Admin
If something beside remained that explained the error this could have been a useful suggestion for the user at the time, to be updated as the program and organization changes.
Admin
A co-worker, long ago, put such a message into a Unix SCSI disk driver, back in the early days of SCSI...for a certain error condition that 'should never happen' he left a console message "If you see this message, <last name> screwed up." Sure enough, a year or so later, some CE from Germany emailed him with the question "Vas ist los '<last name>' screwed up' ? His last name was uncommon enough that they were able to locate him in the company-wide directory, even in those pre-Web days, and contact him directly.
Admin
It's obviously Anthony Martignetti (RIP) , who ran home fast every Wednesday because it was Prince Spaghetti Day. If it hadn't been Wednesday, he'd have hung around long enough to explain the fault in the comment.
Admin
"Yeah, we're used to it now. The infamous Anthony error means a database record got mangled. We never found the source of the mangling. We just find the record from the screen shot and go fix it". Seen situations like this many times before over the last 40 years.
Admin
The new York central park charges upwards of $10,000 to etch your name into a bench for a proud of a few years. Anthony etched his name into history forever and he didn't pay rather got paid for it. He won
Addendum 2021-06-28 12:17: *period
Admin
Have they checked the local bar? Anthony might offer the solution there
Admin
In the 1960's, the source listing for the CDC 3600 Algol compiler contained the following: Hardware Stack Underflow, Please send me the dump. The comment had a name and home address.
Admin
This kind of makes sense. Most pieces of code will fail in the first week if they fail at all.
Admin
I like to think that the title is a reference to Sam Jackson's line from the underrated "Long Kiss Goodnight", though it's an easy joke for anyone to come up with.
Admin
I've done it - if you have an enum and you've switch()ed on every possibility, then adding a default is perfectly reasonable. It actually happened to a coworker of mine - i wrote a state machine, enumerated the states and transitions, and in the transition code, added a default that should never be reached.
Somehow though, my coworker managed to hit that unreachable code. Never figured out why since it's unreachable. I enumerated all the state transitions explicitly - not even making any assumptions on the numbering of the enums.
What I did do was make the code do an early return when it hit the unreachable condition which crashed the system, making it an easy fault to find.
Admin
"It's legacy code, so there's no meaningful commit history that far back"
You know, I think there's a point where we have to stop blaming legacy code for things. I've seen articles here where "legacy" code is only a few years old, so I would expect it to use source control and have commit history. On the flip side, I work with code where some of it is 20-25 years old and it still has commit history.
Admin
Yeah this is not a WTF at all.
The code outlived the risk. This rather points to poor management, a lack of handover and improper ownership. It's like when markets run rampant bullish or bearish and you now blame the origigal architects of an investment solution for poor returns, or celebrate them for the gains years down the line.
Addendum 2021-06-29 03:17: Yeah this is not a WTF at all.
The code outlived the risk. This rather points to poor management, a lack of handover and improper ownership. It's like when markets run rampant bullish or bearish and you now blame the original architects of an investment solution for poor returns, or celebrate them for the gains years down the line.
Admin
Although it's possible that there used to be a guy named Anthongy, I bet that today it's a role. Probably a rotating one, with each maintenance developer being The ANTHONY for one week.
Admin
If the code works, it was written by me. If not, it was written by Anthony.
Admin
When false evaluates to true, you surely have problems that only Anthony can solve, whoever he is. Hopefully not a priest...
Admin
The project I spent most of my time working on started without version control (or devops or really any deploy strategy at all), once we got Visual source safe, that was a big improvement, then we moved to Team foundation and then to Git.
My only solace was that any legacy code that was from an older system and lacked history was usually mine :P
And since we moved from vbscript and jscript through visual basic and vb.net and then c# on net.framework and then netcore I am not sure really old history would be understandable or relevant.
In total I worked just over 17 years on the system before moving on.
Admin
"Anthony" was the business analyst who swore blue that "this never happens".