IANAMechanic, for what it’s worth…
I might suggest the EGR valve (exhaust recirculation valve), but since it happens with both a hot and cold motor, I don’t think this is likely. If you have an EGR valve with an exposed diaphram, a quick check for functionality is to depress it with a cold start and the motor should die when at idle. But since you can’t idle to well, you may need someone to help keep the RPM’s up a notch and then test it. A haynes manual will tell you precisely how to test this valve and/or the EGR control solinoid (if equipped) with an ohm and volt meter.
Next I would look into the TPS sensor (throttle positioning sensor). I mention this because you shouldn’t have to press the gas to start a fuel injection system. If out of alignment or faulty will cause idle problems. Also the IAC valve (Idle air control sensor). It can be removed and cleaned, but don’t spray rough chemicals directly on the sensor, just clean the plunger and the orifice it mates to on the throttle body and replace the o-ring. FYI, both sensors are found on the throttle body. And can also be tested via a haynes manual with a ohm and volt meter.
I was thinking about the crank sensor, if you have one. But a failure with this one is usually a no start condition right away.
The MAP sensor (Manifold absolute pressure sensor). This one can mess with the fuel calcuations in the PCM tables. Maybe what your friend was referring to about “forgetting idle speed”. Check the vaccum hose for cracks and replace if necessary. Can also be tested via a haynes manual with an ohm and volt meter.
The MAF sensor (Mass air flow sensor). I hate this one because it’s usually expensive. If you have one, it’ll be in the ducting before the throttle body. Make sure the ducting has no air leaks before and after this sensor. Can also be tested via a haynes manual with an ohm and volt meter. The little wires on the inside can be cleaned with electrical parts cleaner, do not use brake clean or WD-40. Also don’t rub the wires with anything, just spray them with the cleaner to get the crud off.
Also check the basics - Spark plug wires, ignition coil(s), PCV valve, and vaccum hoses. A leak in the vaccum system will cause all kinds of weird problems. Check them all for cracks and replace as necessary, especially the EGR valve, EVAP solinoid, and MAP sensor.
About the computer “losing its brains”. Like I said, I’m not a mechanic, and maybe some mechanic guys experience this, but I really don’t get this. Unless the computer is truly faulty, this sounds bogus. If it’s not, maybe some can come along to dispell it and show me the light. The computer, when functional, should never “lose its brains”. If it loses power due to a battery issue or such, the OPEN loop functions (cold engine program) should always be there hard coded to use when the power is good again. The CLOSED loop functions (warm engine program) are variable based on O2 readings, timing, and fuel trims that have been learned over time. And I suppose this can be lost or erased, but if this table needs to be “re-learned” again for what ever reason, it won’t run like crap to get to get optimum trims again.