UNIX, C, C++ History, Philosophy, Patterns & Influences on modern Software Development. Alexander Schatten www.schatten.info. November 2009 ...

Similar documents
CSC230 Getting Starting in C. Tyler Bletsch

A standards-based approach to application integration

Programming. Languages & Frameworks. Hans- Pe(er Halvorsen, M.Sc. h(p://home.hit.no/~hansha/?page=sodware_development

Obfuscatorreloaded. Pascal Junod HEIG-VD Julien Rinaldini HEIG-VD Marc Romanens- EIA-FR Jean-Roland Schuler EIA-FR

How To Create A C++ Web Service

Moving from CS 61A Scheme to CS 61B Java

1/20/2016 INTRODUCTION

XML Processing and Web Services. Chapter 17

Operating System Structure

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

Install Java Development Kit (JDK) 1.8

Introduction into Web Services (WS)

WEB SERVICES. Revised 9/29/2015

Implication on society, economy and education

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

C# and Other Languages

CTutor. Tiago Aguiar Instituto Superior Técnico, Lisboa, Portugal November 2014

The programming language C. sws1 1

USE OF PYTHON AS A SATELLITE OPERATIONS AND TESTING AUTOMATION LANGUAGE

Software Engineering. Software Engineering. Component-Based. Based on Software Engineering, 7 th Edition by Ian Sommerville

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

FAME Operating Systems

What is a programming language?

Chapter 1. Dr. Chris Irwin Davis Phone: (972) Office: ECSS CS-4337 Organization of Programming Languages

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

Database Toolkit: Portable and Cost Effective Software

CSE 307: Principles of Programming Languages

Introduction to Scientific Computing Part II: C and C++ C. David Sherrill School of Chemistry and Biochemistry Georgia Institute of Technology

Julien Kerihuel. OpenChange Project

CS 103 Lab Linux and Virtual Machines

Programming Languages

Service Oriented Architecture

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

Creating Web Services in NetBeans

How To Write Portable Programs In C

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Service Management-as-a-Service for Hybrid Cloud

OKLAHOMA SUBJECT AREA TESTS (OSAT )

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Java Web Services Training

Understanding the OS Architecture and Linux History. Zhiqiang Lin

How To Write A Windows Operating System (Windows) (For Linux) (Windows 2) (Programming) (Operating System) (Permanent) (Powerbook) (Unix) (Amd64) (Win2) (X

T Network Application Frameworks and XML Web Services and WSDL Tancred Lindholm

To Java SE 8, and Beyond (Plan B)

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Chapter 3 Operating-System Structures

The C Programming Language course syllabus associate level

Contents. Java - An Introduction. Java Milestones. Java and its Evolution

Embedded Software Development with MPS

COMP 112 Assignment 1: HTTP Servers

Lecture 22: C Programming 4 Embedded Systems

ICT. Universityy. in any

Moving a Commercial Forecasting Product to Open Source

Virtual Credit Card Processing System

Web Services Description Language (WSDL) Wanasanan Thongsongkrit

Evolution of the Major Programming Languages

JVA-561. Developing SOAP Web Services in Java

Consuming and Producing Web Services with WST and JST. Christopher M. Judd. President/Consultant Judd Solutions, LLC

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Web Service Facade for PHP5. Andreas Meyer, Sebastian Böttner, Stefan Marr

Beyond the Mouse A Short Course on Programming

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

Open Source building blocks for the Internet of Things. Benjamin Cabé JFokus 2013

Accessing Data with ADOBE FLEX 4.6

Lesson 4 Web Service Interface Definition (Part I)

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

Application Centric Infrastructure Object-Oriented Data Model: Gain Advanced Network Control and Programmability

General Introduction

Software: Systems and Application Software

Jonathan Worthington Scarborough Linux User Group

Introduction to WebSphere Process Server and WebSphere Enterprise Service Bus

Java programming for C/C++ developers

REST web services. Representational State Transfer Author: Nemanja Kojic

Building and Using Web Services With JDeveloper 11g

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

ITS. Java WebService. ITS Data-Solutions Pvt Ltd BENEFITS OF ATTENDANCE:

Cloud Computing & Service Oriented Architecture An Overview

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Computer Science Course Descriptions Page 1

BEdita. A system to manage and publish content, a shared platform that will increase the value of your informative patrimony

Features of The Grinder 3

ASP &.NET. Microsoft's Solution for Dynamic Web Development. Mohammad Ali Choudhry Milad Armeen Husain Zeerapurwala Campbell Ma Seul Kee Yoon

MICHIGAN TEST FOR TEACHER CERTIFICATION (MTTC) TEST OBJECTIVES FIELD 050: COMPUTER SCIENCE

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

Basic Java Constructs and Data Types Nuts and Bolts. Looking into Specific Differences and Enhancements in Java compared to C

CSE 130 Programming Language Principles & Paradigms

CE 504 Computational Hydrology Computational Environments and Tools Fritz R. Fiedler

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

Example of Standard API

Star System Deitel & Associates, Inc. All rights reserved.

4.2 Understand Microsoft ASP.NET Web Application Development

Oracle Service Bus. Situation. Oracle Service Bus Primer. Product History and Evolution. Positioning. Usage Scenario

CS 253: Intro to Systems Programming

The Plan Today... System Calls and API's Basics of OS design Virtual Machines

Chao Chen 1 Michael Lang 2 Yong Chen 1. IEEE BigData, Department of Computer Science Texas Tech University

Developing ASP.NET MVC 4 Web Applications MOC 20486

Getting started with API testing

Developing an Interoperable Blackboard Proxy Tool

Transcription:

UNIX, C, C++ History, Philosophy, Patterns & Influences on modern Software Development Alexander Schatten www.schatten.info November 2009

Agenda Timeline C and C++ The Unix Philosophy Example: Unix and VMS styles Example: Unix Pipes Languages influenced by C / C++ Modularisation in C, C++ and today Test-Driven Development Clarity and Simplicity vs. Expressiveness

Timeline

B C C++ B & BCPL were developed at Bell Labs Appeared 1969 Not relevant any more Curly Bracket programming language Only one datatype: word Implementations for PDP-7 and PDP-11 B (BCPL) C General purpose programing languange Introduced 1972 (Bell Labs) for PDP-11 B plus data-types and structure Designed for Implementation of System-Software Low-level memory access Imperative (Procedural) Portability! Not object-oriented

B (BCPL) and C PDP-7

C and C++ Dennis Ritchie and Ken Thomson designed C in 1972 in the Bell Labs Photo from Flickr (Gubatron) Bjarne Stroustrup: created C++ as enhancement of C starting 1979 (Bell Labs) C with Classes in 1983 renamed to C++

Software? Open Source? Photo by Ben Franske IBM System/360 Bill Gates (1977)

Unix and Open Source GNU Richard Stallman GPL started 1989 Originated from similar licences in Emacs or GNU C Compiler

The UNIX vs. VMS Philosophy VMS was proprietary OS from DEC for VAX Minicomputers (Picture shows VAX 11/780 from late 70s, early 80s) Extremely robust and stable OS However, very different design choices compared to Unix Windows NT based on VMS principles First released 1978 Photo from Flickr (Astio) Process Spawning in VMS expensive Rather monolithic large and complex applications Less CLI usage Using less, but more complex programs with more complex functions

The Unix Philosophy Do one thing and do it well Modularity: Simply parts connected by clean interfaces Clarity is better than cleverness Simplicity Composition: Write small programs to be connected Representation: Make data complex, not logic Economy: Developer time is expensive, machine time is not Textual Data-Formats (including e.g. GCC compile steps) Command-Line Interfaces Library & Library Exercisers The Art of Unix Programing, Eric S. Raymond

Example: Unix Pipes 1 Small Program Pipe Text File Small Program Pipe Text File Small Program Output

Wikipedia Example: Unix Pipes curl "http://anyurl" sed 's/[^a-za-z ]/ /g' tr 'A-Z ' 'a-z\n' grep '[a-z]' sort -u comm -23 - /usr/share/dict/words 1. Load File from URL 2. Remove Characters 3. Change uppercase to lowercase 4. Remove blank lines 5. Sort Lines 6. Compare List with dictionary Spellcheck of Webpage

Languages influenced by C/C++ Java, Javascript, C#, PHP Example: Java Syntax very similar to C/C++ No preprocessor, no multiple inheritance Higher level of abstraction (no direct system calls) Virtual Machine Primitive Types: standardised with VM Garbage Collection Type Safety Cost and Benefit of Abstraction: Rapidly growing standard library Year JDK Version Packages Classes 1999 1.2.1 21 358 2001 1.3.1 76 1840 2002 1.4.2 135 2723 2004 1.5 165 3279 2006 1.6 202 3777

Modularisation in C / Unix Conventions, not Standards; Unix Compiler always works with one file Per C File small number of functions Header Files used to expose functionality Grouping in Packages, i.e. Directories Build-Scripts using e.g. make to build whole projects Configuration using textual config files command-line parameters Communication between applications via Text-(Files)

Modularisation Today Components Services Service Oriented Architecture Platform-specific RPC? Text(XML)-based interoperability REST Webservices (SOAP, WSDL) Message oriented Middleware (e.g. JMS) Enterprise Integration Patterns Pipes-and-Filters Unix Pipes scaled up Pipes and Filters Example from Gregor Hohpe: Enterprise Integration Patterns

From Library Exercisers to Test-Driven Development Library API Usage? Test-Driven Development Formalised Mechanisms like Unit-Test Frameworks Tests also for Communication Documentation Today Test 1 Library API Test 2 Exerciser Test 3

Clarity and Simplicity vs. Expressiveness Keep It Simple Stupid? Language Efficiency? Expressiveness of Languages Imperative vs. functional & mixed languages Learning Curve Long-Term vs. Short-Term Effects E.g. Scala vs. Java? Complex Frameworks? #include <stdlib.h> #include <stdio.h> int main(int argc, char *argv[]) { int n = 0; } while ( n < argc ) { printf("command line argument %d is %s\n", (n+1), argv[n]); ++n; } return EXIT_SUCCESS; @P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinu / lrep rehtona tsuj";sub p{ @p{"r$p","u$p"}=(p,p);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$p=$p[$f^ord ($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&& close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\s/;print

Conclusion Unix Concepts from the 70s were extremely successful and influential until today Unix-Philosophy allows complex yet robust global networks and distributed software De-Coupling and Modularisation Testing Communication via Text-based protocols Power of Command-Line Open Source Movement

Dr. Alexander Schatten Senior Researcher: Vienna University of Technology IT Consulting www.schatten.info alexander@schatten.info alex_buzz (Twitter) best-practice-software-engineering.blogspot.com Mantra Keep it simple, stupid!