

Ask HN: Sound-based syntax highlighting – what do you think? - TeMPOraL

Hey,<p>I want to drop here an idea that is bouncing in the back of my head for some years already, and that I absolutely, positively won&#x27;t have time to test in upcoming months.<p>We all have experienced the benefits of syntax highlighting in our editors. Apart from increasing readability, it helps spot typos the moment they&#x27;re made. I bet most of us have internalized it into an almost subconscious reaction like &quot;hey, that keyword I just wrote didn&#x27;t turn blue, I must have made a typo&quot;.<p>I was thinking about using sounds to achieve a similar effect. Say you&#x27;re typing a keyword, the moment you type the last letter and make a whitespace, your editor plays a sound. You expect it to be played, so if you don&#x27;t hear, you immediately know you&#x27;ve made a typo.<p>One could introduce different sounds for symbols, numbers, strings, opening&#x2F;closing parens, and maybe even bigger semantic constructs. You get slightly different sound when you close a function, when you close a class, etc.<p>One would have to make sure those sounds are non-distracting. Fortunately, one is rarely annoyed by the sounds of one&#x27;s own typing the keyboard makes, so this suggests it is possible to achieve this goal.<p>One slight twist I though about is to make every keystroke make a sound, with a pitch increasing with the speed of your typing, to make people like typing faster more :).<p>The simplest way to test it would probably be to write an Emacs exension, given the great facilities this editor has for plugging into the typing process, including recognition of semantic constructs. Unfortunately, as I said, while I&#x27;m dying to test this, I have other projects right now and a thesis to finish; maybe someone will give it a shot though.<p>Still, I&#x27;d appreciate any comments regarding use of sound as an additional sensory input to a programmer&#x27;s brain.
======
csmdev
Sounds become annoying with time. But visual cues are often automated and
ignored. This is why the current solution works best.

Because of the way we evolved, a sound automatically makes our brain alert. At
first it's ok. But with time we learn that there is no actual danger. And the
sound only becomes annoying. Making us alert for nothing.

Visual cues are treated differently. If something is deemed safe or accepted
by the brain, you automatically start ignoring it and focus on something else.
So an acknowledgement comes only when something is different. And even then,
we simply notice it. It's not an actual alert like sound is.

So the idea is bad. It goes against the way our brains work.

~~~
TeMPOraL
Thanks for your input. I don't agree with it though ;).

The brain can push sounds to the background in the same way it does with
visual cues, if there's no danger associated with them. For instance, you're
not annoyed by the sounds your keyboard makes when you type (and I know many
developers, who prefer loud, mechanical keyboards).

Also, try the following experiment: open a window during the day, plug in a
microphone and just record with it for a minute. When you play it back, you'll
hear many sounds your brain learned to ignore - cars passing by, hum of your
computer, kids playing soccer on a field nearby, etc.

For those reasons I think there might be a set of sounds that would not become
annoying with time.

~~~
csmdev
You're confusing white noise with independent audio cues.

Plus, I don't think anybody ignores keyboard typing sounds. They work just
like car engine noises. Audio feedback for a physical action. The example
you're searching for is keypad tones for smartphones. That's the concept
behind your idea.

~~~
TeMPOraL
> _The example you 're searching for is keypad tones for smartphones. That's
> the concept behind your idea._

Yes, that's generally the concept behind my idea. You're right, thinking about
it, there's a difference between this and white noise. Still, aren't keypad
tones for smartphones an audio feedback for a physical action?

------
LarryMade2
It sounds intriguing, lots of folks are critiquing off the cuff. I remember
Spell Catcher for the Mac has a you-made-a-typo sound, which was helpful, then
again it at times was irritating as it was like some guy behind your shoulder
kibitzing as you were typing and interrupted your flow.

Though I would think that maybe keysounds might be a good thing though, as an
audible confirmation you typed the right key... not as a punishment, just a
confirmation.

I'd go with something as minimal as possible at first and then try
variations... you might even be able to take some OSS editor and hook some
test code into it.

Lastly How many folks would want to turn on a Hacker's "Gibson Keyboard" sound
just to have the cheap thrill now and again?

------
smeyer
Maybe some people would like this, but I would find it __so __annoying.
Regarding "one is rarely annoyed by the sounds of one's own typing", that
doesn't mean I'm not annoyed by a lot of sounds. For example, I frequently
turn off the beep for alerts in my terminal and switch it to a visual flash
instead.

