CodeNewbie Community 🌱

Discussion on: A Month of Coding!

Collapse
 
jacobvarney profile image
jacobvarney

These questions are always fun 😄

Have you had a similar experience of catching an error that you didn't see at first because you thought your code must have been wrong, but the code was perfect the whole time and you were just looking in the wrong place or something?

In a sense! I do this periodically with some research assistance work that I do. I write computing jobs for a math professor and often he just uses alphabetical characters as variables. I follow suit in my code. Often, when something isn't working as expected, I'll get hung on reviewing the logic and the logic will be fine. However, sometimes I may just be accidentally using the wrong letter somewhere. It's hard to catch because one character doesn't stand out well (especially when there are variables named v and w in a program).

So the code isn't perfect, but my mind does focus on the part that is perfect when something goes wrong.

Collapse
 
mistydb profile image
Misty

The questions are fun for me, too! 😄

That's a great example! I think I experience something similar when I've got a typo somewhere - I end up going over the logic several times before noticing I used the wrong punctuation or misspelled something. One letter variable errors would be so hard to spot!