Game keystrokes or Calculates how fast and moves a cartoon Joystick movements how far to move a cartoon figure on screen figure on screen

Similar documents
Lecture 01 & 02 Computer Programming

Programming Languages and Program Development Life Cycle Fall Introduction to Information and Communication Technologies CSD 102

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

Chapter 11 Program Development and Programming Languages

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

Introducing Computer Programming

Computer Organization & Assembly Language Programming

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Chapter 1 Operations With Numbers

PYTHON YEAR 10 RESOURCE. Practical 01: Printing to the Shell KS3. Integrated Development Environment

Introduction to Java Programming

CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007

Crash Course in Modernization. A whitepaper from mrc

Integrated Software Environment. Part 2

Computer Principles and Components 1

Introduction to Computer Programming Using FORTRAN 77

Chapter 1: An Overview of Computers and Logic

Visual Basic Primer A. A. Cousins

Laboratory. Low-Level. Languages. Objective. References. Study simple machine language and assembly language programs.

Welcome to Python! If you re the type of person who wants to know

Programming Languages and Program Development

An Introduction to Python (TEJ3M & TEJ4M)

Chapter Twelve. Systems Design and Development

Discovering Computers Chapter 13 Programming Languages and Program Development

Getting Started with XMF Remote

Welcome Back! Without further delay, let s get started! First Things First. If you haven t done it already, download Turbo Lister from ebay.

Technology in Action. Chapter Topics. Scope creep occurs when: 3/20/2013. Information Systems include all EXCEPT the following:

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017

Some Basic Terminology

An Overview of Visual Basic.NET: A History and a Demonstration

Web-interface for Monte-Carlo event generators

Copyright 2005 Department of Computer & Information Science

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

Variables and Data Representation

Sisulizer Three simple steps to localize

A short introduction to. designing user-friendly interfaces

Visual Basic Program Coding STEP 2

Lecture by: Hugo Johnson INTRODUCTION TO PROGRAMMING PART I

CS240: Programming in C

Department of Computer Science. Software Usage Guide. CSC132 Programming Principles 2. By Andreas Grondoudis

UNIT I Programming Language Syntax and semantics. Kainjan Sanghavi

If Statements, For Loops, Functions

Introduction to Programming

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Week - 01 Lecture - 04 Downloading and installing Python

S A M P L E C H A P T E R

COPYRIGHTED MATERIAL. An Introduction to Computers That Will Actually Help You in Life. Chapter 1. Memory: Not Exactly 0s and 1s. Memory Organization

Yup, left blank on purpose. You can use it to draw whatever you want :-)

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer?

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

Chapter 2: Operating-System Structures

Computer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software.

assembler Machine Code Object Files linker Executable File

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

1. Review of program specifications 2. Program design 3. Coding 4. Testing 5. Finalizing documentation

Testing is a very big and important topic when it comes to software development. Testing has a number of aspects that need to be considered.

MicroSurvey Users: How to Report a Bug

Component V Supporting Materials / Learn More Interesting Facts. Interesting Facts

Word Processing Basics Using Microsoft Word

NCMail: Microsoft Outlook User s Guide

Computing and compilers

Scientific Computing

1) What is the first step of the system development life cycle (SDLC)? A) Design B) Analysis C) Problem and Opportunity Identification D) Development

Programming II (CS300)

CS 426 Fall Machine Problem 1. Machine Problem 1. CS 426 Compiler Construction Fall Semester 2017

Digital Workflow 10 Tech Rules to Guide You

Chapter 2. Operating-System Structures

Excel Basics: Working with Spreadsheets

>print "hello" [a command in the Python programming language]

Programming: detailed instructions which tell the computer hardware what to do aka software Computer Science: the study NOT of computers, but of what

CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING. 1 Muhalim Mohamed Amin Faculty of

These are exciting times for Macintosh users. When Apple unleashed Mac

Jerry Cain Handout #5 CS 106AJ September 30, Using JSKarel

How To Use My Alternative High

MV-8800 Production Studio

ALICE: An introduction to progamming

the NXT-G programming environment

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

National 5 Computing Science Software Design & Development

Compendium Basics Exercise

Computer Basics. Need more help? What s in this guide? Types of computers and basic parts. Why learn to use a computer?

Hello! ios Development

Using Functions in Alice

CMSC/BIOL 361: Emergence Cellular Automata: Introduction to NetLogo

The Ultimate Web Accessibility Checklist

Software Development. Integrated Software Environment

Low-Level Languages. Computer Programs and Programming Languages

Introduction to the Internet

Chapter 1 Introduction

TMG Clerk. User Guide

SOFTWARE UNIT 1 PART B C O M P U T E R T E C H N O L O G Y ( S 1 O B J A N D O B J 3-2)

SCSP Programming Technique C

Introduction to the Internet. Part 1. What is the Internet?


Final Examination CS 111, Fall 2016 UCLA. Name:

Word Processing: Basic Skills

CS 177 Recitation. Week 1 Intro to Java

Transcription:

Computer Programming Computers can t do anything without being told what to do. To make the computer do something useful, you must give it instructions. You can give a computer instructions in two ways: 1. Buy a program that someone else has already written or 2. Write a program which tells the computer what to do, step by step. If you want to be able to tell the computer what to do, you must write a computer program. A computer program tells the computer how to accept some type of input, manipulate that input, and spit it back out again. They can be thousands, even hundred thousands of single line commands. Each command doing a small task that the computer obeys. Input and output for various programs Type of program Input What the program does Output Word Processor Characters typed Formats the text, Displays and prints from keyboard corrects spelling neatly organized text Game keystrokes or Calculates how fast and moves a cartoon Joystick movements how far to move a cartoon figure on screen figure on screen Web browser HTML codes stored Converts the HTML Displays web pages On other computers codes into text and graphics on the computer screen A program tells the computer how to solve a specific problem. A program can be as short as a single instruction or it can contain thousands of instructions: the bigger the problem, the bigger the program. To solve a big problem, you must first tell the computer how to solve a bunch of little problems.

What does it mean to be a Programmer? A computer programmer designs software programs by developing algorithms (flowcharts and pseudocode) and translating these into one of several languages that computers can understand. In the majority of cases, the computer programmer also designs a graphical user interface (GUI) so that non-technical users can run the software through easy, point-and-click, menu-oriented modules. The GUI acts as a translator between the user and underlying software code, negating the need to know the command line structure of the language. Generally, there are five basic stages of development that a computer programmer addresses in designing software. They are defining the need, designing a flowchart, coding the software, debugging and beta testing. The first stage of development necessitates good interpersonal skills on behalf of the computer programmer who will typically meet with department heads, managers or employees who will relay the tasks to be implemented into the software program. It is up to the programmer to ask the right questions. If he or she misunderstands responses or gets an incomplete understanding of what s required, the software won t live up to expectations, resulting in problems that will fall squarely on the shoulders of the programmer. During the second stage of development the computer programmer uses analytical thinking to logically layout a flow chart. The if, then scenario must take into account not only the logical steps that will take data input from one point to another, but also allow for possible problems relative to the specific work model or environment. Contingencies must be built into the design so that potentially unforeseen circumstances are accounted for. This could mean constructing alternate data flows or pop-up error messages that instruct the user. When the design is complete the computer programmer converts the functionality of the flow chart into computer code. There are hundreds of programming languages, including C++, Perl Java, Visual Basic, FORTRAN, Apple Script and D, with most programmers specializing in several families. This stage of software development is commonly done solo, though multiple programmers might work on different aspects of large computer programs. When the initial software is completed it goes through a debugging stage. Bugs are flaws in the program that cause it to fail, crash, hang, return a false result, or behave in an undesirable fashion. Debugging is a very intense stage of development that can take hundreds of hours. A computer programmer will also try to get the program to fail by using it in ways that are not necessarily typical of the projected real world scenario. Finally the software undergoes beta testing. At this stage the program is released to use with the understanding that it will require modifications before a stable release can be issued. Searching for bugs in the previous stage cannot take into account the variety of hardware and software environments in which the software will have to perform. Conflicts can arise in the wild that are simply impossible to anticipate until beta testing brings them to light.

After a stable release has been issued, the attention turns to improvements. Invariably once software is applied refinements can be made to make it more efficient or easier to use. The computer programmer might also be called upon to expand its functionality to include duties that were not initially part of its design. The programmer will also be responsible for maintaining the program s health. The hardest part about programming is identifying all the little problems that make up the big problem you re trying to solve. Computers need to know EVERYTHING. Unless you specify everything that you want the computer to do and exactly how to do it, the computer doesn t do what you want it to do. Much planning goes into writing a program, unless the program is very short and simple. Good programmers spend very little time working at the computer, but a great deal of time working out solutions with pencil and paper. Writing good, working programs will involve writing many drafts of the program. The following steps simplify the process a programmer takes: 1. Think of the program that you wish to write: A sketch of what you want the end result to be is fundamental. 2. Create the program: Design the interface and write the code. 3. Save the program. 4. Run 5. Fix errors. 6. Document internally for ambiguous code and externally (owner s manual)

Types of Programmers Programmers are generally divided into two categories, Applications Programmers and Systems Programmers. These categories may be divided more specifically by the type of programs they write, such as database programmers, or by the language they use, such as HTML programmers. Applications Programmers Programs that perform a distinct job are written by Applications Programmers. These may range from computer games to graphic design programs to word processing software. Applications programmers may also alter a universal application to meet one company's specific needs. Systems Programmers Systems Programmers write operating systems, such as Windows or Mac OS. They are the programmers in charge of writing software for databases and networked systems. They often act as troubleshooters, helping the Applications Programmers solve problems during the testing and debugging phase. Programming Languages Computers don t understand English ( or French, Spanish, etc) so we must write our step by step instructions by using a language that the computer can understand. Programming Language - A collection of instructions that tell the computer what to do is called source code, which defines how a program works. Syntax - The grammar and spelling of a programming language. Why so many different programming languages? C++, Perl Java, Visual Basic, FORTRAN, Apple Script and D,...each language serves a specific purpose.

The First Languages Computers really understand only one language, machine language (made up of 0's and 1's). This binary code is broken into bits and bytes (8 bits) and represented in such ways that the computer can understand an on or off signal. Assembly language was developed by programmers so programming would be easier. It uses short, easy to remember phrases such as JMP, MOV, and ADD, which represent specific machine language instructions. Computers can t read assembly language, so it must be translated into machine language using assemblers. High Level Programming Languages The intuitive or human-readable form of instructions is called a computer language. Like languages in the real world, there are dozens of computer languages. Some are for specialized tasks and others are more general-purpose. High level languages, such as C++, Perl Java, Visual Basic, FORTRAN, Apple Script and D, were developed because writing machine language or assembly language programs was difficult and confusing. What all programming languages have in common is that they enable programmers to create instructions for a computer without having to learn the computer s numeric machine code. These languages were made to look more like ordinary human language in hopes that it would be easier to write programs and make modifications. Interpreters and Compilers When translating any language into another language, one of two methods is generally used. 1. The complete file is translates at one time and then read later. This means that the original needs only to be translated once and then the translated version can be used as often as necessary. 2. The file is translated one line at a time, and is used as it is translated. This means that the original is translated every time that it is used. Once the translation is done using the first method, the user of the translation can work quickly. It is not necessary for the user to wait for the translation to be done line by line. This method is called compiling, and a compiler is used. Visual Basic uses this method in the executable stage. The second method uses an interpreter. This method is easy to use, as mistakes can be found and corrected as each line is translated. Qbasic uses this method. Visual Basic uses this method in design stage.

Rapid Application Development (RAD) programming languages Most programming languages were designed back in the days when a computer screen displayed nothing but text. No graphics, mouse pointers, buttons or windows. When computers developed Graphical User Interfaces (GUI) with windows, scroll bars, and toolbars, people began demanding programs that included all these GUI features as well. To help programmers create programs with GUI features, man companies developed special dialects of existing languages, dubbed rapid application development (RAD) languages. RAD languages enable programmers to design the way they want their program to look and then write source code to make that user interface actually do something useful, such as display information in a window. Three popular RAD languages are Visual Basic (derived from BASIC), Delphi (based on Pascal), and C++ Builder (based on C++). Object Oriented Programs An object-oriented program can be viewed as a collection of interacting objects or modules, as opposed to the conventional model, in which a program is seen as a list of subroutines to perform. In OOP, each object is capable of receiving messages, processing data, and sending messages to other objects and can be viewed as an independent 'program' with a distinct role or responsibility. The actions on these objects are closely associated with the object. Visual Basic Visual Basic enables you to move elements and place graphical images on the screen with the mouse instead of requiring that you give written and detailed screen instruction as required by languages that came before Visual Basic. Visual Basic is based on QBasic programming and the language is very similar to Liberty Basic, which we studied in CMP 521. It is designed to be a Window s programming language. Inherent in Visual Basic s fundamental design is the event-driven program concept. Visual Basic is graphical in its programming approach. You can literally create complete and working Visual Basic programs by moving picture icons on and off the screen without ever writing one command in Visual Basic s programming language. Remember that with RAD languages, you first design how you want the program to look, then you write the source code in modules to make the user interface actually do something useful. Programs can be as easy or as difficult as you wish. Design Time and Run Time The time when you build an application in Visual Basic is called design time. The time when you use an application for its intended purpose is called run time.

In Visual Basic, the applications you build are called projects. A project always begins with a form. At run time, a form becomes the window the application occupies on the desktop.