UPI Study › Courses › C++ Programming › Free lessons › Lesson 1.1 Free with a free account
Why Learn to Code?
C++ Programming · Chapter 1: Foundations of ProgrammingSection 1.1 · lesson 1 of 84video coming soon
Next lesson: Five Core Ingredients Every Program Shares →
In this lesson
The purpose and relevance of programming.
- Relate software to the hardware it runs on
- Compare the five environments software runs in
- Describe how programmers really spend their week
- Say what knowing C++ will mean by the end
Transcript
Everything said in the video, section by section (1,900 words). Read along, or search it.
Opening Examples
Machines Deciding in Milliseconds
A car decides how hard to brake, before the driver's foot has finished moving. A hospital pump releases a dose measured in fractions of a milliliter. A payment clears between banks in two countries, in under a second. And a telescope throws away terabytes of noise overnight, keeping the few frames that matter. None of that happens because a machine decided to be helpful.
Definition
Programming Means Exact Instructions
It happens because a person worked out exactly what had to occur, and in what order, and wrote it down in a form a machine can carry out. That act is programming: turning an intention into an exact, repeatable set of instructions. It's the one skill this course exists to build. And this first lesson deliberately contains no code at all. It's about what you're learning, and why.
Core Concept
Hardware Is Capable but Idle
A computer is made of two things that need each other. Hardware is the physical part: the processor, memory, storage, screen and sensors. On its own, hardware is capable, but idle. It has enormous speed, and no intentions at all. Software is the set of instructions that tells the hardware what to do with its time.
Analogy
A Recipe Without Judgment
A recipe is a useful comparison. It isn't the food, and it isn't the kitchen. It's a written sequence of steps that produces the food, when someone follows it. But the comparison breaks in one important way. A cook reads, add salt to taste, and uses judgment. A processor has no judgment. It does exactly what the instruction says, billions of steps a second, even something useless, done perfectly. That one difference explains most of the frustration beginners feel.
Key Terms
From Algorithm to Machine Instructions
Between the idea in your head and the electrical activity in a processor, there are several layers. People write and read the upper ones. The machine handles the lower ones for you. An algorithm is the plan: a finite sequence of unambiguous steps that solves the problem, independent of any language. Source code is that plan, written in a programming language that people can read. A translator converts it into machine instructions: the low-level numeric operations the processor carries out.
Principle
Plan Before You Write Code
The plan comes first. Writing code without a plan is the most common reason beginners get stuck, and it's a habit worth never acquiring. You'll hear one sentence often: the machine did what you told it, not what you meant. That's not a complaint about computers. It's a description of the medium. Programming rewards precision, the way accounting rewards arithmetic. And precision is a learned habit, not a talent.
Overview
Five Environments Where Software Runs
It's easy to picture software as apps on a laptop. In fact, most software is never seen by the people relying on it. Five environments cover almost all of it, and each one makes different things scarce. Embedded software runs inside objects nobody calls computers, like an insulin pump, or a car's braking controller. Its memory is measured in kilobytes, and it may need to run for years without a restart. By raw count, most processors made each year end up embedded, not in laptops or phones. Desktop software serves one person, with generous memory. The hard parts are the interface, and responsiveness. Web software is split between the browser and distant servers. Many people use it at once, and every piece of incoming data must be treated as possibly hostile. Mobile software has a powerful device, but a limited battery and an unreliable network, and the system may suspend it at any moment. And scientific software runs weather models or genome analysis, often for days, on clusters of machines. There, correctness and speed at scale are everything.
Scale
Memory Differs by Tens of Millions
These differences aren't a matter of taste. They're measured in orders of magnitude. The clearest single measure is working memory. From a small controller to a node in a research cluster, the span is a factor of tens of millions. So a technique that's sensible in one setting can be unusable in another. Carelessness with memory goes unnoticed on a desktop with 16 GB. The same carelessness makes an embedded device fail within hours. That's why this course treats tracking what your program holds, and releasing it when you're done, as ordinary practice, not an advanced topic.
Myth Versus Reality
What Programming Work Really Looks Like
The popular image of programming is one person, typing fast, alone, producing finished software in one stretch. Almost every part of that picture is wrong, and the correction is encouraging. Reading beats writing. Most work extends or corrects code someone else wrote, often years ago, so working out what unfamiliar code does is the skill. Debugging, finding and removing faults, is normal work at every level, not failure. And the machine's feedback is immediate and honest, so you can learn by correction. Thinking comes before typing. Experienced programmers often seem to be doing nothing: they're working out the plan that lets them write it once. And the work is social. Requirements come from people who describe what they want imprecisely, and colleagues review code before it's accepted. Writing new code is the smallest slice of a typical week.
Working Habit
The Small Repeated Cycle
Underneath all of that sits a small, repeated cycle. It's the most important working habit in this course. Understand the problem. Plan the steps. Write a small piece. Run it. Compare what happened with what you expected. And correct what's wrong. Beginners tend to write a great deal before running anything, and then face many faults at once. Working programmers go round this loop many times an hour, keeping each step small, so when something breaks, the cause is obvious.
Quick Check
Where to Look After a Crash
Quick check. You add one line to a working program, run it, and now it crashes. Where should you look first? Pause, and decide. The line you just added. If you've only changed one thing, you already know where the fault is. That's the whole payoff of working in small steps.
Common Beliefs
Adjusting Misconceptions About Programmers
A few common beliefs are worth adjusting before you begin. You don't need to be exceptional at mathematics. Ordinary arithmetic and careful logic cover most work, and heavy math stays in fields like graphics, cryptography and simulation. Programmers don't memorize everything. They hold the core ideas and look details up constantly. Knowing what to search for, and how to check the answer, is the skill. It isn't a solitary job. Most software is built by teams. Good programmers don't write code that works the first time. They write code that fails in small, obvious, easily fixed ways, on purpose. And software is never finished. It changes for as long as it's used, so code the next person can read beats code that's clever.
When to Automate
Six Features of Good Candidates
Not everything should be automated, and knowing when not to is part of professional judgment. A problem is a good candidate when it has one or more of six features. Repetition: the same procedure, again and again. A person is slower and less accurate the four hundredth time. A program isn't. Scale: checking 40 records by hand is reasonable, but checking 4 million isn't, and the code is barely longer. Precision, where small errors are costly. Speed, where a decision must be faster than a person can react. State, where something must be tracked accurately over time. And connection, joining information from separate sources consistently.
Limits
Machines Supply Speed, You Supply Intent
The limits matter just as much. Code can't decide what outcome is fair, what a business should value, whose need comes first, or what an ambiguous request really meant. A program carries out human decisions faithfully, at enormous scale, whether they were wise or not. The machine supplies the speed. You supply the intent.
Applications
One Skill Across Many Fields
The same skill shows up across very different fields. In health care, code checks new prescriptions against existing ones, and flags dangerous combinations before anything is dispensed. In logistics, it orders deliveries to cut distance, fuel and time. In agriculture, it uses sensors to apply the right water and fertilizer to each part of a field. In accessibility, it converts text to speech, and speech to text. In science, it filters huge data sets down to what's significant. And roles from firmware engineer and game programmer, to data analyst, test engineer and researcher, all rest on the same foundation.
Course Policy
Credit, Grading Scale, and Passing Mark
This course is credit-bearing, and that changes how you should approach it. Your work is graded on a percentage scale, and recorded on a transcript you can send to a degree-granting institution. That institution always makes the final decision on how the credit applies. 90 to 100 is an A, 80 to 89 a B, 70 to 79 a C, 60 to 69 a D, and below 60 is an F. To pass this course, you need 70 percent.
Assessment
Four Equal Components of the Grade
Four components carry equal weight, a quarter each. Time on course measures genuine study time, and the start and end dates appear on your transcript. Quizzes check steady understanding, and they're proctored. Assignments check that you can apply the ideas, and you're questioned on your own submission. And the final exam checks integrated understanding, with webcam proctoring and identity verification.
Policy
Rules for Generative Tool Use
A few rules are worth reading twice. The policy on generative tools is deliberately narrow. You may use them to understand a concept, to hear an idea explained a second way, or to check your understanding. You may not use them to solve assessed questions, to produce worked steps, or to write any part of what you submit. The line is between learning something, and having it produced for you.
Consequences
Penalties, Retakes, and Getting Support
Assignment problems bring a required resubmission first, then a course restart. Proctoring violations get one warning, then a restart. Failing the final exam means retaking the course, not just the exam. A course can be retaken once, followed by a 30-day wait. And if you're stuck, support answers within 24 hours. Asking early is always cheaper than asking late.
Learning Goals
Five Capabilities of Knowing C++
So what will it mean to know C++ by the end? Not memorizing its full vocabulary. No working professional has. It means five capabilities, each resting on the one before. Read: follow a program someone else wrote, and say what it produces. Write: turn a plain-language description into a correct, working program. Structure: divide a task too large for one piece into parts you can build and test separately. Manage: control deliberately how memory and other resources are obtained and released. And judge: given two working programs, explain which is better for a stated purpose, in speed, memory, clarity or safety.
Why C++
Deciding How Memory Is Managed
That fourth level is why C++ is chosen so often. Many languages manage memory for you. C++ lets you decide, so it runs on a device with 64 kilobytes of memory, and in a cluster simulation. That responsibility is yours. And once you can reason this way in one language, the next one takes weeks, rather than months.
Key Takeaways
Lesson Summary: Precision, Plans, and Judgment
To summarize. Software is exact instructions. Hardware supplies speed, but no judgment, so precision is the whole game. The plan comes before the code. An algorithm is the steps, and source code is those steps in a language a translator can convert. Software runs in five environments, whose resources differ by factors of millions. Most of a programmer's week goes to reading, testing, planning and communicating, in small steps around the loop. And code is worth writing where there's repetition, scale, precision, speed, state or connection, but it can't decide what's fair, or what was intended.
Reflection
Everyday Objects That Make Decisions
Here's something to think about. Pick one object you used in the last hour, that you wouldn't call a computer. What is it deciding, how often, and what would happen if its instructions were slightly wrong?
About C++ Programming at UPI Study
C++ Programming (Computer Science 242) is a self-paced online course of 84 video lessons in 11 chapters, from your first program to decisions, loops, arrays, functions, classes, files, pointers and inheritance. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus Every course with PRO →
Why take it here
Why students take C++ Programming with UPI Study
Where the credit goes
Universities that work with NCCRS
C++ Programming carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Why Learn to Code?
What is the difference between hardware and software?
What are the five environments where software runs?
What do programmers actually spend their time doing?
What does it mean to know C++ by the end of a beginner course?
About the C++ Programming course
How many college credits is C++ Programming?
How much does C++ Programming cost and what is included?
Which universities accept UPI Study credits?
How long does C++ Programming take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in C++ Programming.
84 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
3 credits · NCCRSEnroll →