My simple rules when working from coffee shops:
1. Don't take up space when the place is full
(when the place is empty they should like to have you in)
2. Order reasonably - not just one coffee for 2 hours. Get at least 3 items for a few hours session, preferably also food
3. Be nice and over generous with tips