# Programming Fundamentals/Introduction

This lesson introduces computer programming, flowcharts, pseudocode, and integrated development environments (IDEs). These will help you to learn a chosen programming language as well as help you learn to write your own programs. Each of the programs are essential to helping you take the steps needed to go further in your field.

## Objectives and Skills

Objectives and skills for this lesson include:
* Understand fundamental computer programming concepts.
* Use a flowchart to describe a simple process.
* Use pseudocode to describe a simple process.
* Use an online IDE to edit and test simple programs.
* Understand available compilers/interpreters and IDEs for a selected programming language.

## Readings

* Pressbooks: Programming Fundamentals
* Wikipedia: Computer programming
* Wikipedia: Software development process
* Wikipedia: Flowchart
* Wikipedia: Pseudocode
* Wikipedia: Programming language
* Wikipedia: Visual programming language
* Wikipedia: Integrated development environment
* Wikipedia: "Hello, World!" program
* Wikipedia: Comment (computer programming)

## Multimedia

* YouTube: How to Think Like a Programmer
* YouTube: Should I Give Up Computer Science If I Find It Hard?
* YouTube: Introduction to Programming
* YouTube: Elements of High-Quality Programs (Through the development life cycle)
* YouTube: Programming Basics "Pseudocode"
* YouTube: Sandwich making algorithm
* YouTube: What is an IDE?
* YouTube: What Programming Language Should I Learn First
* YouTube: What is Version Control?

## Practice

* Minding the Details
* Creating Flowcharts
* Writing Pseudocode
* Using an Online IDE

## Examples

* Flowchart
* Pseudocode
* Assembly
* Block
* Bash
* BASIC
* C
* C++
* C#
* Clojure
* COBOL
* Dart
* Fortran
* Go
* Java
* JavaScript
* Haskell
* Lua
* MATLAB
* Objective-C
* Perl
* PHP
* PowerShell
* Python3
* R
* Rust
* Ruby
* Swift
* VB.NET

## Activities
### Flowcharts

* Review Flowchart. Use one of the free online or downloadable flowchart tools to create a flowchart that describes how to make your favorite sandwich or other non-prepackaged food. If unsure how to proceed, search the Internet for flowchart peanut butter and jelly sandwich to use as an example. Note: Because peanut butter and jelly sandwich examples are already available, you must select something else for your flowchart.

### Pseudocode

* Review Pseudocode. Create a text document that uses pseudocode to describe how to make your favorite sandwich or other non-prepackaged food. If unsure how to proceed, search the Internet for pseudocode peanut butter and jelly sandwich to use as an example. Note: Because peanut butter and jelly sandwich examples are already available, you must select something else for your pseudocode.

### Programming Languages

* Research different programming languages and select a programming language to use for this course. If unsure, Python3 is currently a popular choice for a first programming language. Use the Examples link above for your selected programming language and use one of the free online IDE links provided to try running the Hello World program.
* Modify the example Hello World program to instead display Hello <name>!, where <name> is your name. Include comments at the top of the program and test the program to verify that it works correctly.
* Research free downloadable tools for your selected programming language (interpreter/compiler, IDE, etc.). Consider downloading and installing a development environment on your system. If you set up your own development environment, test the environment using your Hello Name program written above.

### Interactive Learning/Programming Games

* Code.org
* CodeCombat.com
* Codingame.com
* Checkio.org
* Codewars.com
* Microsoft MakeCode

### Coding Apps

Try one or more of the following mobile coding applications:
* Grasshopper - Google's Grasshopper app is a fantastic way for beginners to start coding. There's no shortage of coding tutorials or programs that aim to teach coding to beginners.
* Encode - Provides small lessons that teach coding concepts and provide examples of real code (uses JavaScript)
* Mimo: Learn to code - Learn basics of coding and do lessons based on your areas of interest (various languages)
* ProgrammingHub - Add courses based on your interests and skill levels. Can be used by beginners or pros looking to refine skills (various languages)
* Py - Offers beginner, intermediate, and advanced courses in the areas of iOS development, website development, and data science (various languages)
* SoloLearn - Teaches beginner lessons in a large number of languages that have many different applications (various languages)
All apps offer free versions, some offer premium versions.

### Developer Networks

Many hardware and software vendors maintain a developer network as a part of their public website. Developer networks are maintained to allow communities of people learn, use, and even exchange and review programs with other members of the online community. Spend some time at a the development network websites below and see what kinds of resources common vendors offer to enable and encourage developers to grow within their communities. Or, if you have a favorite game, program or vendor, spend some time searching to see if they too host an online development community.
* Android Developer Network
* Apple Developer Network
* Cisco Developer Network
* Microsoft Developer Network

## Lesson Summary

Overall, this first lesson goes over the different fundamentals crucial to starting the development process.
* Computer Programming is the process of writing the source code for computer applications. The source code is written in one of many programming languages which will tell the application to carry out a task depending on what code has been written.,
** A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output. Programming languages can be used to create programs that implement specific algorithms, and is usually split into the two components of syntax (form) and semantics (meaning).
* A "Hello, world!" program is a computer program that outputs or displays "Hello, world!" to a user. It is often used as an intro to the basic syntax of a programming language for a working program, and is often the very first program people write when they are new to a language.
* The input–process–output (IPO) model, or input-process-output pattern, is a widely used approach in systems analysis and software engineering for describing the structure of an information processing program or other process. Many introductory programming and systems analysis texts introduce this as the most basic structure for describing a process.
** A program or process using the input-process-output model receives inputs from a user or other source and returns the results of the computations. The system separates itself from the environment, thus defining both inputs and outputs, as one united mechanism.
* A flowchart is a type of diagram that represents an algorithm, workflow or process, showing the steps as different boxes joined by arrows. Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields.
* Visual programming languages (VPL) are any programming language that lets users create programs by manipulating program elements graphically rather than by specifying them textually.
** A VPL allows programming with visual expressions, spatial arrangements of text and graphic symbols, used either as elements of syntax or secondary notation.
* Programming involves problem analysis, solution design, source code development, testing, and maintenance.
** Common methodologies include Agile, waterfall, prototyping, iterative and incremental development, spiral development, rapid application development, extreme programming and various types of agile methodology.
* Program quality requirements include reliability, robustness, usability, portability, maintainability, and efficiency/performance.
* An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools and a debugger. Most modern IDEs have intelligent code completion.
** Integrated development environments are designed to maximize programmer productivity by providing tightly-knit components with similar user interfaces.
** Some IDEs, such as NetBeans and Eclipse, contain a compiler, interpreter, or both. Others, such as SharpDevelop and Lazarus, do not.
* Comments are programmer-readable explanations or annotations in the source code of a computer program. They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters.

## Key Terms
### agile software development

    Agile software development comprises various approaches to software development under which requirements and solutions evolve through the collaborative effort of self-organizing and cross-functional teams and their customer(s)/end user(s). It advocates adaptive planning, evolutionary development, early delivery, and continual improvement, and it encourages rapid and flexible response to change.

### algorithm

    A self-contained step-by-step set of operations to be performed.

### compiler

    A computer program that transforms source code written in a programming language (the source language) into another computer language (the target language), with the latter often having a binary form known as object code.

### continuous integration

    Practice of merging all developer working copies to a shared mainline several times a day.

### flowchart

    A type of diagram that represents an algorithm, workflow or process, showing the steps as boxes of various kinds, and their order by connecting them with arrows.

### incremental development

    Breaks down a development project into smaller segments that are completed before moving on to the next segment. This method reduces risk and facilitates more ease-of-change in the development process.

### input

    Signals or data received by a computer system.

### integrated development environment (IDE)

    A software application that provides comprehensive facilities to computer programmers for software development.

### interpreter

    A computer program that directly executes, i.e. performs, instructions written in a programming or scripting language, without previously compiling them into a machine language program.

### IPO

    An acronym for the Inputs - Processing - Outputs model which describes the structure of a program as what data would be inputted into an information system, how that information is processed, what the processed information would output from the information system.

### machine code

    A set of instructions executed directly by a computer's central processing unit (CPU).

### object code

    A sequence of statements or instructions produced by a compiler, usually in a machine code language or an intermediate language.

### object-oriented programming

    A programming paradigm based on the concept of "objects", which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods.

### output

    Signals or data sent from a computer system.

### procedural programming

    A programming paradigm, derived from structured programming, based upon the concept of the procedure call, where any given procedure might be called at any point during a program's execution, including by other procedures or itself.

### process

    An instance of a computer program that is being executed, which contains the program code and its current activity.

### programming language

    A formal computer language designed to communicate instructions to a machine, particularly a computer.

### prototyping

    Developing incomplete versions of the software program being developed. Allows developers to test individual features of a larger program.

### pseudocode

    An informal high-level description of the operating principle of a computer program or other algorithm.

### rapid application development

    Favors rapid construction of prototypes over a large up-front planning phase. The lack of planning allows for software to be completed much faster.

### scripting language

    A programming language that supports programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator.

### source code

    Any collection of computer instructions, possibly with comments, written using a human-readable programming language, usually as ordinary text.

### syntax

    The set of rules that defines the combinations of symbols that are considered to be a correctly structured document or fragment in that language.

### waterfall development

    Sequential development approach in which development goes through several phases: requirement analysis, design, implementation, verification, and maintenance.

## Assessments

* Quizlet: Flash Cards
* Quizlet: Additional Flash Cards
* Quizlet: Quiz

## See Also

* Introduction to Programming/About Programming
* Introduction to Programming/Programming Languages
* Hello, world!
* FreeCodeCamp: How to Think Like a Programmer
* Technovation Challenge: Algorithms and Pseudocode
* Steve Klabnik’s 9 Tips for Programming Beginners
* FreeCodeCamp: What is Pseudocode?