From: david.brown@hesbynett.no   
      
   On 24/11/2022 05:06, Richard Heathfield wrote:   
   > On 24/11/2022 12:06 am, Ben Bacarisse wrote:   
   >> Tim Rentsch writes:   
   >>   
   >>> I think this problem would make a good interview question,   
   >>> provided care were taken to phrase it so the subtleties were   
   >>> still there, but possible points of confusion were reduced.   
   >>> Not that I know how to do that... :)   
   >>   
   >> I didn't make a good job of presenting it. It certainly didn't pique   
   >> anyone else's interest, but then comp.programming is not well populated.   
   >>   
   >> One thing that struck me was that I had not come across this before. I   
   >> was surprised that this was not one of those idioms that one absorbs   
   >> along the way. I suppose it is of limited use.   
   >   
   > The trouble is that it comes across as "is y >= x and <= z?", which is   
   > about as simple as it gets.   
   >   
      
   Some of us managed to misinterpret the post as being about as complex as   
   it gets!   
      
   I use circular buffers a great deal in my coding. For many of my   
   systems, there are UART communication ports (such as for debugging   
   output - when you don't have a screen or standard output, a UART does   
   the job). There is typically a circular buffer which is piped out to   
   the port via interrupt routines, and when the application code wants to   
   "print" out a message, it gets pushed into the buffer.   
      
   So the kind of thought needed for Ben's "puzzle" turns up in real code,   
   and I've seen people get it wrong.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|