why does my positive battery cable spark when I try to place it on the terminal? on 2000 Ford Expedition

I replaced the starter. I attached the neg. cable and when I tried to attach the pos. cable it sparked. If the starter wires are connected backwards would this cause the sparks to occur when attaching the battery cables to the terminals?

Asked by for the 2000 Ford Expedition
does the battery go dead if you leave it connected overnight?
I first thought the battery was the problem because it was dead. I recharged it twice with it starting. The next time it would not turn over. I changed the starter and I believe my friend crossed the wires causeing it to spark when the cables were attached. either that or I have a ground some where. This problem only started when I replace the starter.
1 more answer , 1 more comment
There is some keep alive memory that draws power, and some cars will turn on lights and other things as if you just turn off the key. Some spark is normal, a big spark is worrisome. If you hooked the wires to the motor side the starter motor would try to turn and that would be a good sign you hooked it up wrong.
should I leave he battery cables attached when installing the starter? this might give me a indication the wire are attached correctly. The starter might engage if I have the wires crossed.