In a course on mathematics we might define the word variable to mean “the unknown quantity.”We have an equation and we want to know: for which values of does the equation hold true? In a course on physics, we might define the word variable to mean “the adjustable quantity.” We have an electrical circuit. We…
Month: July 2024
3 Variations on sequential search
We are going to look at a simple problem. Things might look complicated at points along the way. Be patient. Some important lessons will emerge at the end. If I am successful, the algorithms will appear simple to you again at the end. Suppose that you are looking at a calendar. The page for July…
Why these algorithms?
If you choose to study computer science, you will almost certainly encounter these algorithms (or a very similar set of algorithms) early in your study: Some curricula include the selection sort but not the insertion sort, or vice versa. Other curricula substitute the quicksort for the merge sort and others ask students to learn both…
How and why to practice programming
Borrow code and make it your own Borrow a short program from your professor, a book, or the Internet. Make a small change to that program. Test the program. Confirm that your change produced the result that you expected or, through this experiment, learn more about what kind of change a modification to that part…
Will there be practice today?
At the end of August, on the first day of a new academic year, I stood in front to my students. I welcomed them. Some of the students had arrived on campus a few weeks to begin practices with their athletic teams. Some had arrived only a few days before. They had just completed an…
A Mountain Guide
Let’s imagine that I am not a professor of computer science. I am instead a guide in the mountains of Wyoming. Each of you has hired me to help you climb a mountain. I can show you what to pack and how to pack. I can talk to about the kind of weather you should…
A Fishing Camp
Let’s imagine that I am not a professor of computer science. I am instead the operator of a fishing camp in northern Ontario. You are not a student of computer science. You have left behind a life in the city for a week of vacation. You have told me that you want to catch many…