1) I have a little switch on my laptop that turns WiFi on. When I need to focus, I just turn it off. I only allow myself to turn it on if it's a development-related thing I need to do.
2) I use my down time (subway, boring classes, etc.) to work out what I need to do next. I start with a high-level todo of features then iteratively break them down to smaller pieces, usually going as detailed as function signatures and database table design. Not only does it make it easier to get work done once I get to the computer, but putting the design of a feature in the back of my mind for a few hours will usually bring out the design flaws before I write a single line of code. (My red pocket Moleskine works great.)
3) If I haven't done the feature design ahead of time, when I start a new complex method, I write the method as English comments, one step per line. After that, I write the implementation of each comment in code.
+1 on 2) and 3). In my case, unless the logic of the program is very simple, I always try make a sketch of what I am going to program before I start -- either on paper or text editor.
Of course, YMMV. Others will be more productive just plunging into the program head first.
Leave Yourself a Place to Start (or: Leave work with something small broken)
is something I do all the time. I work Java at my day job, and have found that leaving out the semi-colon at the last place I touched (so that eclipse shows a compile error) really helps me get back to what I was doing the previous evening (or the friday before) so much quicker.
And the last point, get to know your tools. I am currently trying to learn emacs, but I have pretty much mastered eclipse (and other tools that I use). Not having to use the mouse to get to different views and perspectives to browsing around for files, absolutely necessary for improving your productivity at work.
In addition to the last point, getting to know additional tools outside of the development environment really helps. I read websites like lifehacker and have learned of tools like Launchy (on windows). Yes, it takes a while to get used to these tools, but once you have figured them out and configured them to your liking, you can really fly. Though i do get made fun of at work, considering the number of shortcut key combinations that I keep in my head. Invariably, someone will stop by to ask me for a key combo, and I have to type it out because a lot of the times its muscle memory.
I thought this was a great point too, but I did not take it as literally. I find that if I walk out the door with something in my mind that needs to be fixed, a real problem that I'm not sure how to tackle, that I'll daydream about it while doing other things. By the time I get back behind the keyboard I usually am anxious to try out at least one strategy so I dive right in and get working.
I do the same. The remaining problem is actually focusing on the task - I try to tackle that by doing (with a timer) "sprints" of 10 minutes of work (without allowing self to be distracted at all for that 10 mins). Once 10 mins is over, I take 2 mins to goof off, then repeat. After a few cycles I am in the flow usually.
Being a webdeveloper I found everytime I open my browser with igoogle I would get sidetracked by some story.
For what it's worth, iGoogle has a link in the upper right that lets you toggle between the "Classic Home" and "iGoogle". You could use Classic Home mode to do any necessary Google searches quickly without having distracting news articles on the page (and without having to move the keyboard focus to a toolbar search box).
I agree with the guy, but my problem lays not in not knowing how to be more productive. The real issue is to get to actually follow those tips.
Every now and then I see myself buried in work and having to work 24x7. When I get like that, after solving the most imediate problem, I kinda reboot to the point where I actually follow good guidelines for productivity. After a few months, though, I get all burried on work again. My goal is to make this cycle so big that I progressively need less reboots. But it's hard to keep on track all the time with such a distractive and beatiful world around.
2) I use my down time (subway, boring classes, etc.) to work out what I need to do next. I start with a high-level todo of features then iteratively break them down to smaller pieces, usually going as detailed as function signatures and database table design. Not only does it make it easier to get work done once I get to the computer, but putting the design of a feature in the back of my mind for a few hours will usually bring out the design flaws before I write a single line of code. (My red pocket Moleskine works great.)
3) If I haven't done the feature design ahead of time, when I start a new complex method, I write the method as English comments, one step per line. After that, I write the implementation of each comment in code.