At my old Hackerspace, one of those high school robotics teams came to us for some help. The kid who was doing coding could really have used that advice. He confessed to me that he didn't have time to read through all of the controller framework code and understand it completely. We were under coding marathon conditions at that point, so he wasn't far off with that. One of the motors they were using was pretty big, though. Plenty big enough to seriously hurt someone. So I urged him to at least set breakpoints in all of his stubs, and step through those in the development environment at a minimum. He was pretty dismissive about checking his work. Downright smarmy, actually.
Sure enough, something goes wrong, and the metal body of this robot ends up spinning wildly, right in the middle of the team huddled around it, sending parts flying everywhere. Miraculously, no one was hurt. Did that kid learn anything? Nope. He still knew it all.
That reminds me of me. I was overconfident in my abilities so I didn't take the advice of people who were trying to guide and help me. But looking back, I think a big part of what played into that overconfidence was not seeing that I actually could do the cool things I saw other people doing, because I had no one to show me how. So I was satisfied with doing slightly cool things and convincing myself it was amazing. I think a good mentor can show you a clear path from A to Z and get you excited about the fact that you actually can do B, you just have to start with A, then go to B, etc. That's one of the things I've been doing with my son, is trying to show him a cool thing that seems too advanced for him, and show him that it's only a small step up from where he is, and that after a simple 30 minute lesson that he fully understands, suddenly he can actually do the thing he thought was impossible! He just went from A to B in 30 minutes! Enough times of doing that and you're already half way to Z and it doesn't seem so impossible, so you stop being satisfied with letting yourself thinking B is actually Z. I'm probably not making much sense, but I hope the point is coming across at least a little.
That's one of the things I've been doing with my son, is trying to show him a cool thing that seems too advanced for him, and show him that it's only a small step up from where he is
Right on! One of the most valuable skills I've learned over the past several years, is how to decompose your projects into small pieces, then decompose those things into even smaller bits and keep going until the pieces seem downright stupid. That last part is the key. You have to keep going until you'd feel insulted if someone asked if you could do those things. This sounds bad, but it's actually a very powerful mental tool.
Let's say you want to build an MMO. That's a really huge, complex chunk of work. So let's just take a piece of that, let's say the networking part. That's still really huge, so let's just take a piece of that, like the part that synchronizes the client's ship position. That's still quite big, so let's just make something that can send some kind of data between some clients and a server. Well, it turns out there are a bunch of tutorials online for building a Websockets chat server, so let's just start with going through one of those.
Then, when you can send/receive data, write a game loop simulation of an Asteroids ship, and build it into the server. Then, for a client, forget about networking altogether and go through a Javascript Asteroids tutorial. Next, sync those two in the stupidest way possible. Then, when that's working, make your sync just a bit smarter. Rinse and repeat. This is actually how I started building my game server.
(You can see a sort of reverse chronological order of this process here:
What’s the context here? You mentioned lua, is it love2d (gfx or game oriented)? What’s a C to D example of what you’re talking about? Interested because I have an almost six year old, time to get going on this sort of thing myself!
We've been using Love2d and PICO-8, but he's a teenager. I too tried to teach him programming at an early age and then every few years after that, but none of it clicked until recent years.
Find a good mentor!
At my old Hackerspace, one of those high school robotics teams came to us for some help. The kid who was doing coding could really have used that advice. He confessed to me that he didn't have time to read through all of the controller framework code and understand it completely. We were under coding marathon conditions at that point, so he wasn't far off with that. One of the motors they were using was pretty big, though. Plenty big enough to seriously hurt someone. So I urged him to at least set breakpoints in all of his stubs, and step through those in the development environment at a minimum. He was pretty dismissive about checking his work. Downright smarmy, actually.
Sure enough, something goes wrong, and the metal body of this robot ends up spinning wildly, right in the middle of the team huddled around it, sending parts flying everywhere. Miraculously, no one was hurt. Did that kid learn anything? Nope. He still knew it all.