From owner-freebsd-chat@FreeBSD.ORG Sat Nov 1 15:44:35 2003 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8458616A4CE for ; Sat, 1 Nov 2003 15:44:35 -0800 (PST) Received: from mta6.adelphia.net (mta6.adelphia.net [68.168.78.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C41743FB1 for ; Sat, 1 Nov 2003 15:44:34 -0800 (PST) (envelope-from wmoran@potentialtech.com) Received: from potentialtech.com ([68.68.113.33]) by mta6.adelphia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20031101234437.PNZA18834.mta6.adelphia.net@potentialtech.com>; Sat, 1 Nov 2003 18:44:37 -0500 Message-ID: <3FA44561.4070106@potentialtech.com> Date: Sat, 01 Nov 2003 18:44:33 -0500 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031005 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Terry Lambert References: <3FA29783.8060804@potentialtech.com> <3FA41FAC.664CC457@mindspring.com> In-Reply-To: <3FA41FAC.664CC457@mindspring.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: chat@freebsd.org Subject: Re: How do hackers drive? X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2003 23:44:35 -0000 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