Sunday, October 25, 2009

OOSE: Unified Process

Today I learned about the Unified Process (UP) strategy in order to design our software using Object Oriented Principles:


What is UP?


UP is developed by at Rational Software (IBM). It is highly iterative and incremental process... i.e. the software is not released in one big bang at the end of the project; instead, it is developed and released in pieces (prototypes, partial releases, beta, etc.)

This method is lightweight compared to the waterfall model in software engineering with respect to commitment to phases and documentation. The water fall model require heavy documentation of each phase before proceeding... UP is an example of Agile methods.

Life Cycle of UP
- Inception: "Daydreaming"
- Elaboration: "Design/Details"
- Construction: "Do it"
- Transition: "Deploy it"

During inception, we try to create a vision and scope document at a high level of abstraction.

In elaboration, we collect more detailed requirements and do high-level analysis and design. i.e. check for risks, such as technological risks (do we have the technology to do the job?), skill risks (do we have the skills?)... In this phase, we develop the use cases!

During the construction, we build production-quality software in many increments, tested and integrated each satisfying a subset of the requirements of the project.

Finally, during the transition phase, the activities include beta testing, performance tuning (optimization) and user training.

UP Artifacts

What are the products of the UP? The UP describes work activities, which result in "work products" called "artifacts"... for example:
- vision, scope and business case descriptions
- use cases
- UML diagrams
- Source Code
- Web graphics
- database schema

The Process Workflows

- Requirement analysis
- Design: architecture and class levels
- Implementation
- Testing
- Management

Thursday, September 10, 2009

AWC files

According to the "Actical Instruction Manual", the AWC file is defined as:

This is an ASCII text file that contains the raw activity data as well as containing subject information. It can be loaded from the File menu in the Main, Actogram, and Energy Expenditure windows.

Line 1: Subject's Identity (String, e.g. Abbass)
Line 2: Start Date (DAY-MONTH-YEAR, e.g. 24-Jul-2009)
Line 3 : Start Time (HH:MM, e.g. 14:25)
Line 4 : Epoch Rate (1 =15s, 2=30s, 4=1min)
Line 5 : Age (Integer, e.g., 27)
Line 6 : Device Serial Number (String, e.g. B107496)
Line 7 : Gender (Character, e.g. M)
Line 8 : Height in cm's (Float, e.g. 179.5)
Line 9 : Weight in Kg's (Float, e.g. 72)
Line 10 : ignore - only for technical support use
Line 11 : Battery life remaining in days (e.g. 0012)


In regards to the data after the header it can appear in 2 formats:

Step Data : (Activity Counts) , (Steps)(Marker) e.g., (834) , (31.0M)
Non-Step Data : (Activity Counts)(Marker) e.g. (834M)

Tuesday, September 8, 2009

Spike Graph

In order to create a similar graph to the "spike" state of art graph (using R) in Juergen's paper, I had to do the following things.

I had to read the first three chapters of a book titled "R Graphics" by Paul Murrell. This book is a bible for those who are interested in creating "creative" graphics using R.

After that, I started recreating the graph. It was not an easy task to figure out how to make more than 5 plots to be in one column. the default "mfraw"/ "mfcol" would never do the job if you have more than 5 plots. You have to go deep in R graphics and play with parameters related to margins/figures/ plots.

I used the data collected by the first actigraph from bill's old data. the following is a snapshot of what i have done so far. notice that the dates on the right side are static labels. I still did not figure our how to display dates on R plots:

Friday, July 24, 2009

Friday July 24, 2009

Finally, I was able to solve the problem i was stuck at... It is because of cats!! Yes, I have to wrap my HTML statements inside Dojo with the "cat" function. This is only done where we have conditional statements. Now I should be able to proceed my work, and come up with a working prototype to show it to the people in Washington!

Tuesday, July 21, 2009

July 21, 2009

Lately, I have been stuck on one issue. I am trying to have conditional statements in dojo but inside these conditional statements I am trying to run R code to create a certain graph. In other words, I want to have that is we choose a certain plot to show, then R should create this R plot, and then Dojo will create the HTML output to post this picture. I am have been experiencing failure since last Friday.. During the weekend I did not work on the project... so we can say that the last three days were failure :(
I am so hoping that by tomorrow this problem will be solved.

By the way, if this problem is solved, then everything should go really smooth... i have learned a lot about Dojo by now, and the widgets in it are extremely useful for our projects. I will talk about them in details in a later post.

Thursday, July 16, 2009

July 16, 2009

I haven't been blogging for the last couple of days. Today, I will write down what I have been doing so far since the beginning of the week.

I have been reshaping the design of our AVAD website. I split it into two main parts in the form of two tabs. One for data analysis and the other for data visualization. I got stuck on the check box coding part in Dojo. I was able to create check boxes, but I have no idea why images of plots are not displayed when i check their corresponding boxes. notice that the images are getting created dynamically and stored on the disk, but so far i am not able to write a conditional statement (if else) to be able to display the appropriate image. Sounds easy, but it it not! and honestly this is driving me crazy. I think I am gonna buy a dojo book, but i am still researching...

I am hoping to solve this problem by tomorrow. I want to at least show Juergen this capability.

Another thing that i have done, was the filter/search part... it is not perfect yet, but it is okay. i was also able to do sorting of the data after displaying it on the web dynamically... all you have to do is click on the column header to sort! check the attached snapshot (check the bottom of the snapshot!).


Monday, July 13, 2009

Monday July 13, 2009

After learning about how to embed Dojo in Rpad and consequently R, I decided to go further and learn about Dojo, and what could be done with Dojo.

Dojo is based on Javascript and HTML. It is an open source software that provide many components that I will list later to develop some rich content internet applications. Rich content web applications means that we should be able to develop DYNAMIC web applications. According to Dojo's website, their toolkit "puts life" in web applications and can turn them into highly interactive ones, through its widgets, utilities and ajax libraries.

In Dojo we can have any of the well know GUI tools such as tabs, check boxes, radio buttons, sliders, combo boxes... In addition to that we can have color palettes and/or color pickers which are gonna be very useful for our visualizations. We can have the ability of dragging and dropping things in our web page!

Dojo offers us the capability to have an "inline" editor. This would also be useful for us, because we can show data to the doctors, and they can change the data. cool!

At last (but this might not be everything), we can have menus! and that's what we indeed need for our AVAD application.

Today I was able to create most of the basic GUI's using Dojo... Remember that I was not using R or Rpad at all. I was successful in creating the basic widgets that are part of the package, but when it came to widgets such as menus, i was not successful, because i had to import some new packages. I was able to find the packages, but it was kind of hard for me to connect these packages to Dojo. I think I had some problems with the .css files. I have to check for this out tomorrow.

Time:

10: 30 --> 1:30
2:15 --> 6:00

I can't concentrate anymore... BREAK! hahahhahah

The following are some of the links I visited today:

http://www.roseindia.net/dojo
http://sitepen.com/labs/guides/?guide=DojoQuickStart#firstSteps
http://www.w3.org/

Oh, tomorrow I have to go to the dentist to start the implantation of my tooth. AHHHH!

Thursday, July 9, 2009

Thursday July 9, 2009

Today, I feel so happy because I was able to find the website of Rpad! Although the real website (www.rpad.org) is still not working, but finally after a 2-hour struggle, and thanks to google codes section, I was able to find a link to the archive of Rpad website. (http://rpad.googlecode.com/svn-history/r76/Rpad_homepage/index.html)... I made sure to download every single file in the website!

Today, I realized how Rpad is much better that any technology we have been using so far. One of the things that makes Rpad special is that they use AJAX technology. This means that whenever we want to create new plots, or new analysis, we don't have to refresh our webpage.. and this is really great... Thanks to web 2.0 people for this amazing technology!

Another good feature about Rpad, is that we don't have to have a server to run it. It can run locally using a miniwebserver, and thus it can be run on the Intranet, and hence we would have more security. But also, Rpad can run remotely, but we have to do some extra work, and this should be fine on later stages if we decide to go public.

Another issue about Rpad, is that I found it very useful tool for educational technology for statistics courses (maybe this has nothing to do with our project, but it is really interesting). We can have electronic books for statistics, and we can make the user/student run on the spot the analysis he/she is learning about.

Last time, I was able to create someting, but it did not look so great, because the Rcode was showing on the webpage, and for sure we would not like to have it appearing,,, the doctors might chicken out! :S, but today I was able to find a way to get rid of this crap.

I was able to find a way to make our web page have tabs. on each tab, a different plot is dynamically created!

9:00 --> 12:00 : searching for the Rpad website, and downloading all of its files.
1:30 --> 4:30 : recreating of the website, using tabs

More to come tomorrow!!! so interesting!

The following is a snapshot of my work today (You can click on the picture to enlarge):

Wednesday, July 8, 2009

Wednesday July 8, 2009

Today I was able to have some output from Rpad. Although the web site of Rpad was still down, but I was able to find an application called CHNOSZ that uses Rpad. (http://www.chnosz.net/Rpad/index.html)

* 8:30 ->12:00: Rpad and trying to find the appropriate places of files and scripts.

* 2:00 -> 5:00 I was trying to learn Dojo (a javascript toolkit)... Dojo is used a lot in Rpad programming.

The result of my day was the picture following picture:

Tuesday, July 7, 2009

Tuesday July 07, 2009

During this day, I was trying a new approach to build a web interface for our R scripts. It turned out that Ruby is not gonna do the job we are seeking
because there might not be a way for interactivity in it. We need to have Ruby on Rails, and this might not lead to a solution too, because RinRuby is
designed for Ruby, and I don't know if it can work with Ruby on Rails. No one has tried this before.

So I decided to look into different approaches, and there is something called Rpad and Rwui. Rwui is a good package but after playing around with it,
I found out that this is not what we need, because I think that it does not support more than one web page in our website. Rpad sounds promising, but there is not enough
information about it, because its website (www.rpad.org) has been down for a couple of weeks. Today, i did not get anywhere in Rpad, so I emailed the owner of Rpad Dr. Tom Short,
and I will be waiting for his reply.

* From 9:00 --> 12:00
- Checking a new approach for R web interface
- Tried Rpad and Rwui

* From 2:00 --> 5:00
- Continued working on Rpad

*From 6:00 -->7:30
- Sent an email to the author of Rpad.
- More Rpad configuration