Wednesday 29 June 2016

The Day's Deeds

The day presented itself with a challenging invitation. Invitation to admit a mistake and confront it's consequences. I was assigned a task on what feels like ages ago, to have a presentation ready in one day on two very essential but potentially insipid topics. I was to seek help from any fellow trainees. I chose Amisha and Deepti for I was new into my training and they seemed very helpful and creative (which they are). Fast forwarding that day, the presentation happened with misplaced sparks and leaks of energy. Anyway, it was time to submit the presentation before sir. So we did. 
The first submission was made subject to comments and suggestions. And this started a sequence that remains alive till date. People comment, the presentation is changed accordingly, and people still comment. Not to say the presentation did not deserve it's share of constructive criticism, it was aspired to be excellent and it is not, still. While all of this was happening, I managed to sneak my self out of the conversation and hence away from responsibility. And this careless ignorance was finally recognized by sir, today. I want no further delay on this one as well. The presentation needs closure. Hopefully that will happen the following day.
Talking about SIM, Ranvir is doing some benevolent work with the user interface. His work is heartily appreciated. And more such helping hands are readily welcomed. I decided to add some way in which the user will be able to submit queries about the database of SIM. After all this was the intended purpose: analysis based on queries. There were two ways in which I could have approached this:
  1. Provide a simple field for the user to enter any query they want on the set of tables.
  2. Give only some pre-defined queries for the user to use.
So which one of the two approaches I decided to follow? Both. None of these are entirely in alignment to what SIM is supposed to be and none of these are entirely wrong. But more importantly, none of these are complete yet. 
I was able to learn how to make data travel between pages, views and models using the POST and GET functions in HTTP and Django's functions to handle all of this. I also learnt the way in which we can submit SQL queries to Django models. There is one problem though: I was not able to query tables where I wanted to select only a subset of all the fields in the table. Either the query returned all the columns (when I selected all the columns or had the primary key as part of the needed subset of columns) or it showed an error when I chose to have only a few columns in the query and did not include the primary key in it. The error basically stated that I was not allowed to make queries without having primary keys in them. This is again a little weird. 
A Django Guru promised a visit tomorrow, maybe I'll ask him about it.

No comments:

Post a Comment