Dangling participles often make good jokes. But they can be confusing and it's best to avoid them. A participle should describe the grammatical subject of the main clause, as in the sentence Walking down the road, I bumped into a friend. A dangling participle is one that the speaker really intends to describe something other than the grammatical subject of the sentence. If we interpret Riding along on my bicycle, a dog knocked me over grammatically, the participle riding must relate to dog, so we end up with a dog that has first stolen a bicycle and then ridden it carelessly! The speaker really means riding to relate to me, and anyone reading or hearing the sentence would understand this. As a rule, however, it's best to construct sentences so that they say what you really mean them to.