All the time, though nothing super complex. Mostly stuff for work.
I’ll be honest, for years I bounced off every book and course I looked at. I always had this sort of vague understanding of how code worked, but a huge disconnect between that and getting started, making it work, or even trying to read other people’s code or examples.
For me, the catalyst is having a real, definite thing I need to do. I think my first solo project was when somebody at work said “I need you to get X information about these computers”, “These computers” amounted to like 1500 of them, which I was going to have to remote into, open system information and type out the crap into a spreadsheet. I figured there was a way to do it programmatically and started figuring it out, mostly cobbling together other people’s code from the internet and adopting it to what I needed.
Point is, I wasn’t coding to do some bullshit example, I was trying to do a thing that was going to save me a ton of time and sweat. Most of my learning has come from figuring out how to do a thing, not doing a thing to learn, if that makes sense. Of course you do need a understanding of stuff like basic commands (defining a variable, foreach, while, how to read/write a file, difference between a string and a variable, etc), but even that can come with figuring out how to do something. Having a solid goal motivates me more than anything, after that I can start googling and reading docs and whatnot to figure out what I don’t know.
Even if you’re working through a course, I think it’s a good idea to have your own goals in mind, and start looking at what you’re learning through that lens. You just learned how to read/write to a file and maybe sort it, consider how you might leverage that in something you might want to do and then try it. I personally don’t have those examples click for me until I take them and use them myself, without the safety net of having the answer at the end. The nice thing about code is it either works or it doesn’t, and the people that write compilers are good enough to give you error messages so you can figure out what’s broken. Debugging your shit is part of the learning process.
I dunno, that’s a long rambling thing that’s probably not too helpful. You want a solid noob tip? Comment EVERYTHING. Comments are free and they don’t hurt your code, so feel free to write questions to yourself, long explanations about how a function or loop works, or whatever. It’s super helpful when you go back to look at old projects or reuse code.
EDIT: Here’s a great real world thing to work on that sounds easy but has some complexity to it - write code to find the five largest and five newest files on your computer.