Programming is fun for me. It always has been.I’ve always written code to scratch a personal itch. That is to say that I like to write programs that interest me. If I can learn something new or try something different that is a plus. Not having a time pressure makes this even more enjoyable. I’ve written a couple of fun programs lately. I think they have some potential for student projects as well.
For example, my wife bought us some clothing from a company called Two Blind Brothers. It’s nice clothing and profits go to fight blindness according to the web site. The clothing all has labels in the braised bumps of Braille. Naturally one wants to know what the Braille says and while it is probably documented in the company web site I was looking it up letter by letter with a chart. Eventually I decided to write a program to help me out. Yes, programmers will spend an hour writing code to save themselves 5 minutes.
My program has a pattern of 6 dots that can be set or unset to match a Braille patter with the program displaying the appropriate letter. Or I can enter a letter and the program will display the pattern.
I’d love to assign this to students just to see the different ways students come up with to do the parsing and display. I’m probably going to use it as a platform for more experimentation. I have some other ideas about parsing and translating. It’s modular enough to make experimentation easier.
I’ve also been playing with a Yahtzee program. There are a lot of interesting facets to this program. One of them is verifying options. How do you recognize a full house? How do you recognize a straight? How do you make sure the values entered for a Chance or a three of a kind at legitimate? A couple of years ago I thought about using this as a project to use and enhance over the course of a semester. I ran out of time developing that but now that I have a program almost finished I may try to write up something like that.
Loops, arrays, classes (dice class anyone?) and more are all part of a project like this. It’s been fun writing it. I’ve learned a few things that may help me with some additional games.
No comments:
Post a Comment