As mentioned by TypeIA, both Affect and Effect can be either a verb or a noun, depending on usage. However, Effect (verb) is very uncommon and Affect (noun) is almost nonexistent (I have never actually seen it used outside of examples). For now, I would suggest ignoring them entirely; they will just complicate things and make it all more confusing. So, for the time being, just remember that Effect=Noun ("a sound effect") and Affect=Verb ("bad speakers affect the sound").
Keep in mind: only verbs can change tense, so Affected and Affecting are both valid, but Effected and Effecting are not. On the other hand, nouns can be counted, so "an effect", "3 effects", "any effect", "all the effects", etc. work just fine, but you cannot have "3 affects". If you are unsure, see if you can modify the sentence a bit to use one of the above examples and it should become more clear.
Incorrect "What affect will removing this line of code have on my app?" -> "What affects [plural] will removing this line of code have on my app?" (oh no! Affect cannot be plural!)
Correct "What effect will removing this line of code have on my app?" -> "What effects [plural] will removing this line of code have on my app?" (ah, much better!)
Incorrect: "Will these changes effect my code?" -> "These changes effected my code!" (whoops! Effected isn't a word! (sort of...))
Correct: "Will these changes affect my code?" -> "These changes affected my code!" (yay! It works!)