Record the last successful upload port and use it

This records the ports last identified with a given device so that if you use it
on the same machine, it will likely work on the first port we try. This helps 
keep us from hammering on ports that aren't the device we intend to talk to and
should improve stability of both the uploader and the devices connected to it.
a debug mode.

On Tue, Dec 30, 2014 at 10:49 AM, Kent Quirk <notifications@github.com>
wrote:

> In lib/serialDevice.js
> <https://github.com/tidepool-org/chrome-uploader/pull/43#discussion-diff-22330294>
> :
>
> >        // now walk all the matching serial ports and try each one
> > -      debug(ports);
> > +      // debug(ports);
>
> I can see deleting comments that are functional code that's unmarked.
>
> Debug statements that are clearly there to be uncommented when someone
> wants to have a little more information for testing don't mislead. This is
> code under active development and a few bits of scaffolding to save time
> later are not a bad thing.
>
> I've already had to deal with multiple instances of people deleting live
> code that was not currently in use by the set of drivers we're releasing,
> but is important to work under process. Can we please try to distinguish
> between things that block maintenance and things under active development?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/tidepool-org/chrome-uploader/pull/43/files#r22330294>.
>