Computer Input/Output: Fundamentals of Programming Part 3

Remember learning about how computers store different types of information—like words versus numbers versus true/false values? That foundation matters because now we’re going to talk about something even more fundamental: how programs actually communicate with you and with the world around them.

Here’s the thing: a program that just sits there calculating stuff internally but never shows you results or asks for your input would be completely useless. It’s like having a calculator that can do math but has no buttons to press and no screen to show answers. That’s where input and output come in.

Input/Output (I/O for short) is basically how programs interact with everything outside their own code. When you type something, that’s input. When something appears on your screen, that’s output. Simple as that.

What We’re Covering Today

  • What I/O actually is (with examples you already know)
  • Input: all the ways programs receive information
  • Output: all the ways programs send information back
  • Why waiting for I/O sometimes makes apps feel slow
  • What happens when things go wrong (and why programs need backup plans)
  • AI-powered activities to make these concepts stick

Let’s get started.

What Exactly Is Input/Output?

Input/Output means any time your program talks to something outside itself. Let’s look at examples you deal with every single day:

Input examples you already know:

  • Typing your password into Instagram
  • Taking a photo with Snapchat
  • Tapping “Send” on a text message
  • Downloading a file from Google Drive
  • Your fitness tracker reading your steps

Output examples you already know:

  • Seeing your feed load on TikTok
  • Your Spotify song playing through headphones
  • Getting a “Message Delivered” notification
  • Your essay being saved in Google Docs
  • Your phone vibrating when you get a text

Every single app you’ve ever used is constantly doing input and output. That’s literally all apps do—they take input from you or from somewhere else, process it, and give you output.


ACTIVITY 1: Spot the I/O

Try this with ChatGPT, Claude, or any AI assistant:

Copy and paste this prompt:

I'm going to describe using an app.
You tell me every input and output operation that happens.
Ready? 
I open Instagram, scroll through feeds, like a post, and leave a comment.

Watch how the AI breaks down every single I/O operation:

  • Touch input (opening the app)
  • Internet input (loading feed data)
  • Screen output (displaying posts)
  • Touch input (tapping like)
  • Internet output (sending like to servers)
  • Keyboard input (typing comment)
  • Internet output (posting comment)
  • Screen output (showing your comment)

Now try it yourself: Describe any app activity and ask the AI to identify all the I/O operations. Try: playing a mobile game, sending a voice message, ordering food delivery, or watching Netflix.

What you’ll learn: You’ll start seeing I/O operations everywhere, even in simple actions you do hundreds of times daily.


Input: Getting Information Into Your Program

Input is anything that brings data into your program from somewhere else. Let’s break this down by looking at what you probably interact with every day.

Where Input Actually Comes From

Your Keyboard

Every time you type—whether it’s a text message, a Google search, or your Roblox username—that’s input. The program receives each letter, number, or emoji you press and stores it as data it can work with.

Think about typing a text message. Each tap on your phone keyboard sends one character to the messaging app. The app collects all those characters until you hit send.

Your Mouse, Trackpad, or Touchscreen

When you:

  • Click “Like” on an Instagram post
  • Drag a file to the trash
  • Swipe through Snapchat stories
  • Pinch to zoom on a photo

Your physical movements get converted into input data the program understands. A click becomes a coordinate (like “user tapped at position X: 150, Y: 320”). A swipe becomes a direction and distance.

Files on Your Device

Programs can open and read files you’ve saved:

  • Your photo editor loads that selfie you took yesterday
  • Your music app reads the MP3 files in your library
  • Google Docs opens that essay you wrote last week
  • A game loads your saved progress

The program reads the file from your storage and brings all that data into memory where it can work with it.

Sensors

Your phone is packed with sensors constantly feeding input to apps:

  • Camera: Captures images and videos (Instagram, Snapchat, FaceTime)
  • Microphone: Records your voice (voice memos, Shazam, Discord)
  • GPS: Tracks your location (Google Maps, Uber, Pokemon Go)
  • Accelerometer: Detects motion and tilt (fitness apps, racing games)
  • Fingerprint/Face ID: Reads your biometrics for security

The Internet

This is happening constantly on your phone, even if you don’t realize it:

  • Instagram loads photos from its servers
  • YouTube streams video data to your device
  • Weather apps download current conditions
  • Multiplayer games receive updates about other players
  • Group chats sync messages from the cloud

The internet is just input coming from computers far away instead of from your own device.

ACTIVITY 2: Build Your Own I/O Map

Try this with your AI assistant:

Help me create an input/output map for [your favorite app]. 
Ask me questions about how I use it.
Then show me all the input sources and output destinations involved.

The AI will interview you about how you use the app, then create a visual map showing:

  • Every type of input the app accepts
  • Every type of output it produces
  • How they connect to create the experience

What you’ll learn: You’ll see how complex even “simple” apps are, and how they juggle dozens of different I/O operations to create a smooth experience.


Real Example: What Happens When You Post on Instagram

Let’s trace all the input involved in posting one photo:

  1. Camera input: You take a photo (sensor captures image data)
  2. Touch input: You tap the Instagram app icon (coordinates sent to phone)
  3. File input: Instagram reads the photo from your camera roll (file data loaded)
  4. Keyboard input: You type a caption (text data received)
  5. Touch input: You tap “Share” (coordinate triggers action)
  6. Internet input: Instagram confirms your post was received (data from server)

Six different types of input just to post one photo. And you do it without even thinking about it.

Output: Sending Information Out

Output is anything that sends data from your program to somewhere else. Again, let’s look at examples from your actual life.

Where Output Actually Goes

Your Screen

This is the most obvious output. Literally everything you see on any screen is output:

  • Text messages appearing in your chat
  • Your Instagram feed loading
  • Search results showing up on Google
  • Your character moving in a game
  • YouTube video playing

Programs take data (text, images, videos) and convert it into pixels on your screen that your eyes can see.

Files Saved to Your Device

When programs save data:

  • You edit a photo and save the new version
  • You download a song from Spotify for offline listening
  • You export a video you made in CapCut
  • Your game automatically saves your progress
  • You download a PDF from your school website

The program takes data from memory and writes it to storage where it stays even after you close the app.

Speakers and Headphones

Programs output audio:

  • Music playing from Spotify
  • Your friend’s voice on a FaceTime call
  • The “ding” when you get a notification
  • Sound effects in games
  • Text-to-speech reading something aloud

The Internet

Programs constantly send data across the internet:

  • Posting a tweet (text data sent to Twitter’s servers)
  • Sending a Snapchat (image data uploaded)
  • Searching on Google (your search terms sent to Google)
  • Joining a Discord voice chat (audio data streaming out)
  • Backing up your photos to iCloud (image files uploaded)

Other Devices

Some apps control physical stuff:

  • Smart light bulb apps turn lights on/off
  • Phone vibration motor buzzes when you get a text
  • Printer produces your homework on paper
  • Wireless earbuds pair with your phone

ACTIVITY 3: I/O Detective Challenge

Try this with your AI:

You open your weather app.
See 'It's 72°F in your location with clear skies.'
What inputs made this happen?

Example the AI might give you: “You open your weather app and see ‘It’s 72°F in your location with clear skies.’ What inputs made this happen?”

Your detective work:

  • GPS input (getting your location)
  • Internet input (downloading weather data from servers)
  • Time input (getting current date/time to fetch accurate forecast)

Ask for 5-10 different scenarios to solve. The AI can make them progressively harder.

What you’ll learn: You’ll start thinking backwards from output to input, which is exactly how programmers debug problems.


Real Example: What Happens When Someone Texts You

Let’s trace the output chain when you receive a message:

  1. Internet output (from their phone): Their message travels across the internet to the messaging servers
  2. Internet input (to your phone): The message data arrives at your phone from those servers
  3. Screen output: The text appears in your messages app
  4. Sound output: Your phone plays a notification sound
  5. Vibration output: Your phone buzzes
  6. File output: The message gets saved to your local message history

Notice how one action triggers multiple types of output. And this all happens in under a second.

Why Apps Sometimes Feel Slow (And Why It Matters)

You’ve probably experienced this: you tap something on your phone and… nothing happens for a few seconds. The app feels frozen. Maybe there’s a spinning loading wheel. This usually happens because of I/O.

Here’s the deal: Your phone’s processor is insanely fast. It can do billions of math calculations per second. But I/O operations—especially reading big files or waiting for internet data—take way longer.

Think about it like this:

Doing math in memory: Like grabbing a book off your desk (instant) Reading from storage: Like walking to your backpack to get a notebook (takes a moment) Waiting for internet data: Like waiting for someone to text you back (could be seconds, could be longer)

When an app needs to wait for I/O—especially slow internet I/O—that’s when you see loading screens and spinning wheels. The app is literally just sitting there waiting for data to arrive.

Why This Isn’t Always a Problem

Smart apps handle this in two different ways:

Option 1: Wait for everything to finish (the simple way)

Some apps just stop and wait. When you click “open file,” the app freezes until the file is fully loaded. You can’t do anything else until it’s done.

This is like making a sandwich: you have to finish spreading the peanut butter before you can spread the jelly. One thing at a time, in order.

When this works: Opening a file is fast, so waiting half a second isn’t a big deal.

When this sucks: Downloading a big video file while your entire app is frozen for two minutes.

Option 2: Keep working while waiting (the modern way)

Better apps start loading something, then let you keep using the app while it loads in the background. You’ve definitely experienced this:

  • Scrolling through Instagram while new posts load at the top
  • Watching the first part of a YouTube video while the rest downloads
  • Sending a message in Discord while your previous message is still sending
  • Playing a song on Spotify while your full playlist downloads

This is like doing homework while occasionally checking your phone. You can switch between tasks instead of just sitting there waiting.

When this works: Almost always. It keeps your app feeling smooth and responsive.

When this is harder: The programmer has to write more complicated code to juggle multiple things at once.

Most modern apps use option 2 because nobody likes frozen apps. But option 1 is simpler to build, so you’ll still see it in basic programs.

ACTIVITY 4: Design an I/O System

Try this with your AI:

I want to design a simple food ordering app. 
Help me figure out all the inputs and outputs I need.
Then ask me questions about edge cases.

The AI will help you think through:

  • What inputs do you need? (restaurant menu, user address, payment info, special instructions)
  • What outputs should users see? (confirmation screen, estimated time, order tracking)
  • What happens if internet dies mid-order?
  • What if the restaurant is closed?
  • What if payment fails?

Then ask:

Now show me the difference between the following options for this app
- Option 1 (wait for everything)
- Option 2 (keep working while waiting)

The AI will show you how the user experience changes based on how you handle I/O.

What you’ll learn: You’ll understand why programmers make certain design choices and how I/O affects user experience.


When Things Go Wrong (Spoiler: Constantly)

Here’s something important: I/O fails all the time. And when it does, programs need to handle it without crashing. Let’s look at failures you’ve probably seen.

Common Problems You’ve Definitely Experienced

“File Not Found”

You try to open a photo but get an error saying it doesn’t exist anymore. Maybe you deleted it, maybe it got corrupted, maybe your phone lost track of where it was.

A good app says: “That file doesn’t exist anymore. Want to try a different one?” A bad app just crashes.

“No Internet Connection”

You try to load Instagram but nothing happens because your WiFi is off or you’re in a dead zone.

A good app says: “Can’t connect right now. Check your internet” and lets you keep browsing what’s already loaded. A bad app just shows blank screens or crashes.

“Not Enough Storage”

You try to save a video but your phone has no space left.

A good app says: “You need to free up 500MB to save this” and maybe suggests what to delete. A bad app either does nothing or loses your video entirely.

“Permission Denied”

An app tries to access your camera but you never gave it permission.

A good app says: “We need camera access to take photos. Go to Settings to enable it.” A bad app just shows a black screen with no explanation.

“This Is Taking Forever”

You try to load a website but the server is down or super slow.

A good app shows a progress bar, then eventually says “This is taking longer than usual. Keep waiting or try again?” A bad app just spins forever with no updates.

Why Programs Can’t Just “Fix It Automatically”

You might wonder: “Why does the program need special code for these situations? Can’t the computer just handle it?”

The answer is: no, not really. Here’s why:

When something goes wrong, there are usually multiple ways to handle it, and the computer can’t decide which one you’d prefer. Let’s say your internet cuts out while uploading a photo:

  • Should the app wait until internet comes back and keep trying?
  • Should it give up and let you try later?
  • Should it save the photo for automatic upload later?
  • Should it ask you what to do?

The programmer has to write code that makes a decision. Otherwise, the program just crashes because it doesn’t know what to do next.

Good programmers anticipate these failures and write code that:

  • Checks if things exist before trying to use them
  • Gives you helpful error messages instead of cryptic technical jargon
  • Offers you options to fix the problem
  • Doesn’t lose your work when something fails

ACTIVITY 5: I/O Failure Simulator

Try this with your AI:

Simulate I/O failures for me.
You're an app trying to save my photo to the cloud.
I'll tell you what goes wrong.
You show me what a good app does versus a bad app.

Then try scenarios like:

  • “Internet cuts out halfway through upload”
  • “Cloud storage is full”
  • “File is too large”
  • “User revokes cloud access permission mid-upload”
  • “Server is down for maintenance”

The AI will show you how each scenario should be handled properly versus how bad apps fail.

Bonus challenge: Ask the AI: “Now I’m the programmer. Give me an I/O failure scenario and quiz me on how I should handle it.”

What you’ll learn: You’ll understand why error messages exist, why apps ask for permissions, and why good programming means planning for failure.


One Important Thing About Technical Terms

You might be wondering: “Why do programmers use confusing words like ‘synchronous’ and ‘asynchronous’ instead of just saying ‘waiting’ and ‘not waiting’?”

Here’s the honest answer: technical terms exist because they’re precise. “Asynchronous” means something very specific that can’t be fully captured by simpler words. It’s like how “photosynthesis” is more precise than “how plants make food from sunlight.”

But here’s what you need to know right now: You don’t need to memorize fancy terms to understand concepts. Focus on understanding what’s actually happening. The vocabulary will stick naturally as you keep learning.

When you see a technical term in programming:

  1. Look for the plain-English explanation nearby (good tutorials always provide this)
  2. Try to visualize a real example from your daily life
  3. Don’t stress about memorizing it immediately
  4. Come back to it later—it’ll make more sense with experience

ACTIVITY 6: Build Your I/O Vocabulary

Final challenge with your AI:

I'm learning about Input/Output in programming.
Give me 5 technical I/O terms.
Explain each one by comparing it to something I do on my phone every day.
Then quiz me.

The AI will probably give you terms like:

  • Buffer: “Like your text message sitting in ‘Sending…’ status before it actually sends”
  • Stream: “Like watching a YouTube video that plays while still downloading the rest”
  • Latency: “The delay between when you tap something and when it responds”

After explanations, the AI will quiz you: “I’m going to describe a situation, and you tell me which term applies.”

What you’ll learn: Technical vocabulary becomes way less scary when connected to things you already understand.

Wrapping It Up

So here’s what we covered: I/O is how programs communicate with the world outside their code. Every app you use is constantly doing input and output—it’s literally the entire point of programs.

You learned that input comes from places like keyboards, touchscreens, files, sensors, and the internet. Output goes to screens, files, speakers, the internet, and other devices. You see hundreds of examples of both every single day on your phone.

You discovered why apps sometimes feel slow—I/O operations (especially internet stuff) take way longer than the math your processor does. Modern apps handle this by working on other things while waiting for slow I/O to finish, which keeps everything feeling smooth.

You learned that I/O operations fail constantly—files disappear, internet drops, storage fills up, permissions get denied. Good programs anticipate these failures and handle them gracefully instead of just crashing.

Most importantly, you now have AI-powered tools to explore these concepts deeper. Use ChatGPT, Claude, or any AI assistant to simulate I/O scenarios, build mental maps, and practice identifying I/O operations in apps you use daily.

The next time you use any app, try to spot the I/O operations happening. Where’s the input coming from? Where’s the output going? Once you start seeing it, you’ll realize programming isn’t some mysterious magic—it’s just organizing input, processing, and output in clever ways.

For the last topic in this series, let’s unravel control flow algorithms.

3 responses to “Computer Input/Output: Fundamentals of Programming Part 3”

  1. […] For our next topic, let’s dive into computer input/output. […]

  2. […] our previous article, you learned about I/O—how programs communicate with the outside world. You discovered that I/O […]

  3. […] I/O meant keyboards and screens. Now, it means voices, sensors, […]

Leave a Reply

Discover more from Tech Goes BRRR

Subscribe now to keep reading and get access to the full archive.

Continue reading