10 Replies - 1230 Views - Last Post: 15 March 2014 - 08:46 PM

#1 pandora4ever  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 12-March 14

How to progress when you're stuck on a question

Posted 14 March 2014 - 05:05 PM

Hi guys,

I'm a bit new to programming, and I find myself not very good at it. I would always get stuck on a particular part of a question and even through researching, I still find myself just as confused as before. I had a few questions:

What are some methods you guys use to "unstuck" yourself and progress through difficult problems?
What did you guys do in order to become uber hackers today?
What are some good online sources you guys used/recommend using?

Thank you!

Is This A Good Question/Topic? 0
  • +

Replies To: How to progress when you're stuck on a question

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5583
  • View blog
  • Posts: 11,943
  • Joined: 02-June 10

Re: How to progress when you're stuck on a question

Posted 14 March 2014 - 05:38 PM

Quote

What are some good online sources you guys used/recommend using?

Google.
MSDN.

Quote

even through researching, I still find myself just as confused as before

Over time you'll learn to do better search terms. You can't search for the answer to your homework. You have to search for general concept questions then apply that to your specific project.

How to do a targeted search for your question - Read this tutorial
Was This Post Helpful? 0
  • +
  • -

#3 mnichols  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 13
  • Joined: 10-March 14

Re: How to progress when you're stuck on a question

Posted 14 March 2014 - 05:41 PM

In order to best answer your question, it would help to know what language(s) you are working with. I am by no means an expert. In fact I often find myself amazed at how much I don't know that seems to be common knowledge among others here.

That being said, I would definitely recommend setting breakpoints and stepping through the code one line at a time. You would be amazed how much time that can save you.

If you have (or are willing to acquire) an understanding of how to use classes and methods, it is always a good idea to plan ahead and write reusable code so that if you need to make a change, you only have to make it in one place.

As for online sources, the forums here are a great place to start. Sometimes stackoverflow.com can also provide great answers.

I know it isn't a great deal to go on, and many others on DIC will be better equipped to help you, but I hope that at least gets you started towards the solution to this obstacle.

A final word of advice that I have taken partly from another DIC user and partly from a professor at my college:

There are two kinds of programmers, those who live to code, and those who code to live. Never be the second kind. If you don't love it, you won't do it, but if you have a passion for it, then it can make a great career.
Was This Post Helpful? 2
  • +
  • -

#4 pandora4ever  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 12-March 14

Re: How to progress when you're stuck on a question

Posted 14 March 2014 - 11:32 PM

Thanks for the great suggestions and tips! Yes, I think stepping through code one line at a time is a good way to learn, but sometimes I mistakenly get a part of code wrong and then it screws me up because I think to myself "The program should be outputting this, but the actual answer is not what I'm getting!" It's a bit frustrating to say the least, and I just wanted some input as to how I get jump through those inevitable hurdles that I'll have during my journey of learning how to program. In terms of programming language, I have been reading tutorials for Java/C/Python, but my knowledge of the fundamentals definitely needs more improvement.
Was This Post Helpful? 0
  • +
  • -

#5 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1012
  • View blog
  • Posts: 2,444
  • Joined: 04-October 09

Re: How to progress when you're stuck on a question

Posted 15 March 2014 - 02:28 PM

View Postpandora4ever, on 14 March 2014 - 05:05 PM, said:

What are some methods you guys use to "unstuck" yourself and progress through difficult problems?

Internet research, explain problem to friends/co-workers (you would not believe how many times I solve problems by explaining them to others).

Quote

What did you guys do in order to become uber hackers today?

Practice, practice, and ... wait for it ... practice.
Was This Post Helpful? 0
  • +
  • -

#6 pandora4ever  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 12-March 14

Re: How to progress when you're stuck on a question

Posted 15 March 2014 - 02:53 PM

Yeah, I've heard that explaining your problem to other people help you. Also, what do you exactly mean by "practice"? Since there are many things you can do to "practice" such as reading books, open-source projects, sites that give you challenging problems. Does practice consist of all of those? Or is there one way more effective? Please explain, I would love to hear more! :D
Was This Post Helpful? 0
  • +
  • -

#7 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5583
  • View blog
  • Posts: 11,943
  • Joined: 02-June 10

Re: How to progress when you're stuck on a question

Posted 15 March 2014 - 04:08 PM

Quote

Does practice consist of all of those?

Yes. But mostly doing. Coding. Find challenges that are within your code skill level or just a smidgen above so you have to stretch a little.

There is a post pinned at the head of the C# forum with lots of project ideas. Build them. Then decided to build them again with a different approach. I guarentee that every time you build the same project over again you'll plan it differently, because by the time you reach the end of version one you will see where you've coded yourself into a corner. You'll find yourself saying "Damn, I wish I had realized that xyz would be a problem when I started. If I had known that I would have designed it differently." Ok, now that you know that start version 2 from scratch, taking into account everything you learned from version 1.

It basically comes down to that epiphany moment where you say "If I knew then what I know now..."

Simple example:
  • Build a basic calculator with plus, minus, add, subtract.
  • Now add advanced features like 10 operations of undo.
  • Now add a 'paper tape' window to it.
  • Now make the UI scalable, so if someone resizes it, all the button (and their text) and the display scales with it. (Letting you make a big calculator for half-blind granny to use)
  • Now add some nifty features like 'tip calculator', and 'split check between x people'


The important thing here isn't to design it from the start to do all these things.
Just do the project for the first bullet point: + - * /
When that much is done save it as version 1
When that is done, then just handle bullet point 2: 10 levels of undo
That will help you realize where your code is lacking in flexibility for additional features.

This is a simple example of exactly how the real world and a real employer works.
You'll get an assignment to make something. Then 3 months later based on user feedback someone will say "We need to add feature x, update feature y and fix feature z that only works on even numbered Tuesdays"

This post has been edited by tlhIn`toq: 15 March 2014 - 04:09 PM

Was This Post Helpful? 2
  • +
  • -

#8 pandora4ever  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 12-March 14

Re: How to progress when you're stuck on a question

Posted 15 March 2014 - 05:33 PM

Thanks for the informative and insightful answer! Your example of building a calculator clearly outlined the step-by-step process in how one should continue to learn more and improve on a certain project even though they've completed it already. Thanks again!
Was This Post Helpful? 0
  • +
  • -

#9 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7884
  • View blog
  • Posts: 13,403
  • Joined: 19-March 11

Re: How to progress when you're stuck on a question

Posted 15 March 2014 - 06:26 PM

View Postpandora4ever, on 15 March 2014 - 01:32 AM, said:

I have been reading tutorials for Java/C/Python, but my knowledge of the fundamentals definitely needs more improvement.



First advice: Pick one and focus for a little while. You don't learn three first languages. When you have a good handle on one language, that's when you want to move on and look at something else. When you can write a non-trivial application in a language, or take an active role in a major project in that language, then you've probably got a good handle on it. An alternate benchmark would be passing a university-level data structures and algorithms course. For example, if you can pass both sections of Tim Roughgarden's Algorithms course on Coursera then I'd think you've probably got a pretty good grasp on some language or other.


As for getting unstuck, a few tricks that might be useful:
1. Step away. Go for a walk around the block, do some push-ups, go down the street and get a coffee, something of that nature. Change your setting, change your frame of mind, see if that loosens things up.
2. Try to ask the question. Go to the appropriate forum at DIC and press the "start a new topic" button. Try to describe the problem thoroughly enough that someone looking at your post can know exactly where you're at. If you do that right, it'll probably give you the idea you're looking for, and you won't need to actually post the topic at all.
3. Make your research an organized process. Many people think the internet and google and wikipedia and all that are some sort of perfect research machine - they're not. They're a terrible way to do research, and it takes a hell of a lot of work on your part to make them effective. The natural tendency when researching a question on-line is to read a little, follow a link, read some more, follow a link, repeat until completely baffled. Don't do this. Start by writing down a list of things that you want to understand - things that you think would help you get unstuck, if only you understood what they meant. Grab the first item from that list and read the most obvious pages all the way through - the wikipedia page plus maybe two likely-looking pages from the first page of google results. Do not follow any links. In the course of reading, you'll find that there are some topics you want to understand. Add them to your list. After reading the most obvious links, ask yourself "do I understand what's going on here well enough? Or do I need to know more?" If the former, cross it off and move on. If the latter, cross it off and add it to the end of your list and move on to the next item.
The idea here is to make sure you don't go down a rabbit hole, doing "research" on an infinitely deep stack of stuff that ultimately has nothing to do with the problem at hand. If you start with a question about TCP/IP and wind up reading about Aristotle's theory of causation, you're down a rabbit hole. :)
Was This Post Helpful? 3
  • +
  • -

#10 pandora4ever  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 12-March 14

Re: How to progress when you're stuck on a question

Posted 15 March 2014 - 06:50 PM

I appreciate your input Jon. Your suggestions for getting unstuck are very helpful. I think that changing your environment is a brilliant way to get unstuck and I would have never thought of that! Instead, I probably would have hammered on the problem (for god knows how long) until I actually got the problem. You also describe my bad tendencies of following one link to another, entering an infinite loop that is the internet. From now on, I will try to focus and pinpoint what I want to search while researching. Thanks!
Was This Post Helpful? 0
  • +
  • -

#11 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3623
  • View blog
  • Posts: 11,291
  • Joined: 05-May 12

Re: How to progress when you're stuck on a question

Posted 15 March 2014 - 08:46 PM

View Postjon.kiparsky, on 15 March 2014 - 09:26 PM, said:

2. Try to ask the question. Go to the appropriate forum at DIC and press the "start a new topic" button. Try to describe the problem thoroughly enough that someone looking at your post can know exactly where you're at. If you do that right, it'll probably give you the idea you're looking for, and you won't need to actually post the topic at all.


To follow up on this, this is one of the ways I get unstuck: I re-read and start following the advise in How to Ask Questions The Smart Way.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1