Week 1: May 28 - June 3
New city, new people, and new project. Isn't it exciting? I was waiting for this after the final examination weeks! During my first week of work I settled in for the summer, made a working environment, and decided what I exactly will do.
I moved in the dorm, which is close to the campus. It is a little old but large and clean enough room for me.
To be ready to work took me a little time. I needed to set up the computer, keyboard, install the OS, get account of the Internet, and get a key of the lab building for the weekend.
I met my mentor Prof. Gaurav on Thursday Jun 1. I introduced myself and explained the projects I did before. What I was excited was that day before he met the Prof. Tom Henderson whom I worked with last summer. Small world! Prof. Gaurav had some plans for me. We decided to see at the meeting on Friday June 2 with Networked Aquatic Microbial Observing System (NAMOS) project members. You can see them at http://www-robotics.usc.edu/~namos/people.html. Also Prof. Gaurav asked me to read the NAMOS website to get an idea. I read the papers at the web sites, there were a lot of work had already done. It was impressive. On Friday June 2, we had a meeting. It was a lunchtime so Prof. Gaurav bought us pizza. It was nice to meet new people with pizza :). At the meeting, it sounded I will make a simple graphical user interface (GUI) for that project.
Week 2: June 4 - June 10
Now time to work hard! This week I started the code for GUI from understanding of the socket programming. The socket programming is for the network consisting of server and client. This can be applied for our buoys and the laptop computer relationship. I made a little server and client system with sockets in Java. Amit and Bin explained the basic requirements. They are graduate students and work on NAMOS project to develop the hardware and software. The requirements are: to enable user to set the ID of buoy, to get the connection, to select the data type (temperature or fluorescent), to select the period of data, and show the graph of these data. By the middle of this week, I made a GUI with a simple server and client. But they changed their idea to use the GUI that is already build by Arvind in C#. He is also graduate student and work on NAMOS project. His GUI has a lot of useful functions. For example, it corresponds the GPS' of each buoys and shows buoys' position. To add the functions on his GUI, we installed .NET 2.0, winRAR 3.6, XWin32, EditPlus, and DirectX to the computer I use. These are to develop C#, to extract rar files (the code is very huge to transfer, so we needed it), to connect the windows computer to Linux, to write the code remotely, and to run displaying applications. Also we set the account for Linux. Arvind demonstrated how to communicate using GUI with a simple example code. I made an algorithm that goes back to the data file till the user input period, and pick the fix samples of data for user.
Week 3: June 11 - June 17
I finished the functions that enable to user to get connection, set the period of time, and show the picked data at the command prompt. Also I debugged and fixed the server code. To show the graph of the data, we downloaded the gnuplot. The gnuplot is a free software to draw graph easily. I spend hard time to find the command of C# that calls the other executable file such that gnuplot.
Week 4: June 18 - June 24
Go to Lake with teammates!! Sounds fun? Yes, it was :D. I finished the function that allows user to choose the buoy before we leaving. We went to the lake of the James Reserve from June 19 to June 23. We set up the buoys and boats and test their functions. Also Beth and Stefanie, Beth is a technician and Stefanie is a postdoctoral investigator and their major is Marine Biology, sampled the water and filtered them for their experiments. I tested my functions, but the sample from buoy was collapsed. I realized that the size of the sample was bigger than I used at the simulation. I had to change the size. Maybe I should have use the dynamic memory allocation for this problem. Although I changed the size of the sample, it sent me only one sample. I wanted to test more but teammates wanted to use that computer so I couldn't do so far. Also the message at the command line was important for debug, but the battery of the computer was gone and it was lost. I'm planning to use the buoy at the lab to test the communication dynamically, not only at the simulation.
By the way, Carl, a technician of Computer Science, taught me the web site of the James Reserve at http://www.jamesreserve.edu. He showed me the live picture of the nests of birds. There are five or six chicks for each of nests. I could see sometime parent bird feeds them. You can check this out from the left side of menu: click "WEBCAM OBSERVATORY".
Week 5: June 25 - July 1
When I got the lab, I started to check what was wrong with my code at the lake... First, I changed the code to make the size of the data bigger so that we could send more data without error. I estimated the size from the real data from the buoy, that was different from simulation :(. Next, I tested huge amount of data with fixed resolution. Then I found the limitation of the amount of the data transfer of our server and client system. So I added the function to change the resolution if the abount of data is too much, the program can prompt the user to change the resolution. Third, I debugged, as always!
This week, we had a meeting. From Binz' plot, we could see very interesting result. Please see them at http://www-robotics.usc.edu/~namos/data/jr_jun_06/. Prof. David Caron said that when they put the bucket around the algae sensor, then the number of the algae didn't change as much as without the bucket. From this fact, I thought I could add the function that we can choose the range of the data. Because of that we can see the high resolution at the small specified range.
Week 6: July 2 - July 8
I cleaned up the code. I got stuck on some problems.
And I tried to send more than one packet. But it was difficult to do, maybe I needed to more research about packet programming in C#.
Also I researched how to call the gnuplot, make it plot, and save that plot as a picture file. I could learn the basic usage of the gnuplot. The advantages of the gnuplot were that it is free, we can let it to do consequence commands, and change the output from a terminal to the file. I made a command file to plot and save as a picture file.
I faced the difficulty to call another executable file from C# with command which the excutable file will take care of. I posted the message at the forums. More than 500 people looked at my posted message and several of them gave me suggestions, but these suggestions didn't work... Also I emailed the gnuplot project mailing list about the command that have to work at the command line and make gnuplot to read a command file. Because of that if I could know that command, I definitely could use it when I would like to call gnuplot in C#. But the only email I got criticized me that I proved myself that my example of my email doesn't work. Needless to say, I knew my example doesn't work...
Week 7: July 9 - July 15
This week was the most wonderful week!! See below...
I tried to find the C interface for gnuplot from an advice from cowoker Marin & Binz. According to them, after I could find the C interface for gnuplot, then I could implement it as C# interface. I started researching.
In parallel with that, I wrote the code for the packets communication. Consequently, I changed the specs of the communication for more than one packet transformation. But the client only got the last packet.
July 11, I got email. It was from Brazil, writer is Roberto Baginski. He was on the gnuplot project mailing list. He wrote
To launch a batch session of gnuplot using a command file 'command.gp' from a command prompt So, that was everything. In C#, I just called
Process.Start("wgnuplot.exe", "command.gp"); then the code called the gnuplot, let it plot, and let it save that plot as a picture. I feedbacked the result for both the forum and the mailing list for an software developer like me.
I also tried to show the picture at the GUI. It must be updated every translation of data from the buoy to the our laptop. While the picture is on the GUI, the program has to be able to access it and overwrite it. Most of information was on the web :).
At this point, I could say I made the basic structure of the project.
Week 8: July 16 - July 22
I added a few functions on the code. These are: too small input error check, instruction guide message for user, set the default picture, one click connection/disconnection, user selectable resolution input bar, scale selection depends on the time range, lock too huge range of input time, and nice legends of the graph.
Week 9: July 23 - July 29
I met Beth and did demo. Unfortunately, the linux machine that was working as a simulation server didn't work at that time. So I only show her the GUI without data translation. She suggested that the time input could be minutes instead of seconds. Also she wanted to make sure the unit of data from buoy. I asked her if the input will be the exact range that could specified the particular time range, does it helpful or not. This idea was in my mind from the meeting. She was positive. So I started to work on it.
To fix the linux machine, I installed the new linux OS. Also the compiler was installed.
Week 10: July 30 - August 5
This is the last week.... :(. I felt sad to say good bye to all of my coworkers. Also I was busy to finish this project. There were something to improve my GUI!!
As Beth suggested, I changed the time input as minutes, made sure the unit of the data is what they want. I finished the function that its inputs are specified the range of time. For example, user can set the starting time as 8/4/2006 12:4:52 AM and the ending time as 8/5/2006 8:14:22 PM. So user can see that range of data with high resolution. Since the time stamp of the buoy is started on 1970 and unit is second, I made the function to calculate how many seconds when I know the input. It is funny to think about leap year while programming...
Binz helped to set up the buoy to test. I transfered the files from my computer to the Linux machine, and then the Windows machine by using SFPT client program. The Linux machine is to connect and download server excutable to the buoy. And the Windows machine is for user who can use the GUI. I had downloaded the server excutable to the buoy. Then I ran the GUI, but the pictures were not overwritten. I ended up to check with Arbind, and found one line of code didn't work. It was very wierd thing since that is a built-in function of C#.
Next day, that was on Friday August 4, I came to the lab early morning, and again transfer files by using flash memory drive. Then it worked!! The reason of the problem yesterday might be that I ignored one file transfer failure. That file looked the information file of the .NET project, so I didn't care too much (but I should have).
Anyway, I was so happy to see it works!!
I did demo with Amit and he saved these "all" files.