What is in a name? — blog.acthompson.net

It’s been said that the three hardest things in programming are naming things and off by one errors. For some reason, this semester, my students are having the most trouble with naming things. Specifically, they seem to have trouble making the connection between names and objects. For example, they will use the name of what looks like a text box but without actually instantiating the text box firs Or they will use a different name for the textbox than the name the textbox actually has. And they’ll be surprised at getting an error message that says “the name ‘x’ does not exist in the current context.” The same is true with undeclared variables. Often this is caused by not paying attention. I will set the name of an object while live coding and then use that name later in the code. If they were not paying attention any of the three times I point out the name declaration they may not use the same name in their own code but expect it to work later. After all, it worked when Mr. Thompson did it.

Read More



This site uses cookies to give the best and personalised experience. By continuing to browse the site you are agreeing to our use of cookies. Find out more here.

Sign Up or Login

Invalid username or password
Not yet on CircleMe? Join now
Please input a email
Please input a valid email
Max 50 characters
Email already in use
{{email_serverError}}
Please input a username
Min 3 characters
Max 20 characters
Please use only A-Z, 0-9 and "_"
Username is taken
Please input a password
Min 6 characters
Max 20 characters
By clicking the icons, you agree to CircleMe terms & conditions
Already have an account? Login Now