openskills.info
Open Course

Programming Fundamentals

Programming fundamentals are the core building blocks used to write any computer program, in any language: variables that hold data, control flow that decides what runs and when, and functions that break logic into reusable pieces. This topic covers that shared vocabulary and mental model so you can read and write code before specializing in one language or paradigm.

itSoftware engineering

Don't Panic — Programming Fundamentals

Programming is the business of writing instructions precise enough for a computer to carry out. That is less mystical than it sounds and more literal than it first appears. The computer is not being difficult when it follows the words rather than the intention; it has only been given words. The useful response is to make the steps visible.

The central creature here is a variable, a name bound to a value. Assignment changes that binding. It is not a tiny declaration of eternal mathematical truth, which is fortunate, because a running total would otherwise have a very awkward afternoon. A value also has a type, so numbers, strings, and booleans can support different operations without everyone pretending that text can be divided by seven.

Then comes control flow, the arrangement that decides what runs and when. A conditional selects the first true branch. A loop repeats a block, either while a condition remains true or once for each item in a collection. If a result is puzzling, trace the state through one loop iteration. A program is a machine for producing changes over time; staring at the final output alone is like reading a mystery from the last page and blaming the book for being brief.

A function gives a sequence of steps a name, input through parameters, and sometimes a result through a return value. Its local scope keeps the names made for one call from wandering into another call's business. That boundary matters. Heavy reliance on global names makes a program harder to follow because any function might change them. Keep a small piece of logic together, then call it with a different argument when the job repeats.

Values also travel in groups. A list keeps an ordered sequence. A tuple keeps a fixed grouping. A dictionary stores values under keys. The catch is mutability: assigning a list to another name does not copy it. Both names can reach the same underlying data, so an update through one is visible through the other. The surprise is not that the list changed; it is that the second name was never a separate list in the first place.

For a working map, open the Intro when a term needs its full explanation, the Slides when relationships need a compact picture, and the Cheatsheet when you need the comparison at hand. Then use the practice reference to trace state before writing code, and build the score-summary exercise to make the pieces cooperate. After that, paradigms explain larger organization, algorithms explain better procedures, and testing explains how to establish that a program works rather than merely runs.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources

  • https://docs.python.org/3/tutorial/introduction.html
  • https://docs.python.org/3/tutorial/controlflow.html
  • https://docs.python.org/3/tutorial/datastructures.html
  • https://docs.python.org/3/tutorial/classes.html
  • https://docs.python.org/3/tutorial/errors.html
  • https://xlinux.nist.gov/dads/HTML/recursion.html
  • https://cs50.harvard.edu/x/
  • https://ocw.mit.edu/courses/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/
  • https://ocw.mit.edu/courses/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/pages/syllabus/
  • https://docs.python.org/3/tutorial/index.html
  • https://xlinux.nist.gov/dads/terms.html
  • https://exercism.org/
  • https://www.codewars.com/
  • https://github.com/freeCodeCamp/freeCodeCamp
  • https://github.com/ossu/computer-science
  • https://www.codecademy.com/catalog/language/python
  • https://www.ibm.com/history/fortran
  • https://archive.computerhistory.org/resources/text/algol/ACM_Algol_bulletin/1064069/frontmatter.pdf
  • https://www.dartmouth.edu/basicfifty/basic.html
  • https://www.cs.utexas.edu/~EWD/transcriptions/EWD02xx/EWD215.html
  • https://www.cs.utexas.edu/~EWD/transcriptions/EWD02xx/EWD273.html
  • https://www.nokia.com/bell-labs/about/dennis-m-ritchie/chist.html
  • https://www.stroustrup.com/hopl2.pdf
  • https://legacy.python.org/doc/essays/ppt/jpf001/tsld006.htm
  • https://education.oracle.com/file/general/4955_BriefHistoryOfJava_7.pdf
  • https://download.oracle.com/otndocs/jcp/jls1-spec/license.html
  • https://code.visualstudio.com/
  • https://www.jetbrains.com/pycharm/
  • https://replit.com/pricing
  • https://github.com/features/codespaces
  • https://www.codecademy.com/pricing