A Short Intro to Go CS 240 – Fall 2018 Rec. 1.

Slides:



Advertisements
Similar presentations
Systems Programming Course Gustavo Rodriguez-Rivera.
Advertisements

Honors 101, Fall 2006 Please do not sit in back of room! Lots of info on web page Join the mailing list Download Eclipse and start using it Read the text.
Big Projects  Part of this class is about picking a cool software project and building it 1.
Welcome to CompSci 100! As You Arrive… Make sure you grab a syllabus packet. Read through it. I will be covering the most essential points in my talk,
Every week: Sign in at the door If you are new: Fill in Registration Form Ask a Mentor how to get started Make sure you are on the Athenry Parents/Kids.
Git Intro Information mostly from Pro Git. Prepare  Start Eclipse, we have a 5-minute exercise later.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Introduction to Python Dr. Bernard Chen Ph.D. University of Central Arkansas July 9 th 2012
CS 3305 Course Overview. Introduction r Instructor: Dr Hanan Lutfiyya r Office: MC 355 r hanan at csd dot uwo ca r Office Hours: m Drop-by m Appointment.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
Javadoc. The Plan ● What is Javadoc? ● Writing Javadoc comments ● Using the Javadoc tool ● Demo ● Practice.
Git – versioning and managing your software L. Grewe.
Object-Oriented Software Engineering Using UNIX groups and Subversion Estimated Time: minutes “Unix is user-friendly. It's just very selective about.
GIT and JUnit Dr. Andrew Wallace PhD BEng(hons) EurIng
COP 3330 Notes 1/12. Today's topics Downloading Java and Eclipse Hello World Basic control structures Basic I/O Strings.
Mobile Device Programming
Git Basics. Git stores data as snapshots of the project over time When commit Save all the files If files have not changed, point to the previous identical.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 1: Introduction.
GIT.
Helping Students Use Turnitin.com Lillie Craton Lander University Fall 2012.
CS 241 Section Week #1 January 26, Topics This Section HW #1 SVN Review (…by the command line!) C Code Examples.
CS 177 Recitation Week 1 – Intro to Java. Questions?
Welcome to Snap! Below the Line Decal Facilitated By: Zachary McPherson and Bao Xie.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
CS240: Advanced Programming Concepts
Why don’t programmers have to program in machine code?
Git primer Landon Cox January 19, 2017.
Node.Js Server Side Javascript
Discussion #11 11/21/16.
CSC207 Fall 2016.
Interpreted languages Jakub Yaghob
Computer Organization, Eclipse Intro
Jeff Barnhart, Eric Reeves, Bryson Lee
A Simple Introduction to Git: a distributed version-control system
Introduction to Python
CSC 221: Computer Programming I Spring 2010
Discussion 11 Final Project / Git.
CSC 221: Computer Programming I Fall 2005
Text by: Lambert and Osborne
COMPSCI210 Recitation 12 Oct 2012 Vamsi Thummala
Version Control System using Git
Lecture 1 Runtime environments.
Lab 1 introduction, debrief
Getting started in Eclipse
How to build 3D Slicer for Windows
Week 1 Gates Introduction to Information Technology cosc 010 Week 1 Gates
Node.Js Server Side Javascript
Introduction to GO CS240 20/8/2017.
CSE341: Programming Languages Section 1
CSE341: Programming Languages Section 1
Introduction to Algorithm Design
Louisiana: Our History.
Trainings 11/18 Advanced Java Things.
Loops CIS 40 – Introduction to Programming in Python
Introduction to Problem Solving & Programming using Processing 2
CMSC 341 Course Introduction July 2011 UMBC CMSC 341 Intro.
Concurrency in Go CS 240 – Fall 2018 Rec. 2.
The Study of Computer Science
Git started with git: 2018 edition
Introduction to Problem Solving & Programming using Processing 2
Version Control with Git and GitHub
Lecture 1 Runtime environments.
Department of Computer Science and Engineering
Git GitHub.
Review of Previous Lesson
CS 580u Programming Systems and Tools
Introduction to Problem Solving & Programming using Processing 2
Week 1 - Friday COMP 1600.
Presentation transcript:

A Short Intro to Go CS 240 – Fall 2018 Rec. 1

Some Housekeeping Make sure you are on Piazza Come to OH if you can’t install Go Start Assignment 1 Let us know on the Piazza poll if this recitation is too basic or advanced Basic Advanced

You’re not a Business Major Stop Saving File Versions Like this:

You’re a CS Major – Use Git COMMAND WHAT IT DOES git init Start recording changes in this directory git add Include this file in the next snapshot git commit Take a snapshot (commit) git reset Go back to the last snapshot (commit) git checkout a Go to snapshot a Resources to Learn Git: https://try.github.io/ Course website (Assignments): http://web.kaust.edu.sa/Faculty/MarcoCanini/classes/CS240/F18/assignments.html DEMO?

What’s this Weird Language I’ve Never Heard of? “Go is a compiled, concurrent, statically typed, garbage-collected language developed at Google” - Rob Pike, 2012 Rob Pike is the Jeff Dean of distributed systems. Here’s the article the quote is from: https://talks.golang.org/2012/splash.article

What’s this Weird Language I’ve Never Heard of? compiled Like C, C++ concurrent Like Erlang statically typed Like C, C++, Java garbage-collected Like Java and Python

Why Not Use Python, Java, C++, etc? Built for Systems. Go preserves efficiency but has good abstractions. Easy multi threading and IO communication. Develop quickly Do many things efficiently and at the same time

Seems Google Specific. Who Else Actually Uses it? Official Self Reported List of Companies that use Go: https://github.com/golang/go/wiki/GoUsers

“We built everything in Python because it was easy, Why did they Choose Go? “We built everything in Python because it was easy, but now it’s slow. So we switched to Go.” - Most companies using Go

Didn’t install Go? Use the web IDE: But How do I Use Go? Start here: https://tour.golang.org/list Didn’t install Go? Use the web IDE: https://play.golang.org/ Other Resources: Go for Pythonists https://talks.golang.org/2013/go4python.slide#1 Go for Distributed Systems https://talks.golang.org/2013/distsys.slide#1 Official Go Talks https://github.com/golang/go/wiki/GoTalks

But How do I Use Go? DEMO

What About Object in Go? DEMO

Build Software for Any System go build file.go Compile an executable for your machine env GOOS=windows GOARCH=amd64 go build file.go Compile an executable for Windows with 64 bit processor DEMO?

Format your Code DEMO COMMAND WHAT IT DOES go fmt file.go Format the file.go properly DEMO

“Frequently Asked Questions (FAQ)” https://golang.org/doc/faq Wait, I Have Questions! Go’s official “Frequently Asked Questions (FAQ)” https://golang.org/doc/faq

Some Advice for the Assignments Write modular code Use comments (even to yourself) Don’t forget go fmt (graded) The clearer your code is, the more we can help with bugs