Monthly Archives: February 2010

AAAS Breakfast w/ Scientists

This morning I went to the AAAS breakfast with Rob, Liz, and Ramy. I can’t say enough good things about the experience! The venue was great, the food was good, and the students were awesome!

I was really impressed by the quality of their research. It seemed like a lot of the projects were very much real, useful research endeavors that demonstrate a wealth of potential. I found that I got a lot out of speaking with the students, and I did my best to give them worthwhile tips about college and research. (The tips about research basically amounted to: “do research. it is awesome. free trips!”)

More than anything I was surprised by how far along a lot of these students are, compared to what I was doing when I was in high school. I truly feel that they all have promising careers in science ahead of them should they continue on that path. I would highly recommend attending future breakfasts; you will get at least as much out of it as the students do! And besides, you can’t beat a free breakfast, right? Right?!

Side Project Progress

I’m finally making some headway on my customizable tables side project. I spent most of today working on the Javadoc stuff that I’m (still) stuck on with RTMg.mob, but eventually got fed up with it. Significantly, I found a relevant discussion of the problem on an Android Google Group and posted there. Hopefully that will turn up something useful to me in the next few days. Meanwhile, I’ll keep trying to figure out solutions to it myself and devote spare time to the customizable tables.

As for the side project, previously I had been doing some work to create and manage data structures to keep track of my custom UI. That turned out to be pretty difficult and kind of a nightmare to manage. I went around in circles trying to make my management scheme less horrible before I decided to try an orthogonal approach. If I could stick custom UI into a ListView, Android would manage all of the references to my UI elements for me. Additionally, it would give me an easily regulated vertical layout to push data into. This just happens to be an ideal way to format my tables.

I found a couple of approaches to create ListViews with custom Views as their contents. Of course, the problem with these approaches is that they again assume that I know what I want at compile time. When this is known, the xml resources for creating layouts are absolutely stellar at making layout creation easy. Unfortunately, by definition I can’t know this, nor can I have my program write xml for Android at run-time. My solution (so far) is to take the second example I found and go hack, hack, hack on it.

Specifically, I mimicked the row.xml layout by creating an hierarchy of View objects in the java code, changed all of the references to point to my objects instead of the xml, and then deleted the row.xml entirely. I was fortunate enough to have this not only compile, but actually just work the first time I ran it. For you non-computer scientists out there, that’s the programming equivalent of hitting the jackpot. It only happens every now and then to me (if I’m working on something that I don’t already know how to do) and it is always a really nice feeling.

The next step in moving this project forward is to come up with a clever, reasonable scheme for programmatically generating these types of layouts at runtime. I already know that I’ll be using an SQL database which I’m cheating using JSON shenanigans. The piece that is still missing is to parse that JSON into meaningful layout data. I also have to write the JSON based on user input specs, but these are two halves of the same problem. Essentially I need to create a JSON ‘code’ for describing UI layouts. Overall, I definitely must admit that this is the craziest thing I’ve ever tried to make Android do. As I was describing the lengths to which I’ve gone to create this weird little app, I realized that it is a lot of unconventional, weird code. This leads me to believe that the project will either end up crashing and burning completely, or becoming something cool and unique. Lets hope for the latter! 🙂

Edit: I thought for a minute I was being a dummy for using ListView instead of TableView, but it turns out that I may not be. ListView allows me to easily hook my UI up to my database, which is a lot more convenient than managing the queries myself. I had read that ListView did not allow for the items contained within to be clicked on, but this is definitely not the case (I just tested it). Furthermore, each row in a ListView is itself clickable and can be assigned an OnClickListener.

The new face of RTMg

Many in the lab are probably already aware of this, but I realized that a lot of it happened quietly and informally in conversations between Rob, Daniel, and myself.

Given the push towards releasing information to the public about RTMg, OS Metagenomics, and Mobile Metagenomics, we sat down to talk about a few things. First, we wanted a cohesive name for all the junk I just typed. We settled on keeping the RTMg name, but branching it out to be an umbrella for all three services as follows:

  • RTMg -> RTMg.web
  • MM -> RTMg.mob
  • OS M -> RTMg.os

Furthermore, given that Daniel and Rob were contacted by a magazine editor to do a small press release about the project, we wanted to have a nice pretty place for people to check out the RTMg applications suite, and check for updates. In a flurry of activity, I have created such a place.

RTMg now lives here!

If you have any suggestions as to things I should add to the site, let me know. I’ll do my best to add them!

(a big thanks goes out to the creators of the website template I used – Arcsin. Check them out if you ever need free website templates!)

A fun new side project

Given that I’m in the lab full-time lately, and most everyone else has a lot of other commitments now due to the semester having started, I’ve found myself with a bit of spare worktime. I wanted to do something productive while I wait for an opportunity to collaborate with Rob and Daniel on making all of the RTMg User Interfaces cohesive. I’ve had an idea in mind for an app that I’d like that involves my dorky tabletop gaming hobbies. As I was thinking about that app after work one day, I realized that it is actually a great opportunity to develop a potentially useful custom database technique for Android. Without going into detail about my own personal interests in having this sort of capability, I thought I’d post about what I’m hoping to accomplish. Check it out behind the read more!

Continue reading