Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Nov 2003 18:44:33 -0500
From:      Bill Moran <wmoran@potentialtech.com>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        chat@freebsd.org
Subject:   Re: How do hackers drive?
Message-ID:  <3FA44561.4070106@potentialtech.com>
In-Reply-To: <3FA41FAC.664CC457@mindspring.com>
References:  <3FA29783.8060804@potentialtech.com> <3FA41FAC.664CC457@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:
> Bill Moran wrote:
> 
>>When I am about to go somewhere in the car, I take a moment or two to
>>plan out the optimal route to get to my various destinations.
> 
> I use destination proximity planning, so te last leg is provisional;
> for example, last night I went up to San Francisco, and there was a
> chemical spill that blocked the left two lanes of 280 North, near
> Belmont.  Hearing about the spill on the radio, I was able to alter
> my route and avoid unreasonable delays.  If I had planned every inch,
> then any deviation from the route would have been impossible, unless
> I already knew the area well (which is not always possible on things
> like long trips).

I suppose I oversimplified the process.

findshortestroute(1) is run on the current destination list (including
all known information about construction, etc) prior to the start of
the trip, and the results are cached for drivecar(1) to use.  (after
all, I have to free up CPU cycles for importent processes like
watchforhotchicksd(8) (which runs in the background all the time), and
becarefulofradard(8), and the computationally-intensive
singalongtotheradio(1), which is usually spawned by the takeacartrip(1)
shell script that also starts drivecar(1))

Of course, if new information (such as an accident report) renders
the cache stale, drivecar(1) will exec() findshortestroute(1) with the
current location and the list of remaining locations to update the
cache, which drivecar(1) can then use to alter its current processing,
if needed.

>>If there are multiple destinations, I usually do a little thinking
>>to determine what order to visit these destinations in order to make
>>optimal use of my time.
> 
> Travelling salesman problem.  People familiar with the problem (CS,
> graph theory, actual travelling salesmen, etc.) tend to do this;
> other people do not tend to perceive it as a problem.

Hmmm ... I wonder if I could market the findshortestroute(1) program
to these other folks.

>>This is usually modified by the desire to choose a route that includes the
>>fewest number of left turns possible (since right turns are cheaper than
>>left turns, time-wise, and complexity-wise - you can make a right turn on
>>red for crying out loud)
>>
>>Other programmers drive this way as well, correct?
> 
> Not entirely.  8-).

Oh ...

>>The revelation is that I'm starting to understand that many non-programmer
>>_don't_ generally evaluate their car trips like this.  I mean, I know that
>>most people will plan out a route when they're going on a long trip, but
>>this planning procedure occurs _every_ time I get in the car, even if I'm
>>just going to the convenience store for some chips (I have to evaluate the
>>fact that there are two convenience stores equaldistance from here, one is
>>a less complex journey, while the other has a better selection!)
> 
> Most programmers do not drive this way.  They compute the result
> once, and then use a cached copy for subsequent trips.  8-) 8-).

Well ... like I said elsewhere, findshortestroute(1) actually maintains a
long-term cache of commonly visited destinations, and maintains this cache
by using an elaborate event-driven expiration policy.

I mean ... THAT's more like how you guys drive ... right?

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FA44561.4070106>