I get asked all the time about my process for writing songs.  Having never written a hit song, I am certainly not an authority on the subject, but I have written a number of compositions that people seem to enjoy, so I'm happy to tell you what works for me.  There is no specific formula for how I write.  Most of my ideas hit me out of the blue during periods of solitude.  I could be exercising, taking a walk, sitting on an airplane or washing up in the morning and a tune, riff or lyrical phrase will just pop into my head.  I may write it down or hum it into the voice recorder on my phone, or I may not.  If it disappears, it was never meant to be.  If it sticks with me, it has potential.  People always ask whether I start with the music or the words.  Usually, I write the music and lyrics together but, on occasion, I start with the music and other times, I come up with a lyric first.  Quite often, I let the mood of the music take me down the path to the subject matter.  That seems to work well with some pieces.  For me, coming up with the topic of the song is usually the most difficult part of the process.  Once I have a topic, the words usually flow pretty easily.  I find it challenging to sit down at the piano or with my guitar with the intent of writing a song from scratch.  It has happened but I much prefer to have the concept in my head beforehand.  Most pieces I start with never see the light of day and rarely does the finished lyric resemble the earlier versions.  In fact, I sometimes start with words that don't make any sense at all, just to get the proper phrasing and song structure off the ground. Something I'm working more and more on is minimizing what I call "throw-away lines.'  Many songs have lines that are included for no other reason than to finish a rhyme.  I much prefer to make every phrase count and have real meaning but it's much easier said than done.  I've written songs in as little  as 30 minutes while others have literally taken months or even years to complete.  Composing my own material has given me a new found respect for all the legendary songwriters that have inspired me over the years, and as I continue to hone my own skills, I definitely find myself listening to music with a more scrutinizing, though appreciative, ear.