Want to be the next Nick D'Aloisio who at the ripe old age of 17 sold his smartphone app to Yahoo for $27 million?

Want to know the ins and outs of rolling your own Android app?

Want to participate in the Dartmouth Biorhythm Project? -- bringing research into the classroom.

Then read on ....


The coolest technology to emerge over the last decade is the smartphone -- it's had a huge impact on our lives. Today, over half of all Americans own a smartphone and I bet you are reading this webpage on your phone.

If you've been curious about programming phones and creating great apps then this course is for you. We'll focus on programming Android phones -- sorry iPhone.

The course has no exams or midterms -- it's all about programming. But there will be a lot of programming. The prerequisite for this course is Computer Science 10 (no exceptions given).

Because we plan to give each student a Google nexus 4 (thanks to the Neukom Institute and Computer Science department) for the duration of the course we have capped the course. However, if we exceed the cap we might be able to accommodate more students -- I'm assuming a good chunk of the class own an Android.

What we'll teach you

The goal of this course is to teach students how to design, implement, test, debug and publish smartphone applications on java based android phones. Students will learn how to take their innovative ideas from conception to the android market through a series of rigorous hands-on programming assignments and group projects.

This is an introductory course aimed at undergraduate students (but graduate students are most welcome) who have Java programming experience. However, there is a significant amount of programming in this course requiring a commitment on the part of the student.

Topics covered: the android development environment including eclipse, android SDK and phone emulator; key programming paradigms; UI design including views and activities; data persistence including SQLite; content providers; messaging and networking; phone sensors, location based services (e.g., Google Maps), background services; broadcast receivers; cloud programming using App Engine; and publishing applications to the android market.

Android programming concepts are reinforced through a set of thematic programming exercises that introduce these topics and incrementally allow the student to build a complex application; that is, programming labs form a set of components that collectively implement a continuous sensing application. The resulting phone app allows user to log their exercises (e.g., walks, runs) and display them on Google maps.

A key part of this course is group projects where students will work in small teams for joint problem solving.


Computer Science 10 (no exceptions). Android is based on Java programming.

We are using Piazza for information dissemination and Q&A

Sign up to CS65 Piazza. The best way to get answers to programming problems is crowdsourcing -- so the first time someone comes across a problem and we know the answer - everyone sees it. I encourage students to actively use piazza. It's a great system.


There are no exams or mid terms in this class -- it's all about hacking.

70% - Thematic programming exercises

There are 6 weekly programming assignments over the first 7 weeks. These labs are designed to help students learn the android programming environment and key programming paradigms. Assignments are done individually.

Each lab gets 10%

Demo or die MyRuns5 day

10% of the grade will be given for demoing the app.

Each student will demonstrate their standalone MyRuns5 (after lab 5 is complete). We will meet on the green to assess your app. You will be asked to demo two activities: walking around the green and running (if you don't feel up to running we will find someone to run with your phone).

Your MyRuns5 app should correctly capture the activity (walking and running) and the details of the exercise. Andrew should be able to see the exercised saved in your history tab displayed on Google Maps.

Note, if you can't demo your app you will get 0/10%. This might seem harsh but the code has to work and meet the requirements described in the MyLab5 lab specification. Please take this seriously I want to award 10% to each student in the class; that means, all MyRuns5 work beautifully.

30% - Group projects

Projects are made up of a small (5 people) teams and require strong collaboration and a problem solving mindset. The goals of this activity are to help you develop the confidence, skills, and habits necessary to write real phone apps while part of a multi-person team.

The project will develop a continuous sensing application that uses the bio data collected during the term.

Each team member will get the same grade assuming all goes well. The grade will breakdown as follows:


Teaching Team

Lecturer: Andrew T. Campbell. Andrew's research group has been at the forefront of developing a class of mobile apps called continuous sensing apps -- for example download and checkout the BeWell app on Google Play. This class will apply ideas and technologies from research to the classroom.

Office hours: Monday 3-4 pm, Wednesday 3-4 pm and Friday 3-4 PM Sudi 260

TA (the boss): Fanglin.Chen.GR@dartmouth.edu, Office hours will be held during lab hours or by appointment.

Section leaders (Androidistas):


If you have a question mail cs65-help@cs.dartmouth.edu

CS65 Biorhythm -- sections and labs

Sections will go over the forthcoming lab and are on hour slots. Lab hours are unstructured debug sessions.

Check the rooms for your section and labs -- they vary





Submission of programming assignments

We are using Subversion Version Control (SVN) for the submission of programming assignments. You should read those note before proceeding.

SVN is a tool for source code management. Your svn repository root is at https://svn.cs.dartmouth.edu/classes/cs65-S13/Your_Name/ so for me: https://svn.cs.dartmouth.edu/classes/cs65-S13/Andrew_Campbell

(Note, for classes after 2013 this is relevant: change cs65-s13 to the correct year and term for example W14 changes the svn commands below to cs65-W14)

How are we going to submit programming labs using SVN?

Policy for late assignments

You should always aim to get your lab in on time.

Penalties: < 8 hours: 10%; < 24 hours: 20%; < 48 hours: 40%; more: no credit.

Under extenuating circumstances, alternative arrangements may be made with the instructor, if possible before the due date.

Our late policy is a bit harsh but here's the reasoning. Each lab builds on the previous lab so falling behind is a taxation unto itself. To balance this late policy I add this sweetner: you get one free 12 hour pass and 1 free 24 hour pass without penalties. These are atomic units -- you can't divide them up, before you ask. Take it when you like but put a note in your README.txt file and email the TA.

It is not good to fall behind because it limits the time you can spend on the next lab which comes out as you finish the currenmt one. Therefore, three final pieces of advice from CS1:

  Don't fall behind in this course.
  Don't fall behind in this course.
  Don't fall behind in this course.

Dartmouth Biorhythm Project

Ever wondered where the term went?

It was over before it started -- I was so busy my friends don't think we are friends anymore; I managed to cram in so much -- how did I do it all and stay sane?; I lost sleep as the term progressed but stayed healthy, exercised and engaged in three really demanding classes -- how did I manage that?; I met new people -- friendships were formed in the group projects and collaborative assignments; did I manage to relax during the term? -- can't remember; how did my mood change day to day, week to week, assignment to assignment -- don't remember; I was near burnout a few times but kept going; how did the workload and assignment due dates impact my grades - there were a number of weeks when all the due dates overlapped; most classes were great overall but there were lots of moments when I did not understand what was being taught -- but I don't remember the specifics now term is over; exams are done and I can finally sleep, run, eat well, relax, and, enjoy my friends, the great weather, and the Green -- life is good again :) -- the snow is history and summer is finally here!

This story is not an outlier but is it the norm? We do not know.

Some anecdotal information

Computer science is known across campus as a place that you learn stuff deeply -- it's a demanding major. We have a sense as professors what the biorhythm is like but we do not have the day by day data, or the week by week data-- nor, importantly do the students. What we have is a course assessment from students but it only tells us their view of the class three weeks after the end of term -- and little else.

Here are some anecdotal comments by students on pace, load and retrospective for one CS course -- I know, this is not a statistically significant sample but I'd bet you see it across many Dartmouth classes:




How can we shine more light on the Dartmouth term?

Today's smartphones are capable of automatically understanding behavior.

Dartmouth has these intense 10-week terms - the Dartmouth term has its own unique biorhythm. The first few weeks are low key students are relaxed smile a lot and then as the complexity and demands of the term increase students get more stressed, have less sleep and time to exercise, and spend a lot of time -- particularly in this course -- hacking Android code.

Multiply that by 3 and you have the Dartmouth term - it is unique to Dartmouth because we tend to push students to learn complex topics typically taught over a 15-week semester in a 10-week term. This works at Dartmouth because kids are very capable and want to be challenged, whereas it wouldn't work at many other institutions of higher learning.

Similarly, teaching staff including the professor, teaching assistants and section leaders follow a similar biorhythm were increase stress, lack of sleep, changing moods, lack of time for exercise cycle through the term and impact performance and quality of life -- for 10 weeks at least. Particularly with the demands of teaching (which we like to do well), research (which we like to do well) and family life (which we like to do well).

I've taught semesters at Columbia for a decade prior to coming to Dartmouth. As a lecturer it took me at least 3 years to adapt to the pace of the Dartmouth term -- and I've run 10 marathons ;-). The semester has its own cycle and feels more like a marathon in my experience: I would have to pace myself for the semester so I could make it to the end -- I would find myself loosing steam and interest here and there over the 15 weeks but never burning out because it was very manageable. The Dartmouth term is more like a sprint -- it's an intense learning experience for the student and demanding for the professor -- I never have time to loose interest in the Dartmouth dash where I cram a semester's information into a term in terms of knowledge dissemination because if I'm going to teach smartphone programming I have to get the material across, the fundamental skills needed, it is hard to water it down and leave the student with partial knowledge -- so you compress the basics and squeeze them into a term.

What is Dartmouth Biorhythm Project?

The Dartmouth Biorhythm Project aims to shine a light on the impact of the Dartmouth term and its workload on stress, sleep, mood, activity, sociability, health and burnout. We aim to understand the term of a typical Dartmouth student. We plan to study the students in one Dartmouth class over one term -- that is, this class. This is a uniquely Dartmouth experience which brings advance computer technology and research into the classroom so students can get first hand experience with new untested ideas.

Today's phones can automatically infers some user behavior while experience sampling allows students to record other information. The images below show the two apps we have developed that students can use in the project: the first app is Bio (left) and it runs in the background of your Android phone; the second app is Paco (developed as a framework by Google for quantified-self studies) which we extended to allow experience sampling to capture parts of the Dartmouth biorhythm.

As part of group projects each student (and only them) in the study will have access to their data. All students will have access to some of the class anonymized data to use in the group project. The group project is to develop a new app. All students in the class have the opportunity to opt in or not to the study which is covered by the college's CPHS to make sure your privacy is protected at all times. Students that choose not to opt in will be able to complete their group project.

A study like this has not been attempted before at Dartmouth or anywhere else for that matter -- a single class over a single term. Results from the study will help us understand what makes the Dartmouth term tick, its rhythm, ups and downs, stresses, engagement levels, coping mechanisms, failure rates, achievements.

Biorhythm - what's yours?

Biorhythm People:

Group Project

Group projects are made up of 5 students. The theme for this year's project is to develop a continuous sensing application that uses Bio data from the study. Students will have access to their data (or canned data if not in the study), live bio data and some annoymous aggregate class data.

The project starts in week 4, pitches week 5. The last two weeks of class are held over for working on collaborative project -- there will be no classes during the last two weeks of term.

The grade will breakdown as follows:

5% Project webpage, team and project pitch 15% TBD 10% Demo or die day. The app/code has to work.

There is a focus on working code and a demoable app. Rules of demo day. The professor should be able to download the application from Google Play and it should work off the shelf.

The ground rules; the teams will:

Project Deadlines

Next deadline: Thursday May 9 Top Level Design Document (approximately 5 pager). Link the document to your project webpage.

Week 1 (March 25-29)

Topics: class info, first app, activities, user interface and saving user data

Dartmouth Biorhythm trivia: Note, the professor is more stressed than the students in class today but the students are more rested. Dartmouth professors stressed, surely not.

Week 2 (April 1-5)

Dartmouth Biorhythm trivia: Note, the professor is runs more than any student in class from yesterdays data - he also walks as much as the most active student -- and he sits around as much as the average student. We can also look back over the activity data collected for the last two weeks and Andrew is looking pretty darn good -- come on students?

Actvity data that compares the professor and students activity on April 4, 2013. All data is automatically collected from the Bio app without any user interaction.

Week 3 (April 8-12)

We are handing out 10 biorhythm t-shirts this week -- this cool t-shirt was designed by our very own Evan Gelfand (Digital Arts, 13).

We have a huge amount of material to cover this week. The best I can do is get through as much as I can and then you have to read up on material I gloss over. Again, there is a considerable amount of self learning in this course -- you have the notes, code examples, the book, Google, Piazza, Stackoverflow.

Dartmouth Biorhythm trivia: Checkout the mood of professor and class over last week. Note, the professor is in a positive mood during the week and negative at the weekend and the class is opposite to the prof -- mood changes over week and is pretty positive at he weekend.

Dartmouth Biorhythm trivia: We use an automatic sensor on the phone to infer if a user is around conversation. This gives a sense of the level of sociability -- incomplete but a sense. What we found over the last week is that students are around 12 different conversations per day with an average duration of 32 minutes. This is cool!

Week 4 (April 15-19)

Week 5 (April 22-26)

Week 6 (April 29- May 3)

Week 7 (May 6-10)

Project deadline: Thursday May 9 Top Level Design Document (approximately 5 pager). See project section

Week 8 (May 13-17)

All labs completed -- well done! You get your Android hackers badge.

Monday and Wednesday 10-11 AM we meet on the Green for a MyRuns demofeast

Your MyRuns5 demo must work to demo. This will be the version you submitted to the svn on the deadline.

No more classes now in the project phase -- classes end.

Week 9 (May 20-24)

Design and code reviews with each team. Partial working app must be presented.

Week 10 (May 27-29)

Demo Day is Wednesday May 29 6-9 pm

Online book

The Busy Coder's Guide to Android Development

It is an online book $45.00

I like the online book because you pay once and you get the revised versions for free (sort of). This is important because the APIs are still fluid. Many APIs are being added and depreciated at the same time. So the book at least quickly tracks major changes.

I really like these other books too. The first one is more introductory -- the second, more depth, more kungfu. But if you want to go deeper after this class buy both.

Having all three books might seem excessive -- call me excessive.