Archive for April, 2009

project journal 2

Between last night and tonight, I’ve put in between 7 and 8 hours. I’ve written the menus for cbhproj and opt2. Zip is working and SSN is almost working, just one more squirrely error to hammer out. I’ve written AuxDataMember, but not tested it yet. Thanks to Nathan for the suggestion of adding int main() {return 0;} to the classes to test.

project journal 1

I meant to put this up earlier since I did the actual coding on Saturday. I’ve written the SSN and ZipCode class declarations. I got a little confused about exactly how to write the function that allows for implicit conversion, so I haven’t done that part yet. I haven’t tested it, but most of the stuff is there. I’ll be working more on this later today.

Quantum math vs. Google

OK, so it’s not vs. Google just yet.

But quantum math has inspired a new way of searching on the web. The way internet keyword searches work now is that the search engine compares the frequency of your keywords in documents with their frequency in a standard body of text from many sources. Physicists at the University of Malaga in Spain came to the conclusion that keywords should be an intrinsic property of a document, and that one document need not be compared to others to have value in the search.

Pedro Carpena uses random matrix theory, a technique for studying disorder in quantum systems, to search without comparisons. The new method calculates the importance of words based on where they appear in a document, rather than how often. This works because as authors develop their ideas, they tend to use the same words in clusters before moving onto the next paragraph or page or idea.

Random matrix theory searches have not been compared to standard keyword searches yet. And they may never become mainstream, considering that Google is already so prevalent. As one observer says, “This is potentially very promising, but they’re wading into a crowded field.”

Class

I can hardly believe I’m saying this, but I’m actually looking forward to project time. Last night I dreamed about CBH and physics, only instead of 2 tests, we had 2 five-page papers due one after the other – and I hadn’t started either by Monday noon.

I’ve been trying to study for the midterm and I’ve found it more difficult than expected. When I just look at the material on paper, I think that it’s easy and I know it well enough. When I try to write a program…. First of all, I can’t bring myself to write trivial, useless programs just to practice. So I try to write useful ones, which don’t necessarily cover everything we need to know and which are actually pretty monstrous, especially the errors. I did manage to dig up most of my old quizzes to examine, so I hope that proves more fruitful.

Arrays and Strings

Arrays seem pretty simple, even the multidimensional ones. I know we didn’t need to look at those, but they looked interesting. Also, my physics group was at one time considering using arrays in our code, though we ended up using Python instead.

Char arrays seem straightforward as well, but I think the line between char arrays and C-style strings is a little blurry. My catalogue of differences so far: (1) C-style strings automatically include the terminating null character. (2) C-style strings have a custom print function. (3) C-style strings require #include <cstring>. (4) You can call strcpy() and strncpy() on C-style strings.