CS 253: Parallel Functional Programming W/ Java & Android .

2y ago
5 Views
2 Downloads
4.67 MB
64 Pages
Last View : 10d ago
Last Download : 3m ago
Upload by : Averie Goad
Transcription

CS 253: Parallel Functional Programmingw/ Java & Android: Overview & LogisticsDouglas C. edu/ schmidtProfessor of Computer ScienceInstitute for SoftwareIntegrated SystemsVanderbilt UniversityNashville, Tennessee, USA

Learning Objectives in this Lesson Understand the course topics &logistics Course philosophy Course contents Structure of the lecture material Overview of the assignments &assessments Setting up the Java & AndroidIDE on Android Studio Accessing Android & Javasource code2

CoursePhilosophy3

Course Philosophy There’s a growing need for software developers whoknow how to write parallel programs for a range ofcomputing platforms e.g., mobile devices,laptops, desktops, &cloud environments4

Course Philosophy Demand is driven by software/hardware infrastructure advances5See www.gotw.ca/publications/concurrency-ddj.htm

Course Philosophy Effective techniques & practices fordeveloping parallel programs & mobileapps are not best learned throughgeneralities & platitudes“Sitting & thinking”6 is not sufficient

Course Philosophy Instead, it’s better to see byexample how these programscan be made easier to write & read, easier to maintain & modify, more efficient & resilientby applying time-provensoftware patterns & objectoriented & functional design& programming techniquesThis course involves lots of hands-on7 software development & testing!

Summary of theCourse Contents8

Summary of Course Contents Key Java parallelism frameworksCompletable FuturesParallel StreamsReactive StreamsAlso covers Java object-oriented & functionalprogramming language features9

Summary of Course Contents Key Java parallelism frameworks Patterns for parallel programmingSee www.dre.Vanderbilt.edu/ Schmidt/POSA12

Summary of Course Contents Key Java parallelism frameworks Patterns for parallel programming We assume you know (or can quicklylearn) Java, Android, & Git13See opment

Structure of theLecture Material14

Structure of the Lecture Material This course has three main modulesSectionTopicsJava functionalprogrammingfeatures Coverage of Java functional programming features,such as lambda expressions, method references, &functional interfaces Assume you know Java’s support for abstraction,inheritance, & polymorphism15

Structure of the Lecture Material This course has three main modulesSectionTopicsJava functionalprogrammingfeatures Coverage of Java functional programming features,such as lambda expressions, method references, &functional interfaces Assume you know Java’s support for abstraction,inheritance, & polymorphismJava Parallelism Coverage of Java 8 parallelism frameworks, e.g. Java sequential & parallel streams Java completable futures Reactive streams (e.g., RxJava & Project Reactor)16

Structure of the Lecture Material This course has three main modulesSectionTopicsJava functionalprogrammingfeatures Coverage of Java functional programming features,such as lambda expressions, method references, &functional interfaces Assume you know Java’s support for abstraction,inheritance, & polymorphismJava Parallelism Coverage of Java 8 parallelism frameworks, e.g. Java sequential & parallel streams Java completable futures Reactive streams (e.g., RxJava & Project Reactor)Software Patterns Parallel programming & communication patterns18

Structure of the Lecture Material This course has three main modules Each module iscomposed oflessons19

Structure of the Lecture Material This course has three main modules Each module iscomposed oflessons Each lessonis composedof parts20

Structure of the Lecture Material This course has three main modules Each module iscomposed oflessons Each lessonis composedof parts Each part is asingle lectureScreencasts of each lesson “part” & PDF versions of the slides will21be uploaded to www.dre.vanderbilt.edu/ schmidt/cs253#lectures

Structure of the Lecture Material This course has three main modules Each module iscomposed oflessons Each lessonis composedof parts Each part is asingle lecture Each part iscomposed ofsegmentsWe’ll leverage YouTube’s “progress 23bar” feature to demarcate segments!

Structure of the Lecture Material There will be bi-weekly quizzeson material covered in the lectures24

Structure of the Lecture Material There will be bi-weekly quizzeson material covered in the lectures 1st quiz will be on Wednesday,September 2ndAll quizzes are “closed book”25& are given on Brightspace

Structure of the Lecture Material There will be bi-weekly quizzeson material covered in the lectures 1st quiz will be on Wednesday,September 2nd We strive to hand back & reviewquizzes at the start of next classOne of the benefits26of a smaller class ;-)

Structure of the Lecture Material There will be bi-weekly quizzeson material covered in the lectures 1st quiz will be on Wednesday,September 2nd We strive to hand back & reviewquizzes at the start of next classI recommend that you study for quizzes by reviewing slides & watching27screencasts available at www.dre.vanderbilt.edu/ schmidt/cs253#lectures

Structure of the Lecture Material There may be a cumulative finalexam that covers all the lectures The focus will be on the lastweeks of the semester30 December 10th via BrightspaceThe final exam is 2 to 5pm, Tuesday,

Overview of Assignments& Assessments31

Overview of Assignments & Assessments Programming assignments should be written in Java 8 using Android StudioYou can use any IDE, but your final submission must build &32run with the latest Android Studio& Android 11/10 (API 30)

Overview of Assignments & Assessments Programming assignments should be written in Java 8 using Android Studio The Java 8 runtime environment(JRE) is pre-installed with Android33See ng-Software

Overview of Assignments & Assessments Android programming assignments must be submitted using Android Studio A wizard for creating new apps A visual editor for creating GUIs An editor for manipulatingAndroid XML descriptorsneeded for your app An emulator for testing yourapps on your PC A debugger for finding errorsin the emulator or on a device34See developer.android.com/sdk

Overview of Assignments & Assessments Android programming assignments must be submitted using Android Studio Please install Android 11/10 (API level 30)35See en.wikipedia.org/wiki/Android 11

Overview of Assignments & Assessments All source code for assignments & examples available at GitHubGo to GitHub at github.com/douglascraigschmidt/CS25336

Overview of Assignments & Assessments All source code for assignments & examples available at GitHub You will need to learn howto use GitLab et al.37

Overview of Assignments & Assessments All source code for assignments & examples available at GitHub You will need to learn howto use GitLab et al. Be prepared to update yourrepositories occasionally38

Overview of Assignments & Assessments Assignments will provide a range of experience with Java 8 & Androidparallel programsGo to GitHub at github.com/douglascraigschmidt/CS25339

Overview of Assignments & Assessments Assignments will provide a range of experience with Java 8 & Androidparallel programs Implement an image crawler app on Androidusing various Java 8 features, e.g. Java lambda expressions, methodreferences, & functional interfaces Java sequential streams Java parallel streams Java completable futures Java reactive streams40 may change during the semesterThe topics covered by the assignments

Overview of Assignments & Assessments Assignment assessments will bedone via reviews by course staff41

Overview of Assignments & Assessments Assignment assessments will bedone via reviews by course staff Assignments must be submittedon time or you’ll get a 042See AQ

Overview of Assignments & Assessments Assignment assessments will bedone via reviews by course staff Assignments must be submittedSubmiton time or you’ll get a 0Program Your initial submission mustcompile & be largely completeor you won’t get a review orInstructora final gradeAssignmentDueFeedback ReviewResubmitProgram

Overview of Assignments & Assessments Assignment assessments will bedone via reviews by course staff Assignments must be submittedon time or you’ll get a 0 Your initial submission mustcompile & be largely completeor you won’t get a review ora final grade You will not receive a gradefor assignments if you do notattend class regularly44See www.dre.vanderbilt.edu/ schmidt/cs253/assignments.html

Overview of Assignments & Assessments Assignment assessments will bedone via reviews by course staff Assignments must be submittedon time or you’ll get a 0 Your initial submission mustcompile & be largely completeor you won’t get a review ora final grade You will not receive a gradefor assignments if you do notattend class regularly Work must be your own This goes for quizzes &programming assignmentswww.vanderbilt.edu/student ode45

Overview of Assignments & Assessments Assessment criteriaAssessment CategoryExecution correctness%40%Structure (e.g., modularization,30%information hiding, etc.)Insightful programming (e.g.,10%developing reusable classcomponents, etc.)Consistent style (e.g., capitalization, 10%indenting, etc.)Appropriate commenting style46See www.dre.vanderbilt.edu/ schmidt/cs253/assignments.html10%

Overview of Assignments & Assessments The relative weighting of eachportion of the course is: 40% Quizzes 40% Programming projects 10% Final exam 10% ParticipationThese weightings may change,47depending on various factors

Overview of Assignments & Assessments The relative weighting of eachportion of the course is: 40% Quizzes 40% Programming projects 10% Final exam 10% Participation Participation is 5% attendence &involvement & 5% “following directions”48

Overview of Assignments & Assessments The relative weighting of eachportion of the course is: 40% Quizzes 40% Programming projects 10% Final exam 10% Participation Participation is 5% attendence &involvement & 5% “following directions”Attendance also affectsother aspects of your quiz& assignment gradesSee www.dre.vanderbilt.edu/ schmidt/cs253/work-summary.html#quizzes49& www.dre.vanderbilt.edu/ schmidt/cs253/assignments.html

Overview of Assignments & Assessments The relative weighting of eachportion of the course is: 40% Quizzes 40% Programming projects 10% Final exam 10% Participation Participation is 5% attendence &involvement & 5% “following directions”50if you do not actively participate!!!!Don’t expect to get an A in this class

Setting Up the Android &Java IDE on Android Studio51

Installing Eclipse Java/Android Developer Tools To use Android, you need to install the latest release of Android Studio52See developer.android.com/studio

Installing Eclipse Java/Android Developer Tools Installation steps53

Installing Eclipse Java/Android Developer Tools Installation steps Download & install the latestversion of Android Studio54See developer.android.com/studio

Add Components to the SDK Launch the Android StudioSDK Manager Select the “R” versionof Android (11/10 ,API 30)55See developer.android.com/studio/intro/update.html

Add Components to the SDK Launch the Android Studio Virtual Device Manager Create an Android API 30 ging-avds.html

Intel HAXM Virtualization Driver Requirements Intel virtualization extensions(VT, VT-x, vmx) AMD virtualization extensions(AMD-v, SVM) [only supportedon Linux] Download an x86 emulatorimageWindows & Mac OSX sdk /extras/intel/HardwareAccelerated ExecutionManager/IntelHAXM.exe/dmgLinux Install KVM & pass “-enable-kvm” flag to emulator when acceleration57

Accessing Java &Android Source Code58

Accessing Java & Android Source Code Android source code is available For browsingandroid.googlesource.com59

Accessing Java & Android Source Code Android source code is available For browsingandroid.googlesource.com For downloadingsource.android.com60

Accessing Java & Android Source Code Java 8 source code is available For browsingzgrepcode.com61

Accessing Java & Android Source Code Java 8 source code is available For browsingzgrepcode.com For downloadingjdk8.java.net/download.html62

Summary63

Summary You will get out of this coursewhat you put into it64

Summary You will get out of this coursewhat you put into it Be prepared to work hard65

Summary You will get out of this coursewhat you put into it Be prepared to work hard Do not miss deadlines 66

Summary You will get out of this coursewhat you put into it Be prepared to work hard Do not miss deadlines Participate in discussionsin class & on piazza67See piazza.com/vanderbilt/fall2020/cs253

Summary You will get out of this coursewhat you put into it Be prepared to work hard Do not miss deadlines Participate in discussionsin class & on piazza Avail yourself of CS253SlideVideoLinksLectures70See www.dre.vanderbilt.edu/ schmidt/cs253

Summary You will get out of this coursewhat you put into it Be prepared to work hard Do not miss deadlines Participate in discussionsin class & on piazza Avail yourself of availableresourcesPlease resist the urge to email me directly unless it’s aconfidential matter or you’d72like to schedule a meeting!

Summary There are abundant opportunities!See rs-projected-to-be-class-of-2019s-top-paid/

programming features Coverage of Java functional programming features, such as lambda expressions, method references, & functional interfaces Assume you know Java’s support for abstraction, inheritance, & polymorphism Java Parallelism Coverage of Java 8 parallelism frameworks, e.g.

Related Documents:

Numeric Functional Programming Functional Data Structures Outline 1 Stuff We Covered Last Time Data Types Multi-precision Verification Array Operations Automatic Differentiation Functional Metaprogramming with Templates 2 Numeric Functional Programming Advanced Functional Programming with Templates Functional Data Structures Sparse Data Structures

Functional programming paradigm History Features and concepts Examples: Lisp ML 3 UMBC Functional Programming The Functional Programming Paradigm is one of the major programming paradigms. FP is a type of declarative programming paradigm Also known as applicative programming and value-oriented

RA 253 MA weld wire does not meet AWS classifications. Preheating and post-heating are not required for welding RA 253 MA. The chemistry of RA 253 MA welding wire and covered electrodes is balanced to have roughly a 4 to 12 Ferrite Number. This ferrite provides RA 253 MA weld fillers wi

functional programming style. Adding functional programming facilities to Prolog results in a more powerful language, as they allow higher-order functional expres-sions to be evaluated conveniently within the logic programming environment. And, as will be shown in this thesis, the efficiency of functional programming in logic is

Parallel patterns & programming frameworks Parallel programming gurus (1-10% of programmers) Parallel programming frameworks 3 2 Domain Experts End-user, application programs Application patterns & frameworks 11 The hope is for Domain Experts to create parallel code

Introduction to Functional Programming in Java 8 Java 8 is the current version of Java that was released in March, 2014. While there are many new features in Java 8, the core addition is functional programming with lambda expressions. In this section we describe the benefits of functional programming and give a few examples of the programming .

What is Functional Programming? Functional programming is a style of programming that emphasizes the evaluation of expressions, rather than execution of commands Expressions are formed by using functions to combine basic values A functional language is a language that supports and encourages programming in a functional style

luxury week long cruise in the Pacific Ocean. You encountered a bad storm and the clipper ship limped to shore and partially sank. Only the top is still visible off the north tip of the island. You are all now stranded on an uninhabited island in the middle of the Pacific Ocean. The storm basically ruined most things on board, leaving very few useful items. Your task is choose the 12 most .