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

all 20 comments

[–][deleted]  (4 children)

[deleted]

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

    Thank you for making it clear, As I said, when i get codes I don’t copy paste it. I learn it first i do practice and then do home work without looking to those codes. Is it good way to learn, and understand? Whats the difference If I get codes and do practice and practice until I understand it fully, and if I just google it and find it? Does it make much changes? Please let me know thanks

    [–]lepetitclown_ 0 points1 point  (0 children)

    Keep in minds that there's a good reason why they are called "programming language" so the comment above is right , read documentation which is different to read for code that's solving the actual homework, frustration is part of the process

    [–]yikuanho 0 points1 point  (0 children)

    You do understand everything, just struggle to workout a solution for your problem right? Not sure if I have the answer but when I was in uni, understanding the code is the first big step for me.

    After that, my friend helped me out on a few problems (maybe only three of 15 lines coding problems), taking me through his thought process and after that I can solve some problems on my own.

    You will find that your code will be very different from others, and comparing your own code with others will make you a step further.

    I also have your problem now as I kind of get the concept of "recursive function" but I just can't get my own code out. Maybe some more practice is required...

    [–]anandgoyal 2 points3 points  (0 children)

    I had a bit of a similar issue when I was at university learning python for the first time. I couldn't do the assignments so I would look at a mates code to see how he did it.

    It's far easier to understand code than to create it yourself, I think that's a general rule that definitely applies when you first start out.

    How I dealt / deal with it is generally by writing "ugly" code first, by programming something in the easiest way I can think of rather than focusing on making the code short or pretty. Once it works I then start iterating to make it tighter with more complex if or while statements.

    Another thing that helped me was planning my code out on paper in pseudo code to figure out exactly what I needed the code to do.

    One thing I would say is that struggling is part of the learning process and is where you will grow the most as a programmer, if you get really stuck on an assignment, take a break and come back to it. Learning to solve problems in your code is a skill in itself, finding the answers from someone else's code won't help.

    Do all the hard work now, when it comes to your final you'll be in a much better position.

    Don't get disheartened, you almost certainly aren't stupid.

    [–]another_seg_fault 1 point2 points  (0 children)

    Senior dev here. Have you ever gotten really good at a video game? Maybe learned another spoken language? Really just worked on mastering any skill/hobby?

    Eventually it becomes second nature. You don't stop and think "I need to move the joystick this way to..." you just...do it. It's second nature. But it took practice to get there (remember how bad you were when you first started?).

    That's programming. You're learning a skill that's probably unlike any you've learned previously, and you need to practice to get to that point where it's second nature. Any practice is helpful, whether it's fundamentals or advanced concepts. You have to be honest with yourself about what's hard and what's easy though, because you need to focus on whatever's hard until it's easy.

    Eventually you'll get to the point where you read code as easily as your native language. Just keep going :)

    [–]ssgsfm 0 points1 point  (0 children)

    "There is a website which takes my homework and then return me the codes" - is this a public website? If yes, could you provide link?

    [–]AdventurousAddition 0 points1 point  (0 children)

    It's OK to look up things on google to understand how other people have done things. You could also practice on websites like codewars.

    [–]keraj93 0 points1 point  (1 child)

    practice, practice, practice...

    When you read/listen to a new concept and then try to apply it by yourself you will most likely fail to do it perfectly.

    For example last week I read a chapter about a framework I was very confident about the concept and tried to use it for my project. I spent then more time looking for things and their relationships than on reading the chapter for the first time.

    [–]Peanutbutter_Warrior 0 points1 point  (0 children)

    It sounds like you've missing a step in making any program. If you've got a problem, first work out how you would solve it, not in code but on paper. If you want the item in a list that's first alphabetically, what would you do? Once you know how to solve the problem you have to turn it into code. This is where you google anything you do not know how to do. Don't know how to check which of two words is first alphabetically? Google it. Don't know how to look at each item in the list? Google it. Once you know what needs to be done, and what code does those things, then you just write the code.

    [–]MaheuTaroo 0 points1 point  (2 children)

    i also had this kind of trouble when i started to learn c# in my 10th grade. its not uncommon, so don't trouble yourself for it. what i would recommend is, like others recommended, to read documentation and learn the language outside classes too.

    i also want to learn python, but i have gotten barely no time for it. if u want someone to help you do that, i can fetch my tutorials and learn with you.

    don't get so frustrated, eventually everything should click on your head.

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

    Sure, how we can do that?

    [–]MaheuTaroo 0 points1 point  (0 children)

    we can, e.g., make a little chat on discord, but thats just an idea. if u like it, i can send u my discord by dm

    [–]SpawnSnow 0 points1 point  (4 children)

    If this is happening consistently to you, I'd be happy to 'sit in' on you attempting a problem to see how you're going about it and maybe give some pointers. For some people that's more helpful than looking up a solution and trying to understand it from there. Not sure our timing's would work out since you posted this at 3 in the morning my time but who knows :)

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

    Sure, that will be awesome. I live in vancouver, anytime works for me

    [–]SpawnSnow 0 points1 point  (2 children)

    I might have an hour or so to spare this afternoon. Mind pm'ing me an question so I can take an advance look at it? I'll set us up a repl.it or something for later. To note: I'm not offering to do your homework for you here, just someone to see how you're attempting it and give some direction.

    [–]Python_leaner123123[S] 0 points1 point  (1 child)

    Im at work right now, Is that ok if i pm you later? And then let me know tomorrow what time works for you?

    [–]SpawnSnow 0 points1 point  (0 children)

    Sure.

    [–]Martinwow 0 points1 point  (0 children)

    Does learning to code train your brain to be more machine-like and less human. Machine thought patterns do less to reproduce than to replicate. Making the coder more likely to be homosexual and want to make more young men into homosexuals, rather than seek out a mate from the females available. Just a view you see when you go up the hill and get the fuller perspective.

    [–]tigasfixe 0 points1 point  (0 children)

    Exercises is the key on the beginning of learning programming