Go for Java Developers
|
|
- Joel Jefferson
- 5 years ago
- Views:
Transcription
1 Go for Java Developers Stoyan Rachev May , Sofia 1
2 Agenda Introduction Variables and Control Flow Types and Data Structures Functions Methods and Interfaces Concurrency Conclusion 2
3 What is Go? Go is an open source programming language originally from Google that makes it easy to build simple, reliable, and efficient software. 3
4 Why Go? Answer to the challenges of scale at Google Increasingly popular (RedMonk, Tiobe) 4
5 Why Go for Java Developers? Learning new languages makes us better programmers Better choice than Java in some situations Contribute or integrate with existing Go projects 5
6 Go and Java - Similarities C-style Imperative Compiled Statically typed Object-oriented Cross-platform Garbage collection Memory safety Type assertions Reflection 6
7 Go and Java - Differences No VM Syntax differences Built-in strings, arrays, and maps Type inference Closures Concurrency No classes No inheritance No exceptions No annotations No generics 7
8 Why So Different? Language design in the service of software engineering Familiar, yet modern High performance, compile and runtime Balance between complexity and convenience Emphasis on automated tools Less is exponentially more 8
9 Example: Hello, world 9
10 Variables and Constants // Java int x; String s = "Hello, world!"; public static final double PI = 3.14; // Go var x int s := "Hello, world!" const Pi =
11 Control Flow - for for i { < = n 0; { i < n; i++ {... 11
12 Control Flow - if if x < := limit math.pow(a, { n); x < limit {... else {... 12
13 Control Flow - switch switch lang {:= ui.ask(); lang { case "java": getlanguage():... case "go":... default:... switch true { {... 13
14 Basic Types and Pointers var s string var r rune var b boolean Go type int8 int16 int32 int64 float32 float64 Java type byte short int long float double var i int var p *string = &s 14
15 Arrays and Slices var a [2]string a[0], a[1] = "java", "go" var s []string = a[:] s := []string{"java", "go" s var:= s make([]string, 0) s = append(s, "java") 15
16 Maps m := make(map[string]int) m["java"], m["go"] = 1, 2 m := map[string]int{"java": 1, "go": 2 r, = ok m["go"] := m["ruby"] // ok is false delete(m, "go") 16
17 Structs type Point struct { X int Y int p := Point{1, &Point{1 2, 2 p.y = 3 17
18 Example: Meters to feet converter 18
19 Functions // Java public static int sum(int a, int b) { return a + b; // Go func Sum(a int, b int) int { return a + b 19
20 Error Handling public static int f() throws Exception { // Java... throw MyException("...");... return 1 func f() (int, error) { // Go... return 0, fmt.errorf("...")... return 1, nil 20
21 Error Handling Checking for Errors n, err := f() if err!= nil {... // Use n... 21
22 Closures func fibonacci() func() int { x, y := 0, 1 return func() int { x, y = x + y, x return x f := fibonacci() for i := 0; i < 10; i++ { fmt.println(f()) 22
23 defer resp, err := http.get(url) if err!= nil {... defer resp.body.close() 23
24 Methods type Stack struct { data []string func (s *Stack) Push(x string) { s.data = append(s.data, x) s := NewStack() s.push("hello, world!") 24
25 Interfaces func Fprintf(w io.writer, format string, args...interface{) (int, error) type Writer interface { Write(p []byte) (int, error) 25
26 Interfaces - Satisfaction type NopWriter struct { func (w *NopWriter) Write(p []byte) (int, error) return len(p), nil var w NopWriter fmt.fprintf(&w, "Hello, world!") 26
27 Example: Word Count 27
28 Go Concurrency Don't communicate by sharing memory, share memory by communicating. 28
29 Goroutines func say(s string) { fmt.println(s) go say("hi") say("there") 29
30 Channels ch := make(chan int) // create channel ch <- x // send x = <-ch // receive and assign <-ch // receive and discard close(ch) // close channel 30
31 select select { case <-ch1: // receive... case x := <-ch2: // receive and assign... case ch3 <- y: // send... default:... 31
32 Pipelines numbers := make(chan int) go func(int n) { // generator for i := 0; i < n; i++ { numbers <- i close(numbers) (10) for x := range numbers { // printer fmt.println(x) 32
33 Example: Pipelines 33
34 Tools go run go build go install go test go get gofmt goimports godep 34
35 Where to Go from Here? Go Web site, A Tour of Go, Go Docu, Go FAQ, The Go Programming Language, by A. Donovan and B. Kernighan 35
36 Final Words Go is similar to Java, yet different Go is simple, elegant, and efficient Go is worth giving a try! 36
37 THANK YOU :) You can find me Stoyan Rachev May , Sofia 37
Introduzione a Go e RPC in Go
Università degli Studi di Roma Tor Vergata Dipartimento di Ingegneria Civile e Ingegneria Informatica Introduzione a Go e RPC in Go Corso di Sistemi Distribuiti e Cloud Computing A.A. 2017/18 Valeria Cardellini
More informationGo Cheat Sheet. Operators. Go in a Nutshell. Declarations. Basic Syntax. Hello World. Functions. Comparison. Arithmetic. Credits
Credits Go Cheat Sheet Most example code taken from A Tour of Go, which is an excellent introduction to Go. If you're new to Go, do that tour. Seriously. Original HTML Cheat Sheet by Ariel Mashraki (a8m):
More informationLecture 22 Go http://xkcd.com/979/ Go developed ~2007 at Google by Robert Griesemer, Rob Pike, Ken Thompson open sourced in 2009 compiled, statically typed very fast compilation C-like syntax garbage collection
More informationThe Go Programming Language. Frank Roberts
The Go Programming Language Frank Roberts frank.roberts@uky.edu - C++ (1983), Java (1995), Python (1991): not modern - Java is 18 years old; how has computing changed in 10? - multi/many core - web programming
More informationdeveloped ~2007 by Robert Griesemer, Rob Pike, Ken Thompson open source
Go developed ~2007 by Robert Griesemer, Rob Pike, Ken Thompson open source compiled, statically typed syntax looks sort of like C garbage collection built-in concurrency no classes or type inheritance
More informationGo Forth and Code. Jonathan Gertig. CSC 415: Programing Languages. Dr. Lyle
J o n a t h a n G e r t i g P a g e 1 Go Forth and Code Jonathan Gertig CSC 415: Programing Languages Dr. Lyle 2013 J o n a t h a n G e r t i g P a g e 2 Go dogs Go or A Brief History of Go 6 years ago
More informationGo Tutorial. To do. A brief, gentle intro to Go. Next Networking. q Today
Go Tutorial To do q Today A brief, gentle intro to Go q Next Networking About Go Developed by Google Webpage: https://golang.org/ Concurrency was a priority in the language design A bit of a mix between
More informationIssue with Implementing PrimeSieve() in Go
Slices 02-201 Issue with Implementing PrimeSieve() in Go func PrimeSieve(n int) [n+1]bool { var iscomposite [n+1]bool //ERROR! biggestprime := 2 for biggestprime < n for i:=2; i
More informationLecture Overview Methods and Interfaces Methods review Interfaces Example: using the sort interface Anonymous fields in structs
1 Lecture Overview Methods and Interfaces Methods review Interfaces Example: using the sort interface Anonymous fields in structs Generic printing using the empty interface Maps Creating a map Accessing
More informationGo Tutorial. Arjun Roy CSE 223B, Spring 2017
Go Tutorial Arjun Roy arroy@eng.ucsd.edu CSE 223B, Spring 2017 Administrative details TA Office Hours: EBU3B B250A, Tuesday 5-7PM TA Email: arroy@eng.ucsd.edu All labs due by 2359 PDT. Lab 1 due: 4/13/2017.
More informationgo get my/vulnerabilities Green threads are not eco friendly threads
go get my/vulnerabilities Green threads are not eco friendly threads 1 Who ( Web Mobile ) penetration tester Code reviewer Programmer Roberto Clapis @empijei 2 Go Google s language Born in 2007 (quite
More informationunderstanding
understanding nil @francesc thanks welcome every single one of you agenda what is nil? what is nil in Go? what does nil mean? is nil useful? nil? you misspelled null how I learn words how I learn words
More informationPierce Ch. 3, 8, 11, 15. Type Systems
Pierce Ch. 3, 8, 11, 15 Type Systems Goals Define the simple language of expressions A small subset of Lisp, with minor modifications Define the type system of this language Mathematical definition using
More informationGo on NetBSD (and pkgsrc!) A modern systems programming language 23 March Benny Siegert Google Switzerland; The NetBSD Foundation
Go on NetBSD (and pkgsrc!) A modern systems programming language 23 March 2013 Benny Siegert Google Switzerland; The NetBSD Foundation Agenda What is Go? Building Go code with the gotool Running Go code
More informationGo Language September 2016
Go Language September 2016 Giacomo Tartari PhD student, University of Tromsø http://127.0.0.1:3999/golang2016.slide#34 1/53 Go http://127.0.0.1:3999/golang2016.slide#34 2/53 Why? Rob Pike's take (one of
More informationGO IDIOMATIC CONVENTIONS EXPLAINED IN COLOR
GO IDIOMATIC CONVENTIONS EXPLAINED IN COLOR REVISION 1 HAWTHORNE-PRESS.COM Go Idiomatic Conventions Explained in Color Published by Hawthorne-Press.com 916 Adele Street Houston, Texas 77009, USA 2013-2018
More informationDistributed Systems. 02r. Go Programming. Paul Krzyzanowski. TA: Yuanzhen Gu. Rutgers University. Fall 2015
Distributed Systems 02r. Go Programming Paul Krzyzanowski TA: Yuanzhen Gu Rutgers University Fall 2015 September 15, 2015 CS 417 - Paul Krzyzanowski 1 Motivation In the current world, languages don't help
More informationLecture 4: Golang Programming. Lecturer: Prof. Zichen Xu
Lecture 4: Golang Programming Lecturer: Prof. Zichen Xu Outline The history The reason The code Sophistication If more than one function is selected, any function template specializations in the set are
More informationTHE GO PROGRAMMING LANGUAGE CHARACTERISTICS AND CAPABILITIES
Годишник на секция Информатика Съюз на учените в България Том 6, 2013, 76 85 Annual of Informatics Section Union of Scientists in Bulgaria Volume 6, 2013, 76 85 THE GO PROGRAMMING LANGUAGE CHARACTERISTICS
More informationJython. An introduction by Thinh Le
Jython An introduction by Thinh Le precursor_python! Google App Engine! Dropbox! PyGTK (Gnome)! Vim (embedded)! BitTorrent/Morpheus! Civilization/Battlefield Jython! Interpretation of Python (1997)! Jim
More informationLet s Go! Akim D le, Etienne Renault, Roland Levillain. June 8, TYLA Let s Go! June 8, / 58
Let s Go! Akim Demaille, Etienne Renault, Roland Levillain June 8, 2017 TYLA Let s Go! June 8, 2017 1 / 58 Table of contents 1 Overview 2 Language Syntax 3 Closure 4 Typed functional programming and Polymorphism
More informationThe Awesomeness of Go. Igor Lankin DevFest Karlsruhe, Nov 2016
The Awesomeness of Go Igor Lankin DevFest Karlsruhe, Nov 2016 Igor Lankin Software Developer @ inovex C#, Java, Java Script, full-time GO (waipu.tv ) 2 What is Go? 3 An Awesome Programming Language 4 Imagine
More informationCMSC 330: Organization of Programming Languages. OCaml Expressions and Functions
CMSC 330: Organization of Programming Languages OCaml Expressions and Functions CMSC330 Spring 2018 1 Lecture Presentation Style Our focus: semantics and idioms for OCaml Semantics is what the language
More informationGO MOCK TEST GO MOCK TEST I
http://www.tutorialspoint.com GO MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to Go. You can download these sample mock tests at your local machine
More information2 rd class Department of Programming. OOP with Java Programming
1. Structured Programming and Object-Oriented Programming During the 1970s and into the 80s, the primary software engineering methodology was structured programming. The structured programming approach
More informationIntroduction to the Go Programming Language
Introduction to the Go Programming Language Basics, Concurrency and Useful Packages Fabian Wenzelmann April 6, 2017 F. Wenzelmann Introduction to Go April 6, 2017 1 / 114 Why Go? What is Go? Go is a programming
More informationCOMP-520 GoLite Tutorial
COMP-520 GoLite Tutorial Alexander Krolik Sable Lab McGill University Winter 2019 Plan Target languages Language constructs, emphasis on special cases General execution semantics Declarations Types Statements
More informationGo Concurrent Programming. QCon2018 Beijing
Go Concurrent Programming chao.cai@mobvista.com QCon2018 Beijing Shared Memory Model Shared Memory Model class Worker implements Runnable{ private volatile boolean isrunning = false; @Override public void
More informationGO SHORT INTERVIEW QUESTIONS EXPLAINED IN COLOR
GO SHORT INTERVIEW QUESTIONS EXPLAINED IN COLOR REVISION 1 HAWTHORNE-PRESS.COM Go Short Interview Questions Explained in Color Published by Hawthorne-Press.com 916 Adele Street Houston, Texas 77009, USA
More informationGo Programming. Russ Cox and Rob Pike May 20, 2010
Go Programming Russ Cox and Rob Pike May 20, 2010 Live waving View live notes and ask questions about this session on Google Wave: http://bit.ly/go2010io 3 Go is different Go is more unusual than you might
More informationDon t let data Go astray
Don t let data Go astray A Context-Sensitive Taint Analysis for Concurrent Programs in Go Volker Stolz Bergen University College, Norway & University of Oslo, Norway 28 th Nordic Workshop on Programming
More informationRheinisch-Westfälische Technische Hochschule Aachen. Lehrstuhl für Datenmanagement und -exploration Prof. Dr. T. Seidl. Proseminar.
Rheinisch-Westfälische Technische Hochschule Aachen Lehrstuhl für Datenmanagement und -exploration Prof. Dr. T. Seidl Proseminar Google Go illustrated on the basis of Fibonacci numbers Jan Pennekamp Mai
More informationIntroduction to Swift. Dr. Sarah Abraham
Introduction to Swift Dr. Sarah Abraham University of Texas at Austin CS329e Fall 2018 What is Swift? Programming language for developing OSX, ios, WatchOS, and TvOS applications Best of C and Objective-C
More informationCOMP 202 Java in one week
COMP 202 Java in one week... Continued CONTENTS: Return to material from previous lecture At-home programming exercises Please Do Ask Questions It's perfectly normal not to understand everything Most of
More informationUsing the Go Programming Language in Practice
Using the Go Programming Language in Practice Erik Westrup & Fredrik Pettersson Department of Computer Science, Lund University Axis Communications, Sweden May 28, 2014 Supervisors: Jonas Skeppstedt
More informationComputer Components. Software{ User Programs. Operating System. Hardware
Computer Components Software{ User Programs Operating System Hardware What are Programs? Programs provide instructions for computers Similar to giving directions to a person who is trying to get from point
More informationCut. it s not just for Google. Eleanor McHugh.
Ro u gh Cut! Go it s not just for Google Eleanor McHugh http://slides.games-with-brains.net/ compiled garbage collected imperative package main import fmt const HELLO string = hello var WORLD string =
More informationWilliam Kennedy. Brian Ketelsen Erik St. Martin Steve Francia FOREWORD BY MANNING WITH
SAMPLE CHAPTER William Kennedy WITH FOREWORD BY Brian Ketelsen Erik St. Martin Steve Francia MANNING Go in Action by William Kennedy with Brian Ketelsen and Erik St. Martin Chapter 2 Copyright 2015 Manning
More informationArrays and Strings
Arrays and Strings 02-201 Arrays Recall: Fibonacci() and Arrays 1 1 2 3 5 8 13 21 34 55 a Fibonacci(n) a ß array of length n a[1] ß 1 a[2] ß 1 for i ß 3 to n a[i] ß a[i-1] + a[i-2] return a Declaring Arrays
More informationThe current topic: Python. Announcements. Python. Python
The current topic: Python Announcements! Introduction! reasons for studying languages! language classifications! simple syntax specification Object-oriented programming: Python Types and values Syntax
More information(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days
Course Description This course introduces the Java programming language and how to develop Java applications using Eclipse 3.0. Students learn the syntax of the Java programming language, object-oriented
More informationAP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS
AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this
More informationMotivations History Principles Language Gommunity Success stories Conclusion. Let s Go! A brief introduction to Google s new language.
Let s Go! A brief introduction to Google s new language Aurélien Dumez Inria Bordeaux - Sud-Ouest aurelien.dumez@inria.fr Tuesday, October 2nd 2012 Content - 1/2 1 2 3 4 Characteristics SDK vs Examples
More informationThe Go Programming Language. Part 3
The Go Programming Language Part 3 Rob Pike r@google.com (updated June 2011) 1 Today s Outline Exercise any questions? Concurrency and communication goroutines channels concurrency issues 2 Exercise Any
More informationSummary of Go Syntax /
Summary of Go Syntax 02-201 / 02-601 Can declare 1 or more variables in same var statement Variables Can optionally provide initial values for all the variables (if omitted, each variable defaults to the
More informationNew Parallel Programming Languages for Optimization Research
New Parallel Programming Languages for Optimization Research John W. Chinneck, Stephane Ernst Systems and Computer Engineering Carleton University, Ottawa, Canada Motivation Challenges for optimization
More informationDialects of ML. CMSC 330: Organization of Programming Languages. Dialects of ML (cont.) Features of ML. Functional Languages. Features of ML (cont.
CMSC 330: Organization of Programming Languages OCaml 1 Functional Programming Dialects of ML ML (Meta Language) Univ. of Edinburgh,1973 Part of a theorem proving system LCF The Logic of Computable Functions
More informationPointers, Dynamic Data, and Reference Types
Pointers, Dynamic Data, and Reference Types Review on Pointers Reference Variables Dynamic Memory Allocation The new operator The delete operator Dynamic Memory Allocation for Arrays 1 C++ Data Types simple
More informationCopyright 2008 CS655 System Modeling and Analysis. Korea Advanced Institute of Science and Technology
The Spin Model Checker : Part I Copyright 2008 CS655 System Korea Advanced Institute of Science and Technology System Spec. In Promela Req. Spec. In LTL Overview of the Spin Architecture Spin Model pan.c
More informationJava language. Part 1. Java fundamentals. Yevhen Berkunskyi, NUoS
Java language Part 1. Java fundamentals Yevhen Berkunskyi, NUoS eugeny.berkunsky@gmail.com http://www.berkut.mk.ua What Java is? Programming language Platform: Hardware Software OS: Windows, Linux, Solaris,
More informationM/s. Managing distributed workloads. Language Reference Manual. Miranda Li (mjl2206) Benjamin Hanser (bwh2124) Mengdi Lin (ml3567)
1 M/s Managing distributed workloads Language Reference Manual Miranda Li (mjl2206) Benjamin Hanser (bwh2124) Mengdi Lin (ml3567) Table of Contents 1. Introduction 2. Lexical elements 2.1 Comments 2.2
More informationTitan: A System Programming Language made for Lua
Titan: A System Programming Language made for Lua Hugo Musso Gualandi, PUC-Rio in collaboration with André Maidl, Fabio Mascarenhas, Gabriel Ligneul and Hisham Muhammad Part 1: Why Titan We started out
More informationCMSC131. Inheritance. Object. When we talked about Object, I mentioned that all Java classes are "built" on top of that.
CMSC131 Inheritance Object When we talked about Object, I mentioned that all Java classes are "built" on top of that. This came up when talking about the Java standard equals operator: boolean equals(object
More informationDon t Go Java! Edition 2019
Don t Go, Java! Don t Go Java! Don t Go Java! Edition 2019 Disclaimer Disclaimer I actually like Go! Guess The Movie Guess The Movie Guess The Movie Guess The Movie Who s That Dude? Chris Engelbert Senior
More informationCS 261 Fall C Introduction. Variables, Memory Model, Pointers, and Debugging. Mike Lam, Professor
CS 261 Fall 2017 Mike Lam, Professor C Introduction Variables, Memory Model, Pointers, and Debugging The C Language Systems language originally developed for Unix Imperative, compiled language with static
More informationIntroduce C# as Object Oriented programming language. Explain, tokens,
Module 2 98 Assignment 1 Introduce C# as Object Oriented programming language. Explain, tokens, lexicals and control flow constructs. 99 The C# Family Tree C Platform Independence C++ Object Orientation
More informationGo Circuit: Distributing the Go Language and Runtime. Petar Maymounkov
Go Circuit: Distributing the Go Language and Runtime Petar Maymounkov p@gocircuit.org Problem: DEV OPS isolation App complexity vs manual involvement Distribute cloud apps How to describe complex deploy
More informationTranquility Publications. Web Edition MAC
Web Edition 2019 -MAC 2 Go Go language is a programming language initially developed at Google in the year 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. It is a statically-typed language having
More informationLECTURE 18. Control Flow
LECTURE 18 Control Flow CONTROL FLOW Sequencing: the execution of statements and evaluation of expressions is usually in the order in which they appear in a program text. Selection (or alternation): a
More informationChapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.
Chapter 1 GETTING STARTED SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Java platform. Applets and applications. Java programming language: facilities and foundation. Memory management
More informationStatic Deadlock Detection for Go by Global Session Graph Synthesis. Nicholas Ng & Nobuko Yoshida Department of Computing Imperial College London
Static Deadlock Detection for Go by Global Session Graph Synthesis Nicholas Ng & Nobuko Yoshida Department of Computing Imperial College London Contributions Static deadlock detection tool dingo-hunter
More informationObjectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java
Introduction Objectives An overview of object-oriented concepts. Programming and programming languages An introduction to Java 1-2 Problem Solving The purpose of writing a program is to solve a problem
More informationOCaml Data CMSC 330: Organization of Programming Languages. User Defined Types. Variation: Shapes in Java
OCaml Data : Organization of Programming Languages OCaml 4 Data Types & Modules So far, we ve seen the following kinds of data Basic types (int, float, char, string) Lists Ø One kind of data structure
More informationCS112 Lecture: Primitive Types, Operators, Strings
CS112 Lecture: Primitive Types, Operators, Strings Last revised 1/24/06 Objectives: 1. To explain the fundamental distinction between primitive types and reference types, and to introduce the Java primitive
More informationArrays/Slices Store Lists of Variables
Maps 02-201 Arrays/Slices Store Lists of Variables H i T h e r e! 0 1 2 3 4 5 6 7 8 1 1 2 3 5 8 13 21 34 55 89 0 1 2 3 4 5 6 7 8 9 10 ACG TTA GAG CCT TAA GGG CAT 0 1 2 3 4 5 6 What if Indices Aren t Integers?
More informationClosures. Mooly Sagiv. Michael Clarkson, Cornell CS 3110 Data Structures and Functional Programming
Closures Mooly Sagiv Michael Clarkson, Cornell CS 3110 Data Structures and Functional Programming Summary 1. Predictive Parsing 2. Large Step Operational Semantics (Natural) 3. Small Step Operational Semantics
More information6.096 Introduction to C++ January (IAP) 2009
MIT OpenCourseWare http://ocw.mit.edu 6.096 Introduction to C++ January (IAP) 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Welcome to 6.096 Lecture
More informationFinal CSE 131B Spring 2004
Login name Signature Name Student ID Final CSE 131B Spring 2004 Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 (25 points) (24 points) (32 points) (24 points) (28 points) (26 points) (22 points)
More informationLectures 5-6: Introduction to C
Lectures 5-6: Introduction to C Motivation: C is both a high and a low-level language Very useful for systems programming Faster than Java This intro assumes knowledge of Java Focus is on differences Most
More informationfunc findbestfold(seq string, energyfunction func(fold)float64)) Fold {
Carl Kignsford, 0-0, Fall 0 Loose Ends Functions as values of variables Sometimes it would be useful to pass a function as a parameter to another function. For example, suppose you were writing a protein
More informationChapter 1 INTRODUCTION SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.
hapter 1 INTRODUTION SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. Objectives You will learn: Java features. Java and its associated components. Features of a Java application and applet. Java data types. Java
More informationOutline. Overview. Control statements. Classes and methods. history and advantage how to: program, compile and execute 8 data types 3 types of errors
Outline Overview history and advantage how to: program, compile and execute 8 data types 3 types of errors Control statements Selection and repetition statements Classes and methods methods... 2 Oak A
More informationCS 61C: Great Ideas in Computer Architecture Introduction to C
CS 61C: Great Ideas in Computer Architecture Introduction to C Instructors: Vladimir Stojanovic & Nicholas Weaver http://inst.eecs.berkeley.edu/~cs61c/ 1 Agenda C vs. Java vs. Python Quick Start Introduction
More information! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified
Course Goal CMSC 330: Organization of Programming Languages Introduction Instructors: Mike Hicks, Chau-Wen Tseng TAs: Srividya Ramaswamy, Eylul Dogruel, Khoa Doan Learn how programming languages work!
More informationCS 430 Spring Mike Lam, Professor. Data Types and Type Checking
CS 430 Spring 2015 Mike Lam, Professor Data Types and Type Checking Type Systems Type system Rules about valid types, type compatibility, and how data values can be used Benefits of a robust type system
More informationFuture Web App Technologies
Future Web App Technologies Mendel Rosenblum MEAN software stack Stack works but not the final say in web app technologies Angular.js Browser-side JavaScript framework HTML Templates with two-way binding
More informationCOMP520 - GoLite Type Checking Specification
COMP520 - GoLite Type Checking Specification Vincent Foley April 8, 2018 1 Introduction This document presents the typing rules for all the language constructs (i.e. declarations, statements, expressions)
More informationCS 33. Introduction to C. Part 4. CS33 Intro to Computer Systems IV 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.
CS 33 Introduction to C Part 4 CS33 Intro to Computer Systems IV 1 Copyright 2017 Thomas W. Doeppner. All rights reserved. Lifetime int count; int main() { func();... func(); // what s printed by func?
More informationAdvanced Systems Programming
Advanced Systems Programming Introduction to C++ Martin Küttler September 19, 2017 1 / 18 About this presentation This presentation is not about learning programming or every C++ feature. It is a short
More informationC# and Java. C# and Java are both modern object-oriented languages
C# and Java C# and Java are both modern object-oriented languages C# came after Java and so it is more advanced in some ways C# has more functional characteristics (e.g., anonymous functions, closure,
More informationFunctions & Variables !
Functions & Variables 02-201! What Is Programming? Programming is clearly, correctly telling a computer what to do. Programming Executable Program Algorithm: (English) instructions to the computer Programming
More informationSTRUCTURING OF PROGRAM
Unit III MULTIPLE CHOICE QUESTIONS 1. Which of the following is the functionality of Data Abstraction? (a) Reduce Complexity (c) Parallelism Unit III 3.1 (b) Binds together code and data (d) None of the
More informationIntroduction to Programming Using Java (98-388)
Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;
More informationSWIFT! init(title: String) { self.title = title } // required initializer w/ named parameter
SWIFT! class Session { let title: String // constant non-optional field: can never be null and can never be changed var instruktør: Person? // variable optional field: null is permitted var attendees:
More informationLearning objectives. The Java Environment. Java timeline (cont d) Java timeline. Understand the basic features of Java
Learning objectives The Java Environment Understand the basic features of Java What are portability and robustness? Understand the concepts of bytecode and interpreter What is the JVM? Learn few coding
More informationCOMP520 - GoLite Type Checking Specification
COMP520 - GoLite Type Checking Specification Vincent Foley March 5, 2017 1 Introduction This document presents the typing rules for all the language constructs (i.e. declarations, statements, expressions)
More informationCS 61C: Great Ideas in Computer Architecture. Lecture 2: Numbers & C Language. Krste Asanović & Randy Katz
CS 61C: Great Ideas in Computer Architecture Lecture 2: Numbers & C Language Krste Asanović & Randy Katz http://inst.eecs.berkeley.edu/~cs61c Numbers wrap-up This is not on the exam! Break C Primer Administrivia,
More informationClosures. Mooly Sagiv. Michael Clarkson, Cornell CS 3110 Data Structures and Functional Programming
Closures Mooly Sagiv Michael Clarkson, Cornell CS 3110 Data Structures and Functional Programming t ::= x x. t t t Call-by-value big-step Operational Semantics terms variable v ::= values abstraction x.
More informationC Introduction. Comparison w/ Java, Memory Model, and Pointers
CS 261 Fall 2018 Mike Lam, Professor C Introduction Comparison w/ Java, Memory Model, and Pointers Please go to socrative.com on your phone or laptop, choose student login and join room LAMJMU The C Language
More informationGetting started with Java
Getting started with Java by Vlad Costel Ungureanu for Learn Stuff Programming Languages A programming language is a formal constructed language designed to communicate instructions to a machine, particularly
More informationThe Java programming environment. The Java programming environment. Java: A tiny intro. Java features
The Java programming environment Cleaned up version of C++: no header files, macros, pointers and references, unions, structures, operator overloading, virtual base classes, templates, etc. Object-orientation:
More informationLecture 9: Lists. Lists store lists of variables. Declaring variables that hold lists. Carl Kingsford, , Fall 2015
Carl Kingsford, 0-0, Fall 0 Lecture : Lists Terminology: Go uses a non-standard term slice to refer to what we are calling lists. Others use the term array for the same concept. Unfortunately, Go uses
More informationCSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341)
CSE 413 Languages & Implementation Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) 1 Goals Representing programs as data Racket structs as a better way to represent
More informationPIC 20A The Basics of Java
PIC 20A The Basics of Java Ernest Ryu UCLA Mathematics Last edited: November 1, 2017 Outline Variables Control structures classes Compilation final and static modifiers Arrays Examples: String, Math, and
More informationUsing DPDK with Go. Takanari Hayama Technology Consulting Company IGEL Co.,Ltd.
Using DPDK with Go Technology Consulting Company Research, Development & Global Standard Takanari Hayama taki@igel.co.jp Technology Consulting Company IGEL Co.,Ltd. 1 BACKGROUND 2017/9/26,27 DPDK Summit
More informationIntroduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types. Record Types. Pointer and Reference Types
Chapter 6 Topics WEEK E FOUR Data Types Introduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types Associative Arrays Record Types Union Types Pointer and Reference
More informationGO - QUICK GUIDE GO - OVERVIEW
http://www.tutorialspoint.com/go/go_quick_guide.htm GO - QUICK GUIDE Copyright tutorialspoint.com GO - OVERVIEW Go is a general-purpose language designed with systems programming in mind.it was initially
More information5) Attacker causes damage Different to gaining control. For example, the attacker might quit after gaining control.
Feb 23, 2009 CSE, 409/509 Mitigation of Bugs, Life of an exploit 1) Bug inserted into code 2) Bug passes testing 3) Attacker triggers bug 4) The Attacker gains control of the program 5) Attacker causes
More informationChapter 1 Getting Started
Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different
More informationIndex. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309
A Arithmetic operation floating-point arithmetic, 11 12 integer numbers, 9 11 Arrays, 97 copying, 59 60 creation, 48 elements, 48 empty arrays and vectors, 57 58 executable program, 49 expressions, 48
More information