Concentration is back
It is amazing what a break does to your concentration.
Saturday morning I re-attempted problem 2 and re-watched the walk through video and almost immediately discovered my incorrect thinking from my code and what I needed to change.
Problem 2
Problem 2 is about having a user inputting a sentence or string, and then encoding it with the caesar cipher, and spitting it back out. The Ceasar Cipher is relatively simple. Take below as an example
Ceasar Cipher
"The elephant" Key of 2
This means that every letter in the alphabet shifts by the Key, so 2 characters.
So "The elephant" becomes Vjg gngrjcpv
The hard part in coding is that a "z" character with a key of 1 wraps around to an "a"
I understand the next steps on what I need to do now, and I'm working on how to translate alphabet into integers and vica versa according to the ascii guide.
Finished
The code above led me down the path, but I ran into another problem getting the algorithm right, as well as my order of operations inside the algorithm. I'm going to need a refresher on this.
I initially needed help figuring out the algorithm, I peaked at forums that offered help to similar issues, and it was another "duh" moment. I had initially thought of something really similar but scrapped it and went down another route.
Realizations
I really want to finish this course. but more importantly I want to 100% understand everything I do, and not try to finish it without understanding because that negates the whole purpose of me taking this course.
I got frustrated because I was overwhelmed about how to solve the algorithm and printing out the corresponding caeser cipher letter
I felt I did well on the first 2 problem sets and on PSET2 I took a long time to finish the first and second problems and needed help while doing so.
I think my brain gets overwhelmed and always tries to piece more than 1 thing together. I don't think I've quite grasped the language of how logic and programming works just yet. When I try to break things down, I can, but I break it down in a way that breaks programming rules, which isn't logical.
I think it's important I recognized that, and try to alter my thinking when approaching problems. This is the reason why I took programming because my brain is poor at solving problems and thinking logically quickly. I like to try everything wrong first, and by that I learn how something works.
I don't know If I can change that, or if I will just struggle with everything before getting it, but I will continue on in hopes that I will be able to adapt to problems in a more logical way.
On to problem 3. I'm setting my expectations that it will take me 8-10 hours, that way I don't feel overwhelmed if I get stuck.
No comments:
Post a Comment