Sunday, April 30, 2006

Task 2 week 2: glacial progress

The progress seems glacial. And yet what I learned how to do this week will be crucial. I learned how to have two different programs coordinate their timing with each other. Specifically I wrote a little thing that turns on my pitch detector which then goes about producing a note. Immediately after that note is stored control of the CPU is handed over to a second program that uses the value of that note. The next step is to improve on that second program so that it will paint a picture that will alert the user to frequency of the pitch being detected.

So back on March first I went to a meeting with Denis. I felt like there were two babies that needed to be born. The first I felt like I was in as good a position as anyone in the world to bring to fruition. The second I knew I needed to hand it off to someone qualified. Denis was nervous about the first and excited about the second. So we started learning to program. It's been fun.

The first baby still looks exciting. Am I crazy to be considering twins?

Wednesday, April 26, 2006

Merril J. Bateman on Diligence

I wish to illustrate the process of acquiring truth with the mind and the heart and then suggest that living faithfully and serving with all one's heart, might, mind, and strength are really functions of steadily enduring, of doing one's best each day, in contrast to great bursts of energy that one tries to prolong. (Merril J. Bateman pg 16 of the April 2006 Ensign)


Sunday, April 23, 2006

Task 2 week 1

Yesterday afternoon it was Kate first. Elsie followed, hot on her tail. Then Kate again. Then it was mayhem between the three girls. The count by the end of the day was Kate 4, Abigail 4, and Elsie 6. Timmy didn't start in until this morning. This morning in our bed he started vomiting too. I was teaching so Gina stayed home while I went to church. I think that Kate and Abby are pretty much over everything now but Elsie is still a bit iffy.

That was (I hope past tense is appropriate!) probably the most exciting adventure of the week. I got the yard tilled and helped my PhD advisor move. Elsie continued to progress toward walking. Kate decided the other morning that she could read the Book of Mormon so we let her tackle one of the verses each scripture study session. I'm pretty impressed with what she is doing.

Anyway, to the point: tangible progress was nil. We made our next goal and have started to hack away. I learned about threads and producer/consumer pairs and about action events and such but I haven't yet implemented anything.

I've been having trouble with mental discipline. Rather than thinking about the technical challenges that we face I keep finding myself thinking about the marketing challenges that we face. I find the problem a fascinating one: how do we reach and educate thousands of people? Neither of us has time to go and sell to one person at a time for too long. (Say that we want to hire a couple of people. Say the labor is neither expensive nor cheap. Then we have to come up with at least $8000 per month just to pay for labor. Say we sold at the $100 a pop that one of the priests in our priests quorum thought that the simplest version of our pitch detector would sell for. If 50% of the revenue becomes that salary we would require 160 successful sales per month. But we want to hire developers, not full time salesmen!) Anyway, we need to figure out a way to get some leverage. I believe there are a lot of ways. We just have to find them. I think I will start listing marketing ideas as they come so that they don't get lost. Perhaps I'll try for 100 for old time's sake.

Anyway, this week I think my task will be to implement what I've been learning. It is time to begin playing around in GUI land. The dream is this: a working (meaning live pitch updates) GUI by Saturday.

Thursday, April 20, 2006

By June 1st

I think I read the definition in Hyrum Smith's book. Not sure though: "a goal is a dream with a deadline."

Anyway, here is the dream and the deadline:

  • We want a fully operational GUI-pitch detector combo that is nice enough that we won't be ashamed to distribute it.
  • We want to put it in a format where a non-expert can install it on their windows PC with no external help.
  • We want to accomplish these things by June 1st 2006.

After that Denis leaves for Russia for a month or so. I will be working in between Albuquerque and Los Alamos so we'll see what gets done.

Saturday, April 15, 2006

Progress Report 7: did we make it?

This month and 15 has flown by. But it would have gone by with or without the goal.

In this post I get to judge whether or not the goal was achieved.

Here is the goal as stated on March 1st: a distributable working prototype of a simple system available by April 15th.

First, could we distribute what we have done? Technically yes. We can send it out and anyone can run it.

Second, does it work? Again, technically yes: What we have is a pitch detector that takes in sound and displays integers 1 through 12 depending on the note you sing or play. It works surprisingly reliably though I believe that we can do more optimizing. And it works in real time. It is actually pretty fun to sing and watch the integers change by 2 if you move by a whole note or by one if you move by a half note. And it is fun to see the note that you sing.

Third, is it a simple system? Definitely.

So actually, I think that I ought to be able to look at what we have done and feel pretty proud. Intellectually I know that it was a real challenge and that we rose to it and learned a ton. And I am proud. I'm actually amazed that we wrote a working program in this foreign language that was Java. And the physics behind pitch detection turned out to be a lot more interesting and complex than I had thought. But we did it.

However: while we technically met the goal and did a lot of good work, the spirit of the goal was not met. I didn't just want the program to be distributable. I wanted it to be something we would be proud to distribute. We're not there yet. Denis succeeded in putting together a simple little GUI that start a method and read in a note and display it. I succeeded in making a simple pitch detector that can take input from a sound card and process that input and end up with musical notes. But when we put it together something didn't work. The GUI wouldn't refresh the field in which it was supposed to display the note until the loop providing new notes was over. Even if we fed it info inside the loop and even if we tried to force it to refresh (using commands suggested by generous Java Guru Sam Baird). So what is the current real time feedback? It is commandline text output. Not too impressive.

I think that I have a lead on why it isn't working and what to do about it. This week's project will be to learn all that I can about threads and events and how different objects can talk to, listen to, and interrupt each other. Maybe we can figure it all out.

Bart (thanks Bart, you're the only person that I know actually reads the blog regularly. Your feedback helps give this thing meaning.), in a comment appended to my last blog, asked what next. Now that we have started this project I want to complete it. To me that means 2 things:
  1. I hope to see this progress to the point where we can be proud of it as a quality addition to this world. I see quality as being measured by three metrics: robustness, "funness", and depth. Robustness means that it needs to work well and under a variety of circumstances. It needs to become dependable. Funness means that you will want to spend time using the program because you like using it. For pure pleasure as well as for any higher reasons. Depth means that you can make it a tool for your own use and extend it for the use of others. It means that users can add value to the product over time so that in the end the product has more value than we could have given it alone.
  2. I want to know that a million families have used this program. It is really one of those things that I can't understand not having. We just need to make it known and accessible.

I recognize that those are ambitious goals. I believe they are achievable. But I don't know it. That wedge between belief and knowledge is part of what is going to make this a fascinating ride.

Finally, let me acknowledge my true gratitude to Gina. The pitch detector did not get completed in the target one hour per day. Not even close over this last week. She has been a remarkable support and friend through all this. Thank you Gina. Thank you so much.

Thanks for reading.

Doug

The pitch detector works!

At least for my own and Gina's voices. Yeehaw!

Monday, April 10, 2006

Progress Report 6: One week left

First off, my apologies to any reader who hoped for a weekend entry. Our home Internet is temporarily out while we wait for a new modem. So I will be posting this tomorrow, that is April 10th Monday morning.

Elsie's Birthday is today! One year old already. Wow, has that passed fast! What a cute little toddler is coming to replace our infant of yesteryear! I ought to figure out how to post photos to this sight. She is a real cutie.

This was a neat week. I was in a meeting for most of the day on Wednesday, Thursday, and Friday. It seemed pretty much like an ordinary meeting. But when I stepped back and looked at what I was actually doing I couldn't help but be amazed. I was in a meeting between 12 world class scientists (they were the world class scientists and I was a welcomed observer), including a Nobel Prize physicist. And they were all sitting around brainstorming on the creation of a working, scalable quantum computer using neutral atoms and lasers. I pretty much just observed and learned. The next day I was in our yard shoveling manure. Br. Roberts from our ward (Vice President of the New Mexico Appaloosa Club or something like that and a former Navy Seal) and his brother-in-law dumped a truck load of manure onto a tarp in our front yard. I took a couple dozens of wheelbarrows full into our back yard.

The thing is that whether I was watching plans be drawn for a quantum computer or shoveling manure, when I didn't have to be thinking of the work at hand I was thinking of how to get up a skeleton program by the 15th of April. On Wednesday I found a computationally cheap (I hope) way to convert the array of little endian bytes into shorts. On Thursday I found a nice pitch detection algorithm that looks like it is easily fast enough to use real time. On Friday Denis agreed to write a class that will read in a value in Hz, interpret it as a note on the musical scale, and give an appropriate visual cue. He hopes to be done this coming Thursday. On Saturday I wrote a simple class that obtains audio from a microphone and converts it into an array of shorts. Tomorrow (Monday) I hope to perfect that class and implement the pitch detector. So I hope to be ready come Thursday to meet with Denis and put everything together. Bottom line, I think we are going to get it done by this Saturday. And I think that the meeting of the goal will be a miracle, a gift from a loving God. And I think that miracles happen all the time.

Have a great week.

Doug

Sunday, April 02, 2006

Progress Report 5: General Conference, work, progress report, teamwork

General Conference was excellent but I couldn't process it all. I felt like I was watching a shower of pearls pass by and I could only catch one here and one there. I would like to establish a routine of review and go through all the talks a few times each to see what I can glean.

A normal man works 8 hours or more a day most of the days of his grown life. And we're taught that it was ordained to be so from the beginning. What that means to me is that work has a place in fulfilling our purpose here on earth and that it can be a teaching experience. So when I approach work and school I want to approach them with an attitude of one who is learning spiritually as well as in other ways. And not just learning like the mind learns but also learning as muscles learn under stress. Not just spiritual learning but spiritual exercise and training as well.

This idea is part of a broader concept, the concept that we are here to learn and to become more like our God and Father. I think this amazing concept can inform our decisions about how we handle our attention, talents, our finances, and to what we choose to love. I guess it is my hope that as I participate in one exciting challenge after another that I might keep my heart and mind aware of the larger picture. I hope to treat this life as a spiritual quest for progress as much as an adventure. Time is so short here on the earth. There is so much to be done. I can't afford to lose my way by taking my heart off of the most important things, off of God and off of the well being of people around me.

So where do I hope to put my attention over the next months? I hope to put it on learning. On coming to understand and apply the great truths that are offered me everyday but that take so much effort to really take advantage of. I hope to repent every day. Because, again, life is short. It's too short to procrastinate changes for the better until later. I have to make them now.

This week I finally got to look at raw data. It was exciting. I had to learn a bit about classes and objects and Java syntax to do it and I had to learn some specifics about the Java sound API as well. But I saw the data. Unfortunately it was completely unintelligible: it was an array of bytes taken directly from the audiostream entering the computer from my microphone (after ADC of course). The bytes were displayed not as ones and zeros but as crazy characters from I don't know how many different alphabets. But at least I got to the bytes! Now I have to figure out how to turn them into a sequence of numbers that can be analyzed and how to handle them in the stream in such a manner that I won't miss any data while analyzing it. April 15th looms. It will take a miracle to complete a working pitch detector by then. I do, of course, believe in miracles. So maybe we should try for one. I am unsure. I want to but I am scared to lay it on the line. And I want to keep priorities straight. I don't want the miracle coming through giving up time reserved for things more central to my life . . .

Teamwork. I think that most people would agree that I am pretty independent and introverted. I like it that way. I like to be very much in control of my life, opportunities and activities and that kind of control can be more difficult to maintain when you work with other people. And yet, the best thing that I have ever done, which is my family, is very much a team enterprise. And I love it.

So here is a question: what is neater? A) you stay independent and get nothing accomplished of any lasting merit, B) you stay independent and accomplish something of lasting merit, C) you work with many others and get nothing accomplished, or D) you work with many others and accomplish something of lasting merit. (Note: I really don't know where the question mark belongs in a question like this! If you know please tell me how I should do it.) What I have come to realize is that I think that option D is by far the neatest. Even more surprising is that I am beginning to think that it is about sixes whether B or C is a more attractive option. The thing is this: if you accomplish something on your own, good for you. If you work with others, good for you and them. More people benefit. So what I think I am learning is that introverted or no, I think that working with a whole team devoted to a goal is neater than working alone. But how shall we go about recruiting the best bunch of free workers we can get?