
Gray code at the pediatrician's office - J3L2404
http://blog.plover.com/math/gray-codes.html
======
anigbrowl
Hmm. As a geek I like Gray code and think it has many useful applications, but
this is not one of them: _Iris stood against the post and the nurse adjusted
the bracket to exactly the top of her head. Then she read off Iris's height
from an attached display._

How is this an advance on looking at a conventionally numbered ruler (with a
similar bracket to touch the top of the head) and writing down the number?
It's technological and presumably expensive, but it isn't delivering any
discernible benefit that I can see. Measuring height via computer vision +
Gray code would be very useful in security applications where you want to log
biometric information for a large number of people efficiently (camera +
abstract-looking wall design in an access corridor or at a security
checkpoint), but if you're paying a human to take the measurement you might as
well use a scale that's easily human-readable ( _ie_ at a glance). I hope the
doctor's scale was at least using bluetooth or similar to automatically update
the patient's digital record...but I wouldn't bet on it.

~~~
TetOn
Presumably it's considered useful because there's a measurable error rate in
the nurse a) reading -and/or- b) recording the observed data. Assuming this
thing works properly more often, you've not only guaranteed you get the data
entered properly, but it's more likely to be right.

~~~
falcolas
I imagine this is compounded by the subject matter being measured. A simple
"click and lock the measurement" button would be invaluable when trying to
measure the height of a squirming child.

Simple, easy to read numbers that eliminate guesswork would seem to make a
nurse's job much simpler (or allow them to utilize people who are not
registered nurses to collect this data). There have been similar advances in
scales, blood pressure cuffs, heart rate monitors, etc. All are readable using
analog gauges, yet they progressed to digital devices.

------
ColinWright
Previous discussions:

<http://news.ycombinator.com/item?id=667689>

<http://news.ycombinator.com/item?id=899913>

~~~
Corrado
OK, it may be an old question but why doesn't HN search for old URLs before
allowing you to post? I missed this the first time around and am really glad
that it got posted (and glad you found the dupes) but most reposts are bad. I
think something like a URL check would be valuable.

~~~
ColinWright
There is a URL check, but it only finds exact matches, and only if the URL
tested against is in memory. If it's old enough and hasn't been accessed
recently, it's not found.

I thought this was in jacquesm's FAQ, but it appears not to be:

<http://jacquesmattheij.com/The+Unofficial+HN+FAQ>

You might suggest it to him, although he's very busy.

------
llimllib
Here's another visualization of the Gray code:
<http://billmill.org/static/perm4.png>

(it's from a few visualizations of permutations I did a while ago:
<http://billmill.org/permvis.html> )

------
clvv
A partially related topic(maybe many of you already know): I was learning
about minimizing logic expressions the other day, and I learned about the
Karnaugh Map, which uses Gray code for its axes. You can read more about it
here: <http://en.wikipedia.org/wiki/Karnaugh_map>

------
Bdennyw
When I looked at that pattern I though "Looks like one of Wolframs FSAs". And
after reading the encoding algorithm, seems like it is. See
[http://demonstrations.wolfram.com/ElementaryCellularAutomato...](http://demonstrations.wolfram.com/ElementaryCellularAutomatonRulesByGrayCode/)

------
T-hawk
Gray code was used as long ago as the Atari 2600 game system, designed in
1977. The system's clock for drawing out sprite graphics pixels counts in Gray
code internally. Why? Because a binary adder could have too long a propagation
delay. To increment 01111111 to 10000000 requires seven carry operations which
would not always complete within a single clock cycle. (A modern ALU has tons
of transistors to compute all those bits in parallel, but the Atari 2600 mass
market game console did not have the budget for that many transistors.) Gray
code was the solution. It always changes only one bit to increment a counter
so the operation was guaranteed to complete quickly.

~~~
DerekL
No, they didn't use Grey code for that, they used a "linear feedback shift
register". A LFSR has lower propagation delay than a normal binary counter.

The driving controllers did use Grey code.

------
orenmazor
extremely fascinating, but what problem does this solve that a standard analog
equivalent ruler/markings didn't?

~~~
izak30
The optical machine doesn't have to count lines, it can read it's place on the
bar from a small (2cm wide) part, rather than keeping an incrementer from the
bottom or top.

~~~
orenmazor
I understand that. but whenever I'm at the doctor's they still have a
graduated wall against which they put patients to get their height.

I'm all for digitizing things, but is there any reason to replace this?

~~~
uxp
In regard to digital measuring devices, they are much easier to recalibrate
than say a strip of metal with graduated marks. This can lengthen it's
lifetime of use, as well as speed installation and manufacturing time as
neither has to be as precise as the analog versions.

Another perceived benefit is that the indicator dial/display can be offset
from the scale. I know I've seen some height gauges that partially cover the
numbers that indicate their position. Digital solutions allow the measuring
marks to be independent of how one takes the measurement.

~~~
tedunangst
Why would a ruler marked in binary not need to be as precise as a ruler marked
in decimal? Changing the base of the numbers does little to affect how one
attaches it to the wall.

~~~
uxp
After it was manufactured, it could be calibrated and the counter could then
tell itself that 100cm is actually only 98cm due to manufacturing tolerance
errors, for example. Then, after it was installed on the wall one centimeter
too high, it could then be re-calibrated to reflect that error as well.

Abstracting the way the device counts (incremented binary marks on the wall)
away from the measurement (inches or centimeters, etc) with a re-programmable
digital device has many benefits.

------
fudged71
This is incredibly interesting. Thank you!

