Feeling irritated and frustrated

Im thinking coding isnt for me. I dont understand hardly any of it. I thought I was getting the hang of it till I ran into loops. Im on https://www.codecademy.com/courses/learn-python-3/projects/python-carlys-clippers AND it just absolutely showed me I know nothing. If I Cant even do these tasks why am I here?
I literally only maybe got 3 tasks correct on my own without looking, like the easy stuff.
Im not looking for support and hugs but to see if anyone has felt like this?, does it get easier? will I ever be able to stare at a instructional paragraph and put this stuff together?
I feel like im in some really basic stuff and im having such a hard time figuring it out.
This is why I dropped out of coding bootcamp for JavaScript.

Task 7 - 13 I dont understand the use of [i] or what the instructions are telling me to do.
Here is my code, the commented out is what I originally wrote

hairstyles = [“bouffant”, “pixie”, “dreadlocks”, “crew”, “bowl”, “bob”, “mohawk”, “flattop”]

prices = [30, 25, 40, 20, 20, 35, 50, 35]

last_week = [2, 3, 5, 8, 4, 4, 6, 2]

total_price = 0

#for price in total_prices:

print(prices)

for price in prices:

total_price += price

average_price = total_price / len(prices)

print(“Average Haircut Price:”, average_price)

#new_prices = [prices in prices for prices - 5]

new_prices = [price - 5 for price in prices]

print(new_prices)

total_revenue = 0

for i in range(len(hairstyles)):

total_revenue += prices[i] * last_week[i]
#print(“Total Revenue:”, total_revenue)

print(“Total Revenue:${0}”.format(total_revenue))

average_daily_revenue = total_revenue / 7

print(average_daily_revenue)

#cuts_under_30 = [len(new_prices) -1 for range(i) in hairstyles[i]]

print(cuts_under_30)

2 Likes

It does get easier (with consistency and time) . I think even across different levels of programming a recurring theme is: “how do I translate a highly technical specification into something that fits my vocabulary?”

As a working musician this is a common feeling (and the few years I’ve programmed, I find it very similar):

  • I start a new project
  • no idea how to perform the necessary thing in the moment
  • craft a game plan to internalize the necessary elements that are new and alien
  • gain insight into how long it took to go from 0 to practical proficiency
  • next project will have more realistic arc and expectations (gained from insight)

Many projects (majority) fall by the wayside but even those help to add to the entirety that is experience.

Programming to me is a process-oriented practice. Things like error messages are way-points to steer me into (eventually) functional code.

I will add that the useful thing one can leverage is the learning community. Forums such as these go a long way into providing tools to getting resources to understand a lot of the little things that a while ago were not easily accessible. Don’t hesitate to ask questions (the more specific they are, the better… and remember to format your code [How to] Format code in posts).

5 Likes

Thank you for you reply. I will be sure to follow the format next time. I hope it gets easier, right now im spending about 4 days a week 1-2 hr a day studying, just some things dont stick. Think ill go thru the loops lesson again and again until it makes sense.

Consider also switching up format. I find codecademy great for hands-on learning. Sometimes though watching a clear youtube video (or podcast) will help me think in a different mindset, and my personal favorite is working through a book by hand (no computer) and then testing it days after.

At some point maybe you’ll find a balance that works for you.
The amount you’re studying is good. It really is a matter of time before it starts to stick.

1 Like

I just really started getting serious about learning coding a couple weeks ago My problem is Im inpatient and Im really trying to be patient. If I cant figure something out completely on my own I get frustrated and feel like quitting. Im learning slowly that coding isnt 100% memory based, but its good to know what should go where as a starting block I guess.

I was practicing just simple for loops trying to loop thru a int and was getting an error. I only solved the issue once I looked up the error, I wasnt using range. Once I did that it clicked. Just like you said the errors push you in the right direction.

Thanks for the advice

Learning to code is almost exactly like learning a new human language like French or Italian. I say almost, because with other humans when you make a grammatical mistake they’ll let it pass and try to comprehend what you mean to the best of their abilities. With computers, one “grammatical” language mistake (e.g. typo, missing variable, etc.) will make them stop completely; they’re dumber than a rock!

So, patience is really an important skill in coding. Because even after you come into grips with a concept like loops, you’ll later run into a new coding concept that you’re unfamiliar with and spend time there until you figure it out. It’s a continuous learning process, and everything seems hard at first, but as soon as you ‘get it’ and use it over and over it becomes muscle memory - just like speaking a human language!

I personally spent the first couple of months making my first personal project where I was constantly pulling on my own hair and writing to my experienced software engineer friend how I hate coding and how complicated it is. His answer was “even I have those days after years of programming! Just stay stubborn and Google is your best friend”… he was talking about the search engine of course and not the company itself.

Coding both is and isn’t memory based. When you’re venturing out in uncharted territory like Python land, you’ll always be checking the map (i.e. Python manual, revisiting tutorials, hints, etc.) Until the methods become more and more familiar that they stick in your head. For now, don’t worry or even think about the notion that you can’t remember things.

Codecademy is cool in that it lets you practice as you learn, but don’t make it your only source of knowledge! Heck, even the lessons themselves in Codecademy ask you to look at the manuals and forums and other sources out there. When I don’t understand something, like loops, in a lesson, I do the following:

  • Before moving to the next lesson, I’d play around with the code a little bit more to see what happens if I tried something else, and to also better understand how things work. The console is your best friend while experimenting. Learn to read the error log you get to find out where you made a mistake in the code, and log anything you’re investigating to the console. log the i values in a loop to understand what exactly happens to it, or the other variables, etc.

  • Check if there’s any discussion going on in the forums here. Usually people have already asked the same questions I am wondering about, and others answered them in great detail.

  • Find the online manual/documentation of the language. Can be the official one, or any other out there, as long as it explains the subject in a way you understand.

  • Search Google (e.g. “python loops” or simply “loops in code/programming”) and see what articles discuss them. I suggest avoiding complex/deep discussions on forums like Stack Overflow in the beginning, because they can be too overwhelming for a beginner. If a discussion or article is too complicated, I just leave it on the side and look for something simpler and maybe get back to it and see if it adds any new knowledge. If it’s still flying over my head, I’d skip it for a future time when I’m more experienced in the language.

What is key here, and I think is fundamental in your learning, is to not copy/paste code you find online that you don’t 100% understand. This is very, very bad! Make sure you understand the fundamentals. However, at the same time don’t dig too deep that you’d bury yourself. Remember, you’re learning a coding language, not software engineering! You really don’t need to know for example why the i (or whatever you choose to name it, j, k, or even cookie) does what it does in a loop or how it’s created or how does it increment or loop. You’re not making the language, you’re using a programming language to build something. Just as you would use a hammer, you don’t need to know where the wood or metal came from or how it was formed to create a hammer tool. You only need to know how to hold it and hit a nail to stick it to the wall.

2 Likes