Concepts / Introduction to Programming Languages

Introduction to Programming Languages

Programming is a creative partnership where humans provide ideas, creativity, and judgment while computers provide speed, memory, and the ability to repeat tasks without error.

  • Programming

From Taps to Instructions

Every time you use a laptop, phone, or tablet, you interact with a machine that is waiting for instructions. You normally provide those instructions by tapping, clicking, or speaking. Programming extends this interaction: instead of giving the computer one immediate action at a time, you can provide precise instructions for an entire sequence of tasks. Programming is therefore not merely a mechanical activity. It is a creative partnership in which humans and computers contribute different strengths.

The human contributes ideas, creativity, and judgment. The computer contributes speed, memory, and the ability to repeat tasks without error.

providesprovidesHumanIdeas, creativity, judgmentShared resultWork neither handles aswell aloneComputerSpeed, memory, repetition
How do human strengths and computer strengths combine to produce a result?

Inside a Personal Digital Assistant

A Personal Digital Assistant, or PDA, is built in layers. Hardware forms the foundation. The operating system is built on that hardware, and applications are built on the operating system. Each layer depends on the layer below it. This layered view helps explain why using an application is part of a larger system: the application relies on the operating system, and the operating system relies on the hardware.

supportssupportsHardwareFoundationOperating systemBuilt on hardwareApplicationsBuilt on operating system
What contains what, and how do the layers of a PDA depend on one another?

Tracing a PDA Layer by Layer

Suppose you use an application on a PDA. Which layers are involved?

Start with the application: The application is the layer you directly use for a particular task.

Move to the operating system: The application is built on and relies on the operating system.

Reach the hardware: The operating system is built on the hardware, which forms the foundation of the PDA.

The application, operating system, and hardware form connected layers rather than isolated parts.

Choosing the Right Partner

Humans and computers are suited to different kinds of work. Computers are extraordinarily fast, have large amounts of memory, and can repeat the same task millions of times without getting tired, bored, or making careless mistakes. Humans are creative, intuitive, and inventive. Humans are better suited to asking why, imagining possibilities, recognizing new patterns, understanding context and nuance, and making judgments in ambiguous situations.

handles wellhandles wellHuman strengthsCreativity, context,judgmentAmbiguous situationsHuman judgmentComputer strengthsSpeed, memory, repetitionRepetitive tasksComputer repetition
Which tasks are best handled by human judgment, and which are best handled by computer repetition?
Human contributionComputer contribution
Ideas and creativitySpeed
Why questions and inventionLarge amounts of memory
Context and nuanceTireless repetition
Judgment in ambiguous situationsRepeated work without careless mistakes

The partnership works because the two partners contribute different strengths.

From Idea to Repeated Work

A programming language is a formal system of symbols and rules that lets you write instructions precise enough for a computer to execute. It allows you to specify which tasks the computer should perform, the order in which it should perform them, and the conditions under which they should occur. This is how a broad human goal becomes a sequence of instructions that a computer can repeat.

describe preciselytell the computerrepeatHuman ideaWhat should be done?Precise instructionsProgramming languageComputer executionTasks performed in orderRepeated resultTedious work delegated
How does a human idea become precise instructions that a computer can repeat?

Delegating a Repetitive Check

Imagine that you need to check every entry in a long list for a particular pattern.

Choose the goal: The human decides what pattern matters and why the check is useful. This requires human ideas and judgment.

Describe the procedure: The human expresses precise instructions in a programming language, including the task and its order.

Repeat the procedure: The computer checks the entries repeatedly, using its speed and ability to repeat work without getting tired or bored.

Use the result: The human can focus on interpreting the result and deciding what it means in context.

The human defines and interprets the work while the computer performs the repetitive part.

Learning a programming language gives you a way to delegate repetitive, tedious, or time-consuming tasks to your computer, leaving more time for work that requires creativity and judgment.

Learning Through Direct Feedback

When you begin programming, you are both the programmer and the end user. You write a program to solve a problem that matters to you, then run it and use its results. This creates a direct feedback loop. You can judge whether the program works, whether it is easy to use, and whether it solves the problem you intended to solve.

useobservelearn fromrepeatWrite programProgrammerRun programUserEvaluate resultWorks? Useful? Easy to use?Improve programFeedback
How does using your own program help you learn what to improve?

This direct feedback makes programming practical from the beginning. You do not need to wait until you create software for other people before programming becomes useful. At first, the goal is to automate tedious parts of your own work and improve your ability to handle data and information in your life.

Begin with a problem whose result matters to you. Then use your own experience as the user to evaluate whether the program works, is easy to use, and solves the intended problem.

Mistakes About Programming

  • Thinking programming is only a dry, mechanical skill for specialists

    Programming is described as a creative activity and a partnership in which humans contribute ideas, creativity, and judgment.

    Fix: Approach programming as a way to extend your own capabilities by combining human creativity with computer strengths.

  • Expecting the computer to decide what matters

    A computer cannot read your mind and requires precise instructions about the tasks, order, and conditions.

    Fix: Use human judgment to choose the goal and express the task precisely in a programming language.

  • Focusing only on memorizing syntax

    Learning to program is presented as gaining a form of literacy and learning to automate tedious work, not merely memorizing syntax.

    Fix: Connect each programming concept to a problem you want to solve or a repetitive task you want to delegate.

  • Believing the computer should replace human judgment

    Humans are better suited to understanding context and nuance and making judgment calls in ambiguous situations.

    Fix: Give repetitive, precise work to the computer while retaining responsibility for interpretation and judgment.

  • Thinking programming is useful only when building software for other people

    Beginners can write programs for their own problems and receive direct feedback as both programmer and user.

    Fix: Use programming first to automate tedious parts of your own work.

Practice the Partnership

EASY

Choose a repetitive or time-consuming task from your own work with data or information. Describe which part requires your creativity or judgment and which part could be expressed as precise instructions for a computer to repeat.

Hints
  • Start by stating the human goal rather than the computer instructions.
  • Look for a task involving repeated checking, calculation, or searching.
  • Explain what the computer would repeat and what the human would still need to decide or interpret.
EASY

Arrange these PDA layers from foundation to highest layer: applications, hardware, operating system. Then explain why the layer order matters.

Hints
  • The hardware is the foundation.
  • The operating system is built on the hardware.
  • Applications are built on the operating system.

What to Remember

  1. Programming is a creative partnership: humans provide ideas, creativity, and judgment, while computers provide speed, memory, and tireless repetition.
  2. A Personal Digital Assistant consists of hardware, an operating system, and applications, with each layer built on the one below it.
  3. Computers are well suited to repetitive, precise, and time-consuming work; humans are better suited to creativity, context, nuance, and ambiguous judgment.
  4. A programming language is a formal system of symbols and rules for writing instructions that a computer can execute.
  5. Learning to program lets you delegate tedious work to a computer and use direct feedback from your own programs to improve.

Key Takeaways

  • Programming combines human creativity and judgment with computer speed, memory, and repetition.
  • A PDA is layered: hardware supports the operating system, which supports applications.
  • Programming languages let humans express precise tasks that computers can execute in a specified order and under specified conditions.
  • The main practical benefit is delegation: computers handle repetitive work while humans focus on creative and strategic work.
  • Beginners learn through a direct feedback loop because they are both the programmers and users of their programs.