I’ve been challenged by a friend to record and release something every day for a month. I’ve chosen August to do this and I’m going to see how far I can get. I plan to use anything at my disposal, including my phone if I have to.
I’m going to use this as a chance to experiment with different styles, too, so if you’ve heard any of my electronic music, prepare to be a little surprised.
Follow me on Twitter or watch here for updates. And let me know if you want to join me. It could be fun.
When you were three years old, you asked “why” an awful lot. If you have kids you’re probably sick and tired of hearing that question. But it is a fundamental question; it’s how we learn. We have a need to understand. Some things are learned over time, like “We need to eat so we don’t die.”
But some things are not easily understood.
Like Pointers in C.
Recently I came across an exercise that was designed to help the student understand the use of pointers in C. Here it is:
Declare three doubles. Then write a function that takes in a double, followed by pointers to the other two doubles. The function should add one to each double. Call the function and print out the values of each. What do you observe?
This is instructor focused. It screams “I need you to understand pointers. We’ll do a trivial example that shows that the first parameter won’t be modified but the other two will.” It’s terse and leaves a lot of work up to the student. It’s good to make students work, but you must give them motivation before you just throw them into the deep end of the pool.
If we just added a little context and some explanation, we could make this better and actually explain what’s going on:
You need to write code to move a game piece from one location to another on a two dimensional board. To do so, define a ‘move’ function for this. The ‘move’ function should take in four arguments: the current position of the piece on the x axis, the current position of the piece on the y axis, the number of spaces to move on the x axis, and the number of spaces to move on the y axis. Since you can only return one value from our function, define this ‘move’ function as void, and use pointers to modify the original x and y position of the piece. Think about how you will modify those existing x and y positions.
Both use the same premise: in C, we can’t return more than one result from a function, so we get around that by using pointers to pass values by reference so we can change the values of the arguments we pass in. This is often called mutation. In some languages, mutation is bad. In others, it’s the way stuff gets done. Context is key.
But this second example is more learner-focused. It gives meaningful context to the problem at hand. It explains what we’re doing, and the context helps the student understand why. It specifically reinforces the idea that if we want a function to modify multiple values, we have to use pointers and modify those values.
This example could be vastly improved depending on what specific things you needed to teach.
What’s not helpful, though, is using simplistic, out of context exercises. A demo where you have the student print out memory addresses for variables does nothing to motivate them. Why do they care about the memory address? What’s its significance? You know the reason why they should care.
Articulate that to them. And if they’re not ready to understand it, then it’s not time to introduce the topic yet. Teaching the basics is hard. Be patient, be articulate, and help students connect the dots.
I’m actually pretty happy with this song. I did a lot of it on the iPhone while waiting for meetings, waiting for things to build, or as a distraction for those times when my brain was starting to get fried.
I’m editing a couple of really cool books, I’m working very hard on getting one of my best-selling books updated with fresh content, and on top of that I’m teaching full-time. That doesn’t leave me much time to work on music.
So against my better judgement, I’m doing the 2013 RPM Challenge, where you have just 28 days to write and record an album of music. I participated in 2011 when I wrote and created 26 Days and it was very good for me to do that. I’m looking forward to digging in again. I’ve already spent a few hours putting together some tunes, and I’m hoping to do the same thing I did previously-spend a few weeks writing and composing, and about a week actually recording.
I’m doing something a little different this time. It’ll still be electronic music, but it won’t be quite the same style. Stay tuned.
I’m teaching an introduction to programming course and I asked my friends and fellow developers to send me short 30-second clips of why they love what they do. Then I edited them all together. Here’s the video!