I change the chip in my car every 300 miles or 3 weeks whichever comes first.
The important thing as to whether the battery should be disconnected or not is, if the air/fuel stuff in the new chip is similar to the old chip then just swap them.
However, if you've been using a "brand A chip" and want to test a "brand B chip", then you should disconnect the orange wire for the swap. After the swap, drive the car around town for 3 or 4 miles,
then begin the evaluation of the new chip.
For a closed loop chip to learn fueling, you'll need to run
- warm/hot idle
- some 10 - 25 MPH driving (hopefully in stop/go traffic)
- several brief part-throttle accels
- finally, add a few miles of 3rd and 4th gear cruise
- bake in a 180 degree engine compartment for 30 minutes and shazam! your chip is all "learned-up".