Tuesday, December 27, 2011

Approval!

My project proposal was approved by my teacher!!! woot woot!

Now only 150 more hours to get an A...

//END OF LINE

Monday, December 26, 2011

Happy Holidays!

Work has officially begun on my senior project. I'm getting more and more excited as I start actually making progress. I've have made a decision about what I'm going to be doing, designing and building a QR code reader for either the WebOS platform or iOS5. I'm leaning towards the WebOS, because I'm currently not really willing to pay money just to test my app out on my iPod touch. As I get further into the project I'll hopefully be posting some of my code and such, but I may just be too busy procrastinating to get anything posted before the end of the semester.

//END OF LINE

Sunday, December 18, 2011

End of the Year

The semester's over and now I have more free time than I know what to do with myself. The goal is to at least start working on my senior project. I'm planning on doing something with either reading QR codes, OCR, or a genetic algorithm. I have to do a little more research to turn in my proposal and then hopefully I'll be able to start the coding part and get things moving. Next semester is going to be crazy busy!

//END OF LINE

Wednesday, December 14, 2011

Moments

Don't you just love those moments when you look at an old program you wrote and just say, "what the HECK was I thinking!?!?!?!?". At least those moments prove one thing, that you've learned and matured... or just forgot why that way was the only way to make things work.

//END OF LINE

Monday, December 5, 2011

Finals Week

The end of the semester is here and finals week is next week...

So any projects I'm wanting to start are being put on hold so I can pass my 2 part algorithm final... It's the only one I'm really worried about, the other ones will be pieces of cake.

But I have been doing some small and simple programs to make my homework easier... or to just do the monotonous boring parts for me. Like my beginning math class I have to take. We had to go through specific verses of a book and see how many times specific words appeared... No way was I going to actually do that...

for (int i = 99; i >= 0; i--)
{
   counts[i] = 0;
   int found = -1;
   do
   {
      if(found != -1)
      {
         counts[i]++;
         verse.erase(found, words[i].length());
      }
      found = (int)verse.find(words[i], found + 1);
   }while(found != -1);
}

The c++ string class has some nice features but not quite up to the standard java features. If I had used a vector instead of an array I would have been able to not do any hardcoding on the for loop but since I've been working with arrays quite a bit recently it was just simpler to implement at that specific moment.

It has a little bit of hardcoding and it technically doesn't require the words to be sorted in alphabetically order but it works better if it does, so it takes care of the longer words first if some phrases have other phrases in them.

If I ever have to do an assignment like this again, I'll be way more efficient but throwing this program together probably took about as much time as if I had done the actual looking up each verse.

//END OF LINE