Rather than focus on specific tricks, I've found the best thing to keep me focused is to set up lots of aggressive short term goals _and_ have a fixed time when I will stop working for the day. Just having daily goals isn't enough - it's too easy to procrastinate and then work long hours to make up for it.
I also try to schedule a two hour chunk each day (preferably near the beginning) with minimal interruptions and just leave emacs and shells open. Regardless of how many meetings or other distractions come up the rest of the day, I can guarantee some amount of forward progress on the technical front. It's actually pretty amazing how much can get done in two hours if you're very focused.
I also try to schedule a two hour chunk each day (preferably near the beginning) with minimal interruptions and just leave emacs and shells open. Regardless of how many meetings or other distractions come up the rest of the day, I can guarantee some amount of forward progress on the technical front. It's actually pretty amazing how much can get done in two hours if you're very focused.