The Revolution Was Madeup
Madeup now supports surfaces of revolution. Trace out a radially-symmetric cross-section of an object, then spin it around the object’s central axis some number of degrees using the revolve command to form a solid. The variable nsides determines how many intermediate stops are made as the cross-section is spun. I offer a few examples of the revolve […]
Randomness in Madeup
About 30% into writing tests for a piece of code, my energy deflates. When I consider how many more tests I have to write to thoroughly test my code, I am overwhelmed. The worst part about testing is that you can’t just tax the moving parts of your software the way someone like you would. […]
Naming Things
Often in my introductory programming classes I will share a snippet of code that is unnamed or vaguely named. I ask the students to interpret the code and choose better names. This past week I gave them this snippet: public static double ?(double x, boolean b) { if (b) { return x; } else { return x […]