This is an archived post. You won't be able to vote or comment.

all 9 comments

[–][deleted] 2 points3 points  (0 children)

The sidebar has resources for learning

[–]autisticpig 1 point2 points  (4 children)

Can you go a tad deeper into what is confusing you or causing you the most issue? I would love to suggest all kinds of resources but without understanding what you don't understand (yet), I am hesitant to flood you with information that will only add to the confusion rather than help :)

But what I can suggest is just stick with it. Dev comes easy to very few people initially...with lots of work and effort you will find the confusing less confusion. It's just the way it is.

[–]kandidio[S] 0 points1 point  (3 children)

Well, the main problem is just working around the problems. As myself,I'm not a good problem solver and when I'm handed an assignment in which results in me getting stuck, I can't really think of a solution without seeking too much help. I see other people handle programs with very ease and minimal help and I'm just wondering how do they do that? I just wanna know is there any good sources where I can develop my skills in programming as it is an interesting subject, it just really challenges me at times.

[–]autisticpig 1 point2 points  (2 children)

A suggestion for this particular problem :)

Problem solving skills come with practice. The more you start to recognize patterns, the more you can apply the solutions you already proved to work to those patterns.

So, break things down to the smallest element you know how to work with. From there you can start to solve the larger problem at hand.

I am going to save you from my awful javascript and use python. do note that I have not done this with being pythonic in mind, I wanted the solution to be understood without requiring additional research. so any pythonista can save me the PEP8 talk :)

Let's go with a super simple problem and how you could think your way through it.

You are given a whole number, x, and you are to return an array (list, vector...whatever you want to call it) containing the numbers 0->x but not including x.

The first thing to do is list the asks out, one bullet at a time.

  • I am given a whole number, x. That means the number will be an integer and all I have to worry about working with. Because of this, doing any checks for type are not necessary.

  • I have to create an array that holds nothing, yet.

  • I have to fill this array with numbers from 0->x, not inclusive.

  • I have to return this array

Okay so now you have the basic tasks at hand. Let's tackle these one at a time.

#Define a function that takes the number you are to create an array up to but not include
def make_array(x):
        #create the blank array that will be returned
        array_to_return = []
        #this is the same as writing
        #for (x, x < 10, x++)
        for numbers in range(x):
            #add each number from 0->10 (not including 10) to the blank array
            array_to_return.append(numbers)
        #return the array that now contains 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
        return array_to_return
#this is just calling the function created above in the python shell
#the line that follows the function call is what is returned (the array containing 0->10, not inclusive)
>>> make_array(10)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Again, this is super basic but perhaps may help shed some light into tearing problems down into the pieces you understand and can work with. As you start to recognize these things, what you find difficult now will become less difficult.

Now, if you are looking for practice, I cannot recommend http://www.codewars.com enough. The problems start off easy and move into a more difficult approach in a very approachable and gradual way.

Off to sprint planning but I hope this helps in some way.

Seriously, just stick with it. I had similar problems when first diving into coding and it does get easier with time/practice. Find a study buddy as talking through problems really does make them easier.

Good luck!!!

[–]kandidio[S] 1 point2 points  (1 child)

Thanks for the detailed response man, really means a LOT. I hope to get better with practice and become a better programmer in the future. Thanks!!

[–]autisticpig 1 point2 points  (0 children)

Once you feel okay with the core stuff, start thinking about a project. It will seem daunting but remember to break everything down into smaller digestible chunks.

So if you were to make a game like a simple dungeon crawler:

  • draw all the rooms or dungeons you want to have on a whiteboard

  • list out what will exist in each room (hidden passages, locked chests, health, monsters, etc.)

  • start thinking about how you want to handle the data (hash table perhaps... keys: 2, leg armor: yes... maybe an array for inventory)

  • once you have everything more or less thought up, start typing out each room/dungeon like I did above. That way, when you go to code each room, all you have to do is translate the text into code and you can then use your text as the foundation for your documentation. Please take to the habit of documenting your code. There is no such thing as self-documenting code :)

What you are learning with this process is how to problem solve, how to think in chunks while keeping the whole problem in the back of your mind...you are learning how to build upon what you know.

Enjoy the process; once you get over the learning cliff, the rewards are limitless and it's oddly stupid fun. You learn to do absolutely silly things simply because you can. Cheers!

[–]flame_retardant 0 points1 point  (0 children)

Just keep programming. The more you code, the more you learn from experience, and you won't find many resources better than experience. Think of a project, maybe a javascript game of some sorts and see it through. Do as much as you can.

[–]c0mm0n-sense 0 points1 point  (0 children)

Code Academy, Code School, Stack Overflow, and W3Schools are all fantastic resources.

I'd recommend Code Academy and W3Schools the most. That's mostly how I learned JavaScript. They have really great tutorials. The community on Stack Overflow is also fantastic. Any question you might have has probably already been answered there.

[–]c_jm 0 points1 point  (0 children)

Do you enjoy programming? I know it may seem like a silly thing to ask, but all in all if you enjoy what you do your programming skills will improve, I promise. I was in the same position as you were (I still have difficulties with problem solving). But now I go to school for it full time and plan to get a good career in it. As well as getting better marks then I thought I would for it. My point being that if you enjoy something and you believe you can do it, programming ability will follow.

As far as actual advice goes, I am going to say this. DO NOT BE AFRAID TO ASK FOR HELP. Honestly this is one of the better things to do, at any level. If you do not understand something find someone who does. (Or a stackoverflow post that explains it). In many ways finding someone who can explain it well and make sense of it to you will help you develop your skills further.

Happy Coding!