General Information
Instructor:
Geoffrey Towell259 Park Science Building
526-5064
gtowell at brynmawr dot edu
http://cs.brynmawr.edu/~gtowell
Class:
Lecture Hours | Monday / Wednesday 1:10 - 2:30 |
---|---|
Room | Park 336 |
Lab, Park 231 | Monday 2:40 - 4:00 |
Office Hours | M 10am-11am. Thursday 2:30pm-3:30pm Also by appointment |
Zoom | Meeting code: 232 840 6920. Password: given in class, or ask me |
Course Description |
An introduction to the study of programming languages. Where do programming languages come from and how do they evolve? And why should a programmer choose one over another? This course explores these topics by covering programming language features and paradigms, including object-oriented, functional, and imperitive. The course will focus on general structures common to programming languages; focusing on why those structures exist, the various ways in which those structures are implemented, and how to use them. In addition, the course will look at programming techniques in two languages: Go and Kotlin. While these languages have many similarities; programming in the two will be very different. In particular, programming in Kotlin will take an almost pure functional approach which Go will be imperitive. |
Computer Lab | Park 231 Instructions for using the lab computers Remote accessable lab computer status |
Text
Important Dates
- Aug 30, First lecture
- Sep 29, First Midterm
Rules for first Midterm.
Get the midterm Or enter this URL: http://comet.cs.brynmawr.edu/get245/. You will need your Bryn Mawr or Haverford ID number.
Answers for midterm1 - Nov 3, Second Midterm Rules for second Midterm. Identical to rules for first midterm Some practice questios for second midterm
- Exam period, Final Exam
Rules for the final. The rules are slightly modified from the midterms to include a rule about over-time submissions (#3) and copying from the web (#16) and to allow more time
Some sample questions. Note that these questions are of the form you might see on the final, but they are questions that I rejected from the final.
Assignments
There will be homework assignments approximately weekly. Homework will be electronically submitted. The homeworks will typically be small programming problems that are linked to class discussion. Programming is expected to take less than 5 hours per week.All assignments must be turned in on time. If there are compelling reasons why you cannot turn in an assignment on time, you must ask for permission at least 48 hours in advance of the due date.
Despite my best efforts, homeworks may have sections that are not quite correct. If you find an error, let me know. If I agree that the issue is an issue and you have told me of the issue at least 48 hours prior to the due date then I will give bonus points as follows:
3 points for the first issue reported 2 points for the second issue reported 1 point for the third issue reportedOrdering is based on date of email recipt. One bonus per person per assignment.
All programming assignments must abide by the following standards.
- Design Principles
- Code Formatting Standards
- Goolgle's style guideThis is consistent with my documents, but much longer.
All programming assignments must be accompanied by a README file. I will read, and often will respond, to all README text. See the file for a description of the expected contents.
- Homework 1 Due Sep 19, before 11:59:59pm
- Homework 2 Due Sep 28, before 11:59:59pm
- Homework 3 Due Oct 29, before 11:59:59pm
- Homework 4 Due Nov 17, before 11:59:59pm
- Homework 5 Due Dec 9, before 11:59:59pm
Labs
Labs will often look like programming assignments, just smaller. All labs can be done on the CS department lab machines or on personal machines (assuming you have installed the appropriate software.)- Lab 1: August 30. Access and Login.
Today's lab is very simple. First, confirm that your card gets you into the lab -- Park 230 and Park 231.
Second, log into a CS department lab machine using your UNIX login.
Send email to gtowell245@cs.brynmawr.edu with a picture of your screen after logging in. - Lab 2: Follow the directions in computersetup.html to set up your own
PC.
If you are going to do all of the work for this course ont he lab computers, that is fine. In that case,
just
set up VSC with the packages described in this document, then do the hello world.go program.
When complete, take a photo (or screenshot) of you r computer with the Go program and its terminal output. Send that picture to gtowell245@cs.brynmawr.edu. - Lab 3: Sep 13 Go Practice
Programs for the go practice. These programs are NOT commented; which is fine for labs. Comments are required for homeworks.- fixx buzz
- kilometers / miles
- minumum subslice. My program actually does max rather than min.
- structs with embedding and maps
- Lab 4: Sep 20 Sorting and implementing interfaces in Go
- Lab 5: Sep 27 Go Packages
- Lab 6: Oct 4 Go and JSON
- Lab 7: Oct 18 Kotlin!
- Lab 8: Oct 25 Kotlin Classes
- Lab 9: Nov 1 Kotlin functional programming
- Lab 10: Nov 15 equality of Go slices
Lectures
This course is intended to be fairly free-flowing with a lot of discussion. Therefore, I will not normally publish powerpoint lecture notes. I will try to restrict my commentary to topics covered in the text.
- Aug 30: Introductory remarks.
- Sep 1: Scott 1.1-1.4
The end of history and the last programming language, this article is on pages 111-123
The semi-colon wars "Lab-ish" -- Send me your public key. - Sep 8, Sep 13: Topic 3, Programming in Go
- Sep 15, Sep 20, Sep 22: Topic 5, Names, Scopes and Bindings. Ch 3 from Scott
- rough notes
- Static declaration of Integers in Java
- java recursion depth
- variable lifetimes in Go
- function nesting in Go
- block nesting in Go
- aliases in Go. More than one reference to same object.
- Pair of classes resulting in hiding in JavaAAAB
- Closures in Go
- Dynamic Method dispatch
- Topic 5: Sep 27, Oct 4, Oct 6
Control Flow
Chapter 6 in Scott
- Topic 6:
Oct 18,20,25,27(?)
Atomic Kotlin (various parts)
- rough notes
- Hello World
- variable initialization
- No changing function params
- immutability in Go
- basic class definition
- multiple constructors
- data classes
- Null safety in Kotlin
- recursive function in kotlin
- Safely sum numbers in listtail recursively with optional params
- Another list summer but positional
- Yet another summer With an internal recursive function
- recursive functions returned
- extending classes
- extension functions have static dispatch
- getters and setters for properties
- Topic 7:
Oct 27
Functional Programming: Scott Ch 11
- Topic 8:
Types: Scott: Ch 7
- Topic 9:
Nov 15, 17
Composite Types: Scott Ch 8
- Topic 10:
Nov 29, Dec 1, Dec 6
Subroutines: Scott Ch 9
- rough notes
- Go: passing pointers
- Go: Building a useful binary tree and passing pointers
- Kotlin: passing references
- Kotlin: pass objects
- Java: pass references
- Go: pass with closure
- Go: changing closure
- Go: varidic functions
- Kotlin: variadic functions
- multiple return values in Go.
- Go: Basic Exception handling
- Go: more exceptions
- Charlie's parameter passing slides
- Kotlin: implicit destructuring to give multiple returns
Course Policies
Communication
Attendance and active participation are
expected in every class. Participation includes asking questions,
contributing answers, proposing ideas, and providing constructive
comments.
Please
stay in touch with me, particularly if you feel stuck on a topic
or assignment and can't figure out how to proceed. Often a quick
e-mail, or face-to-face conference can reveal solutions
to problems and generate renewed creative and scholarly energy. It
is essential that you begin assignments early.
Grading
Grades will be awarded based on the number of points earned and according to the percentage breakdowns shown.Homework | 30-35% |
Class Participation | 5-10% |
Lab | 5% |
Midterms (2) | 35% |
Final exam | 20% |
Mid-terms will be in class (or possibly take-home). If take-home then the time to complete will be no more than 2 hours. All exams, whether in-class or not, will be open everything. The only restriction is that you may not discuss the exam, in any way, with anyone until 24 hours after the exam (unless you are told otherwise).
Incomplete grades will be given only for verifiable medical
illness or other such dire circumstances. Incomplete grades must be approved through the Dean's
office.
ALL work submitted for grading should be entirely YOUR OWN (except for labs). Sharing of programs, code snippets, etc. is not permitted under ANY circumstances. That said, I encourage you to discuss assignments at an algorithmic level with other students. That is, talk about the problem, and general apporaches to problems. Do not share or discuss actual code.
Links
- Kernighan's book on programming style. Most of the examples in this book are in languages rarely if ever used, but the lessons still apply.
Learning Accommodations
Students requesting accommodations in this course because of the impact of disability are encouraged to meet with me privately early in the semester with a verification letter. Students not yet approved to receive accommodations should also contact Deb Alder, Coordinator of Accessibility Services, at 610-526-7351 in Guild Hall, as soon as possible, to verify their eligibility for reasonable accommodations. Early contact will help avoid unnecessary inconvenience and delays.This class may be recorded.
Creating a Welcoming Environment
All members of the Instruction Staff are dedicated to the cause of improving diversity, equity, and inclusion in the field of computing, and to supporting the wellness and mental health of our students.Diversity and Inclusion
It is essential that all members of the course community – the instructor, TAs, and students – work together to create a supportive, inclusive environment that welcomes all students, regardless of their race, ethnicity, gender identity, sexuality, or socioeconomic status. All participants in this course deserve to and should expect to be treated with respect by other members of the community. Class meetings, lab sessions, office hours, and group working time should be spaces where everyone feels welcome and included. In order to foster a welcoming environment, students of this course are expected to: exercise consideration and respect in their speech and actions; attempt collaboration and consideration, including listening to opposing perspectives and authentically and respectfully raising concerns, before conflict; refrain from demeaning, discriminatory, or harassing behavior and speech.Wellness
Additionally, your mental health and wellness are of utmost importance to the course Instruction Staff, if not the College as a whole. All members of the instruction staff will be happy to chat or just to listen if you need someone to talk to, even if it’s not specifically about this course. If you or someone you know is in distress and urgently needs to speak with someone, please do not hesitate to contact BMC Counseling Serices: 610-526-7360 (610-526-7778 nights and weekends). If you are uncomfortable reaching out to Counseling Services, any member of the Instruction Staff will be happy to contact them on your behalf. We understand that student life can be extremely difficult, both mentally and emotionally. If you are living with mental health issues such as anxiety, depression, ADHD, or other conditions that may affect you this semester, you are encouraged to discuss these with the Instructor. Although the details are up to you to disclose, the Instruction Staff will do their best to support and accommodate you in order to ensure that you can succeed this course while staying healthy.Created on June 2021. Subject to constant revision.