Lord Cosmo’s Commandments

Book the First · I

The Book of Cosmo

Chapters I through III, being the Algorithmic Commandments delivered upon the steps of the computer science building.

  • Canonical
  • Three chapters
  • Eight commandments

Chapter IWherein structure is spoken into the void

In the beginning, the semester was without form, and void, and confusion was upon the face of the students. And the spirit of Cosmo Wu moved upon the syllabus.

And Cosmo said, “Let there be structure,” and there was structure. And he saw that it was good, and he called it CS 331.

Now Cosmo had two disciples, Xiao Jin and Xiao Xor, and he gathered them upon the steps of the computer science building and spake unto them these Algorithmic Commandments:

  1. Thou shalt show up. For attendance is required, both in lecture and in discussion, and thou shalt arrive on time and shalt not depart before the session is finished.
  2. Thou shalt not rely upon the recording, for there is none. Thou shalt read the sacred texts before thou comest to class, that the lecture may find fertile ground.
  3. Thou shalt bring thy laptop, for the quiz cometh at the start of the hour like a thief in the night, and the unprepared shall be caught wanting.
  4. Thou shalt attempt the assignment before thou lookest upon the solution, not once, but many times, for the struggle is the training and the training is the strength.
  5. Thou shalt remember thy discrete mathematics and thy proof techniques, and thy loop invariants shalt thou keep holy.
  6. Thou shalt not neglect thy calculus — thy limits, thy logarithms, and thine exponentials — for they are the foundation upon which the house of algorithms is built.
  7. Thou shalt seek office hours, and TAs, and ask, and it shall be answered unto thee.
  8. Thou shalt speak unto the staff through Canvas Messages, and unto thy fellow students through Ed Discussion, and shalt not wander into false forums.

And Xiao Jin and Xiao Xor kept these commandments, though the way was hard, and the readings were many, and the recursion trees did branch without end.

Chapter IIThe day of the High-Stakes Exam

And it came to pass that the day of the High-Stakes Exam arrived, and the students trembled, for the exam spoke of Dynamic Programming, and of the Master Theorem, and of algorithms both advanced and terrible.

And Xiao Jin looked upon a problem of overlapping subproblems and was afraid. But he remembered the Third Commandment, and he broke the problem into its parts, and he built a table, and he filled it from the bottom up, and lo, the optimal solution appeared.

And Xiao Xor looked upon a recurrence, T(n) = aT(n/b) + f(n), and did not despair. For she remembered the Sixth Commandment, and she recalled her logarithms, and she compared f(n) against n^(log_b a), and the Master Theorem opened itself before her like a scroll unrolled.

And together they answered every question, for they had attended every lecture, and completed every reading, and attempted every assignment thrice before consulting the solutions, and visited office hours when the invariants would not hold.

Chapter IIIWherein the grades are posted

And when the grades were posted, Cosmo Wu looked upon his disciples and saw that it was good.

And he said unto them,

“Verily I say unto you, the algorithm is not given to the swift, nor the proof to the clever, but to those who keep the Commandments and endure unto the final exam.”

And Xiao Jin and Xiao Xor rejoiced, and went forth into the land of internships, and told all who would listen: complexity is not to be feared, but studied, six to eight hours a week, outside of class.

Selah. 🙏

Thus ends the Book of Cosmo.

Received text. Reproduced without alteration, including its own numbering of the commandments.