Skip to main content

Learn to Program

You already “program” in everyday life—any time you plan steps to reach a goal, you’re doing it.Programming on a computer is simply the formal, precise version of that.To get good at it, treat programming as a practice: time-boxed, focused, and with a specific outcome you want to reach.

Learn about Object Oriented Programing 

Did you know that data has a shape?

What is your goal?



Debugging Debugging is the process of figuring out why your program isn’t behaving the way you expect.
It’s detective work: identify symptoms → trace causes → fix the root issue.

Understand the 'Base Case

Functions let you break problems into reusable, well-defined chunks.


A good function has:

  • A clear purpose

  • Defined inputs

  • A predictable output

  • No unnecessary side effects

This makes debugging and testing dramatically easier.

Performance refers to how efficiently your program runs:

  • Time (speed)

  • Space (memory)

  • Responsiveness

You don’t optimize first.


You optimize after your program is correct and measurable.

Your future self (and teammates) should be able to test your code with minimal effort.


This means:

Getting Specific

A specification answers two questions:

  • What should this program/function do?

  • How do we know if it is correct?

A spec reduces ambiguity and guides testing.

Watch this video about Variables 

Break your program into separate modules (files or components), each responsible for one part of the problem.Why?

  • Easier debugging

  • Easier testing

  • Easier collaboration

  • Easier to extend later

Watch this video about Protocols

Testing

Testing is how you confirm your program matches the specification.Input → Output Testing Given specific inputs, does your function produce the outputs the spec says it should? 

Debugging vs Testing

  • Debugging: finding the cause of a failure

  • Testing: checking whether a failure exists

Unit Tests

Test small, isolated parts of your program (usually functions or classes) to ensure each piece works independently.

Integration Tests

Test whether all components work together correctly.This is the mature testing stage—you can’t do it until you have working parts to assemble.


def max(x, y):
    # x & y are floats
    ...

Even this tiny function has billions of possible input pairs.


You’ll never test all
cases.So we build a test suite:

  • Small enough to run quickly

  • Large enough to give confidence

A test suite doesn’t prove a program is perfect, but it drastically reduces the chance of bugs.

Testing reveals where things fail.
Debugging reveals why they fail.Together they form the core cycle of real programming:

Write → Test → Debug → Improve → Repeat

Watch Design Based Thinking

Watch Data Insights and how to cross the river

Watch Threat Modeling

Watch Brute Force Algorithm

Watch The Art of Coding w/ Pybytes

Have a question? Send me an email

Resources and References