Wise words please!

Hi there,

I have hit these coding challenges and with a ton of help I’m managing them. I mean LOADS of help sometimes! I can grab together the coding concepts I think I’m meant to be using. Attempt to code it together in a way I pretty much know will be wrong and then get my software engineer friend to explain where it all went wrong and explain why it works.

I get that this is one way of learning however I’m faced with this reasonably simple challenge to do on my own ‘Find the Longest Word in a String’ - and just cannot for the life of me see how to put the concepts together (for loops / reduce(), randomly named variables etc…

I’m not seeking support with this challenge but rather support with my demoralised floundering with learning Javascript and coding in general.

Every now and then against all odds I have solved a coding challenge MYSELF. So incredibly rare though it gives me an encouraging little high.

Most of the time though I’m staring at pages of code (this goes for my Javascript Udemy course too) just perplexed, confused and having unhelpful thoughts of how I will ‘never’ learn it. That I am ‘too old’ (38 ?!) and on really bad days buying into the sexist crap as well and blaming being female (!!??!! only in split seconds of madness).

I have a strong goal of wishing to be self employed (at least partly) within two years so maybe this makes learning coding a bit high stakes sometimes. My current work is at a psychiatric hospital and also a homeless hostel so very different from software…

I was just hoping there might be some reassurance out there hearing how others learn. I’m doing 100 days of code and my intention to do a minimum of an hour a day is fairly solid. I’m just unsure at the amount of help I still need.

My friend is encouraging and calls it ‘pair programming’. He’s very helpful though I often sit there looking like a dog that’s just been shown a card trick :slight_smile:

Thanks everyone

Sounds like you’re letting implementation get in the way of your solution. For your “all by my self” challenge, try this:

  • Unplug your keyboard. You don’t need that right now.
  • Grab a pen and paper.
  • On one sheet of paper, describe the problem in your own words. Write down what you will start with and what you need to finish with.
  • In English (or your first language) write down steps for how you would do this without a computer.
  • (It can be hard to start out with the abstract idea of “Find the longest word in a string,” so think about how you would do it if you knew the string would be “The longest word”. This is your nice short test case.)
  • You probably skipped steps within your steps. For example, the step “Get peanut butter” is really “Go to kitchen. Open pantry door. Move cereal box. Pick up peanut butter jar. Put back cereal box. Close pantry door. Carry peanut butter to table.”
  • Depending on how you like to work these things out, turn this into a list, a decision tree, a graph, whatever. You’re just creating instructions for someone very dumb. (Programming computers isn’t hard because they’re smart. It’s hard because they’re stupid.)
  • When you think you have a good set of instructions, start writing them out again. When you recognize “steps” as something you know how to do in JavaScript, write pseudo code (still only pen and paper!). For example, you might recognize an ifelse pattern.
  • Feel free to repeat that last step a few times.
  • Only now should you actually look at the computer.
1 Like

Thank you!

What a great, clear and sane piece if advice :slight_smile: I really like the idea of coming away from the computer as I know by now that just staring at the screen isn’t as productive as I’d like.

It’s very motivating. I have a pen and notebook on my desk!
Thanks for taking the time