Experienced programmers probably also have a good feel for whether the problem they're having is truly unique (and not worth searching for), whether others will be able to articulate the problem, and how long it might take to solve the issue from first principles, hence how much effort is worth investing in the Google excavation.
Most experienced programmers also have a good feel for how much harder it is to write a solid, tested, scalable module yourself than integrate a open source solution, even if it's not perfect.
Funny story, when I was just starting out in this field, my client wanted his chip to communicate with a sensor that was already on his board. This was at the time, a brand new, unreleased product. Because our hardware engineering department didn't like to communicate with the software engineering department the CPU they chose for the project didn't support i2c, but they sensor they chose (out of many thousands of different sensors from different manufacturers) only communicated over i2c.
At the time I was obviously very frustrated with the hardware engineers so I did a simple search for other sensors in the same category. Most of them would communicate over a handful of different protocols, it just so happens that the one they picked only supported i2c.
So, since I was just starting out and my client was breathing down my neck for access to the sensor that he paid for, I figured I didn't have enough time to write my own bit-bang software driver for i2c. Instead, I would just find one on google... So the driver I picked had a really tricky bug in it where it was bit-shifting the address of the device it was supposed to be communicating with. A logic analyzer came in really handy here. So my "solution" was, instead of fixing the bug properly, I just manually bit-shifted the address the opposite direction, and then the driver bit-shifted it back. At first I used the "I estimate, that had hardware and software engineering communicated better, and worked together better, we could have shaved half the development time off of that project. Such a waste.