Thursday, April 30, 2009

Old houses


So I just moved into a summer home on university. For the summer. It's pretty old, but it has character. Tonight I hung my clothes up in the closet and noticed that this kind of house was the kind of house where you might hear the following dialogue:

Is this closet rod strong enough to hold my heavy suits up?

Yes, it is actually the pipe that connects the water for this house to the main city line. It's pretty strong.

Monday, April 20, 2009

IPTC

The IPTC is the International Press Telecommunications Council. They basically don't don anything useful, but "develop and maintain technical standards" (according to the wikipedia article http://en.wikipedia.org/wiki/International_Press_Telecommunications_Council. However, I have had a good experience which has helped me develop a greater respect for people who don't really do anything in life, but to sit and make regulations. I'm grateful to the IPTC because the IPTC set up a platform for adding metadata to certain types of files. Like JPEGs and stuff.

Why this is important: I'm graduating from BYU, and I'll have to relinquish this mac. However, I would still like my files. Especially all of the comments I have made on photos in my photo albums. Unfortunately, I've been using Canon's software to transfer photos to my laptop. (This is incredibly clunky, and I'd avoid using it at all costs.. The first thing wrong with it is that the main import program is called "Camera Window", but when I try to launch it using Spotlight, I can find it, and press enter, then get the message: "This program cannot be executed directly".. man.. good thing I let it install shortcuts to my application bar thingie and didn't delete them like I usually do, or I wouldn't be able to start importing pictures ever.) I have also been using the companion Canon ImageBrowser (clunky too.. undo/redo doesn't work for many of the features, and the category things are all messed up) to input all of my captions for the pictures from my internship in Germany, as well as all the rest of the pictures I have taken in my life.


Naturally, it would be the pits to loose all of these captions, so I wrote Canon, asking how to transfer comments from one computer to the other, basically asking if there was a database file somewhere, or something like that. A polite foreign help person responded by saying that that was impossible. And that if I had any questions, I should reply to the email. I replied, and asked to be put in contact with an ImageBrowser specialist. The polite foreign help person's manager who was also polite and foreign responded, saying that the first polite foreign help person was an authority on ImageBrowser. Bleh. Partly due to finals, I let it be, meaning to come back to it later. Needless to say, I fished the email from Canon out of my junk mail, and emailed them back a scathing comment about their tech support quality that claimed that they were experts in something that they were not, and gave false technical responses... I couldn't prove them wrong with anything except for my gut. Which is usually right.

And now I'm back. Looking at the new Dell Studio XPS 13s, and wishing I knew how to transfer all of my comments for my pictures to another computer.(Lest you think this is a trivial task, I have taken over 4500 pictures in less than a year, with most of them having comments.)

I started out with a simple test proposed by my father.. make a change on one of the comments, then use find the find files that were modified in the last minute. ("find . -mmin -1"). I discovered that the JPEG picture file itself was being modified. That was nice. The diff tool usually doesn't compare binary files, but I found out that the -a flag forces a line-by-line comparison of files. I did a diff on a before copy of the picture, and the after copy of the picture, and discovered that amidst the binary junk, the comments were in the JPEG files themselves.

See, polite foreign canon help person? My gut is right. You are wrong.

So I wrote a little comment extractor in perl. But it couldn't quite weed out all of the binary. And took quite a while (.5 seconds... but for 4000 pictures..) to complete. I looked on line for perl tools to extract metadata from JPEGs, and found a perl module here: http://search.cpan.org/~jcarter/Image-IPTCInfo-1.9/IPTCInfo.pm that says it will let me get at the comment data. (Unfortunately, I am having troubles enabling the root account on my mac... stupid macs. Or perhaps I just don't know what I am doing. Which is probably the case.)

This perl module relies on the standards set up by the IPTC. So I guess they do have a use. And I'm glad they set up that standard. Bless their hearts.

So, I'm on my way to not only being able to transfer pictures and comments off of this mac, but also to creating my own picture comment reference library, where I create a text file of all of the comments, and just search through that to find pictures of "berlin" or "university" or "mouse" or "paris" or whatever. However, it's too early in the morning, so I'll do this later.

And so it stands:
Polite foreign help person: 0
My gut: 1
IPTC: 1 assist

Tuesday, April 14, 2009

FAT

I made it. It's the last day of school for the winter semester. I feel like I have given it my best, although I didn't accomplish everything I probably should have. I ended up finishing everything except for this FAT lab for my Operating Systems 345 class. We ran out of time. At quarter-to midnight, we were tired of FAT, so we wrote up the mandatory implementation description. It went like this:


My Brother and I's Implementation of
FAT File System
====================================================================

1) IMPLEMENTATION
We worked hard to complete the early stages of the project, and completed methods for detecting valid/invalid DOS file names, traversing file directories (and displaying the correct prompt), and correctly displaying entries in the current directory while using a mask.
We were also able to start on the implementation of defining files, and successfully implemented a one-file define, in which the file will be defined with the correct date and time stamp, including the appropriate cluster and size. Unfortunately, this implementation has several limitations as compared to a full-blown FAT file system, as discussed in the LIMITATIONS section below.

2) TESTING
We used unit tests to test the file name verification method, as well as the insert and extract methods. These functions were tested thoroughly and appear to be very robust.
We also tested defining files with invalid names, and could successfully detect and throw the appropriate error for bad file names.
We were capable of listing directory items with and without a filter, as well as navigating a directory tree. We tested these functions with the test cases outlined on the project specifications.

3) LIMITATIONS
Regrettably, the time expired before we were able to form a complete implementation. We think this may have had a direct impact on our inability to define more than one file. Had more time been given, we would have been able to complete more of the sections. Currently, we give no promises for any functions other than a rudimentary define file task and the fully-implemented cd and dir commmands.



Cordially yours,
The Authors

Tuesday, April 7, 2009

Class Reviews

I wrote this.. and liked it..

The mercy of Dr. M was a breath of fresh air in the midst of a crowd of CS professors who believe they are predestined to promote grade deflation (there's no such thing as predestination... only foreordination).

That's how I really feel.. I'm still two labs behind, and we have a week left of school. I hope I will be able to finish.

Books

I felt quite out of place as I walked through the library today. If I had only thought to wear a pastel polo tucked into a white pair of pants held up by a skinny woven belt and worn my sweater tied around my neck, I would have felt more at ease as I walked through the Harold B. Lee library this afternoon with 5 books in my hands. If I had remembered my uniform, the 90s would have taken me up into its bosom in a chariot of fire.

However, my identity discovery has been marked by a firm denial of any association with the pre-wikipedian era (PWE). There are those who deny any fact just because it comes from wikipedia. I am not one of those closed-minded knowledge-haters. While I do believe that everything needs to be backed up by facts, wikipedia is a good place to get a broad overview of a subject. More importantly, I believe that in our quest for knowledge, we should not believe everything we hear, and should learn to filter out questionable claims. I honestly believe that those who hate on wikipedia are those who are unable to use logic and previous knowledge to detect truth in their own quests for knowledge.

Anyway, I now embark on the first major research paper of my post-mission college career. 15 pages on "The Affect of War on Medical Research." I hope it goes well. It's due tomorrow. But I have my Books. And I have Wikipedia.