The public and private variables are suspect; but, they probably came from reading several, several tutorials, and she doesn't know how and when exactly to use them yet. In the snake code example, I also noticed that she was using different styles for calling methods on the document and snake; but that would also be from doing things like searching how to capture keyboard input from JS. Different people do it different ways.
As for the tabbing/etc? Especially in Javascript, all it takes is missing a few closing braces and many people will start tabbing out their code just to find where they missed the tab, then they'll start thinking "Hey, that looks nice, I'll do it more!"
And, as other people have mentioned, if you're using an IDE or any intelligent text editor (even Notepad++), it'll start auto-tabbing for you.
The public and private variables are suspect; but, they probably came from reading several, several tutorials, and she doesn't know how and when exactly to use them yet. In the snake code example, I also noticed that she was using different styles for calling methods on the document and snake[1]; but that would also be from doing things like searching the internet on how to capture keyboard input from JS. Different people do it different ways.
As for the tabbing/etc? Especially in Javascript, all it takes is missing a few closing braces and many people will start tabbing out their code just to find where they missed the tab, then they'll start thinking "Hey, that looks nice, I'll do it more!"
And, as other people have mentioned, if you're using an IDE or any intelligent text editor (even Notepad++), it'll start auto-tabbing for you.
[1] When I was first learning Java, I didn't know why classes had to start with public class; nor did I know why I had to write a seemingly long-winded public static void main(String[] args) magic phrase to make the program start there. I didn't know what any of those words meant, but I did them because they were the right thing. Now, years later, I know what each part of that means; but, I did it back then because it was what I was told I was supposed to do. She is probably in that phase for many of these things; and, that's okay! If she keeps up with her craft; and, as her time starts coming to a close, she starts creating novel projects or slows her use of tutorials, you'll see she's starting to create her own style; and that's okay too!
She's an artist. She knows when tracing helps like she knows when drawing it freehand helps. Funny enough, painting/drawing and programming aren't all that different in some styles. Start with the scaffolding and fill in the details.
As for the tabbing/etc? Especially in Javascript, all it takes is missing a few closing braces and many people will start tabbing out their code just to find where they missed the tab, then they'll start thinking "Hey, that looks nice, I'll do it more!"
And, as other people have mentioned, if you're using an IDE or any intelligent text editor (even Notepad++), it'll start auto-tabbing for you.
The public and private variables are suspect; but, they probably came from reading several, several tutorials, and she doesn't know how and when exactly to use them yet. In the snake code example, I also noticed that she was using different styles for calling methods on the document and snake[1]; but that would also be from doing things like searching the internet on how to capture keyboard input from JS. Different people do it different ways.
As for the tabbing/etc? Especially in Javascript, all it takes is missing a few closing braces and many people will start tabbing out their code just to find where they missed the tab, then they'll start thinking "Hey, that looks nice, I'll do it more!"
And, as other people have mentioned, if you're using an IDE or any intelligent text editor (even Notepad++), it'll start auto-tabbing for you.
[1] When I was first learning Java, I didn't know why classes had to start with public class; nor did I know why I had to write a seemingly long-winded public static void main(String[] args) magic phrase to make the program start there. I didn't know what any of those words meant, but I did them because they were the right thing. Now, years later, I know what each part of that means; but, I did it back then because it was what I was told I was supposed to do. She is probably in that phase for many of these things; and, that's okay! If she keeps up with her craft; and, as her time starts coming to a close, she starts creating novel projects or slows her use of tutorials, you'll see she's starting to create her own style; and that's okay too!
She's an artist. She knows when tracing helps like she knows when drawing it freehand helps. Funny enough, painting/drawing and programming aren't all that different in some styles. Start with the scaffolding and fill in the details.