CS 342: Software Design Overview Class Overview Git Basics - - PowerPoint PPT Presentation

cs 342 software design overview
SMART_READER_LITE
LIVE PREVIEW

CS 342: Software Design Overview Class Overview Git Basics - - PowerPoint PPT Presentation

CS 342: Software Design Overview Class Overview Git Basics Break Intro to Java Class Goals Learn the Java language Use Java to do interesting things Generalizable methods, techniques and principals Good


slide-1
SLIDE 1

CS 342:
 Software Design

slide-2
SLIDE 2

Overview

  • Class Overview
  • Git Basics
  • Break
  • Intro to Java
slide-3
SLIDE 3

Class Goals

  • Learn the Java language
  • Use Java to do interesting things
  • Generalizable methods, techniques and principals
  • Good development practices
slide-4
SLIDE 4

Experience

  • Java?
  • Packages?
  • Exceptions?
  • Patterns?
  • Async?
  • Lambda / functional programming?
slide-5
SLIDE 5

Java

in a Nutshell

Benjamin J. Evans & David Flanagan

Java

in a Nutshell

A DESKTOP QUICK REFERENCE

6th Edition

Covers Java 8

Grades

  • Readings
  • Class participation /

discussion

  • Homework
  • Midterm / final
slide-6
SLIDE 6

Getting Help

  • https://www.cs.uic.edu/~psnyder/cs342-summer2017/
  • Questions in class
  • Office Hours
  • Me: SEO 1218, 2-4pm, Wed and Fri
  • TA: SEO 1380, TBA
  • Piazza
slide-7
SLIDE 7

Class Framework

  • Brief reading quiz (clickers)
  • Discussion on quiz
  • Lecture (and discussion)
  • Break
  • Lecture (and discussion)
slide-8
SLIDE 8

Updates and Info

  • Follow Piazza
  • Website for readings and dates
  • Email for emergency situations
slide-9
SLIDE 9

Getting Setup

  • Java 8
  • Git
  • SSH
  • Linux
  • Basic Java environment (ie choose your IDE)
slide-10
SLIDE 10

Version Control

slide-11
SLIDE 11

Git

  • Open source
  • Keeps track of changes on disk
  • Has useful tools to synchronize remotely
  • Authentication tools
  • Tooling (github, bitbucket, gitk, etc.)
slide-12
SLIDE 12

Git Basics

  • git init
  • git status
  • git add <some file(s)>
  • git commit -m <something>
  • git checkout
slide-13
SLIDE 13

Git Networking

  • git clone
  • git pull
  • git push
slide-14
SLIDE 14

Much Much More Git

  • git remote
  • git log
  • git revert
  • branching, tags, diff
  • Website
slide-15
SLIDE 15

Git in this Class

Your Remote Repo
 `origin` My Repo
 `course`

slide-16
SLIDE 16

Git in this Class

Your Remote Repo
 `origin` My Repo
 `course` Your Local Repo

git clone

slide-17
SLIDE 17

Git in this Class

Your Remote Repo
 `origin` My Repo
 `course` Your Local Repo

git remote add course

slide-18
SLIDE 18

Git in this Class

Your Remote Repo
 `origin` My Repo
 `course` Your Local Repo

git pull course master

slide-19
SLIDE 19

Git in this Class

Your Remote Repo
 `origin` My Repo
 `course` Your Local Repo Work

git add
 git commit

slide-20
SLIDE 20

Git in this Class

Your Remote Repo
 `origin` My Repo
 `course` Your Local Repo Work

git push

slide-21
SLIDE 21

Git in this Class

Your Remote Repo
 `origin` My Repo
 `course` Your Local Repo Work

git pull course master

slide-22
SLIDE 22

Git Demo

slide-23
SLIDE 23

Final Git Thoughts

  • .gitignore
  • .git/
  • Its complicated!
slide-24
SLIDE 24
slide-25
SLIDE 25

Programming Languages?

slide-26
SLIDE 26

Object Oriented Experience?

slide-27
SLIDE 27

Java Experience?

slide-28
SLIDE 28

Java Basics

  • Originally Oak, Java in 1995
  • Commercial language
  • Crazy popular
  • “Boring” reputation
slide-29
SLIDE 29

Java Highlights

  • Memory managed
  • Object oriented
  • JVM / Runtime
  • Fast (in some ways)
slide-30
SLIDE 30

Java Highlights

  • Bytecode
  • Packages / namespaces
  • Type safe
  • Rich ecosystem
  • Compiler improvements (unboxing, <>, etc.)
slide-31
SLIDE 31

Java Lowlights

  • Verbose


Integer coolInteger = new Integer(8);
 
 List<String> greatStrings = new List<String>();
 greatStrings.add(“Hachi Machi”);
 
 Packages

  • Heavy Tooling


IDEs, refactoring

slide-32
SLIDE 32

Java Lowlights

  • Fragile, Deep Type Hierarchies


Taxonomies are difficult, reworking them is tricky
 
 JSONReader, YAMLReader, SocketReader?

  • Industry / Enterprise Focus


XML, less open source uptake (especially earlier)
 
 Package management…

slide-33
SLIDE 33

Java Lowlights

  • Creaky in Points


Primitives vs. Arrays vs. Objects
 


int[] = {1, 2, 3};
 ArrayList<Integer> aList = new ArrayList<Integer>();
 aList.add(new Integer(4));
 aList.add(new Integer(5));

  • Redundant


So many ways to do the same thing…

slide-34
SLIDE 34

Java Lowlights

  • NULL


“billion-dollar mistake”
 
 String radString = null;
 if (radString != null) {
 radString.stringThing();
 }

  • Oppressive Type System


Glue classes, functional programming, etc

slide-35
SLIDE 35

Using Java

Figure 1-1. How Java code is compiled and loaded

slide-36
SLIDE 36

Java Hello World

  • Boiler Plate and `main`
  • Primitive types
  • Control flow
  • Comments
  • References
  • Calling methods
  • Types
  • Building
  • Running
slide-37
SLIDE 37

Java Demo

slide-38
SLIDE 38

Wrapping Up

  • Feedback is welcome, all the time
  • https://www.cs.uic.edu/~psnyder/cs342-summer2017/
  • Register for Piazza
  • Email me
  • ssh public key
  • two or three languages you’re most familiar with
  • discussion group preferences