First off, adapt my coding style re: white space. Long ago, some clown wrote a joke article on best practices giving code examples with like 12 full tabs of white space everywhere he could; making code impossible to read without a 12 foot wide screen or in .0001 font size. A lot of programmers assumed it was credible and started doing it - even though it was really obviously not good practice. It drives me crazy. Come on guys, I say, you're smarter than that. 50% or more white space on the 240 column page doesn't make any sense. Put the first curly brace on the same line as the function or class signature (with a space or two, not a tab or two in between). Use 3 spaces to indent for code levels (5 if you have a partially blind team member). Then use a blank line here and there in the code to put things in smaller logical blocks.
Here's another example of something that's bone-headed. I'll first tell you this doesn't come from an inexperienced half-wit. It's in some very good code by a guy who was able to get a very advanced technique working while most of the rest of the world is still scratching their heads about it. This is what's frustrating to me. Why are good programmers so bone-headed about formatting their code?
for (Iterator<Byte> iterator = collection.iterator(); iterator
.hasNext();) {
byteArray[i++] = iterator.next();
}
Now just look at the format of the for condition. If you actually think about it, isn't that an entirely illogical place to put a line break? For one, I had plenty of space to see the entire for ... { on one line. (Luckily, this guy doesn't use multiple tabs to indent.) But if he absolutely couldn't live without breaking it up, why there in the middle of a function spec? There's a perfectly good delimiter just before that - the semi-colon - that would have made more sense as a break point. My vote is to put the whole condition and the opening { (that goes with the for) on the same line. He also ends well - easy to match the closing brace with the "for" that opened. (Some people - and tools (Is that redundant?) - like to put that in strange places too.)
Second - make note of the focus of each programmers expertise and if there's a significant difference, be sure that's reflected in which part of the code each programmer works on. An expert in industrial control in robotics, an engineer who primarily works on the complex mathematical bits, and the guy with the CS degree who impresses himself with totally obscure code construction (the less understandable, the more sophisticated it seems, right?) are all going to write code differently. Where there are these significant differences, break the work up so that each individual strength matches the job.
When there aren't such differences, agree on coding style and in any case - code review, code review, code review. Quite frankly, I've been through a lot of sloppy spaghetti code in my life (12 times down the line in debugging and changes by the maintenance group, or the result of cock-eyed integration) and was well on my way to being an expert on the code after 2 minutes of talking to the last guy who worked on it. (Side note: There is in fact, a point at which it's better to rewrite the code than to continue adapting.)
Personally, I prefer to work at home on my own as well. I've never met a programmer who prefers or works better in a cubical surrounded by lots of other programmers, discussions, and interruptions. But you have to get used to working in a team, and that means taking the time to get together and discuss (not fight) what you're doing. That's actually part of the job - it really is. Much better to accept it and do it systematically, efficiently, and effectively. And while we're at it - it's also part of the job to spend time transferring knowledge and information to the people who write the documentation (some of which you may need to write yourself). And when you're experienced enough to up your level of responsibility, you may even find yourself chatting more often with managers and people in marketing, etc.
Coding alone is a hobby. Professional software engineering is a multi-faceted occupation.