Let me begin by explaining that I teach English As A Second Language in the Texas University and College System, and my students tend to be very demanding of "rules." I have been seeking 'rules' that govern the use of articles with gerunds. If you will allow me, I will show some of the grammar structures that plague a "general rule":
We can say, "Making a cake is fun." Does anyone see a change of meaning when we say, "The making of a cake is fun" or "Cake making is fun"?  Here, in the first example, cake is the gerund's object, and then the introduction of an preposition removes the gerund's object. When the gerund does not take an object, as in "Swimming in a race is fun" or "Running in a race is fun," when adding an article,  the preposition needs to change to "The swimming/running of a race is fun." Does the meaning change? And, as a third problem, "Swimming in a pool is fun." Here, it becomes awkward to change it to "The swimming in a pool is fun" (I think one would never say this nor "The swimming of a pool is fun." - but, "The swimming of the English Channel is fun" sounds credible). Do "Pool swimming is fun" and "English Channel swimming is fun" have the clearly different meanings - more general in connotation - I think they have?
        Trying to quote "grammar rules" to guide my students through this labyrinth of articles and gerunds has become a challenge. (Like the 'natural progression of adjectives' we use but that are difficult to show by "rule."  The big old brown cow - not, usually - The  brown old big cow.) Have any of you discovered a magic source to guide students through these mine fields? Am I trembling at monsters that are not really under the bed? I simply hate to appear lazy and fall back on the ole "It's a usage thing" popular with some teachers. I would appreciate any guidance and/or suggestions you might care to share.
Gordon in a very hot and very dry Texas