deshalb oder denn?

denn and deshalb are easy to mix up, but they point in opposite directions:
- denn + reason: Ich bleibe offline, denn ich brauche eine Pause.
- deshalb + result: Ich brauche eine Pause, deshalb bleibe ich offline.
The word order gives it away: after denn the subject comes first, after deshalb the verb.