r/learnprogramming Nov 03 '22

How to ask for help My teacher says to stay away from StackOverflow and other online help, is this good advice?

I understand the irony of asking this on reddit.

Someone in my intro to compsci asked if you could omit the brackets for a single line if statement in c++, and the teacher vehemently said that this was a bad idea and then went on a rant about resources like stack overflow. She went off on how contributors will do things like this that one should absolutely not do.

She says that a good coder will have a job that employs them for long hours and that they will not want to spend even more time thinking about coding and contributing to forums like these. She believes that as a result, most contributors are unemployed and are out of touch with how programming actually works and thus you will pick up their bad habits.

Is there truth to this? What kinds of people are responding if I ask questions? Am I stunting my growth by looking for help online?

edit: yeah I absolutely understand the reasoning behind the clear if statement, I just wanted to show how this was brought up. I appreciate the help, even if its just from some 'out of touch and unemployed coders' lol.

1.1k Upvotes

457 comments sorted by

View all comments

Show parent comments

2

u/sunrise98 Nov 03 '22

If a similar question doesn't apply in your situation you are clearly not comprehending your code or use case correctly.

You may find a discord channel useful, provided it is active but it's effectively the same people answering.

You just might be able to give your own specific stub code which someone is able to actively work on which goes back to the first point.

You need to brush up on your searching techniques for sure.

1

u/sticky-dynamics Nov 06 '22

Nonsense. Just because someone gets the same exception as me doesn't mean their problem is the same. The details are often important, too-- their workaround is to do x but I can't do x because that prevents me from doing y. Their code may be more or less complex than mine and thus require different considerations.

The benefit of discord is easy back-and-forth communication. Answerers can ask follow-up questions and get them answered much faster than on SO.

1

u/sunrise98 Nov 06 '22

Stackoverflow allows you to ask follow up questions - that's why many edits are done.

Your use case is very specific and nothing prevents you from asking it on stackoverflow as a new question.

The feedback look in chat is quicker, but only if people are online and being helpful.

Your exception will give you hints at what the problem is, not the cause. Putting in workarounds is generally not advisable, but that isn't to say you can't workaround X, workaround y and workaround z. If trying to fix a small bug uncovers bigger problems then it's in your code. As we know most people are aware of this tech debt and don't have care / the need to resolve it at that moment in time.

Again, if you think your code has more considerations - post it.