How do I keep my extruder head from getting clogged? Using a thermoplastic MDF printer with a 0.4mm extruder nozzle, I frequently have trouble with the nozzle getting clogged.

I am not sure what's causing the clog, but my guesses are dust and/or burnt filament (from leaving the hot end on without extruding).

What can I do to prevent, or at least minimize, the extruder nozzle getting clogged?

Bonus question: What other common causes of clogs are there? (ie what should I watch out for besides dust and leaving the hot end on?)
Different types of hotends and extruders can lead to different problems associated with clogging. Based on my personal experience the leading causes of clogs and jams are the following


Foreign material in the nozzle (dirt, dust, low quality filament)
Mixing materials in the hotend (running ABS at 220 then switching to PLA without purging the nozzle)
Excessive retraction or "heat soak" in PLA (PLA expands when heated if your retraction is set to high you can actually push the expanded PLA high enough that it cools down and can no longer flow)


To solve these issues I recommend using one type of filament, preferably decent quality (typically $40 per kg), if you swap materials be sure to completely purge your nozzle of the higher temperature material. Set your retraction as low as you can trying to minimize ooze (try .4 mm for all metal hotend or 2-3 mm for makerbot style). To minimize carbonized plastic in your hotend don't leave your hotend's heater on for extended periods of time. One way to keep dust from accumulating on your filament is to cover your rolls when you aren't using them, I personally use hairnets, you can buy a 12 pack for a couple of dollars and they last for a long time.