This document covers programming environments and the evolution of programming models, highlighting the use of text editors and integrated development environments (IDEs) for coding. It discusses the advantages of IDEs, such as syntax highlighting and debugging tools, and contrasts procedural programming with object-oriented programming paradigms. The document also includes assessment tasks related to text editors and programming paradigms.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
11 views23 pages
03 CS1 Unit 2 - Lesson 3
This document covers programming environments and the evolution of programming models, highlighting the use of text editors and integrated development environments (IDEs) for coding. It discusses the advantages of IDEs, such as syntax highlighting and debugging tools, and contrasts procedural programming with object-oriented programming paradigms. The document also includes assessment tasks related to text editors and programming paradigms.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23
CS 1 – Programming
Logic Formulation Unit 2: Computers and Programming Lesson 3: Programming and User Environment, Evolution of Programming Models Learning Outcome
Acquainted with programming and
user environment and with the evolution of programming models Programming Environments Programming Environments When you plan the logic for a computer program, you can use paper and pencil to create a flowchart, or you might use software that allows you to manipulate flowchart shapes. If you choose to write pseudocode, you can do so by hand or by using a word-processing program. To enter the program into a computer so you can translate and execute it, you usually use a keyboard to type program statements into an editor. Editor •We can type a program into one of the following:
•A plain text editor
•A text editor that is part of an integrated
development environment (IDE) Text Editor A text editor is a program that you use to create simple text files. It is similar to a word processor, but without as many features. We can use a text editor such as Notepad that is included with Microsoft Windows. An advantage to using a simple text editor to type and save a program is that the completed program does not require much disk space for storage. Sample Codes in Notepad Text Editor in IDEs We can use the editor of an integrated development environment (IDE) to enter your program. An IDE is a software package that provides an editor, compiler, and other programming tools. For example, the Microsoft Visual Studio IDE, an environment that contains tools useful for creating programs in Visual Basic, C++, and C#. Sample Codes in Visual Studio IDE Advantages of an IDE Using an IDE is helpful to programmers because IDEs usually provide features similar to those you find in many word processors. In particular, an IDE’s editor commonly includes such features as the following: • It uses different colors to display various language components, making elements like data types easier to identify. • It highlights syntax errors visually for you. Advantages of an IDE (Cont.) • It employs automatic statement completion; when you start to type a statement, the IDE suggests a likely completion, which you can accept with a keystroke. • It provides tools that allow you to step through a program’s execution one statement at a time so you can more easily follow the program’s logic and determine the source of any errors. User Environments User Environments A user might execute a program you have written in any number of environments. For example, a user might execute the number doubling program from a command line. A command line is a location on your computer screen at which you type text entries to communicate with the computer’s operating system. Many programs are not run at the command line in a text environment, but are run using a graphical user interface, or GUI (pronounced “gooey”), which allows users to interact with a program in a graphical environment. Sample Command Line Interface (CLI) Sample GUI Understanding the Evolution of Programming Models Early Programming Models
•People have been writing modern computer
programs since the 1940s. The oldest programming languages required programmers to work with memory addresses and to memorize awkward codes associated with machine languages. Early Programming Models (Cont.)
•The oldest computer programs were written
in one piece, from start to finish, but modern programs are rarely written that way—they are created by teams of programmers, each developing reusable and connectable program procedures. Two Major Models or Paradigms • Currently, two major models or paradigms are used by programmers to develop programs and their procedures. One technique, procedural programming, focuses on the procedures that programmers create. Object-oriented programming, focuses on objects, or “things,” and describes their features (or attributes) and their behaviors. Procedural Paradigm The procedural programmers focus on the actions that are carried out—for example, getting input data for an employee and writing the calculations needed to produce a paycheck from the data. Procedural programmers would approach the job of producing a paycheck by breaking down the process into manageable subtasks. Object-oriented Paradigm The object-oriented programmers might design a payroll application by thinking about employees and paychecks, and describing their attributes(e.g. employees have names and Social Security numbers, and paychecks have names and check amounts). Then the programmers would think about the behaviors of employees and paychecks, such as employees getting raises and adding dependents and paychecks being calculated and output. Assessment Tasks 1. Aside from the example given in this lesson, list and differentiate two(2) plain text editors and IDEs.
2. (Research) What are the advantages and
disadvantages of procedural paradigm and object-oriented paradigm. End Up next... Unit 3: Data Types, Structures, and Decisions Lesson 1: Data types and Variables
CODING FOR ABSOLUTE BEGINNERS: How to Keep Your Data Safe from Hackers by Mastering the Basic Functions of Python, Java, and C++ (2022 Guide for Newbies)