If programming seems hard, it might be because you need to learn a separate discipline depending on the order of magnitude of your codebase LOC:
10⁰: Axiomatics
10¹: Logic
10²: Mathematics
10³: Computer Science
10⁴: Software Engineering
10⁵: Group Psychology
10⁶: Politics
10⁷: Crisis Management