@futurebird Also, I tell junior devs to think back to science class. Every change you make to code is an experiment; your hypothesis is that the new code will be somehow better than the old. But you can't put too many variables in an experiment, or you won't know which changes mattered and why.
So test often. Test after every line of code if you have to. It sounds annoying but it's much easier than the avalanche of bugs you get when running 1000 new lines the first time.
Yes, that's exactly what I did! I already posted a couple of answers, but after looking at the whole thread I realized I didn't really understand the question. Yes, I think this is the answer to the question.
@futurebird oh I see, indeed this was with university students, I've never teached computer science to younger students so I'll read what others have suggested. But at any stage of learning, I completely agree that some fun being involved greatly greases the wheels :)
@futurebird Some of it may be the lack of confidence in being able to fix it. I have seen devs who, as soon as they hit an issue, immediately look to make it someone else’s problem, so I fully support teaching them how to debug.
I like the idea of giving them buggy code. A lot of being a developer is finding the mistake the past developer (often yourself) made. :)
@futurebird Thank you for asking this. It made me feel useful, and brought back good memories now that I'm retired. Something else it made me think of was students' reaction when I'd come over to help with a problem they'd been struggling with for a while and point right at it. They would be all amazed and say how did you do that, and I'm like, well I've seen it hundreds of times. 😄
@futurebird@nicklockwood to me that’s one of the fundamental truths of programming (or doing real math or science). Most of the time you’re wrong and trying to figure out how to fix it or address it. We do t spend much time on our successes we go on to the next thing that isn’t working. So I agree with your thoughts
@futurebird Also, I tell junior devs to think back to science class. Every change you make to code is an experiment; your hypothesis is that the new code will be somehow better than the old. But you can't put too many variables in an experiment, or you won't know which changes mattered and why.So test often. Test after every line of code if you have to. It sounds annoying but it's much easier than the avalanche of bugs you get when running 1000 new lines the first time. Go slow to go fast.
@LaVi già, proprio così. Anche comprando il caffè più costoso, a casa risparmi alla grande. Considerando poi che con quei 30€ abbondanti risparmiati, ci pago la fibra a casa.
@LaVi @Alberto Interessante.Certamente quello che ho visto aveva un aspetto molto fedele al lupo grigio.Teneva sempre il muso un po’ basso, il collo allungato, guardandosi attorno. Aveva un movimento lento, come guardingo. Non abbaiava.Stava sempre vicinissimo all’uomo, in bottega lo lasciava libero ma lui stava accucciato ai suoi piedi.Perciò al supermercato, lasciato fuori, si è tanto agitato.