CS222 Advanced Programming

Tips

Writing

Clear and concise communication is the mark of the intelligent professional. Everything you write this semester, from exam responses to commit messages, are expected to be written in clear, correct English, following traditional standards of composition. Remember: if you are competing for a job against another candidate who is of similar technical ability, the winner is going to be the better communicator.

Composition

One of the most important rules of composition for us is that the paragraph is the unit of composition. Consider this advice from the classic 1920 edition of Strunk’s The Elements of Style.

If the subject on which you are writing is of slight extent, or if you intend to treat it very briefly, there may be no need of subdividing it into topics. Thus a brief description, a brief summary of a literary work, a brief account of a single incident, a narrative merely outlining an action, the setting forth of a single idea, any one of these is best written in a single paragraph. After the paragraph has been written, examine it to see whether subdivision will not improve it. Ordinarily, however, a subject requires subdivision into topics, each of which should be made the subject of a paragraph. The object of treating each topic in a paragraph by itself is, of course, to aid the reader. The beginning of each paragraph is a signal to him that a new step in the development of the subject has been reached.

There is more to this than Strunk explains, and it’s rooted in the modern understanding that writing is epistemic. That is, writing creates understanding—it is not merely the conveyance of something already fully-formed in your psyche. By writing clearly, you begin to think clearly.

George Orwell gives excellent advice for word and phrase selection in a 1946 essay about the interplay of language and politics. He argues convincingly that imprecise thinking begets imprecise writing, and imprecise writing begets further imprecise thinking. Orwell offers the following rules to “cover most cases.”

  1. Never use a metaphor, simile, or other figure of speech which you are used to seeing in print.
  2. Never use a long word where a short one will do.
  3. If it is possible to cut a word out, always cut it out.
  4. Never use the passive where you can use the active.
  5. Never use a foreign phrase, a scientific word, or a jargon word if you can think of an everyday English equivalent.
  6. Break any of these rules sooner than say anything outright barbarous.

Essays

When you are asked specifically for an “essay” in this class, keep in mind that the word itself comes to us from Latin via French, where the meanings are “weigh,” “ascertain”, and “trial.” An essay is an attempt to understand. It must have a thesis that it is defending, and everything in the essay should support this thesis.

A good process will help you to write a convincing essay. Before you begin an essay, you must have something to say. Determine your goal for the essay, and write it down. Then, write an outline of the major points you would like to make. Each of points in your outline should be expandable into a paragraph, and they should be sequenced in a logical way. Once you have the outline established, flesh out each point into its own paragraph. At this point, you may either collapse multiple points together if they do not stand on their own or you may realize you need to break down a particularly complex point into smaller, paragraph-sized ideas. Once you’re done, the best practice is to step away from it, ideally overnight, which gives your brain time to process the experience. Then, you have two options. If you’re too close to the deadline, read and edit what you have written already. If you have given yourself time to really dig into this essay, instead write a new thesis statement and outline, without looking at what you wrote previously. You will often find that this second outline is more elegant and refined, because at this point you have honed your ability to think and communicate about your ideas. Compare this second outline to your first draft, and revise from there.

Programming

Anything that takes your fingers off of the keyboard will slow you down, and that includes both the mouse and touchscreens. Pay attention to what commands you use regularly within your editor, and learn the keyboard shortcuts for them. The goal of this exercise is to go as quickly as possible from intention to action. After a brief investment in learning the shortcut, it will be committed to muscle memory, and you will gain in productivity. If this is a new idea to you, start with simple things like Copy, Cut, and Paste, and watch your productivity increase. Once you have that down, likely candidates for the next most important are Rename or Format Document.

Keep a piece of paper and a writing implement next to you whenever you are programming. Use this to jot down ideas that you need to remember for later but would derail your current focus. This is a great place to keep track of refactoring tasks. You never want to be refactoring two things at once, but it’s important not to lose an insight into what you can change next. While one could maintain a list in digital form, there is nothing as cathartic as crossing off an item from a physical to-do list. Paper is the right tool for this job.

Naming problems can creep into any program. Given a variable or class name, ask, “Is that what this is?” or for a method name, ask, “Is that what this does?” If you cannot answer affirmatively, fix it right away using the keyboard shortcut you just learned or write it on your paper task list you keep next to you. (See how the advice creates a positive feedback loop?)

Checklists

These checklists are designed to serve as reminders as you work on your two-week project and final project in CS222. The lists come from a combination of research, documented best practices, and experience with what kinds of things student programmers tend to overlook.

Commit Checklist

Iteration Checklist


CS222 Course Plans (Fall 2026) © 2026 by Paul Gestwicki is licensed under CC BY-SA 4.0