Sensorial’Org

HindiGym

HindiGym

hindihome_01.jpghindihome_02.jpg February 28th, 2009: A new homepage layout was in order to emphasize some of the new sections now that HindiGym has left the ground. The image on the left was the previous homepage; the image on the right is the redesigned layout. You’ll notice that the overall width of the design has also been expanded to adapt to increasing screen resolutions.

April 1st, 2008: A design for an upcoming Web site called HindiGym, an educational resource providing worksheets for kids and their guardians who wanted to learn or teach the Hindi language. Green and orange were specific colours that was requested to make the layout fresh and vibrant for target audience.

The logo was provided by the designers are Blue Sky Designs.

Code Sprint: Day 2

I just finished day 2 of the reading week code sprint (coding 9-5 for 3 days), having been operating on 3 hours of sleep because I was putting together a presentation.

For the past two days, I’ve been implementing the TA to Student mapping. There’s one instance of OLM per course, and for each instance, there is a set of users and a set of TAs. When users submit assignments (either individually or as a group), there needs to be a way for the instructor to assign some TA to mark them. We are considering two main strategies for this: (1) each TA marks some subset of students/groups; (2) every TA marks some section of all assignments.

olm_mapping.jpg
At the moment, the interface is like this. I’ve accomplished:

  • Users can select any number of groups by clicking on them; groups can be deselected from the same gesture. (In the future, users should also be able to select a series of groups)
  • Users can select any TA by clicking on them; a TA can be deselected with the same gesture. However, only one TA can be selected at time. It behaves like a radio button.
  • Users can assign a set of groups to a set of TAs.
  • Learned how to use both the rails debugger (available with gem install ruby-debug, and Firebug’s console feedback =)

Struggles

When a user clicks on “Assign TA”, the event is handled by a JavaScript function. Every time a group/TA is selected/deselected, the data structure holding the set of groups/TA is updated. Once the “Assign TA” event has been received, an AJAX request is sent to the controller passing this information via parameters.

The set of groups is stored as an array using JavaScript. This in turn is converted to an JSON string using the Prototype library (i.e. myArray.toJSON()) before it is sent to the controller.

The controller receives this information as a string. So if you try iterating it using Ruby’s .each construct, the only element you’ll get is that string. This JSON must be decoded: ActiveSupport::JSON.decode(myJSONstr).

To be done

  • Display the number of groups each TA has assigned to them
  • Toggle groups by TA (including those who hasn’t been assigned a TA).

OLM: Progress Report

I’ve fallen behind in trying to keep up-to-date with where I was with my projects as assignment deadlines and interviews are brush past me. An update on the project course I’m doing:

Janruary

Week 0: Familiarized myself with Ruby and Rails. Downloaded InstantRails, and tried out a few simple applications. Of course, none of them ever works.

Week 1: Got my first application up and running! It was a proud moment.

Week 2: I downloaded the OLM codebase and struggled with getting it to communicate with Postgres. Once that was set up, I started the application and tried to get up to speed on what has already been done.

Because of the Model View Controller nature of Rails, it was difficult to follow the code in that I had to jump from one file to another in order to trace the sequence of events. The MVC model helped me understand each component of the system from a linear perspective, but when the components started to interact with each other, the relationship became harder to see; association between models is done through “Rails magic” via has_many, has_one, belongs_to, and has_many_and_belongs_to… I still have to figure out how foreign key comes into play.

To help me better understand how it was suppose to behave, I played around with application by interacting with it as an end-user. Beginning with a high level task (e.g. adding a user), I broke down each goal into a series of subtask (clicks that the user has to make in sequence to accomplish the high level task). At each step, I asked myself “What could go wrong?” and “What can I put here that might break this?” I made a note when something broke, when something behaved oddly, and anything that was ambiguous.

Week 3: At the weekly meeting, it was confirmed for me what were the bugs and what were design decisions. Since this was the week of CUSEC, I spent the days leading up to event trying to reproduce the bugs that I’ve encountered and filing tickets for them.

Week 4: The changes that I made this week were mostly for aesthetics. Synchronizing the text, realigning the page elements, establishing a visual hierarchy… I used this as an exercise to explore the Views and how they corresponded with the controllers. At the same time, I looked for ways to increase the usability, but given my lack of domain knowledge, what’s intuitive for me may not be intuitive for our stakeholders and end users.

February

Week 1: Taking a step back from the usability aspect of the project, I worked on implementing the TA and Grades model. The TA and the Student are derivations of the User; since Student was already implemented, most of the logic was there.

The Grades model includes the Assignment (the assignment that this grade is for), the Group (the group of students who submitted for this assignment; individuals will be considered as groups of one’s), the User (aka the TA who is assigned to mark this group for this assignment), and Grade (the grade that each group achieved), and Status (whether or not the TA has started marking this assignment).

This is an opportunity to work through a complete component–the controller, the model and the view. More on this later.

Week 2: Since the controllers and views of the TA and Student are almost identical, they will be refactored into a Users controller before the Code Sprint that’s taking place over later this week.