EC101: Programming as Thinking
Python, Logic, and Human Reasoning
Variables as memory, functions as abstraction, code as formalized thought
π Overview
You've learned how humans think. Now learn how to formalize that thinking into code.
Programming isn't about memorizing syntaxβit's about taking the cognitive patterns you already use and expressing them in a language computers understand.
What You'll Learn:
- Variables as named thoughts in working memory
- Functions as chunking mechanisms
- Branching as decision modeling
- Loops as cycles of refinement
- Data modeling as meaning modeling
π― Key Outcomes
By the end of this course, you will:
- Write Python code that solves real problems
- Understand why code is structured the way it is (not just how)
- Think algorithmically about everyday tasks
- Debug systematically using metacognitive loops
- Model problems before writing code
π Prerequisites
- EC000 - Understanding cognition as a system
πΊοΈ Course Structure
Module 1: Variables & Memory
Focus: Storing and manipulating information
Lessons:
- 1.1 - Variables as Named Thoughts: Why we name things
- 1.2 - Types as Categories: How computers classify information
- 1.3 - Scope & Context: When variables exist and die
Project: Build a personal information tracker
Module 2: Functions & Abstraction
Focus: Chunking procedures
Lessons:
- 2.1 - Functions as Mental Chunks: Packaging thought patterns
- 2.2 - Parameters & Arguments: Inputs to procedures
- 2.3 - Return Values: Outputs from computation
Project: Create a library of reusable utility functions
Module 3: Control Flow
Focus: Modeling decisions and repetition
Lessons:
- 3.1 - Conditionals as Decisions: If/else as choice points
- 3.2 - Loops as Refinement: Iteration in thought and code
- 3.3 - Breaking & Continuing: Escaping loops intelligently
Project: Build a text-based decision tree game
Module 4: Data Structures Intro
Focus: Organizing information
Lessons:
- 4.1 - Lists as Sequences: Ordered collections
- 4.2 - Dictionaries as Associations: Key-value thinking
- 4.3 - Choosing the Right Structure: When to use what
Project: Create a contact management system
Module 5: Problem Decomposition
Focus: Breaking problems into solvable pieces
Lessons:
- 5.1 - Top-Down Thinking: Starting with the big picture
- 5.2 - Bottom-Up Building: Assembling from components
- 5.3 - Debugging as Hypothesis Testing: Scientific problem-solving
Project: Build a complete application from scratch
π Connections
Builds On
- EC000 - All cognitive concepts from EC000 appear here in code
Leads To
Used In Hackathon Lab
- Every hackathon week uses these foundational concepts
π‘ Key Concepts
Concept 1: Variables = Named Thoughts
Just like you hold thoughts in working memory, variables hold values in computer memory. Naming them well makes code readable.
In Practice: user_age is better than x
Concept 2: Functions = Chunking
Experts don't think in individual stepsβthey think in chunks. Functions let you do the same in code.
In Practice: calculate_discount(price, percentage) chunks pricing logic
Concept 3: Loops = Mental Cycles
You naturally iterate ("try again until it works"). Loops formalize this.
In Practice: while not solved: try_solution()
π οΈ Practical Applications
- Automate repetitive tasks in your daily life
- Think more clearly about problem-solving
- Build tools that serve real needs
- Prototype ideas quickly
π Resources
- Reading: "Think Python" by Allen Downey
- Practice: Daily coding challenges
- Community: community
π Getting Started
Difficulty: βββββ Beginner
Time Commitment: ~12 hours
Prerequisites: EC000
Next Course: EC102