There's feedback and there's feedback... but for deliberate practice, the key is that the feedback must be instant. So a code review sometime after the fact is still crucial for learning, but is not functioning as deliberate practice feedback. Deliberate practice has to fit that criteria of being fine-grained sub skills that you are consistently refining to get 'right', and can be thought of almost (or actually) as muscle memory.
A form of pair programming can work for this. Also a series of short exercises where you immediately find out if you had the right answer, like for example some code koans. The only problem I have with code koans is they almost always ramp up too quickly. For deliberate practice, the point is not to 'get the right answer' -- the point is to get the right answer so reliably that this particular subskill becomes automatic, thus draining few cognitive resources so you can move forward. If you read the book -- and I know you did THANK YOU -- think of deliberate practice as the way to cope with the PILE UP ON B BOARD problem. Anything you can think of that can provide that, but with code, of course it's not just important that you solved the problem (i.e. the code gave you the correct result) but that you solved it in the best/appropriate way, and for that you need a model of how it *should* be done.
There can never be enough examples of 'good' code, and at every level of scale/granularity from using a consistent good style in a single simple line of code all the way up to architecture choices. And of course there is no ONE single 'right way', but there are certainly a lot of good conventions, idioms, patterns out there. Of course all of this is shifting as FP ideas (and capability) moves into Java and we haven't yet settled on what the best practices are (and in what context) for this FP-in-an-OO world.
I will say that I haven't had to really write Java or even *think* in Java for a long time, and I never thought I'd get excited again about it (at least not the way I was back when, say, we finally got Java 2!! The only other MASSIVE change to the language), but Java 8 is just making me really inspired again about Java.
Kathy Sierra wrote: think of deliberate practice as the way to cope with the PILE UP ON B BOARD problem.
Oh! So for programming, "real" problems aren't good for deliberate practice because they aren't focused. Rather practicing idioms sounds better for deliberate practice.
I remember doing this when I was learning about regular expressions. I wrote similar code many times and now when I need to do a number of patterns/idioms, I don't have to think about it at all. I did the same thing when I started using Groovy for functional programming. (still am; just with harder examples.)
Kathy Sierra wrote:I will say that I haven't had to really write Java or even *think* in Java for a long time, and I never thought I'd get excited again about it (at least not the way I was back when, say, we finally got Java 2!! The only other MASSIVE change to the language), but Java 8 is just making me really inspired again about Java.
Yeah, Java 8 is awesome! I got excited about NIO in Java 7 because I do a lot of file operations in code I write. But FP is way cooler. The code feels so much cleaner and easier to read. [and yes, I know it's not really FP the way a fully FP language is. It's just making the code inside a Java program better]