Don't know if you were trying to be facetious but I downvoted because this is potentially dangerous advice. Just because he can't concentrate with coworkers and other noise around, doesn't mean he has ADHD.
OP: For noise, really good noise reduction headphones are the key to my sanity in the workplace.
As for internet distraction, I found two things helpful. 1) Eliminate non-essential immediate/push notifications. and convert them these tasks to on demand type tasks. Turn off twitter notifications on the iphone, shut down your IM client, and only check your feeds when you want to, not when they get pushed to you. I find the interruption of the notifications plays hell with my concentration. 2) install rescuetime and track (or even block) your internet sites.
Yeah, definitely don't just take Adderall. I'm diagnosed with ADHD and I take Adderall every day and I still have a lot of trouble focusing. Especially when the problem gets boring. Especially when I want to solve a much more generic problem than the one I really need to get done. Especially when I'd rather be outside doing God knows what. If you seriously suspect that you have trouble focusing even on things you are interested in--and I mean seriously suspect; I routinely get distracted from very enjoyable activities like eating or sex, so it's not just "I can't focus at work"--go see an appropriate professional.
Honestly, I tend to use my imagination to concentrate. I mean, really stupid things like imagining that my code is slaying dragons or something, or that I'm actually developing software for an asteroid mining platform. Really, use whatever it takes to make yourself INTERESTED in what you are doing.
Specifically who would be considered "an appropriate professional"? Just go see my general practice physician, or is there someone more specifically I should go to instead?
It's hard to say. I'd probably ask your general practice physician for a referral to a therapist that specializes in adult ADHD. And I say therapist rather than psychiatrist intentionally: A therapist is usually someone with a PhD in psychology or counseling, and is less likely to take a purely "better living through science" approach than a psychiatrist, who is usually an MD specializing in psychological health, and is more likely to simply prescribe drugs and send you on your way. If you see a therapist, and they recommend medicine (they usually will), they will write up a recommendation to your primary physician to prescribe you that medicine.
i've changed my opinion about it several times as well. it seems that when you're on it, you find things you don't like about it (particularly the anti-social bit). but when you're off, you can see flaws in substitutes like caffeine (legitimately turns you into an insomniac).