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 develop your own app as part of a group project?
Then read on ....
[If you are not a Dartmouth student feel free to use the material found below. All the notes and code are online. Let me know what you think]
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 is heavy on programming assignments, has a midterm and final group project. 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.
Lab hours will be supported by both TAs on the date before and the day the assignment is due between 6-9 pm in L001. For example, if the assignment is due on Monday at 11.59 PM the there will be lab hours Sunday 6-9 pm and Monday 6-9 pm.
You can make an appointment to see the TAs. Just email them.
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 the Android Studio IDE; 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. This should be a fun, creative and group-oriented experience. You will need to be organized to do well in the allotted time.
Computer Science 10 (no exceptions). Android is based on Java programming.
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.
The coursework is as follows: There are a number of longer thematic and shorter programming assignments, a midterm, and a group project.
Checkout the grading rubric for the programming assignments plus design and coding advise.
50% - Thematic programming exercises
There are 6 weekly programming assignments over the first 6 weeks. These labs are designed to help students learn the android programming environment and key programming paradigms. Assignments are done individually. Each lab will receive the same percentage of the grade.
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.
Labs are graded on completeness of the required features, the correctness of the functionality, and the robustness: note, if your lab crashes it will not be graded and you will have to resubmit a working version with 15% penalty against your lab grade.
You should download, inspect and run all code examples in the notes (.zip files) to fully understand concepts and patterns taught in class. However, you cannot under any circumstances ``cut and paste'' these examples into your solutions for your submissions. You should use these coding examples as a learning tool andbut always code your own intrepreation of these coding examples in your solutions if you choose to use the patterns; that is, look at the code and understand how it works but always code your own versions of these patterns if you use them in your solution. If you cut and paste any class code there will be a 15% penalty and you will have to recode and resubmit your lab.
The MyRuns document captures the complete app specification and lab assignment information. You should read through the design specification for the complete MyRuns app a couple of times before starting the lab sequence. For each lab we give you a running example of the solution called an APK. Your job is to functionally replicate each APK.
15% - Standalone/non thematic programming exercises
In addition to building the MyRuns app over the term there a number of standalone non-thematic program challenges (new in 2016); Topics include:
15% - Midterm
The midterm will consist of questions and programming exercises.
20% - Group projects
Students will develop their own app.
Projects are made up of a small (4 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.
Each team member will get the same grade assuming all goes well. The grade will breakdown as follows:
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?
Create a directory for each new lab in your root repository directory (viz. Lab1_submission, Lab2_submission, Lab3_submission, Lab4_submission, Lab5_submission, Lab6_submission) -- for example, https://svn.cs.dartmouth.edu/classes/cs65-S13/Andrew_Campbell/ Lab1_submission/
Develop your solution in the directory e.g., Lab1_submission
Make sure your repo is up to date and that the submission directory is synchronized with the repo (e.g., Lab1_submission).
Note, we take a snap shot of your repo at midnight on the submission date. So to submit you have to make sure you add and commit all your local files so your repo is up to date at 11.59 pm. Please make sure your code works and does not crash.
Here are some notes for using SVN with Android Studio or from the terminal. These notes allow you to use SVN embedded in Android Studio or handle source management from the terminal.
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 three 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.
First, you may discuss and help each other (e.g., help in debugging, sharing knowledge, giving moral support, getting coffee, etc.) - I promote that as the type of team spirit and joint problem solving skills that is the essence of the course and necessary to do a great project. However, you cannot work jointly on coding up (i.e., writing) your programming assignments. You can talk, discuss solutions, even show snippets of code (i.e., a few lines of code only) on the white board (not the computer) to solve a problem but you cannot jointly work on the code development and writing. Submitted code for the labs has to be yours and yours alone.
The project phase is different. You can work jointly on writing code. But you cannot take code from anywhere (e.g., the web or any other source). It has to be the joint product of the team. One caveat: no sharing of code between teams. As above, teams can discuss code, show each other snippets on the white board, but not share source code. The project phase of the course is a friendly competition so there isn't a lot of incentive to share code.
We hate to state this since you all know it but it is necessary to be explicit here (citation - culled and extended from CS8 Policy on joint work):
You would be amazed at how easy it is to tell when people work together on problem sets, particularly coding exercises. Think about the simple shell commands we run against your source code from labs and projects to compare your lab assignments and projects against every other assignment and project ever submitted since this course started - it takes less that a millisecond to run these checks - no effort on our behalf.
We use the moss tool from Stanford to run regular checks against all submitted code. To quote the website
"Moss (for a Measure Of Software Similarity) is an automatic system for determining the similarity of programs. To date, the main application of Moss has been in detecting plagiarism in programming classes. Since its development in 1994, Moss has been very effective in this role. The algorithm behind moss is a significant improvement over other cheating detection algorithms (at least, over those known to us)"
Similarly, we know how to use google too. You should not under any circumstance look at or use code from students that have previously taken CS65. The message is simple - please don't make life unpleasant for all of us by breaking these rules. The penalties for cheating at Dartmouth are severe, starting with suspension and including expulsion. If you are unsure about anything, please ask.
We take the Honor Code very seriously, so please, if you are unclear on any matter regarding this policy, do not hesitate to see me in office hours, and we will be more than happy to answer your questions.
Laptops and smartphones can be distracting. You might find this policy a little ironic but no laptops or smartphones unless I mention we need to use them for class.
Read the New Yorker post on "The Case for Banning Laptops in the Classroom" by my colleague Professor Rockmore. I'm the soccer highlights fellow in the article.
Please write clean code using good coding styles. As the course moves on you will get dinged for poor coding styles. Checkout this single guideline for advise:
Android code style guidelines (1) and (2)
Also, checkout a summary of design and coding tips.
Group projects are made up of 4 students.
The project starts in week 5 with pitches.
The grade will breakdown as follows:
Note, an up-to-date project page will be more of a running blog on your project progress and graded for completeness. I should be able to go there and read where you are. Be creative.
There is a focus on working code and a demoable app. Rules of demo day. The professor should be able to download app and it should work off the shelf.
The MyRuns document captures the complete app specification and lab assignment information. Please read this a couple of times and refer back to it.
Assignment OUT IN MyRuns1 Monday 01/04 Wednesday 01/13 11.59 PM MyRuns2 Thursday 01/14 Monday 01/18 11.59 PM StressMeter Tuesday 01/19 Monday 01/25 11.59 PM MyRuns3 Tuesday 01/26 Monday 02/01 11.59 PM DebugThis Tuesday 02/02 Wednesday 02/03 11.59 PM MyRuns4 Thursday 02/04 Tuesday 02/09 11.59 PM MyRuns5 Wednesday 02/10 Tuesday 02/16 11.59 PM TestThis Wednesday 02/17 Thursday 02/18 11.59 PM MyRuns6 Friday 02/19 Wednesday 02/24 11.59 PM
Note. all labs with the exception of DebugThis and TestThis can be done as pair programming assignments. DebugThis and TestThis must be done by each student individually.
Read over the weekend: Using the Camera and Data Storage
Please read this over the weekend:Using PreferenceFragment to store user preferences
Please read this over the weekend: Dynamic Layouts using the Fragment Manager
Please read this over the weekend: Debugging
Please read this over the weekend: BroadcastReceivers and Notifications
Next, Thursday during x-hour each student gets 1 slide a 1 minute to pitch an idea. Send me shared google slide by Thursday 11 AM next week. X-hour is 12.50 so it is tight to do 45 kids in 50 mins.
We recommend you buy the following book which is only available online:
The Busy Coder's Guide to Android Development
We will supplement the course notes with specific chapters from this book. Note, it's a huge book, don't be intimidated.
I like the online book because you pay once and you get the revised versions if updated. 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.
Finally, I'll suggest a few other books but I'm not recommending you buy them.
This is also excellent if now a little dated. The author is from the Android team so it represents a nice reference.
This book is not a reference but a boot camp. We will use some coded examples from this nice book:
Having all three books might seem excessive -- call me excessive.