Tuesday, February 4, 2014

The MOOC and Me : It Lives!


I may be able to do this after all!

I just completed the second problem of the second week's set of two. That's Week One for those keeping score. The first week was Week Zero. It's a twelve week course ending with Week Twelve. There is no eleven. Harvard math. It's a self-paced course, however, so it's all cool as long as I finish before the end of the year.

The first problem was Build a Pyramid and, although I knew what I wanted to do and thought I knew how, I didn't, and it frustrated me for weeks until I finally broke it into little components that I could test individually. Can I make it print the hash marks? Yes. Can I make it print the spaces? Yes. Can I control the number of each per line? Yes. Can I control the number of lines printed? Yes. (I say, "Yes," now but the answer was frequently, "No," while I was struggling along.) Finally, it all clicked.

I used that same technique on the second problem "Counting Out Change." First, I tested the request for user input. Then I tested each variable independently and together. The new skill was casting a floating point obtained from the user into an integer to count down the change owed. Once that worked, I built and tested a single while loop to count down the money owed and count up the coins given out. Since this project only took a couple of days, I'd say that's a system that works for me.

I realize these are itty bitty baby steps but, although I've been around computers for a long time*, use them daily and understand the theory, programming has never worked for me before. Now, maybe it will. If nothing else, at least my confidence level is growing. My coin counting solution is clunky and repetitive. We've just discussed modulus and now I think I know how to make a new, more streamlined version using that.

The next set of problems involves cryptography.

*My first serious exposure came while I was in college. During the summers I worked in a printing plant in New Haven and one year we were all sworn to secrecy (as in Ultra-Top-Secret-if-one-unauthorized-page-leaves-this-building-getting-fired-will-be-the-least-of-your-worries secret) when the company got the contract to print the in-house manual for IBM's brand new operating system: COBOL. I'm old.


No comments:

Post a Comment