One effective technique to use is to write the shiny new thing down. It goes into a list of things you are working on or want to work on. Let it sit for a couple of days, jot down extra ideas and details as they come to you, do a little scope statement. Initially I assign everything as "normal" priority.
Periodically come back to the list, review all items and reprioritise. If it is complete junk, scratch it off. If it's worth moving quickly on, put it high on the list. If it's worth thinking about some more or dealing with "later", lower the priority.
If you complete a current project, pull a new one off the top of the list. Not necessarily the very top, depending on time available, interest in that topic etc.
Issue tracking software is great for this (I use GNUe DCL which is a little difficult to set up but really nice once you get it going) but you can use a notebook or an emacs buffer or whatever ruffles your feathers.