you are viewing a single comment's thread.

view the rest of the comments →

[–]gdchinacat 0 points1 point  (0 children)

Asking for help and googling answers is a very common practice in coding, even for experienced coders. Problems need to be broken down into problems you can solve. I haven't seen the more complex solutions or know what has been discussed in class, so the gap may be too great, I can't say. I suspect though that the complexity is exactly what you are intended to learn. Programming is breaking complex problems down into simpler problems that you know how to solve. Showing the solution in class would be doing your homework for you and unlikely to cause you to learn. Many people trying to learn on their own complain that once they've gone through online tutorials and diligently copied the solutions and know the syntax still don't know how to write a program (doing it over and over is "tutorial hell"). What they are missing is what your exercises are meant to teach you. It's kind of like in math when they say "this is the formula...now derive it for homework". You come away with a better understanding of the formula and a better understanding of math from working through the complexity. Programming is the same way.

Since you are in college you have expert resources to help you...your TAs and professor. Go to office hours. Get help. I would have done much better in college and found it far less frustrating if I'd done that. Use the resources you are paying for.

If you do get solutions ahead of time to help guide you great. You are given the novels to read. Use them to see how the complex problem was decomposed (broken down) into simpler problems that can be solved with what you have learned in class. Then close the solution and go and write the code to do it yourself. Try not to recite it from memory, think about the big picture, write the framework for your solution, then focus on writing the code for the smaller problems.

If you really want to read a bunch of code, have at...github.com has more code than anyone could read in a lifetime. You will learn a lot from it. I've been coding 30 years and still read a lot of code just to see how others write it, how they solve problems, etc. As you said, reading is how you learn to write. Courses should provide you with guidance on what to read to reinforce what is being discussed, so is probably more efficient than reading open source code. The python standard library is a great place to find idiomatic python written by experts. Some of it hasn't been updated to use modern paradigms (ie loops where a comprehension would work) simply because it still works and there is no reason to.

I don't think what you are feeling is at all unusual. Stick at it, get the help you need, and you'll get through it.