Vviewpoints
Article development led by
queue.acm.org
I
M
A
G
E
B
Y
H
U
R
C
A
/
S
H
U
T
T
E
R
S
T
O
C
K
as well play it really well, even if your instrument is a hammer and anvil.
As you point out, the developer definitely has this the wrong way around
for at least two reasons: The first has to
do with how one communicates a value as important as time; and the other
has to do with how and where software
should translate data into a human-readable form.
Computer systems generally, and
networked systems specifically, often
depend on time and time stamps to
Dear KV,
While debugging a set of networked
systems that seemed to be executing
operations out of the expected order,
I discovered an interesting feature of
the protocol used by the application.
The system is fairly old, and I was
not involved in its creation, but I was
asked to figure out why about 10% of
the transactions were flagged as being
in the wrong order. All the application
communication happens using TCP.
And since TCP guarantees the ordering of messages, I was confused as to
how transactions between two systems could arrive out of order. What
I found—by using Wireshark—was
that the TCP stream was, as expected,
in order, but the application protocol
used on top of TCP had some rather
odd properties.
In particular, all of the information,
including time, was communicated as
strings. The bug turned out to be an
incorrect conversion of the time from
a string to a value that could easily be
compared. Although the messages ar-
rived in the correct order, the system,
reading the time, thought they were out
of order and complained loudly. When
I finally tracked down the developer
who wrote the code, he said that he had
used strings to make the protocol eas-
ier to debug and to make it easier for
people looking at the log file to know
what was happening in the system. My
feeling is that he got this concept the
wrong way around, and I am wonder-
ing how you might feel about this, as
you have written about in the past.
Stung by Strings
Dear Stung,
How does this make me feel? Well, like
nearly all questions around software
and technology, it makes me angry, but
then, what does not make me angry?
When you play only one note, you might
Kode Vicious
Numbers Are for Computers,
Strings Are for Humans
How and where software should translate data into a human-readable form.
DOI: 10.1145/3376630