Comp Sci at Stuyvesant with D. Holmes

single-semester intro full-year intro Content
Zoom Zoom steps for joining a remote session
chat chat communicate during class sessions
Requires logging into Google with your account and
enrolling during class. If you missed your class on enrollment day, email Holmes as described here.
notes notes notes by Holmes to augment some lessons, starting with a syllabus
hw hw Check for a new homework assignment after 3:30 on every class day.
hw server hw server for submitting homework answers. See these FAQs.

Table of contents

homework teaches success

Students succeed in this course by understanding the homework. You are unlikely to learn new material at the pace of this course merely by attending class, even if that worked in middle school. Whether you judge success by mastery of the course material, or judge success by grades, understanding the homework is apparently required. To acquire that understanding, you must practice the thinking, look for patterns, find your errors, and revise erroneous attempts. Homework exercises all of those necessities.

Homework requires 20–30 minutes per day for a typical student in an introductory course, and up to 60 minutes per day in the advanced placement course. It commonly takes less for a student with experience in programming, but more for a student who is struggling or catching up.

There are six key elements to doing homework completely and correctly. These apply to many courses in high school and college:

Tests in this course aim to assess the extent to which a student understands the homework. People motivated by grades can boost them via the do–compare–re-do sequence.

keeping up is easier than catching up

Keeping up with homework assignments is challenging but crucial in computer science courses, for several reasons:

homework omits repetition

In fifth grade, math homework typically involves many repetitions of similar problems. Students can learn by repeating similar work until patterns become obvious. Each problem requires only a minute to solve.

That model fails in problem-solving courses like this one, where the problems are larger. It can easily take 10 or 15 minutes to write a program, test it to find errors, and fix those errors. So an assignment that is aimed to take half an hour should require writing at most three such programs. Students can no longer rely on absorbing a pattern through repetition.

Instead, be thoughtful about the problems. Do the significant work that can be required to understand the question. Struggle solo with the solutions, rather than immediately asking for assistance. Write down questions that occur to you, and take the initiative and responsibility to seek answers.

understand homework solutions

You are responsible for understanding solutions for homework problems by reviewing answers to them. Students and I collaborate on posting answers, usually on Piazza. There are good reasons to study these solutions:

"My computer (or internet connection) broke, so I can't do the homework."

Computer failure happens to everyone eventually. I would like to express my sympathy by lifting the requirement to do homework while awaiting repair or replacement. But from the point of view of keeping up with the homework, a broken computer provides no relief from the problems of falling behind. Students must find a way to keep up. Here are some strategies:

Whatever approach you take, rise to the challenge of keeping up while repairing your computer.

A broken internet connection requires similar thinking. You can use a computer at school, including those in the library and CS Dojo. You can submit homework by carrying it to school on a USB drive and submitting it from school.

corrections on the homework server are shown as late submissions

The homework server records the time of the last submission to each homework slot. So if you submit homework on time, but subsequently submit a correction to it, the homework server will show the submission as late. That happens even if the correction is that you originally submitted the homework to the wrong homework slot, and you re-submit it to the correct slot.

Corrections are helpful. Correcting the content of homework is a great way to learn. Correcting which slot holds which homework helps me if I review it.

The apparent lateness is such a minor problem that you can ignore it. To keep the record straight, you can include a comment with the re-submission, telling me that the original was on time. But look at this from my perspective: I use the timeliness to alert me to students who are falling behind in the course, to spot where a conversation might be helpful. A rare lateness is harmless, so neither of us should spend much effort to avoid a rare appearance of lateness.

Re-submissions overwrite the comments from previous submissions. So if the existing comment has valuable information, copy it before re-submitting, and include the copy in the re-submission.

rubric for most homework

Homework is graded with a denominator of 3. The basic grades are…

Small errors are expected, since most homework aims to develop thinking, not demonstrate mastery. So minor errors are compatible with a grade of 3/3. For submissions that surpass expectations, there is a 10% bonus, resulting in a grade of 3.3/3.

Late homework is worth 1 point less than a comparable on-time submission.

how else to succeed

recommendation: work with a classmate

Working on the homework with another student can help significantly. Some people mistakenly expect that the benefit derives solely from sharing knowledge. But other factors probably outweigh that sharing:

Stuy's CS teachers strongly encourage you to experiment and improve at working in pairs.

Some caveats:

keep up when you miss a lesson

As with homework, it is easier to keep up than catch up with the content of lessons. If you miss a day or are confused by a lesson, take remedial action quickly.

The best way to catch up is to sit with another student from your class to go over their notes, while taking notes yourself. Both of you are likely to benefit; a person who teaches learns from the process, clarifying their own thinking. (I know; I learn from this effect every day.)

The web page on "notes from class" shows some class materials. Those materials can augment or correct your recollection of what you heard in class. They cover only fragments of lessons, however, so you will need notes by a student.

good students seek help

Too many Stuy students are reluctant to seek help, perhaps because middle school was easy for them. In better high schools and colleges, good students seek help; weak students don't.

Know these sources of help:

class and community participation

Asking questions or proposing answers helps the askers and answerers. Askers benefit because they do the hard thinking necessary to identify misunderstandings. Answerers benefit because they do the hard thinking necessary to verbalize their understanding. In addition, participating in class helps participants stay engaged with the class. Both questions and answers help me assess how well concepts are being communicated.

Many students are initially reluctant to reveal their confusion. Such reluctance is understandable since no one likes being wrong. You can help: work on making class a hospitable environment for the ego-sacrifice of asking questions and proposing answers that could be wrong.

Explaining another student's question to me helps both of us. You must have experience with this already: A helpful and brave student says "I don't understand". The teacher starts to re-explain whatever they regard as the hardest part of the material. But every other student in the room knows that the problem was a term that the questioner had not heard before, often because the term was new to lots of people. In that case, please jump in with an interruption like "No, Mr. Holmes, the issue might be the term x." Everybody wins.

The Piazza on-line forum extends participation beyond the class time. Participating via Piazza is particularly valuable for people who are disinclined to speak during class.

notes help, if used well

Each lesson's aims are displayed as questions, which you are asked to record. Knowing the aims in advance helps you recognize the answers as the lesson covers them. If we both do our jobs well, you should be able to answer those questions after the class.

Many Stuy students found notes superfluous in middle school. Material was presented slowly enough, and with enough repetition, that they learned it during class, with no need to refer back to it. However, as you rise through increasingly challenging education, eventually you will reach a level at which you can no longer get by on being a fast learner, because everyone in your class learns as fast as you do, and the pace of the class is sped up accordingly. When you reach that level, learning requires thinking about the material after class, independently. Independent thinking requires recalling the material. Successful students take notes that aid that recollection.

To benefit from notes, good students improve them after classes, reminding themselves of the questions, and identifying the answers.

In fact, if you do not review your notes, or if you store them un-read until the night before an exam, you are likely to learn more by listening and thinking hard during class, without the distraction of taking notes.

Apollo Robbins will convince you in 9 minutes that copying from the board interferes with learning, because you can't think about two things at once. Way cool.

Do your review and answering before you start the homework. That timing helps with the homework, because the homework aims to exercise material from the most recent class. The alternative to review-before-homework is more work for less learning. There are often many ways to solve computer problems, and lessons often base new techniques on those taught previously. Homework after the later lessons aims to exercise the new learning. But students who have not reviewed a lesson forget it. Instead, such students try to apply old lessons to new problems. That involves more work than using the newly-taught techniques, and forsakes the opportunity to learn the new techniques.

Algebra students are often introduced to solving quadratic equations by factoring. Later, they are taught the quadratic formula, which is helpful when the solutions are fractions or complex numbers. Pity the student who ignores the aim of the lesson on the formula, and works hard on the homework trying to guess the factors of x2x–1=0. The effort will be fruitless and it won't help the student understand the formula.

In summary:

how to read

Probably you have been told how to succeed at reading comprehension under time pressure. Often the techniques include…

Sadly, that is not "how to succeed at reading comprehension".
Maybe that is "how to succeed at reading comprehension on a standardized test".
Certainly it is "how to fail at reading comprehension in computer science and math".

Comprehension in this subject requires multiple close readings. Here is a typical sequence for understanding a programming problem:

Successful students read differently in different subjects. I learned that only in grad school. Maybe you can learn it sooner. Teachers never told me this before then, presumably because lots of teachers are as ignorant as I was, and for a similar reason: a single reading style had long worked for me in the subjects I liked best, and I got by in the other subjects.

New students routinely complain that my writing is hard to read. I may be a particularly bad writer, but there is also another issue: reading computer science text requires serious concentration on every word. Two examples:

Communication is hard. Readers must expect to do their share of the work.

how to write

Problems posed in this course routinely ask for answers in good English sentences. The responses are routinely hard to read, often because they ramble, or constitute only sentence fragments, or lack antecedents for pronouns.

Problems posed in this course routinely impose word limits. Weak students routinely violate those limits.

Avoid these errors by drafting an answer on scrap paper or a word processor. I cannot answer a hard question in a single draft; it is optimistic, prideful, or foolish for you to expect that you can.

Save words by omitting echoes of my question. For example, if asked "What advantages derive from clear writing?", it is redundant to start your answer with "There are many advantages to clear writing. For example, one should practice clear writing because...". Eleven words wasted. "Omit needless words."

Students have taught me why they make these errors: writing a lot, quickly and poorly, succeeds in other courses. That approach fails in this course.


the Department of Education made grades irrelevant

Since we started remote learning, the Department of Education's policies allow families to decide that the grade for any course can be removed from a student’s record.

On a personal note:

grading starts from an average grade

Many Stuyvesant students focus on grades to an extent that harms their education and mental health. To ameliorate this distressing proclivity, this course's grading seeks to align higher grades with good practices for learning, as well as the school's policies. Spend your efforts on improving as a student; let the grades take care of themselves.

At the start of the term, the grading in this course makes two assumptions:

As each of a student's actual grades becomes available, it will replace a grade of 90% that was assumed initially. So by the end of the term, a student's course grade will reflect only their work, with no remnant of the original assumption.

You can play with example calculations posted here. The example is simplified to make it tractable:

simplification in the sample reality at Stuy
2 marking periods 3
1 higher-weight summative assessment per marking period about 2 per marking period
actual grades through homework_2, shown in black;
assumed grades of 90% thereafter, shown in gray
gradual replacement
from assuming all grades of 90%
to all actual grades by student

A few homework assignments will be graded lightly, aiming to assess whether each submission shows substantial understanding of the material. For details of the scoring, see the section titled rubric for most homework.

Grades on individual assessments are posted on JupiterEd, where both students and parents/ caregivers can see them. Ignore JupiterEd's calculations from the grades, like the one they label "Semester Total" Those calculations mean nothing in this course. JupiterEd is used only to report the values that I calculate in another system. I calculate combined grades in the other system and post them, too, towards the end of JupiterEd's list, under the headings "homeworks", "summatives", "Classwork/ Participation", and "semester grade".

Classical testing fails during remote learning, so I expect to give no tests this semester. The fundamental issue is the impossibility of providing reasonable curbs on cheating by dishonest students. Honest students deserve a reasonably equitable environment, and no teacher wants to provide hard-to-resist temptations to cheat.

"What can replace tests for higher-weight grading during remote learning?" is the most-discussed question bothering the computer science teachers. The answer, pretty clearly, is "Nothing." When we gave tests, I had reasonable confidence in distinguishing between students who earned a 95% versus those who earned a 90%. The course average across all students was around 90%. Students who earned the much-higher grade of 95% usually exhibited sustained interest and effort that exceeded that of a typical student. Without tests, students, caregivers, teachers, and administrators must accept the inevitable reduction in the accuracy of grading. For perspective, notice that this inaccuracy ranks low in the list of harms caused by this epidemic.

Instead of testing, I aim to provide more detailed grading for summative homework. The results will be weighted more heavily in the grading for the semester. That is, when a grading opportunity aligns with a homework assignment that students can be expected to understand well, I will write a detailed rubric, like the rubrics formerly used for tests.

Publishing a rubric for summative assessments usually requires providing most or all of the answers. So once a rubric is published, a submission for one of these assessments can be worth no more than half credit, even if a student can somehow demonstrate that they understand the topic fully, and did not merely copy answers.

When homework assigns reading, the initial grading for that assignment reflects an assumption that the student did the reading. If a student's subsequent actions demonstrate ignorance of the content, the grade on the homework will decrease.

For example, hw00 asks students to read the class home page, since it contains my best advice for succeeding in this course and others like it. Part of that advice gives instructions for writing email that helps both you and me. So if a student sends me email that demonstrates ignorance of those instructions, their grade on the homework goes down.

The notes here show the leading grading ideas so far. Necessarily, these ideas are under development, open to improved ideas from any source, or changes in my understanding of the administration's directives, or realities that diverge from my expectations. About all I am certain of is my good intent and my need for others' help and patience.

The categories in the grading are explained here. Questions? Comments? Suggestions? Discuss them on Piazza.

learn from your errors

Figure out how you erred on homework, especially homework that is graded with a detailed rubric and weighted heavily. That is educational because that work focuses on the elements of the course that I think are important.

In heavier-weighted grading, I create a rubric to promote consistency, so that similar errors by different students are graded similarly. I publish the rubric with the grades. It can communicate the parts of a problem I regard as important and it often lists common errors.

Initial work on figuring out errors must be done by students, without my help, mostly for the educational benefit. So do not ask me for help until you have thought, asked, and experimented to correct your work.

To find the error in your answers, try some of these steps:

disputing judgment

When you and I agree that an answer is wrong, please respect my efforts toward fairness and consistency, by accepting my judgment of the penalty.

If the penalty seems high, estimate the fraction of the important parts of the problem you did correctly, as identified in the rubric. For example, if you decide you did an 18-point problem about half right, then a score between 8 and 12 is probably close enough. Contesting the grade is probably not worth the time and risk of requesting that the entire assessment be re-graded.

If you insist on disputing my judgment, within two school days of the publication of the grade and rubric, write a paragraph explaining the alleged error. Resubmit your work to me, with the explanation. I will re-grade the whole assessment. I will correct all grading errors I find, in both directions. Your grade may go up or down.

extra credit: points for perspicuity

Students can earn points for perspicuity. If a piece of code or English is so clearly and tersely written that I can verify its correctness in a single reading, it can be worth extra credit. Clear writing is hard in any language, however, so achieving it normally requires drafting the answer and editing the initial drafts.

raising grades

Students who focus on grades occasionally ask for opportunities to earn extra credit to compensate for low grades. I know of no work outside the curriculum to recommend as a remedy. Instead, whatever time a student wants to devote to improving their grade in this course should be devoted to learning the course material and preparing appropriately for the next assessment. My best advice on doing so is in this document.

Holmes's schedule

period activity
1 teaching second-semester intro
2 teaching second-semester intro
3 teaching second-semester intro
4 usually available
5 usually available
6 teaching single-semester intro
7 usually available
8 teaching single-semester intro
9 usually available
10 usually available
office hours usually available
after school usually available

To make an appointment to talk in person, send email. Tell me… 

I will respond with whether I can meet then.

For discussions with students, we have made effective use of the usual Zoom meeting. Caregivers are requested to provide a phone number that I can call at the appointed time.

Courtesy requires keeping your appointments, or — second best — alerting me in advance if you intend to break an appointment.

email helps communication

Before emailing me, consider Piazza, for the reasons discussed here. Emailing me is appropriate for issues that concern only you, but Piazza is often more efficient, since most of the questions that arise stand to help more than just you.

Thought transference from your head to another's is difficult; help the reader by writing carefully.

Use standard English, the way you would in a paper submitted for a grade in an English class, including full sentences, verbs, paragraphs, courtesy, organized thoughts, re-reading, revision, spell-checking, and all the other techniques you know for communicating effectively.

In the first sentence of your email tell me why you are writing or what you want. Like a topic sentence in a paragraph, the email's first sentence should answer the reader's implicit question, "Why should I make the large effort to understand the rest of this email?"

For that reason, business-related emails like ours should not start with "I hope you're having a nice day", nor any of its variants.

Word choice can help focus your sentence on why you are writing. If you start with a first-person pronoun, like "I" or "my", you are likely to be writing about yourself, rather than telling the reader what you seek from them. Try starting with a second-person pronoun, like "you", or an imperative, probably introduced by "please". Examples:

In subsequent paragraphs, provide background, explanation, or amplification.

Do not use informal abbreviations, like "ur". Do not omit punctuation, as in "dont". Such shortcuts are fine when texting with friends, but they are inappropriate in more formal communication, like ours.

Use the subject field of your email to maintain threads that bind related messages together, thereby distinguishing one conversation from others. Indicate content and purpose. A subject like "help!" or "homework" is useless; it tells the reader nothing except that the author is too lazy to help the reader understand the issue. Expect bad results from telling the reader that.

Send your email to the appropriate address:

your class period send to…
1 1domain
2 2domain
3 3domain
6 6domain
8 8domain

People occasionally try other ways to communicate with me that work less well than the email accounts shown above. Avoid these:

So for best results when you want individual attention, use the appropriate email address from the list above.

Put your name in the message, perhaps by configuring your email client's display name.

Keep your email program from categorizing email from me as spam, by whitelisting the domain For instructions on how to do this in your email program, run a web search that starts with the email software you use, followed by the term whitelist, like
     gmail whitelist

classroom routines

It is widely observed that time is the most critical scarce resource in a class is time. As a student, the scarcity rarely occurred to me; I just had to keep up. But in leading a class, the scarcity rankles constantly. Can we delve far enough into a question to understand why people find it interesting? How much easier will the homework be if more of it is done in pairs in class? What's so cool about tail recursion optimization, and why should I care?

So it is worth establishing routines that save time and disruption.

arrive before the late bell

Class begins at the late bell.

start of class

Your objective at the start of each class is to enter a mental and physical state in which you are ready to contribute and learn.

Arrive before the late bell, so that you are working on these tasks by the time it rings. Successful sophomores have assimilated this timing; I make it explicit here to avoiding embarrassing anyone who has not learned it yet.

I have sympathy for people who are only now jettisoning the impression from middle school that time before the late bell is free for socializing, because I remember making the transition.

But the absurdity of this misconception becomes apparent if you think about college classes. For example, in the first year at a medium-sized university, I was privileged to hear David Wilkinson take time out from his widely-recognized work studying how background radiation supports the big bang theory to teach physics to beginners. And Burton Malkiel had just left President Ford's Council of Economic Advisers to teach Econ 101 to a few hundred first-years. When people like that take 50 minutes to explain what they think you should know, you don't squander the first three looking for a seat and a pencil. Students probably don't make it that far unless they have learned how to prepare to learn.

My teaching falls far short of those teachers', but you can certainly read a clock as well as their students.

The start-of-class assignment typically asks you to…

You are welcome — indeed, it is probably better — to work in pairs with an immediate neighbor, augmenting each other's notes and jointly identifying answers. If you missed the previous class, seeking help from a classmate is necessary, not just optional.

By this stage in your scholastic career you know the appropriate voice level for group work. As a rule of thumb, if I can distinguish your voice over your colleagues', you are too loud. Learn to murmur.

As adherents of the Cornell note-taking system [1] [2] know, the review contemplated here is actually too little too late. By the time they start college, good students develop the self-discipline to review notes without prompting. That review is most profitably done soon after each day's class. In college, there will be no do-now, no teacher-designed exercises to help students recall the context of the previous class. Instead, successful students do that review on their own initiative, on a schedule that works for them.

While you are in high school, learn about and experiment with study techniques. To help with that experimentation, I assign techniques, such as the beginning-of-class reviews. By the time you reach college, you want to have internalized the techniques that work for you.

Start-of-class routines typically finish within 3 minutes of the late bell, depending on the opening assignment. Four minutes represents 10% of a 41-minute period, so you can appreciate the need for discipline.

I cannot address individual concerns before lessons. At that time I am trying to start the class as speedily as possible, so attending to individual concerns would delay the entire rest of the class. If you need individual attention for less than a minute — for example, to add a signature to an absence note — wait until the do-now is under way. For longer conversations, make an appointment. Sometimes I can also talk after classes.



partial day

I teach your course several times a day. Students who plan to miss a class can ask permission to attend one of the other classes.

whole day

When you are absent, it is your responsibility to catch up. Ask a reliable classmate to review their notes with you. Ideally, do this at the CS Dojo, for access to more help if questions arise. I regret that I cannot afford the time to tutor individual students. One benefit of your accepting this responsibility is that I rarely need to object to a student's missing a class for musical or sports conflicts, or to make up a test in another subject, etc.


When I am absent, I usually post instructions in the class notes. Look there and remind your neighbors to do so.


independent learning and showing off

Everyone is welcome to learn extra topics on their own, and to use it on homework or tests. One of the great aspects of computer science courses is that you can learn any amount more on your own, and benefit from it, whether the amount is small or large. Every semester there are a handful of students whose interest in the material leads them on, and it is a pleasure to see.

But in class and Piazza, don't introduce digressions that hurt — rather than benefit — the class as a whole. Independent learning is great, as long as it is, well, independent.

This kind of self-restraint is tougher than it sounds, since it is natural to want to show off extra learning. Showing off is unattractive as well as distracting. Instead, independent learners occasionally ask quick questions after class on material they have been studying on their own, without distracting anyone or showing off in the slightest. Sometimes I can help by pointing them to appropriate documentation.

The temptation seems particularly acute on the homework solutions that students are asked to post. The solutions should present the simplest possible answer to the homework problems, so as to help someone who was a little confused by the presentation in class. Introducing new material is likely to further confuse such a person. In one semester this kind of showing off rendered Piazza posts unusably dense for many students and me. Keep that from happening.

Rather than Piazza, you are encouraged to participate in public forums like the StackOverflow community, which is like Piazza for pros. No one there will think you are showing off, not least because the pros there are really impressive. Here, for example, is a posting on StackOverflow by a great Stuy student. The question was answered by Seth Tisue, who was then the lead developer of NetLogo! Also notice how polite most people are on StackOverflow, including both the student in the original posting, Mr. Tisue in his generous response, and the student again in saying "thank you". If only life were like this.

To burnish your reputation within the class in a positive way, I recommend answering questions, in class and on Piazza, without condescension or outside-the-syllabus material. You can help lots of people by writing high-quality, well-tested hints or answers to questions about the material.

Answering a question posed by another student is also very helpful. The questioner thereby hears the answer phrased differently from the way I might phrase it. That difference is valuable because the questioner was left confused by my original phrasing, so hearing different phrasing is likely to help them. Everybody wins.

People who enjoy learning about computer science will feel rewarded by taking more comp sci courses at Stuy or participating in the comp sci community outside classes. The other classes and activities are led by people whose great teaching inspired me to want to join them. Both activities will give you the company of independent learners who are nice people, and who share your interests. Learning in the company of good students is why you went to Stuy, whether you knew that in advance or not.

no gifts, please

I cannot accept material gifts from students or their families. Students regularly give me gifts of their attention, their effort, their patience, their opinions, and their advice on becoming a better teacher, all of which are valuable to me. Let's keep material gifts out of this.

If you (or your parents/ caregivers) have roots in a culture with a different gift-giving tradition, please help everyone involved understand my respect and disinclination to give offence, while remaining consistent.

There are many reasonable views on this issue; the "no gifts" policy is just mine. Here are two others:

miscellany (optional reading)