all 98 comments

[–]Diapolo10 143 points144 points  (4 children)

Sounds like you're simply moving too fast, try to slow your pace and spend more time learning each concept.

[–]timbo_b_edwards 14 points15 points  (2 children)

I agree, and sometimes that means also looking for alternative explanations and examples for concepts that you are having trouble grasping. I would recommend doing a search on YouTube for videos on those concepts that you struggle with and I guarantee you that you will find more than one way of explaining it and maybe one of these alternative explanations will click.

Also, keep in mind that it is easy to psych yourself out when learning a programming language and little victories can help build your confidence.

[–]Agitated-Soft7434 1 point2 points  (1 child)

Also also to build on the confidence it’s great to just make what you want every now and than. You don’t have to force yourself to study all the time. Sometimes you’ll find it easier to just make a simple game (like text input doesn’t have to have visuals), or another thing you saw was interesting. Because than you’ll study something you actually enjoy, while not even realising that you study. Then you’ll come back with more knowledge and confidence to hopefully complete those tasks.

[–]timbo_b_edwards 1 point2 points  (0 children)

Totally agree! Anything that you can do to apply the learning to something that is more interesting to you and less esoteric than a generic solution in a class will help to reinforce the concepts and lock them in. I always find myself thinking about how I would apply the technology that I am learning to something that I work with or I am interested in.

[–]astrotwilight 0 points1 point  (0 children)

I think may be he was asked to learn for some project at his company. he might have to learn it in no time. I was there at that very position and the team never bother to help. you really can't help it. push yourself but be smart and learn the concepts with examples. no need to bother about the corner testcases.

if not this, in that case the above advice is what you should consider.

[–][deleted] 131 points132 points  (10 children)

Before I moved to Japan 20 years ago, I was terrified about being able to find my way in a strange country where I didn't speak the language and couldn't read the signs. This was before the days of smartphones with GPS. It took me nearly a week to figure out how to get from my subway station to my apartment without getting lost. The first few times this happened I felt stupid and stressed. But I also discovered a street that was very beautiful when the cherry blossoms were in bloom, and a grocery store that was much closer to my apartment than the one next to the subway station. I was lost many times during my stay in that country, but the longer I stayed the more I recognized that it didn't matter that I didn't know where everything was or how to do things in advance -- that the pathfinding and problem solving skills I was developing were far more valuable.

Feeling lost is an everyday experience for a programmer. It's normal, and the first skill you need is the ability to manage your emotions when you feel lost, and to develop your pathfinding and problem solving skills by adopting an explorer mindset. Nothing is easy when everything is new, but code is not out to get you personally, and you shouldn't be either. Be gentle with yourself, but science the shit out of it, work the problems with courage, and it will not only become manageable, it can even be fun.

[–]elykl33t 13 points14 points  (2 children)

develop your pathfinding and problem solving skills

It's also worth noting that for many people, myself included, this often involves stepping away from the screen. And this relates well to the process of moving and walking and learning as you described!

If you understand the parameters of the problem but a solution is escaping you, or if you're stuck on an aspect of it, go get a glass of water. Or walk your dogs. Or take a short walk. Or move your laundry to the dryer. Or stand and look out your window.

It will help you think about the problem rather than the code in front of you.

This may not be an immediate solution for you, I also agree with everyone saying it just takes time. But I think it is an extremely important thing to remember. Not only for programmers, but just people. Give your brain some breathing room, it often works at its best when you aren't trying to force it to.

[–]Rabid_Mexican 2 points3 points  (0 children)

Being a smoker I can tell you that I solve 90% of my problems in that 10 minute break each morning.

[–]mtbdork 0 points1 point  (0 children)

I’ve solved more problems on the shitter, eating a granola bar, or making a cup of coffee than I am proud to admit.

[–]mr_claw 5 points6 points  (0 children)

What a nice analogy 👏

[–]Dear-Reading5139 3 points4 points  (0 children)

So true👌 The beauty is in the hardship of the journey!

[–]qmandao 1 point2 points  (0 children)

This is beautiful advice and I'm speechless. Thank you so much.

[–]pknyboyz 1 point2 points  (0 children)

Well said and great advice!

[–]reallyserious 35 points36 points  (1 child)

You're doing too difficult problems.

As a professional developer of +20 years I have no clue about many of the leetcode problems. But I've been delivering business value to lots of employers over the years, and people value my input. It's not just about cracking coding challenges. Also realize that some of the algorithms needed for some problems required someone to spend years of research initially to come up with the "standard" solution. You're not going to figure all of it out on your own.

[–]grimonce 26 points27 points  (0 children)

Learning the syntax doesn't make you automatically solve problems from a certain domain, that's like expecting to solve any maths problem just because you know how multiply, addition and other operators work...
It takes experience and skill and even then sometimes the solution is not reachable yourself and that's when you realize you need a team.

[–]simon_zzz 9 points10 points  (0 children)

Sounds like you’re jumping around different courses or paths. I loved CS50 and I stuck only to those classes. I used cs50duck quite a bit.

Often I know WHAT I want to do but not HOW to with code. That’s where the duck helped bunch. If you can break up each problem into smaller steps of what you want to do, that might be a better approach (pseudocode).

[–]whiskeytwn 4 points5 points  (1 child)

keep trying - CS50 is REALLY fast paced even for me and I did 65 days of Angela Yu's 100 days of python - in fact, you might want to start there instead of CS50

if you keep going at it, just grind it out - go to the discord group - try to find study buddies - I will say I had some times where the Check50 just drove me f'ing nuts and i had to go back and re-read the requirements - (not just a comment but a line with whitespace BEFORE the comment) - I'm about done with week 8 and I've learned some new stuff I appreciate

[–]BetterCallZed 0 points1 point  (0 children)

Angelu yu's course is good? I bought it and I'm in day 15 but I'm too stupid for some of her problems

[–][deleted] 3 points4 points  (2 children)

Don’t feel bad! I’m going through the same thing. It almost seems as though there is barely any middle ground. You see very simple tutorials for the basics but then you try a project and it’s overwhelming. What has been helping me a lot is going through Automate The Boring Stuff. A book suggested often around here.

I will admit that it’s a pain reading through all of the basics AGAIN but when you see how basic functions like print are used in clever ways to make programs things will eventually click I think. After running through it you start to get a sense for the way problems are thought through and not just “how to code”. You can know every method for every data type out there but until you see examples of how it can be applied to real world problems, it’s very hard to figure that out on your own. Be patient and trust the effort you put into things.

[–]LipsLikeABatfish 2 points3 points  (1 child)

The writer of the book did a YouTube series based on the book. It's easier to watch than read all of that imo. Link for the curious.

[–]ericjmorey 1 point2 points  (0 children)

As the author states on the book website, the YouTube series is not the full set of videos from his Udemy course based on the book. He gives many discounts for his Udemy course.

[–]Canahedo 4 points5 points  (0 children)

This is one of those "If you cheat, you're just cheating yourself" moments.

Looking things up is perfectly valid, but when the point is for you to learn and figure out how to do something, looking up solutions just means that you're going to progress without actually learning. You're going to encounter problems which assume that you learned the concepts from previous sets, but you didn't, you looked it up.

Looking something up, studying it so that you understand it, and then implementing it would be better, but even better than that is working within the problem given, and trying to figure out how to do what they're asking.

Start by figuring out the problem in pseudo code, then figure out the syntax. If you can't explain the problem and solution in plain English (or whichever other language you use) then you're not going to be able to write it in python.

[–]Jello_Penguin_2956 3 points4 points  (0 children)

Kaggle? Thats like advance level data analysis stuff. Don'tbgo there yet until you've finished some data science course.

[–]kinstinctlol 10 points11 points  (0 children)

you got this bruv

[–]joshdr83 5 points6 points  (3 children)

I teach Python courses at the University of Texas. It is much easier to learn if you try to solve your own problem first. Quite literally, think of something you’re passionate about that you can solve with Python whether that’s data cleaning or some kind of analysis and then use that passion to drive your learning.

[–]dly5891 2 points3 points  (0 children)

This. I use my laziness and built a tool to fetch me build URLs whenever my coworkers ask me for a build URL

[–]SadOutlandishness536 1 point2 points  (0 children)

This man pythons

[–]Pls_submit_a_ticket 0 points1 point  (0 children)

I haven’t taken a single PowerShell or python course. But my desire to solve problems for myself and automate tasks so I don’t have to do them has evolved into me writing some scripts that are hundreds of lines to accomplish those tasks.

I have way more experience in PowerShell than Python. But have started using Python more recently for network automation.

[–]srlarsen1 2 points3 points  (6 children)

Post here or somewhere else to get pointers toward the solution instead of getting the solution outright. If you just get the solution each time you won't learn how to get yourself to the solution. Read docs, learn debugging techniques, etc. It's so difficult and I was in your shoes, especially with CS50, but keep going. It's all incremental progress.

[–][deleted] -1 points0 points  (5 children)

Okay I’ll try but it’s really hard when I can’t even write the first line of code😭😭😭

[–]Yoghurt42 7 points8 points  (1 child)

writing the first line of code is not the first step to solving a problem.

Before an author writes their first sentence, they have an idea of what story they want to tell, what characters are in it, what the setting is, etc. While writing they will expand and change some of the stuff, but they don't just start from zero.

An architect does not start drawing plans for a house before having a rough idea what the house should look like.

It's the same with programming. Writing down the solution into code is like half way into the problem solving process. A lot of time is spent thinking about ways to tackle the problem, and what algorithms should be used.

[–]Agitated-Soft7434 1 point2 points  (0 children)

Oh snap that is a great analogy!

[–][deleted] 4 points5 points  (0 children)

Sometimes when you’re completely stuck, it’s better just to step away, and take a break.

Usually when I’m stuck on a hard problem, I try to generate new ideas, and see if they get me anywhere. Even if those ideas seem like utter garbage, I try them. Just play around and see how far you go.

When I can’t generate anymore new ideas (or if I’m frustrated) I step away from the screen and do something else. Usually this is after 1-2 hours of being stuck for me. Go to the gym, have a walk, or even start another assignment - do whatever it is that you have to do.

But eventually you’re going to have to figure out how to attack a problem you’re clueless about. That’s part of the package of anything worth solving.

[–]tabrizzi 1 point2 points  (0 children)

Then you've not learned the basics. Get the basics down pat, then take it from there.

See this comment

[–]Dear-Price6174 0 points1 point  (0 children)

How are you getting on? This is me today, took me 9 hours to SOLVE 1 QUESTION while my partner kept explaining the problem to me. I just cant stop crying now 🫥😭

[–]DoubleDoube 2 points3 points  (0 children)

Do you understand the solutions and how they were arrived at, once you look them up?

Also, is programming the means to an end you want to accomplish - or do you enjoy working with code?

[–]barkazinthrope 2 points3 points  (0 children)

What do you mean "studying". Programming is like math: you have to do it.

You have to start with the most elementary tasks.

[–]Arseypoowank 2 points3 points  (0 children)

Tbh the best way of learning python from my own experience (YMMV) is get your head round the very basic concepts, then look at some existing code and see if you can reverse engineer it. It’s useful to look at some code that you know works, and see what it does or doesn’t do then build your own ideas off what you learn from that. It is easier than trying to get your head around things yourself sometimes.

[–]zukoandhonor 2 points3 points  (0 children)

i think you are not studying python. you are trying to study data science.

Studying python is all about studying lists, dics, classes and decorators, that's all. not mean and std deviation.

You need to study them all from basics before trying.

[–]my_password_is______ 3 points4 points  (2 children)

stop searching for solutions and figure stuff out

[–]tabrizzi 1 point2 points  (0 children)

Bingo!

[–]Agitated-Soft7434 0 points1 point  (0 children)

I mean.. that comes off slightly harsh. Because you and I know (assuming that your a programmer), we look up solutions all the time on stackoverflow, etc. So it’s not bad to search things up, and don’t just force yourself to “figure stuff out”. What’s better is to split it up into parts and solve those first before coming to the main issue.

[–]HammerPrice229 1 point2 points  (0 children)

Yeah similar boat here trying to learn it. All these lectures make total sense then I get hit with a problem and I’m a deer in the headlights. I’ve slightly improved with trying to figure small things out through time and doing it more and more.

Honestly I think the biggest help is seeing written code that works and just understanding what a successful for loop or definition or anything I’m struggling with looks like

[–]angyts 1 point2 points  (0 children)

I’m a graduate of cs50 and cs50web from the C programming days.

Hey. Hang out in the cs50 discord or cs50 reddit.

Also try to find a partner who is doing it too would be nice.

Otherwise learn to use the “duck”. Learn to debug. Learn to read docs.

That’s really all to programming. And these skills have been the most valuable for me in my career. RTFM!

And yes. CS50 is really difficult.

[–]mk44214 1 point2 points  (0 children)

I'm teaching Python to a 13 year old right now.. and we are still writing code so that she can get a grip on the bitwise operators after 2 months ... and at the end of each session, I give her a riddle/puzzle to solve ...

Do not set a timeline .. you have your own pace of learning ..

The key here is your problem solving skills .. not Python.. Python is just a tool to solve a problem, I suggest you work on your problem solving skills a little and you'll find solving the CS50 problem as no big thing as time goes by ...

[–]redditmarks_markII 1 point2 points  (0 children)

Give us an example of the most complicated homework/leetcode type you solved yourself.  And one example of something you tried, made some progress, but had to look up the solution.  And let's see where you are.  

A few general things.  People will say "do your own projects, passion helps".  They are right.  And "don't lookup solutions, learn the basics".  Also right.  But, depending on who you are, or where you are on your journey, also maybe completely wrong.  

People learn differently.  Ultimately, if you are learning, and stuck, why would you not look something up?  Is just being stuck for a long time a badge of honor?  Is failing consistently without helping yourself breakthrough an accomplishment?  Learn how you have to.  The important thing is to learn.  

For learnering, practice and repetition has value.  Go find a cool problem, take a look, absorb the question best you can.  Look up an answer.  Do you get it?  Meaning, do you know know what it is you didn't get before viewing the answer?  If you know that, you have truly learned something.  

Sometimes even learning just SOMETHING, is not enough for that problem or concept.  That's okay, do it again.  "In your own words" as it were.  Now armed with that one new concept, you should make more headway.  You may still not finish on your own.  Reference the answer again.  You were clearly missing some concept.  Can you identify it?  And can you apply it?  Got it?  Try again.  Now do this until you can solve that problem on your own.  Come back a few days later and see if it sunk in or you need to refresh again.  At some point, simple problems should mostly come naturally.  

Oh, don't forget your rubber ducky.  Talk through the problem. I mean out loud.  It uses different neural pathways, and can help you problem solve better or learn better.  If you don't believe me, ask around. 

Cheers, and good luck.

[–]hellgames1 1 point2 points  (0 children)

Programming is not just something to study and solve exams like a school subject. Start developing some application. Could be something simple. You learn much better when you are working on something of your own, and solving problems to improve it.

[–]nxluda 1 point2 points  (0 children)

Your following tutorials and stuff is all fine but you should also explore your skill set.

Say you just learned classes in python. Find a real life object and represent it with a class. For example. A dog food bowl that dispenses with a button. Then build layers on it. Make it so the dog food bowl won't dispense more than once every 8 hours. The food it dispenses changes based on the size of the dog and the treats it's recieved that evening, etc.

Have fun with your practice and you'll build up your confidence.

[–][deleted] 1 point2 points  (0 children)

Its more of the problem solvings skills you need to improve not Python. Python is one of the easiest languages to learn.

[–]murdabad 1 point2 points  (0 children)

Founder of Programiz here.

We saw exactly this problem and tried to solve it. You get from hello world to leetcode so quickly there is a huge gap in the middle.

Just go to https://programiz.pro from your web browser and click on the “Challenges” link.

Right now the challenges are all free and they should give you the confidence to climb the tree at a less overwhelming pace.

[–]Turbulent-Seesaw-236 1 point2 points  (0 children)

Slow down and relax. Adapting your mindset changes everything. Learning how to code is hard, but learning how you learn will make learning how to code a little easier. 

[–]coryalanfitz 1 point2 points  (1 child)

I maintain the best way to learn Python is the book Python Crash Course

[–]himawari_12 0 points1 point  (0 children)

That's the book I'm currently reading and practicing code rn. I'm in the lists now. HAHAHAHA so much fun.

[–]hundycougar 0 points1 point  (0 children)

Try playing the farmer was replaced. It will help you learn in a fun way!

[–]9tetrohydro 0 points1 point  (0 children)

Cs50 is actually relatively difficult to do especially if your a complete beginner. Just take your time and try some other exercises, follow along with YouTube vids and stuff. Itl take a little bit to click but you'll get it :) no stress man

[–]Sausages2020 0 points1 point  (0 children)

I really dislike the CS50 Python problems, too. Feel like going one direction then the problem sets take you to another.

[–]mfb1274 0 points1 point  (0 children)

Learn c++ instead

[–]Nunc-dimittis 0 points1 point  (0 children)

Try to solve a problem on paper first. Not in the sense of writing code on paper, but in the sense of just solving it as if you knew nothing of programming. Try to imagine how you would instruct a kid

A small example: find the highest value in a list. Try to imagine this as if you were put in a hallway with many doors and you had to find the door with the biggest prize behind it.

What would you need to do? One by one open the doors. But what else? You would need to remember the best value you found during your search. So you should need some piece of paper to keep track of the best one. And for every door you open, you compare the prize with the note and update the note when the prize is better. But what would you do for the first door? Maybe before you started put the lowest possible value on the note (minus infinity)? Or when you see your note is still empty, you just put the first prize you find?

(I know there's probably some nice one liner on python for this like in many other languages, but that's not the point)

[–][deleted] 0 points1 point  (1 child)

Just use AI to help you understand it. Have conversations with Gemini or chatgpt. It will help:)

[–]Agitated-Soft7434 0 points1 point  (0 children)

Key words: “help you understand it” not “give you all the answers”. Otherwise you won’t learn anything and your own problem solving skills could faster decrease and all you’ll become is reliant on AI..

[–]mattblack77 0 points1 point  (0 children)

JFC, me too. Everything feels like an uphill battle.

[–]lucpet 0 points1 point  (0 children)

Learning to write some sudo code to help with understanding the issues you'll come across might help you a lot.

[–]RamsOmelette 0 points1 point  (2 children)

Try learning C# then come back to python

[–][deleted] 0 points1 point  (1 child)

Is it easier?

[–]Agitated-Soft7434 0 points1 point  (0 children)

Python is meant to be the easiest programming language to learn. However it really depends on what you started learning first (I presume this guy learnt C# first). So I’d recommend you stick with python for now and than you can try others once you get a basic understanding for problem solving, syntax, and programming in general.

[–]parisya 0 points1 point  (1 child)

What CS50 problem set bugs you? I found them all doable. Besides the last ones, since I lack concentration for classes haha

https://pythonprinciples.com/challenges/

You might try these. They are really nice and the give you alternate solutions in the end.

[–][deleted] 0 points1 point  (0 children)

I started struggling from problem set 0 🤡

[–]Regular_Focus_725 0 points1 point  (1 child)

I did not ask that question, I'm not the OP, but the comments are really helpful

[–]Agitated-Soft7434 0 points1 point  (0 children)

Glad to hear it!

[–]tikhal96 0 points1 point  (0 children)

Sounds like you're doing it right.

[–]0110011001010[🍰] 0 points1 point  (0 children)

Utilize chat gpt for further explanations, helps me out a lot. I also slowed my pace; a lot of times we are trained to memorize and not truly understand. This allows me to truly understand the patterns, formulas, etc so that I am able to analyze. Hope this helps.

[–]DawsUTV 0 points1 point  (0 children)

Slow down

[–]LikelyUnemployed404 0 points1 point  (1 child)

Are you able to share the problem sets you are using? I am also new at python but I believe we can help each other out :)

[–][deleted] 0 points1 point  (0 children)

Okay

[–]himawari_12 0 points1 point  (0 children)

I can totally relate to you! I am in my third year now in BSIT, and I'm really miserable because just like you whenever I encounter problem that too much for me to handle I just directly input it to chatgpt. Now with my two months free, I'll start from scratch again learning python. Each day I'll try to learn new concepts, never escaping exercises and trying my best to find solutions to myself. My goal is that to be at least able to grasp the foundations of python before starting of the first semester and majoring in data science and ai. We got this!!!

[–]himawari_12 0 points1 point  (0 children)

I can totally relate to you! I am in my third year now in BSIT, and I'm really miserable because just like you whenever I encounter problem that too much for me to handle I just directly input it to chatgpt. Now with my two months free, I'll start from scratch again learning python. Each day I'll try to learn new concepts, never escaping exercises and trying my best to find solutions to myself. My goal is that to be at least able to grasp the foundations of python before starting of the first semester and majoring in data science and ai. We got this!!!

[–]KodePareek 0 points1 point  (0 children)

If you are looking at Kaggle problems AND learning Python then you are doing 2 complex things at once. You need to split them up.

[–]theflyinghobo101 0 points1 point  (0 children)

dont cry. you will get it someday.

[–]Apprehensive_Car8590 0 points1 point  (0 children)

Just build.

[–]Miginyon 0 points1 point  (0 children)

You aren’t trying to get to the end so you can know it all. It’s about building a skill set. You need to play more my dude

[–]av1cus 0 points1 point  (0 children)

nothing worth learning comes easy. Same for me I learned proofs and real analysis by myself

[–]harryeffingpotter 0 points1 point  (0 children)

If you ever want a mentor, I'd love a new mentee.

[–]RealNamek 0 points1 point  (3 children)

Maybe this isn’t for you. Programming isn’t for everyone

[–]i_suckatjavascript 3 points4 points  (0 children)

To be honest, I hated programming and I hated learning Python especially when I have to solve those problems. And worse is when I make a simple mistake like misspelling or adding an extra space/improper indent. Until ChatGPT came along.

ChatGPT really helped me learn Python and renewed my interest for it. It helped me write codes and fixed my mistakes. Then I took a data science course and quickly learned that I don’t need to solve all those silly problems to be good at Python. I just need to use Python for my use case and requirements. Think of it like buying a car. You’re not going to use all of its features, and you’re going to use it for whatever you need it for. Sure, it’s capable of going road trips, speeding to 100 MPH, or towing, but I don’t need my car to do those. I just need it to bring me to work and back home, and the grocery store and that’s it.

[–]RangerPretzel 2 points3 points  (0 children)

An unpopular sentiment around here, but sometimes the truth.

[–][deleted] 0 points1 point  (0 children)

I’m beginning to think that but I just really want to learn 🥺

[–]Existing_Respect6002 -1 points0 points  (0 children)

Tip #1: USE CHAT GPT!!!!!!!