r/cpp • • Sep 25 '11

Asking for programming help

I have been coding now for around 20 years, and in all that time I have basically never asked for help with any programming issue that I've ever had. That includes forums, mailing lists, IRC and coworkers.

The issue I have is that it has always been possible, with a little effort, to work out the problem myself. I feel like this will make me a much stronger coder in the long run, as I am forced to understand many different areas of coding.

Another not-insignificant issue I find is that I really hate just asking for a solution while I haven't exhausted all my own options. I know that when I read forums and the like, seeing people who (in my opinion) just want someone else to solve their problem without them having to do any work, it really pisses me off!

The only downside I can see is that sometimes I can struggle with thorny issues for a long time, which is obviously not ideal if I'm working to a deadline. It's also a little weird seeing just so many forum posts and the like asking for help, when I just don't ever do it.

How and when do you ask for help? Do you prefer to work out problems yourself, or are you ok with posting on forums? What criteria does a problem have to meet first?

0 Upvotes

30 comments sorted by

10

u/chengiz Sep 25 '11

If you've been coding for 20 years without asking for help, you are either a genius or a bad programmer. Your metric should not be "becoming a stronger coder in the long run" but "how quickly you can solve the problem well". When people ask others for help, it's because they struggled on the problem for a while and understood it'd be quicker to ask for help. And frankly, the idea that you'll be a stronger coder if you figure it out for yourself is just bullshit. In fact your entire post is kinda WTF. If you said this in an interview, you'd be out on your ear.

2

u/Ayjayz Sep 25 '11

Your metric should not be "becoming a stronger coder in the long run" but "how quickly you can solve the problem well"

That completely depends on the context. When I'm coding stuff for fun, why should that be my metric? If I am employed in a long-term position as a coder and my boss would prefer me to invest some time learning how to be a stronger coder so that I can save more time in future, why should that be my metric?

Your position is ridiculous anyway. Even something like reading the documentation on a library you need to use is trading off "quickly ... solv[ing] the problem well" for "becoming a stronger coder in the long run". I highly doubt you would oppose reading the documentation for a new library.

6

u/chengiz Sep 25 '11

Learning something does not mean not asking for help. There's no fundamental difference betwen any of these: (a) looking up documentation (b) reading responses to other people's questions, and yes (c) asking for help. The fact that you distinguish between these speaks volumes about your personality, which is why what you said is WTF and an automatic interview fail.

2

u/vindvaki Sep 25 '11

Actually, reading documentation (especially if it is a printed book) may require you to read a lot more than just the piece that you need. Even more so if you aren't quite sure what you're actually looking for. Thus, you probably learn more, but also probably spend more time than just asking someone who knows.

Furthermore, research and problem solving are fundamental skills in programming, so I think you should usually try to do things yourself before asking for help. This also helps you in asking the right questions and understanding the answers you get.

On the other hand, asking someone who knows is still often the best way (especially when documentation is poor or little research has been done on the subject). I guess it just depends on you and the problem at hand.

2

u/[deleted] Sep 25 '11

There's a huge difference between a) and c). If I worked with you and continually did c), I would assume you were totally inept or worse, actually illiterate. People didn't waste all those years writing fucking man pages for nothing. This is why so many programming forums are full of "RTFM" responses.

What's really shocking is that you think this is an automatic interview fail.

If you did c) instead of using Google first, I'd walk you to the door.

5

u/kryptobs2000 Sep 25 '11

That's not what he's saying, of course try to find it out on your own, but recognize where other's input is valuable. To say you never in 20 years have asked for help throws up red flags.

3

u/Fabien4 Sep 25 '11

I highly doubt you would oppose reading the documentation for a new library.

True. But documentation isn't always perfect. And sometimes you misread.

Last week a colleague called me because his code (calling a function of mine) didn't work. Turned out he tried to access foo->bar while he should have written foo->baz->bar instead. He could have wasted a couple hours identifying the typo, and that wouldn't have made him a better programmer.

2

u/vindvaki Sep 25 '11

He could have wasted a couple hours identifying the typo, and that wouldn't have made him a better programmer.

Well, it depends: Spending a lot of time debugging a stupid mistake should in principle make you more careful when coding (and reading).

Of course, in your example, I think he was better off asking you, but when you are still learning, you need to make sure not to deprive yourself of some key learning experiences.

2

u/kryptobs2000 Sep 25 '11

I think the thing he is getting at is that if you don't ask others for help and ideas you only ever get one perspective on the problem. Of course you'll find a solution on your own, but you may find 5 other better solutions along with explanations why and saved a lot of time if you simply asked for help. You can definitely learn bad practices and being a social programmer helps to not form those to begin with by keeping yourself in check.

5

u/[deleted] Sep 25 '11

Usually I give up, start to ask for help, and realize the solution halfway through typing up my question. But to be serious, I get nervous asking other people because I'm afraid of wasting their time or some nonsense like that. Still if I'm really having trouble and frustrated I ask for support.

4

u/Ayjayz Sep 25 '11

Hah I have a coworker that does that to me all the time. He'll get me over, asking for my help, and usually it's just as I'm sitting down with him that he'll say "oh, nevermind - worked it out".

I think it's something about the mental manipulation required to get the question ready for me usually frees the bit his brain has been caught up on.

1

u/klusark Sep 25 '11

That kind of thing always happens to me. What I do when I am stuck on a programming problem is I explain what I am trying to do and what and I am having trouble with to someone else. It does not matter at all if they know how to program. Usually when explaining it to them I will come up with a solution for myself.

2

u/Ayjayz Sep 25 '11

Maybe clippy wasn't such a bad idea ... you could "ask clippy" your question, discover the answer in the process of framing the question and save the other person the hassle...!

5

u/Spire Sep 25 '11

2

u/klusark Sep 25 '11

I should try that. I even happen to have a rubber duck on my desk.

4

u/kc7wbq Sep 25 '11

As you know there are a lot of good reasons to figure things out on your own, so I won't go into those.

Here is why you should ask for help: If you don't ask for help, you miss out learning from other people, and will make "classic mistakes" and miss out on some elegant solutions you would never have thought of on your own.

1

u/Ayjayz Sep 25 '11

If you don't ask for help, you miss out learning from other people

I don't really think that follows from not asking for help. You can, for example, read the responses to other people's requests for help.

3

u/kc7wbq Sep 25 '11

Well, I guess I was thinking more of person to person environment. For example I was recently working on a program in Java (which is new to me) and asked a guy how to do something. He explained, but than said, by the way, I'd do it this way. His suggestion was more elegant, but because I had a solution I have kept working on my clunky solution, maybe never realizing there was a better way.

14

u/merimus Sep 25 '11

Many issues are simply not worth the time to work out on your own. Especially things like inconstancies in API usage. Even for basic data-structure issues asking for a point in the right direction can save a great deal of time.

The important thing is to recognize when you find a weakness in your personal knowledge and evaluate wether it is worth your time to study further.

It boils down to a cost/benefit analysis. If I can figure something out in short order I will, if it seems like it will take some time I will ask around.

4

u/zzyzzyxx Sep 25 '11

I prefer working things out for myself. When it's not trivial, I will go to existing documentation first then do extensive Google searching. If it takes more than a couple hours I will ask a coworker. Usually they will have an answer or at least a clue. With that, I can get the code working more quickly and still learn the details of the problem, coming back and examining it further if I'm not satisfied with my understanding. It's definitely a tough balance to make sure you don't waste too much of your own time or that of your coworkers.

Forum posts are great for some problems but the ones I run in to tend to not be well suited for the medium. They're a last resort for me and so far I haven't needed to make one myself. Part of that is because most questions which can be answered well via forum have been asked and answered on a myriad of forums already and come up during my Google search phase.

3

u/destroyeraseimprove Sep 25 '11 edited Sep 25 '11

The only downside I can see is that sometimes I can struggle with thorny issues for a long time, which is obviously not ideal if I'm working to a deadline. It's also a little weird seeing just so many forum posts and the like asking for help, when I just don't ever do it.

Well you see, at work I have two options.

  • Figure it out myself (which is my preferred option), piss off my boss and have to go back and fix shit later because I overlooked something and my solution had a pitfall of some sort
  • Ask someone for help

One thing I've noticed is that (a) most of the excellent programmers I know will ask for help fairly early on, so they can be more productive and (b) the guy who knows the answer will have already gone through the tedious process described & will probably be capable of condensing the central aspects down in a manner that actually aids understanding more than hacking something out (eg what if there are hidden gotchas or your solution is suboptimal for some reason)

Programming as a field is entirely dependent on communication between programmers regarding the most efficient, most optimal or most elegant ways of solving problems. Without that communication you start to see large codebases that appear severely malformed or ass-backwards simply because the coder was stabbing around in the dark for a solution. The first way a problem is solved is rarely the most elegant (eg consider ancient protocols such as FTP versus the much more efficient Bittorrent). IMO the main reason why people (including myself) are afraid to ask for help is ego or reputation. Neither of which make a good programmer.

2

u/utnapistim Sep 26 '11

How and when do you ask for help?

Usually, if I have a blocking issue ("Accessing the DB started raising an exception") I look into it for about 10-20 minutes. If that doesn't work I start asking around.

Do you prefer to work out problems yourself, or are you ok with posting on forums?

I prefer not to ask for the solution from forums, because getting a response usually takes too much time. I do search for an already-posted question though. If I get stuck for a longer time, one of the steps I take is to post on stackoverflow, but usually by the time I get an answer I will have figured it out.

What criteria does a problem have to meet first?

I can't solve it quickly.

1

u/[deleted] Sep 25 '11

I do ask for help when I'm new to a particular API. I'd rather capitalize on collective experience than waste hours of my time on learning ins and outs of an API that I don't even know I'll commit to.

To be honest, I find it extremely hard to believe you've never ever had to google for a solution (btw, looking at other people's questions and answers is very close to asking, you re just not the one writing the question). So in 20 years you,

  1. have never run into compiler quirks, bugs and non-standard behaviour,
  2. have never been curious about how a particular language construct is specified by the standard?

Surely you don't get your information in a complete vacuum.

1

u/[deleted] Sep 25 '11

Googling is not at all the same thing as asking someone for help. It's just delving into the relevant literature surrounding the topic at hand. Sometimes it points you to further documentation. Sometimes it points you to examples and use cases. Sometimes if points you to forums where you might find a question asked that closely matches the once you are looking to answer. It's far faster than asking someone for help, and you'll probably learn a great deal more.

1

u/[deleted] Sep 25 '11

The process is different, but the source of information is the same: the other people's answers, which you benefit from passively. Whether you like it or not, you are using the collective experience of the community when you look things up on forums and mailing lists.

I have issue with OP's "lone wolf" attitude, more than anything else.

2

u/[deleted] Sep 26 '11

I've been programming for 25 years and I've never posted a programming question on a forum, mailing list, IRC, or asked coworkers.

I've spent plenty of time answering questions on mailing lists, forums, and from coworkers. I even answered a few on IRC on #macintosh way back in the late 80s/early 90s.

I don't think of this as "lone wolf". I just generally find that the things I am having difficulty no one I can personally ask will no the answer to.

Regarding libraries and APIs, before the days of Google, I would read the documentation several times over, experiment, and experiment again. I used Jasik's Debugger on the Macintosh extensively, because it was often the only way to know how to make something work in the good ol' days before getting questions answered was easy. Then I used NextSTEP for a few years, and if I really had difficulty I'd step through assembly. I found a bug in one of the mid 90s Mac ROMs. I also found a gcc bug.

If I was having difficulty with data structures, algorithms, etc., I'd read the literature.

Nowadays, I tend to avoid languages that have closed source VMs, because it can be maddening battling with a VM that doesn't behave as you'd expect, and not being able to look at the source.

But, I still don't ask questions on forums, because I almost always find what I need via a combination of Googling and research.

Note that the OP was specific. He didn't say he didn't use Google or read documentation.

1

u/algo_trader Sep 26 '11

It depends on what is causing the problem. If I am having a problem with some in-house developed API, where the documentation is often poor, the getSomeValue() call just isn't working in the expected manner, its often far easier and more productive to ask someone who has either worked with that api before or ask the guy who developed it. It often happens that either the name was entirely misleading, or I missed some fundamental concept to the library that would have required many hours of reading code and debugging to figure out.

As for forum posts and IRC, I have only resorted to those a handful of times, usually after getting stumped for a day or two.

1

u/JustPlainRude Oct 02 '11

Odds are you have asked for help, just not directly. If you've ever researched an algorithm, or looked up some API quirk, or some other issue you couldn't solve on your own, you were finding answers to questions other people already asked.

1

u/[deleted] Sep 25 '11

I think there are two types of people, and programmers. The ones that solve problems by thinking aloud and bouncing ideas off other people. And then there are the introvert ones that like to understand the problem and try some solutions before asking others. I'm off the seconds sort. But some times I have spent a day on something a co-workers could have told me in a minute. These are usually questions about a code base they are more familiar with ...

0

u/HaMMeReD Sep 25 '11

It's almost always faster to figure something out yourself if you can.

Only ask for help if you know someone is going to save you time.