I`s sure if your working in a group that there will be people there to help out
but as you know there are times when you work on your own projects and and you
do not want to show anyone the code.
How do you go about fixing your problems
Isolate the issue and eliminate traces of your project so that you can publicly ask for help. I do it all the time, even for public/open-source projects.
Edit: I posted this at the same time as http://www.cplusplus.com/forum/lounge/129118/#msg697875 and this topic is at the top of this forum but the other topic is listed as most recent on the main forum page, resulting in login info being absent on the main forum page. Weird stuff. If the same thing happens but in the same topic, as it often has in the past, the topic is duplicated in the post listing of the forum.
I make an example of my problem. Usually 20 lines or so with generic terms. It helps demonstrate a problem with a concept, not with the specific code I'm working on. That's more effective when asking for help anyways.
Big closed-source projects are a team effort, there is always someone else to talk to.
What kind of a situation you're imagining that a programmer wouldn't want to show anyone their code?
Well obviously not programs that run in the console or programs that a lot of programmers can make.
The thing that was going in mind was, later maybe this year or next year I will be starting Objective-C and I will be programming iPhone apps and tweaks (Cydia). And I would`nt wanna be giving the code for them now.
Just out of curiosity, do companies have some sort of policy in place for this?
Well I`d imagine as giving away code isn`t the way to go and usually companies have people working on a certain thing so it`s not like that person/s is going to know most of the code for the program.
And I`m sure they will have a policy to ask someone in the company if you get a problem and not go online
Most of the time, you can just describe your problem well, but if you do need to share a small snippet of code, why does it matter? I mean, you want help because the piece of code you're showing is broken anyway, right?
I feel like you're kind of asking two different things here.
The first is if you're working on your own code, how do you show problematic code to others. I think Stewbond nailed this one.
The second is if you're working in a team for a company, how do you resolve problems. In this instance, there isn't likely going to be a case where you don't show other programmers your code. It's not like it's private code and legally it'll probably belong to the company/client you're writing it for.
This question is too vague, to be honest. Problems manifest themselves in numerous ways. Often times, we pair program ( http://en.wikipedia.org/wiki/Pair_programming ) when we're doing something tricky. Other times it's a simple as looking it up in a book or online.
Well I would probaly just go and see what the problem is then make a demostration and post it to a forum and ask it anybody knows why it is not working.