You can remember the meaning of 工厂 with this easy mnemonic:
I hate working (工) at that factory. It is located on the side of the cliff (厂) and I'm afraid of heights.
Using mnemonics to remember the meaning of Chinese characters like can have an enormous impact on how long to learn Mandarin it takes.