Introduction to Programming in Java

Programming is magic, a very practical kind of magic you can make use of in art, science, business, or whatever other activity interests you. This course teaches you how to read and write the structured languages that machines understand. It also teaches you how to use these language skills to tell a computer what to do and to figure out what it actually did (these are rarely the same thing on the first try for anyone). You'll mostly be writing programs in the Java language by the end, but you'll learn to read and translate ideas in many other languages along the way.

CodeHS: Most Java-language concepts and skills will be developed through practice with this online courseware. You will have written more than 100 programs by the end of the quarter.

Lecture: Attendance is optional, but lecture meetings will be the hub of the class. Browse the slides or watch the recordings of the webcast (linked at the bottom of the syllabus) to quickly see what happened in a lecture you didn't attend. Lectures take place M/W/F from 9:20am to 10:25am in Classroom Unit 2.

Reading: Reading assignments (often videos or news articles) draw connections to current events and the broader culture around programming. Responses mostly take the form of multiple choice questions that require interpretation beyond what you just read.

Labs: In-person participation is required for credit. Most (1-hour) activities practice programming outside of CodeHS, and some even outside of Java. Two lab sessions will be reserved for helping you prepare for exams.

Exams: Exams will take the form of multiple-choice quizzes on Canvas. You will have several days available to complete each exam, but they should only take 1-2 hours. Several exams questions require you to write Java programs to reason to the best answer.

Textbook: There is no textbook for this class. However, if you like learning from books, we can recommend this one: http://learningprocessing.com/

Course Staff

Need help? Want to ask a question? Our class discussion forum on Piazza is a great resource. Post anonymously if you like.

Instructor

Adam Smith amsmith@ucsc.edu (Please call me "Adam" or "Professor Smith")

Office hours:

* Regular weeks: Tuesdays 4-5pm and Wednesdays 12:30pm-2:30pm in Engineering 2, room 269.

* Finals week: Tuesday/Wednesday/Thursday noon-3pm in Engineering 2, room 269.

Teaching Assistants (TAs)

There are no more lab make ups during office hours!

(All make ups should have been completed by last Sunday.)

  • Geetanjali Rakshit
    • Labs A & E
    • Office hours: Tue 8AM-9AM, Tue 9AM-10AM, Baskin Engineering, room 119
    • Finals Week Office hours: Wed 11AM-1PM, Baskin Lounge
  • Kenneth Chang
    • Labs B & D
    • Office hours: Wed & Thur 11AM-12PM in Engineering 2, room 586
  • Brian Schwarzmann
    • Labs F & I
    • Finals Week Office hours: Tuesday 10:00 am - 1:00 pm in E2 387
    • If there is lots of interest, I will extend these hours!
  • Nikhil Varghese
    • Labs H & J
    • Office hours: Mon 4-5pm in E2-586 & Fri 12-1pm in Baskin Engineering, room 118.
  • Wei-Lin Wu
    • Labs C & G
    • Office hours: Mon 5:30-7:30pm in Engineering 2, room 586

Here is a schedule of lab section (to help you find another section if you miss the one you've signed up for). All labs take place in Baskin Engineering, room 109.

#41345 LBS 01A M  08:00AM-09:00AM  -> Geetanjali
#41346 LBS 01B Tu 08:00AM-09:00AM -> Ken
#41347 LBS 01C Tu 01:00PM-02:00PM -> Wei-Lin
#41348 LBS 01D Tu 02:00PM-03:00PM -> Ken
#41349 LBS 01E W 08:00AM-09:00AM -> Geetanjali
#41350 LBS 01F Th 08:00AM-09:00AM -> Brian
#41351 LBS 01G Th 05:00PM-06:00PM -> Wei-Lin
#41352 LBS 01H Th 06:00PM-07:00PM -> Nikhil
#41353 LBS 01I F 08:00AM-09:00AM -> Brian
#41354 LBS 01J F 05:00PM-06:00PM -> Nikhil

Contact protocol

Try to get help in-person: Instructor and TA office hours are scattered throughout the week. Your (hundreds of) classmates are also an excellent resource for this class. Try to find a time/place where you can meet them in person. You don’t need to have a specific question to seek in-person contact. Showing up to office hours or meeting with others just as a place to do homework with others is a good idea.

Try to get help online: Although you can try to ask about programming exercises in Piazza, it is difficult to have useful multi-step conversations about the precise details of code this way. Email has many of the same difficulties and the further disadvantage that it can only help one person at a time. Use email, Piazza, or social media as a way to arrange real-time support sessions (meeting with classmates at some well-known location in your college or organizing a group videochat for peer support). It’s easiest to get help when people can see your computer screen and ask you what happens when you change something.

Sign up for the class Piazza forum here: https://piazza.com/ucsc/winter2019/cmps5j01

Scoring and Grading

The course will be scored as following:

  • 20% Labs (score reflect participation, not just attendance)
  • 20% Readings
  • 30% CodeHS (scores based on only the Exercise and Challenge items)
  • 30% Exams

The mapping from numerical scores to letter grades will depend only on scores, and it will be decided during a discussion of the course staff after all scores have been finalized.

Incompletes: Students with score below a certain threshold in certain categories may be given the option to take an I grade instead of the normal letter grade and complete or re-attempt some of the assigned work during the next quarter.

Late work policy: Reading and CodeHS homework may be submitted/completed late for full credit up until 8am on Monday of finals week. No late Reading or CodeHS work past this point will be considered. Missed lab activities may be made up in a later lab meeting of the same week or in TA office hours with TA permission. TAs may decide to give full, partial, or no credit depending on the type of lab activity that was missed.

Other policies

Collaboration policy:

  • Labs: You should work together in lab activities where possible.
  • CodeHS: Although it is possible to complete all CodeHS work alone, you’ll have a much better time if you work in the same room as others who can show you their screen and ask you questions about what to change. You are encouraged to help each other work through CodeHS in any way so long as you are the one typing and running the programs on your own computer.
  • Readings: Although it is possible to complete reading responses alone, you’ll benefit from checking your reasoning with others. You are encouraged to talk to others about why you chose the answers you did before submitting them. The answers you submit should represent your own carefully reasoned beliefs (or at least guesses).
  • Exams: In contrast to other aspects of this class, you are required to work through exams by yourself without contacting others outside of the teaching staff about questions and answers. You may use any online and offline reference material so long as you do not communicate questions or answers to others in this class. For example, it is fine to use Wikipedia, Google Search, or an online programming environment like JDoodle to help answer your questions. You should not email or post in the class discussions looking for question-specific clues or describe the exam questions on a service like Chegg. You can, however, request that a classmate give you a demonstration of a programming environment or a programming construct in general.
  • Exams (revised February 6, 2019): You may speak to classmates and neer-peer mentors (those who took 5J in Fall 2018) about exam questions, answers, and your reasoning for choosing one answer over another. When you help another student, you are encourged to provide help in a way that exercises your ability to explain ideas and your partner's ability to come to the best answer through their own reasoning (rather than giving them an answer that they do not understand). You may also consult read-only online reference material (Google Search, Wikipedia, Java tutorials, etc.) or run experiments using online programming environments like JDoodle. Because the selection of questions on each person's exam is randomized, it will be difficult for you to simply follow along with another student. Please actively use each other as a resource to practice and develop your programming skills during the exams.

Alternate interpretations of readings: Many reading assignments require interpretation that goes beyond the contents of the assigned texts. If you miss points for picking an answer that you truly believe is the best available answer in your interpretation, you can discuss this interpretation with Adam in office hours with the possibility of adjusting your score. Most often, this happens when a key phrase means something specifically different for you that it does not mean for others because of your individual background.

Laptop/mobile use in lecture: You are encouraged to bring your laptop or mobile device to lecture so as to participate in occasional active learning sessions. You can use your devices to follow along with the lecture slides or take notes. You should not use your devices to chat or watch movies or sports. If you don’t want to pay attention to the lecture session, you are free to go home and review the webcast recording or lecture notes later. Attendance is entirely optional.

Academic honesty: The Baskin School of Engineering has a zero tolerance policy for any incident of academic dishonesty. If cheating occurs, consequences may range from getting zero on a particular assignment to failing the course. In addition every case of academic dishonesty is referred to the students’ college Provost, who sets in motion an official disciplinary process. Cheating in any part of the course may lead to failing the course, suspension or dismissal from the Baskin School of Engineering, or from UCSC. The course staff is intent on setting up the course with many opportunities for you to learn from your peers and to not create unnecessary situations that might trap you into academic dishonesty.

Disability Resource Center: UC Santa Cruz is committed to creating an academic environment that supports its diverse student body. If you are a student with a disability who requires accommodations to achieve equal access in this course, please submit your Accommodation Authorization Letter from the Disability Resource Center (DRC) to me privately during my office hours or by appointment, preferably within the first two weeks of the quarter. At this time, I would also like us to discuss ways we can ensure your full participation in the course. I encourage all students who may benefit from learning more about DRC services to contact DRC by phone at 831-459-2089, or by email at drc@ucsc.edu

CARE: Title IX prohibits gender discrimination, including sexual harassment, domestic and dating violence, sexual assault, and stalking. If you have experienced sexual harassment or sexual violence, you can receive confidential support and advocacy at the Campus Advocacy Resources & Education (CARE) Office by calling (831) 502-2273. In addition, Counseling & Psychological Services (CAPS) can provide confidential, counseling support, (831) 459-2628. You can also report gender discrimination directly to the University’s Title IX Office, (831) 459-2462. Reports to law enforcement can be made to UCPD, (831) 459-2231 ext. 1. For emergencies call 911.

MSI Sections

You can drop into MSI sections as needed to get help with homework or exam preparation.

Friday  10:40 - 11:40AM  Viet Nguyen CMPS 5J ARCenter  202 
Monday  2:40 - 3:40PM  Viet Nguyen CMPS 5J Oakes Learning Center  -
Thursday  1:30 - 2:30PM  Viet Nguyen CMPS 5J Cowell  222 
Tuesday  11:40 - 12:40PM  Viet Nguyen CMPS 5J Merrill College  003 

Lecture Notes

Webcast videos of each lecture will be available here: https://webcast.ucsc.edu/ (username: cmps-5j-1 password: programming). Adam's Google Slides for each lecture will be posted below usually just before the beginning of each day's meeting.

L01: Course Introduction

L02: Computer Languages and Natural Languages

L03: Programming in the Age of the Internet

L04: Karel versus the Real World

L05: Programmable Machines

L06: Programming from Scratch

L07: Answering Questions about Programming

L08: Human Factors

L09: Arduino

L10: Karel and Exam Topics

L11: Programming a Collaborative Creativity Tool (guest lecture)

L12: Practice Exam Introduction

L13: Basic Java, JavaScript, and Python

L14: Midterm Exam Reflection

L15: Programming != Computer Science

L16: What Happens When You Hit Run

L17: Methods, Functions, and Procedures

L18: Object-oriented Modeling

L19: Sequences and Collections

L20: Tables and Grids

L21: Above, Below, and Behind the Code and Data

L22: Final Exam Topics

L23: Predicting Your Grade, Part 1

L24: Predicting Your Grade, Part 2

L25: Final Review 1

L26: Final Review 2

L27: Course Recap

Course Summary:

Date Details Due