

I can recommend switching to reading books. An e-reader with mild backlight is ideal for this use-case as you can keep the room pitch black and still be able to read. My time to fall asleep and rate of early wakeups has plummeted since I made the switch
I mean, putting in a bit of thinking before you actually hit the keyboard can be an incredibly effective form of optimization, if you can get for example an O(n^2) down to an O(log n). You’ll even save time on not having to rework the thing later, and if you build on poor foundations, chances are you’ll stumble upon fundamental architectural challenges down the road, which can be extremely costly in terms of development time.