09.05.07
Homework #1, A Refresher
I sat down tonight to work on my first programming assignment for a class this year. I was excited merely to be coding again. This assignment was a bit of a refresher of C and some of its oddities (and pains due to string handling). It was nice to have something manageable and rather non-time consuming to kick things off. As I wrote I could tell how rusty I was, not recalling the arguments for some standard file manipulation functions. I rewrote one function two or three times. All would work, but in my mind I kept changing how I thought the overall implementation should go. In the end I got exactly what I wanted, and back when I was heavy into programming I’m sure I could have done it exactly the same or better in less time and less rewriting since I wouldn’t have to change my implementation ideas several times.
The assignment is, basically, to create a minidatabase system using files. You use the given program to generate an index file of names and file offsets of the database so you can lookup phone numbers. My program scans the index file to match the names to get the offset to lookup the phone number for display.
Anywho, you can check the assignment at http://cns2.uni.edu/~okane/114/#asgn1, supposing the link is still good.
My code, as always, is posted. You can view it at http://ew.xidus.net/download/dbms/1/