1 / 39

Hun Myoung Park, Ph.D.

Introduction to Electronic Government Programming & Software Development Saturday, September 20, 2014. Hun Myoung Park, Ph.D. Public Management & Policy Analysis Program Graduate School of International Relations. Programming Languages. To communicate between human beings and computers

tyson
Télécharger la présentation

Hun Myoung Park, Ph.D.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Electronic GovernmentProgramming & Software DevelopmentSaturday, September 20, 2014 Hun Myoung Park, Ph.D. Public Management & Policy Analysis ProgramGraduate School of International Relations

  2. Programming Languages • To communicate between human beings and computers • Instruct a computer (H/W) to do what you want to get using a programming language • Each computer can understand its own machine language only • Instructions can be written in programming languages and then translated into the corresponding machine language.

  3. Machine Language • First generation language • Consists of 1 and 0 • Only language that computers can understand • Each computer has its own machine langue (machine dependent) • Difficult to write and read programs

  4. Assembly Language • Second generation language • Replace machine language’s binary codes for instructions and addresses with corresponding symbols and mnemonics • 1:1 match • Translated by assembler • More technical and faster • But less flexible and user friendly (not easy to read)

  5. High Level Languages 1 • Less machine dependent • More readable (closer to human languages and farther away from machine language) and flexible • But less efficient (bigger and slower) • Need to be translated into a machine language (interpretation or compilation)

  6. High Level Languages 2 • BASIC (Beginner’s All-purpose Symbolic Instruction Code) • FORTRAN (FORmula TRANslator) by IBM • COBOL (Common Business Oriented Language) by ANSI. • ADA, PL/1, Pascal • C by Bell Lab, C++, and Visual C • JAVA by Sun Microsystems • Perl, PHP, Python, Ruby

  7. Classification of Languages • First generation (machine language) • Second generation (assembly language) • Third (high level language), forth (query languages), and fifth (natural & intelligent languages) generation languages • Low-level languages (i.e., machine & assembly language) • High-level languages (e.g., C and Java) • Script languages (e.g., Perl, PHP, Python)

  8. Comparison of Languages

  9. Programming Paradigms • Procedural programming • Object-oriented programming • Functional programming • Declarative programming

  10. Procedural Programming 1 • Imperative or structured languages • Tells the computer what you want it to do step by step • FORTRAN, COBOL, BASIC, C, Pascal, Ada

  11. Procedural Programming 2 • Procedures (actions) & objects (data) are independent • Passive objects that cannot initiate an action by itself • A subprogram (routine or module) is a section of the program that performs a particular task when it is called from the main program.

  12. Object-oriented Programming 1 • Active Objects have both data and methods (procedures or actions) • Methods are not independent of but belong to the active object. • Objects need stimulus to perform actions • Visual Basic, Visual C, C++, Java, Smalltalk • Even in script languages (PHP & Python)

  13. Object-oriented Programming 2 • A class is a abstract blueprint of objects that have data and methods • An object (instance) is an (actualized) instance of the class (variables + actions) • A class of human beings (name, gender, height… + eating, sleeping, speaking …) • An object of human beings (Seohyun, 170cm, 40Kg … + eating milk, … )

  14. Object-oriented Programming 3 class human { public name … public height … … function eating (…) { … } function studying (…) { ... } … } // end of class

  15. Object-oriented Programming 4 • Inheritance: a class can inherit from other classes. A class student inherits data and methods from a class human being and has its own data and methods • Student = human beings + student’s data and methods • Faculty = human beings + faculty’s data and methods • Staff = human beings + staff’s data and methods • Codes are reusable (minimize redundancy)

  16. Object-oriented Programming 5 • Data abstraction and decoupling: separating objects from classes • Encapsulation and information hiding: Data are bound closely with their methods. • Polymorphism enables to define methods with the same name that do difference things depending on classes. • A work() may mean teaching in a class faculty but farming in a class farmer.

  17. Functional Programming • Define primitive functions and combine them to keep creating new functions • LISP (LISt Programming) & Scheme

  18. Declarative Programming • Logical reasoning to answer queries • Use deductive logic • Prolog • Report generators: query languages • Query languages: SQL (structured query language) • Application generators: Visual Basic, FOCUS

  19. Declarative languages • Define computation logic • Logical reasoning to answer queries use deductive logics • Used in artificial intelligence • Fourth generation language • Prolog (PROgramming in LOGic) • Query languages: SQL (structured query language) and Report generators

  20. Language Translators 1 • Computer can understand machine languages only • Language translators translate source codes into the machine language. • A source code file needs to be compiled and linked to be an object file, executable file in a computer.

  21. Language Translators 2 • Lexer reads a source code (program) character by character and assembles characters into reserved words (token) • Parser performs syntactic analysis and converts tokens to nodes on a syntax tree. • Code generator produces segments of machine code of each node. • Optimizer inspects machine codes and eliminates redundancies.

  22. Language Translators 3 • Assembler translatesa assembly programs • Interpreter (interactive) • Compiler (non-interactive, batch)

  23. Interpreter • Interactive way of communicating between users and machines. • Translates each line of the source programs or translates instructions one by one and return the result promptly. • Java source Bytecode by Java compiler  interpreted by JVM emulator • BASIC, LISP (LISt Processor) by MIT for artificial intelligence

  24. Compiler • Compiler translates a whole source code into an object code before executing it. • Most high level languages (e.g., C and Java) are translated by their compilers. • Source code  Object file  Linking libraries  Executable file • A library is a collection of commonly used modules that are combined into the executable file.

  25. Computer Software (Program) • A collection of well organized instructions that a computer executes to achieve specific tasks. • Algorithm or logic is a set of ordered steps to solve a problem. • Programming and coding (writing statements) is only a part of system development

  26. Software Development • In the system development stage, when customized software is needed • Program development life cycle (PDLC) • Problem clarification • Program design • Program coding • Program testing • Program documentation and maintenance

  27. Problem Clarification • Objectives and users (programming needs) • Output to be produced by the systems • Input required to get the desired output • Processing to transform input to output • Feasibility (e.g., budget, man powers, modification of old program?)

  28. Design the Program • Program logic in structured programming; modularization (subprogram or subroutine) • Design details • Pseudo-code (narrative outline) • Flowcharts • Control structure (logic structure), sequence, IF, case, iteration or loop (DO, FOR, WHILE) • Structured work-through to review

  29. Flowchart

  30. Components of a Program • Variables (data type, constant, variable declaration and initialization) • Input and output • Expression (operators) • Statements (assignment, compound statement, control statements) • Subprogram: variables, parameters, call by value, call by reference

  31. Control Structures

  32. Coding • A process of writing a program using a proper programming language • The result is a source code (program file in the text format) • Follow coding standards • Documentation (comments or remarks) makes it easy to understand and check mistakes.

  33. Compiling • Interpret a source code (program file) and convert into an object file • Source code  Compiling  Object file (object module) Linking  Executable file (load module) • Linking combines object files and built-in libraries (commonly used modules)

  34. Debugging • A process of checking and correcting errors (bugs) in a program • Errors • Syntax error • Logic error in the logic of a program • Run-time error occurs while a program is running

  35. Software Testing • To check if the software meets the requirements and works as expected • Unit testing (component testing), integration testing, system testing, and acceptance testing • Running programs with test data • Alpha test at developers’ site • Beta test or pre-release test (outside test)

  36. Implementation and Maintenance • Implementation to run the program on the information systems • Installation and compatibility tests • Maintenance (updating)

  37. Documentation • Description of the program development • Data dictionary • Documentation for users • Documentation for operators • Documentation for programmers • Documentation in source programs

  38. Conclusion • Software development is not the same as coding (programming). • Importance of software test . • Documentation in all stages.

More Related