Before becoming a team lead, I was the type of developer who, when given a task, would dig into the application api's, the database schema, the configuration, whatever it took to fill in the gaps to accomplish the task. Sure I'd get stumped sometimes, but I'd always try to ask for help sooner rather than later.
Now, I'm a lead of 4 developers. Two are like I was, I can give them a task, they'll go do it with minimal guidance. The other two will spend hugely more time on tasks. I've notice they tend to go off on tangents, spending time things that aren't relevant, like setting up vm envirnoments they don't need when they can develop and test locally. There have been occassions when they have asked me for help, and then a week later come back with the same question as though we had never talked about it.
It's baffling to me, it's like they're "scatterbrained", ie not focused or concentrated. How does one manage people like this?
From your description, it sounds like these programmers are not as efficient in their work, or as task/goal-oriented as you'd like them to be, but not that they're completely incapable. Sometimes you will find programmers who can't program; they're hopeless, you have to fire them. But otherwise good programmers can be awful at managing themselves... and you're the manager, after all, so it's your problem to solve. Of course, you don't want to micro-manage them every hour of the day; that's not scalable.
Not every aspect of Extreme Programming is applicable to every situation. But a quick morning standup meeting can be a very effective tool. First, you will find out when people get off track and are having problems. Second, it creates some accountability to advance the ball every day. Third, while you must actively work to have the team cooperate instead of compete, it will naturally create some competitive and evolutionary pressure, where the more focused members of your team provide a good example and, over time, can share some of their secrets. Finally, the standup helps reinforce teamwork. If someone is having a hard time with a task, you can respond and say, "hey, you know, Bob's in a good place with what he's working on, why doesn't he help you out today, see whether a fresh perspective can help?"