In mentoring engineers I've found that some are doing what amounts to advanced pattern matching. They memorize the syntax for a for loop but never really internalize what it does (they just seem to know write these letters if you want things to repeat). Not dissimilar to what I suspect LLMs are doing when they generate code.
By contrast when I write code I see in my minds eye what the code should do, tinker with it, formulate an algorithm, and only then do I try to translate what's in my head into syntax.
When asked how people can learn this skill (or get better at algorithms in general) I always say they should practice writing code by hand.
By contrast when I write code I see in my minds eye what the code should do, tinker with it, formulate an algorithm, and only then do I try to translate what's in my head into syntax.
When asked how people can learn this skill (or get better at algorithms in general) I always say they should practice writing code by hand.