# 1 Course Information

Instructor Course
John Paul Helveston Mondays
Science & Engineering Hall, Office 2830 Phillips Hall 108
+1 (202) 994-7173 August 26 - December 9, 2019
jpg@gwu.edu 6:10 - 8:40 PM
@JohnHelveston Slack

# 2 Course Description

## 2.1 Official GW Bulletin Description

Introduction to programming using the R programming language; topics include functions, conditionals, loops, strings, file input/output, plotting, coding style, Monte Carlo methods, and packages.

## 2.2 Unofficial Description

This course provides a foundation in programming using the R programming language. Emphasis will be on producing clear, robust, and reasonably efficient code using top-down design, informal analysis, and effective testing and debugging. Throughout the course, students will primarily work on individual programming assignments to help practice problem solving skills, coding skills, and data science skills. Students will be assessed through quizzes, homework assignments, and exams. Teaching will involve interactive lectures with plenty of time spent live coding. This course assumes no prior programming experience and is an ideal preparation for higher level courses in data analytics.

## 2.3 Prerequisites

There are no prerequisites, and no prior programming experience is necessary to succeed in this class.

# 3 Learning Objectives

Having successfully completed this course, students will be able to:

• Write clear, robust, and reasonably efficient code in R using:
• Sequential, conditional, and loop statements.
• Multiple data types, including numeric, string, and logical data.
• Data structures, including vectors and data frames.
• Visualizations of data.
• Develop simple programs to effectively solve medium-sized tasks by:
• Demonstrating an effective programming style based on established standards, practices, and guidelines.
• Proactively creating and writing test cases to test and debug code.
• Applying computational problem-solving skills to new problems.
• Import, manipulate, visualize, and export data in R.

# 4 Pep Talk!

Learning R can be challenging - it’s like learning a new language. Hadley Wickham - the chief data scientist at RStudio and the author of some amazing R packages you’ll be using like ggplot2 - made this wise observation:

It’s easy when you start out programming to get really frustrated and think, “Oh it’s me, I’m really stupid,” or, “I’m not made out to program.” But, that is absolutely not the case. Everyone gets frustrated. I still get frustrated occasionally when writing R code. It’s just a natural part of programming. So, it happens to everyone and gets less and less over time. Don’t blame yourself. Just take a break, do something fun, and then come back and try again later.

If you’re finding yourself taking way too long hitting your head against a wall and not understanding, take a break, talk to classmates, ask questions in Slack, e-mail me, etc.

I promise you can do this.

# 5 Required Texts & Materials

## 5.1 Software

All required software for this course is freely available on the web. This includes:

Go to the course “Getting Started” page for installation instructions.

## 5.2 Texts / Other Useful Resources

This course does not require any textbooks. All learning materials and resources are freely available on the web. See the course resources page for a list of useful resources.

# 6 Assignments

Homework Assignments:

Homework assignments contain a mix of coding exercises and written exercises. They generally assess the material taught the weeks they are assigned, and should take several hours to complete. Start homeworks early (Tuesday is best, Thursday at the latest!), and come to office hours & tutoring hours for help.

Read the Collaboration Policy about collaborating with fellow students on homeworks. While most problems must be worked on individually, some will be marked as “collaborative”; on these problems (and only these problems), you may work on code with other students.

Homeworks will be graded based on style (modularity, readability, commenting, etc.) and functionality (correctness on all possible test inputs). Your code should be properly annotated with comments that are well-placed, concise, and informative. Your assignments will be graded by your tutors, by automated graders, and at times by your instructor.

Quizzes:

There will be five quizzes given about once every two weeks immediately at the beginning of class. Quizzes cover material from the previous weeks and the previous homework assignments. Quizzes are designed to be time-intensive, to test for fluency, and to demonstrate where additional study is needed.

Midterm Exams:

There will be two midterm exams given in class, as noted in the course schedule. Each exam will cover only material presented in the preceding weeks (as noted in the schedule.

Final Exam:

There will be a standard final exam during the final exam period at the end of the semester. This exam will cover material from the entire semester. The final exam is built to allow enough time to attempt all problems.

Class Participation:

Regular class attendance is essential. Much of the class time will be spent doing exercises and coding. Multiple absences, inappropriate or unprofessional behavior during class (such as monopolizing discussions or being rude or disruptive), not participating in classroom exercises, and not being prepared for class will result in a lower grade for the class participation component. As a rule of thumb, the participation grade will be assigned according to the following rubric:

Score Attendance Classroom
Low Frequently absent Rude; disruptive; distracting; monopolizes discussions
Moderate Attended most classes, but often arrived late or left early Takes notes; attentive; occasionally contributes in class discussion / exercises
High Attends on time and prepared Takes notes; attentive; regularly contributes in class discussion / exercises; does not dominate conversation; listens and responds thoughtfully to comments made by others

Final grades will be calculated as follows:

Course Component Weight Notes
Homeworks (6) 30% Lowest homework grade is dropped
Quizzes (5) 15% Lowest quiz grade is dropped
Midterm Exams (2) 30% Lowest midterm grade is half-weighted
Final Exam 20%
Attendance & Participation 5%

This Alternative Minimum Grading (AMG) policy is available to everybody, but is designed specifically for students who struggle in the first part of the course, and then through sustained hard work and dedication manage to elevate their performance in the latter part of the course to a level that merits passing with a C (even if their Standard Grade might be lower than that).

You can’t “sign up” for AMG grading. Every student will be considered both for Standard Grading and AMG, and the instructor can choose to assign the AMG grade if a student’s effort merits it. To compute your AMG score, first use the following to compute your raw score. If the resulting score is higher than a C, set it back to a C.

Course Component Weight
Best 5 Homeworks 20%
Best 4 Quizzes 15%
Best Midterm Exam 20%
Final Exam 40%
Attendance & Participation 5%

Unlike the Standard Grade, effort is heavily factored into your AMG score. To qualify for AMG you must put forth sustained effort, which means meeting the following requirements:

• You cannot miss multiple class periods
• You cannot miss multiple assignments or quizzes
• You cannot violate the Collaboration Policy

A 93 - 100% C 73 - 76.99%
A- 90 - 92.99% C- 70 - 72.99%
B+ 87 - 89.99% D+ 67 - 69.99%
B 83 - 86.99% D 63 - 66.99%
B- 80 - 82.99% D- 60 - 62.99%
C+ 77 - 79.99% F < 60%

The course instructors may choose to change the scales at their discretion. You are guaranteed that your letter grade will never become worse as a result of changing scales.

# 8 Getting Help

## 8.1 Slack

All course communication will be managed through Slack - Sign up HERE

Watch this 2-minute video to see what Slack is all about:

You can use Slack to:

• Ask for help with an assignment.
• Send direct, private messages to each other or the instructors (just like email…but better!)

You can post questions on slack and receive quick responses. This also enables other students to see answers to common questions. Be specific - if your code has an error you don’t understand, include the code and the error message in your question.

## 8.2 Office hours

Office hours are set times dedicated to all of you. This means that I will be in my office (wistfully) waiting for you to come by with whatever questions you have. This is the best and easiest way to find me outside of class and the best chance for discussing class material and concerns (or anything really). Please come by!

This can be a difficult class - do not suffer in silence! Come talk to me!

## 8.3 Tutoring hours

Similar to office hours, your class tutors will each hold a specific period of time each week dedicated to help you will course assignments. Please don’t make your tutors sit and do emails for two hours - come by and ask for help!

## 8.4 Library Services

While the University Library is not a stand in for TAs, you can schedule a consultation for general help with Coding, Programming, Data, Statistical, and GIS. See more at https://academiccommons.gwu.edu/writing-research-help

# 9 Course Policies

## 9.1tl;dr

• BE NICE. BE HONEST. DON’T CHEAT.
• Write your own code - don’t look at others’ code & don’t let others look at your code.
• You get 5 late days - use them however you want, no strings attached.
• You can’t use more than 2 late days on any one assignment.

## 9.2 Collaboration Policy

Learning how to program is like learning how to ride a bicycle - to get better, you must practice writing code yourself. Therefore, we have a set of strict rules regarding what kind of collaboration is allowed, what counts as over-collaboration, and what counts as cheating.

### 9.2.1 Good Collaboration

• Going through test cases and discussing why an input results in a certain output.
• Figuring out new input/output pairs for the problems.
• Discussing which general concepts might be useful in solving a problem (conditionals, loops, etc.).
• Asking questions about how to build an algorithm for the problem.
• Asking for debugging help with code.
• Sketch out algorithms on a whiteboard together.
• To avoid copying the code, you should write up the solution together, discuss it, then erase the solution, wait a few minutes, and write up solutions individually.
• Help each other debug specific parts of assignment code.
• General discussion of course concepts.
• Detailed explanations of example code on the course website.
• Collaboratively solving a practice problem, with any level of co-writing code and co-debugging.

### 9.2.2 Over-collaboration

Over-collaboration results in a warning on the first offense, and a penalty on later offenses. Examples include:

• Building ‘psuedocode’ algorithms together on a whiteboard that are essentially full programs.
• Explaining to a friend how to solve a problem in high-level terms by going through your own program line-by-line.
• Helping a friend debug on a non-collaborative problem.
• Helping a friend debug on a collaborative problem by suggesting they use your own approach to the problem.
• Collaborating with a student on a collaborative problem and then not including their name as a collaborator in the assignment writeup.
• In the case that you have taken this course before, copying your own code from the previous time you took the course.

### 9.2.3 Cheating

Cheating results in a penalty on the first offense, and failing the course on the second offense. Cheating on homework assignments can include:

• Copying or stealing any amount of code from someone currently in the class or someone who has taken the class before.
• NOTE: Copying is never okay, whether the code is provided electronically, visually, audibly, or on paper.
• Providing code you have written for an assignment to anyone else in the class.
• Again: never share your code with others in the class, including electronic sharing, showing someone code on your computer, verbally speaking the code, or writing down the code on paper.
• Finding code online and using it in the assignment. One exception: you may use code from the course website.
• Putting code solutions from the course assignments online.
• Receiving code-level assistance from any person not associated with the course.
• Getting someone else to write the assignment code for you.
• Asking questions about the assignments on any online services outside of the course office hours and course Piazza.

Cheating on quizzes, midterms, or the final can include:

• Referring to any external resources while completing the assessment (phones, notes, etc.).
• Copying part of an answer off of another student’s paper, even if it is very small.
• Using solutions provided by students who previously took the course.

### 9.2.4 Penalties

Penalties are decided by the course instructors, and can vary based on the severity of the offense. Possible penalties include:

• Receiving a 0 on the assignment/quiz in question.
• Receiving a -100 on the assignment/quiz in question.
• Receiving a full letter grade deduction in the course.
• Automatically failing the course.

Penalties may also be accompanied by a letter to the Dean of Student Affairs, again at the instructors’ discretion. This can lead to university-level penalties, such as being suspended or expelled.

### 9.2.5 Plagiarism Detection

Programs are naturally structured, which makes them very easy to compare for plagiarism. Automated plagiarism detection systems make this process even easier. Watch this video showing plagiarism detection software in action (this example is using Python code, but this also works for R code).

In short, if you copy code, we will know - don’t copy code!

### 9.2.6 Grace Period

Your first year of college is a time when you do a lot of learning. Sometimes, you might make bad decisions or mistakes. The most important thing for you to do is to learn from your mistakes, to constantly grow, and become a better person.

Sometimes, students panic and copy code right before the deadline, then regret what they did afterwards. Therefore, you may rescind any homework submission for up to 24 hours after the deadline with no questions asked. Simply email the course instructors asking to delete the submission in question, and we will do so. Deleted submissions will not be considered during plagiarism detection, though of course they will also not be graded. However, it will always be better to get a 0 (or partial credit) on an assignment than to get a cheating violation!

## 9.3 Late Policy

Each students is allowed 5 late homework submission days - use them however you want, no questions asked. No more than 2 days can be applied toward a single assignment. Late days are meant to cover illness, family emergencies, and religious holidays. Assignments submitted more than 2 days after the due date will not be graded. In extreme circumstances, contact the instructor.

## 9.4 Use of Course Materials

All solutions to homeworks, quizzes, and exams are proprietary. Don’t post them online or try to sell them - this is a violation of the student code of conduct.

All other course materials available on the course website are developed open source - you are welcome to post and share them following the licensing guidelines listed in the license page.

## 9.5 What To Do if the Instructor Does Not Arrive

Wait 20 minutes, after that you’re free to leave. One member of the class should be selected to notify the EMSE Department of the Instructor’s absence by calling the EMSE Department 202-994-4892 on next business day.

# 10 University Policies

## 10.1 University Policy on Religious Holidays

In accordance with University Policy, students should notify faculty during the first week of the semester of their intention to be absent from class on their day(s) of religious observance. Official university policy here: https://students.gwu.edu/accommodations-religious-holidays

• Students should notify faculty during the first week of the semester of their intention to be absent from class on their day(s) of religious observance.
• Faculty should extend to these students the courtesy of absence without penalty on such occasions, including permission to make up examinations.
• Faculty who intend to observe a religious holiday should arrange at the beginning of the semester to reschedule missed classes or to make other provisions for their course-related activities.

## 10.2 Support for Students Outside the Classroom

Disability Support Services (DSS): Any student who may need an accommodation based on the potential impact of a disability should contact the Disability Support Services office at 202-994-8250 in the Rome Hall, Suite 102, to establish eligibility and to coordinate reasonable accommodations. For additional information please refer to: https://disabilitysupport.gwu.edu/

Mental Health Services (202-994-5300): The University’s Mental Health Services offers 24/7 assistance and referral to address students’ personal, social, career, and study skills problems. Services for students include: crisis and emergency mental health consultations confidential assessment, counseling services (individual and small group), and referrals. https://healthcenter.gwu.edu/counseling-and-psychological-services

Academic dishonesty is defined as cheating of any kind, including misrepresenting one’s own work, taking credit for the work of others without crediting them and without appropriate authorization, and the fabrication of information. For the remainder of the code, see: https://studentconduct.gwu.edu/code-academic-integrity

In addition to the formal code of academic integrity, the instructor expects that students will treat this course with the level of professionalism required in the workplace. Remember that real firms are sponsoring student projects throughout the semester; in a workplace setting, these firms would be paying clients for the analyses being conducted. This course prepares students to succeed in the workplace, and maintaining a high degree of professionalism is expected.

# 11 Cute Animals

Once you have read this entire syllabus and the course schedule, please click here and e-mail me a picture of a cute non-feline, non-canine animal. For real. Brownie points if it’s animated.

EMSE 6574, Sec. 11: Programming for Analytics (Fall 2019)
George Washington University | School of Engineering & Applied Science
Dr. John Paul Helveston | jph@gwu.edu | Mondays | 6:10–8:40 PM | Phillips Hall 108 | |