Sensorial’Org

Some Neat Stuff

When I first went into computer science, my view on the discipline was very narrow. I thought it was programming, and for the first two years, that’s what it was: writing trivial applications to solve some well-defined problem that I was never going to revisit. That, and a lot of theoretical analyses about algorithms and runtime and calculus. This year, I’m doing stuff that’s a lot more exciting: development processes, development practices, development teams, and writing software that have actual applications, software that’s actually being used. One of them being the OLM project I’m working on. That’s a really rewarding experience.

But the really interesting things are being developed in grad school, something that I wasn’t even thinking about considering. Until the Research in Motion showcase yesterday. The projects that I found most interesting were:

  • SketchPad, an tablet application that allows an architecture/designer to very quickly iterate through floor plans and furniture placements. They have the ability to divide up space with multiple doors, glass walls, workstations, etc. All of the renders were 3D so you’re able to see the space from virtually any perspective. What was really impressive was the walk-through feature. After the floor plan has been laid out, you can draw a trace around the floor, and a movie is generated to show the new layout based on the path that you chose; it shows you the space from the perspective of someone walking through the space.
  • This is just fucking remarkable. I have no words, because I was watching the project representative, Seok-Hyung Bae, draw for an hour. Although I’m not sure how easy it would be to draw organic matter with the system. It’s relatively simple to imagine the wireframe of a spacecraft, or a car, especially with the system’s aid in perspectives, but for something like a human being, the planes are suddenly a lot more complex. I imagine it might still be easier to paint with colours and values, and rely on the brain to subconsciously resolve how it all comes together. Regardless, I need an ILoveSketch.

The video browsing by direct manipulation project was also really fun. Given a video clip, you’d click on an object, and the system will show it’s movement over time so by dragging the mouse, you move it back to where it was before or where it will be after. Then there was a video tracking system that studies various characteristics about people entering and leaving the space. E.g. demographics, how people are responding to an ad, etc. Tag clouds meet reviews. Using an adjective-noun extraction technique, you’re able to generate a visualization of all user-submitted reviews. In the end, you’re given a cloud of 20-30 keywords, and the context in which they were used. Remote control cars and airplanes were cool when you’re a kid, but a remote control robots are in another league entirely. It’s a whole new level of animation when control is transferred from a library of motion algorithms to the animator himself.

The breadth of this discipline is just amazing. It does’t matter what you’re interested in, there’s a place for it in computer science.

Other things that I’ve stumbled across that is worth sharing:

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.


« Previous entries

Next entries »