"Oh, I forgot that I needed to do this"

Hi everyone,
I’m putting this post here, because this is where the above happened.

When given a challenge, I am expecting to complete it with the information that I was given as well as utilize this discussion forum to solve it.

As I am just starting out on my coding journey, I realized very quickly that asking for help is very much encouraged in order to stimulate camaraderie and is practically expected. While I am very much a social butterfly, I approach all of my challenges with the process of :

  1. Solve utilizing what I have learned so far
  2. Ask for help (i.e. google, forums, etc.)

So far, this process has really helped me to retain a lot of what I have learned because I’m actually going through my code to determine if my thinking is correct and it is validated when the code compiles. It’s not unusual for me to spend over an hour of trying to solve a challenge, so that I can think of different ways to solve something and see if it works.

Unfortunately, this process does not work if the code that I have is missing something.

Minute: 7:38

The above picture was initially my first guess in what was needed, but because it was missing from the FString, I thought I was wrong.

Now, I understand that I could have tried putting “Guess” next to the FString so see if it would work, however why would I question that my instructor’s coding was wrong/incomplete? More importantly, how would I know that I needed to put it exactly there without asking someone first?

If this was the intent of the challenge, it probably would have been good to mention.

I do understand that this is more of a rant than anything productive, but I feel that this will become a huge issue for me to continue this course if I’m expected to get help in order to correct my instructors work.

Thank you.

Hi @GeneCPChung I think the biggest thing that you are overlooking is that coding requires a lot of attention to detail and critical thinking. Imagine if you were making this game on your own. You would have to be on point on what exactly your putting or else spend a lot of time hunting down the problem. It could be a simple forgetting a “;” or in your case forgetting to put a parameter. So when taking on these challenges you want to take the chance to think critically on what your doing and how to go about doing in it and double checking your code.

In this case the problem was a lack of understanding of functions. Functions was covered on an earlier lecture right about when we started building the game. To give you a recap, a function looks like this:
Type Name(Parameter)

an example would be:
int Add(int x,int y)
return x+y;

Remember that a basic function takes an input and produces and output though it doesn’t always need input or to produce and output. In the case of the example we want a function to add two numbers so we want our function to take in two numbers and produce one number. Noticed that the parameters have to be specified the type and need a variable that will be used in the scope of that function. Without it the function will only know the type but won’t know where to put it.

When you were grabbing your guess word your first reaction should’ve been where is my guess word coming from. How did I identify the guess word for the function I’m currently using. You wrote guess.length() assuming that the function knew what you were doing but you should never assume. In other words, your mistake was like if you meant to write int number = 5 but instead skipped that or just wrote int and started using the variable number in your code. So now the compiler is going, “I don’t know what number is?”

Hope this helps and don’t feel discouraged. I’m a beginner as well and am facing challenges but practice makes perfect so hang in there.

On another hand, I felt really good that I figured on my own that “Guess” was missing from that line. It took me more than 20 minutes to get it right and I tried 6-7 different things. I feel things like this improve my knowledge much more than when you have everything served on a platter. Anyway, so far, really enjoying these lectures.

Privacy & Terms