Tuesday, February 17, 2015

One Thing Leads To Another

One of the great things about teacher blogging is the sharing of ideas. Often these ideas can be easily adapted and adopted in new ways. Earlier today Doug Peterson had an interesting post about wind chill calculations. He had an interest, shared by lots of us “enjoying” a particularly cold winter, and did some research. This resulted in a Small Basic project. And all the information I needed to write my own project.

Now Small Basic is a wonderful little language for projects like a wind chill calculator.  I can easily understand why it was a go to language for Doug. On the other hand I have been doing a lot of work with TouchDevelop lately so writing the program in that came to my mind. My wind chill program (which you can run from any web browser) looks like the following.

image

TouchDevelop has three levels of ability for coding these days BTW. That is the “beginner” format which I chose in part because I like the color coding.

Any way, I can see some room for expansion. There are obvious UI improvements but as is often the case there is more to wind chill can meets the eye. For example these calculations are apparently only useful for temperatures below 50 degrees Fahrenheit. That’s an obvious check that should be made. It has the added advantage of being able to add if statements to a simple assignment statement project.

We should probably also check for negative wind speed. As always one thing leads to another in programming. And now thanks to Doug for sharing what he did I have another project I can use with my students. One that conveniently works in any programming language I might use.

3 comments:

Doug said...

I'm glad that you liked the concept, Alfred. I was really intrigued by the number of different ways that wind chill has been calculated. When I did mine, I used the second formula which generated the same results from The Weather Network (my source fo test data). The formula that you used generated a much colder result. Can I believe a New Englander when he complains about the cold again?

What I found particularly interesting was that I started with a simple premise and started digging and digging. The more I dug, the more I found out about wind chill factor. Probably much more than I ever dreamed of. It was funny. I always liked to write little snippets of code like this. In the day, it would be to bring up MS-BASIC or QBasic. When I went looking for a quick little program, I recalled the Small Basic that you had introduced me to. I like your move to TouchDevelop. I need to play with it more; I fumble with it quite a bit.

But the concept of an app for all devices is intriguing. Does your school have a weather station? It would be really interesting to extend this program a bit further and pipe real school data to the app on a portable device. I hope that your students have fun playing around with their own creations. Given the conditions this winter, it's really appropriate.

Just think...in a few months we'll be in Grapevine, Texas complaining of the heat!

Alfred Thompson said...

We don't have a weather station which now that I think of it is strange. We have several faculty members who are serious weather bugs. I should ask about that.

Garth said...

Apps have sort of killed weather stations. I can remember when every school had a weather station out side the science room window. But then I can remember when the glaciers were retreating. The wind chill would be a great programming assignment for my kids. "Build a wind chill computer." They would end up on the discovery path like Doug went through. Leave it wide open as to the algorithm they should use. All that side knowledge. For the advanced class "Build a wind chill computer. Use two languages. Grading will be based on completeness of comments."