- 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
Sigh. If only the phone could multitask and switch to its regular phone ability...
But no, that makes too much sense.
Admin
Everyone knows that if you hang up the phone multiple times it picks it up again. Not to mention the race conditions that could be happening when hanging up three times at once (but I guess that's why that exception mouth-tape is for).
Admin
Can't race conditions cause programs to hang up anyway? <!--it's a joke-->
Admin
I did this recently actually in a call, ended up crashing the System UI, but the call remained connected all throughout a "soft reboot"
Admin
TIL that 13 years or less is a few decades.
Admin
Admin
Admin
I recall years ago, when Borland Pascal ruled the world, I had an app that called a library function and the function did nothing. In desperation I tried calling the function twice - exactly the same line of code, cut and pasted onto the very next line. Low and behold, it worked. I got several colleagues to check my results, and they concurred. We added a comment saying "Don't know why we have to call this twice, but apparently we do" and shipped it. Unfortunately I can't recall the exact function.
Admin
Who is this guy Everyone?
Admin
Yea, I have had the same problem, although in my case it is a process of joining a CentOS server to a windows AD (so uses can log in using their windows user names and passwords. For some unknown reason, the first time you run the join script, it fails on the last item, but when you run it again, it works.... (but then again, Windows is involved, and we already knows that the Microsoft way of debugging is 'try again until it works' :-) )
Admin
It was called 'CallMe2x()'
Admin
If at first you don't succeed, try, try again.
If at first you don't succeed, then skydiving is definitely not for you. --Stephen Wright
Admin
Hang on… An article from @Remy without smartass comments or a cornify link?
Admin
On the first call, the IP stack drops your request because the ARP table is empty for your destination, yet it send a ARP/RARP query anyway. On the second call, the IP stack has received a response for your destination and actually send your packet...
It is even worse if the call must read an answer from the network... without waiting. On old hardware, the round-trip might have been short enough for the read to get the answer on first call, but with fast computer of today, the answer to the first call is available only during the second call (fast computer, or wider network, from LAN on coaxial to the cloud at the antipod)
Hey, I did not change any line of code on that system for 30 years... just changed the network, from a small delay to a wider lag.
Admin
Call me once, shame on - shame on you. Call me twice - you can't get called again.
Admin
Admin
I think I've had to do something like that a couple of times. At least the one I specifically remember, though, there was a specific, documented reason for it. The hardware was pipelined, and the first attempt to read it returned whatever garbage data happened to be in the pipeline and loaded that data you really wanted into the pipeline; the second read returned the valid data (and loaded it again, with another copy of the valid data — that will be no longer be valid the next time you want to do this).
Admin
BP had a bug where if a nested function was called from a newly-loaded segment, and that function called a function with a constant string parameter, and that function was large enough to push the calling segment out of memory, the compiler would not emit the code to make sure the constant segment was still in memory. A second call would often generate the right code. Except for that bug the system was almost bug-free. Good times.
Admin
How do you know Everyone is a guy? Everyone is not just anyone, but may be someone and probably isn't nobody.
Admin
For some reason, the server software I use attempts to join, them immediately leave, and later tries to join again. Sometimes it does this too quickly though, and stays joined (but disabled), so joining again fails, and since it's disabled it can't log in to get its own SID (or something). My situation is backwards: Attempt to join at most One time. If it fails, a complete reboot is required, as the system is then in an unknown state and will forever be confused to the point that it will never join.
Filed under: Probably should make this a sidebar...
Admin
Fun race condition:
Phone 1: connect Phone 1: Am I connected? Yes. Phone 1: hangup Phone 2: connect Phone 1: Am I connected? Yes. Phone 1: hangup Phone 2: send data OH WAIT I CAN'T
Admin
That's the RWTF.
Admin
Yeah, where's the snark? Or did Remy finally get broken?
Admin
Oh sure. But not the phone; just the program.
Admin
Even now, every time I log into Informatica's support portal, the first time I log in I get a session expiry screen, which directs me back to the login form; when I log in again I get into support.
Also, it doesn't matter how many times I tick the "Remember my email address on this computer" box; it never does.
Admin
We had a situation like this when trying to connect a VPN through a satellite modem. The modem started in an idle state and when you tried to connect it first had to get into a ready state which took some time. There was no indication like a LCD or LED on the modem as to what state it was in.
While the modem was getting ready, OpenVPN would time out. In the meantime the modem would enter the ready state, so the connection would succeed on the second attempt.
Our scripts basically contained
connect(); connect();
until we figured out what was wrong and implemented a proper fix.Admin
The original programmer clearly based his style on this ancient but reasonably well-known bit of FORTRAN code:
10 STOP STOP STOP ! IN CASE STILL SKIDDING GOTO 10
Admin
E_NOT_FORTRAN_CODE
Admin
That's the problem right there. Everyone knows that in-house software gets ahead of the curve by switching to "Enterprise" software.
Admin
Maybe this:
http://stackoverflow.com/a/16095658
Admin
A more careful reading of that might suggest that you've got to do:
Excuse me, but isn't that a really horrible API? Maybe it's just the naming that's weird, but that pattern just makes my stomach churn.
Admin
KILL IT WITH FIRE!
Admin
The above is the bury it alive variant.
Admin
So you need to call it once more AFTER the first time it returns success?
The only case where I'd expect to see such things are system calls:
waiting
will likely exist and potentially be cleared by a signal handler. Not having that extra check there is often a bug.Admin
BP really need to learn to take better care of their pipelines. Something terrible could happen.
Admin
Is allowing the same method call on a single object to affect the state of two completely different things a common idiom in Go?
Admin
More real-world example: a multithreaded database connection pool.