I work as a freelancer from home, so my answer might be less interesting to people at an office, but I've found that at home I'm mostly just doing the things I wanted to do at the office when I worked in one, but felt uncomfortable doing there. These include:<p>Taking short (15 - 30 mins max) naps if and when I need them, which pretty dramatically helps me creatively problem solve.<p>Going for a long-ish walk outside. This is by far the absolute best thing I've added to my days. I feel more energized after, I mentally and emotionally am much happier, and physically it made me slightly fitter. Plus it helps relieve some of the problems I know I'm developing sitting all day.<p>Podcasts. This one I only do when I'm taking a break, I can't focus and get into a flow listening to other people talk about interesting topics. Awesome for those walks though.<p>Chat with other developers and friends on slack or some other messenger. Usually at some point during the day I'll have a 15 minute flurry of messages with a developer friend about some side project or something we think is cool.<p>And finally, this one is half work half fun, but I'll research something I think is cool or would be useful. Might be a service, framework, product, methodology, anything at all. I probably spend an hour or so of my work day, every other day, on researching something that's not an absolute necessity to the work, but might benefit it. In some cases it's paid off big time. Mostly though it just keeps me happy, interested, and hopefully a little sharper.
When I was working, I settled into a rhythm of being in the office for about 4 hours a day, with almost no free time. No YouTube, no social media, not even checking personal e-mail accounts. I think I would check HN, but I would save the articles to read later and not read them in the office.<p>It also helps to write down the major things you want to do before you get in the office. When you get there, just start doing it rather than slowly warming up. Also I find that test-driven development helps get rid of this "warm-up" procrastination.<p>Not everyone can do this, but programmers can sometimes work themselves into that position (e.g. work for a place long enough that people don't question your hours.)<p>Though I would usually take a break for tea (with no computer) and occasionally a nap... I think those are productive uses of time.
I'm going to go on a bit of a curve here, and say take a walk -- the motion helps me think better and I think there have been studies to that effect.
I go for half-hour walks once or twice per day, or read HN or something. My /etc/hosts file is littered with filled-in rabbit holes like Reddit, Facebook, Twitter, etc., but HN gets a pass for now.
I work. Now, there are a couple of caveats here that are integral to what I've said. First is that I <i>love</i> programming. I actually go home at night -- well, I work from home, but you know what I mean -- and I write code for side projects or contribute to other open source projects. I also love my job and the people I work with. I would not do this for a company that shit all over me or didn't go the extra mile for employees. Having worked for startups my entire life, I've never actually been in a work environment where the work ran out -- there is always something to upgrade, refactor, or fix -- but I suppose if it did, I'd use that time to research things related to work I see in the future.
I work from home, and free-time is not something I have, but it's an illusion that plagues me, like an evil force begging me to step away from work and play with the dog, take a nap, or read hckrnews.
Researching ideas that previously came to my mind minutes before when I was busier. I write down these kinds of ideas to save them for later and them I put them out of my mind as I'm trying to do my work. Or, I just browse HN.<p>Usually I look at this through my phone as I'm walking somewhere. Taking a 4-5 minute break for a walk is important because sitting all day is not healthy. Sometimes the walk has a purpose such as going to the coffee machine. Sometimes it's just randomly moving around then go back to my seat.
Apart from binge-read HN?I usually bring whatever I'm reading and sneak a few pages whenever I'm waiting for feedback or getting a little stir-crazy.
Productivity doesn't happen to me at office, so i have conversations with people on various topics of common interest - which further opens up avenues for exploration.<p>I sometimes prefer asking the hard questions, which we usually take for granted and try to get another perspective. Its fun and intellectually engaging when you actually sit down with a person and have a conversation rather than text!
I set goals for what I want to accomplish that evening and over the weekend. My wife and I have a running shared todo list that we reorganize and prioritize when we have free time. By the time we get home, we can start getting things done instead of watching TV all night.
I network. I will get coffee with folks (managers, ICs, Execs) who I randomly bump into in meetings, code reviews, fire drills etc and find out what they are working on, future job openings, collaboration opportunities, new product ideas, etc.
I try to take walks. I also check up on stuff that I enjoy as a hobby, such as Youtube channel subscriptions for car videos and other interesting topics.<p>It gives my brain a bit of a break to think about other things for a little while.
I've been playing Kerbal Space Program at the end of the day at work lately. It's fun as heck, and almost always becomes a team activity involving beer and fun mishaps.
Recently, playing <a href="https://meatshields.com" rel="nofollow">https://meatshields.com</a>
Two 10 minutes breaks during the day is enough to have fun.
Asteroids, Ms. Pac Man, Ping pong, a walk outside, etc.<p>Just about everything else can be attributed to work-related socializing or efficiency enhancement.