Monday, September 22, 2014

Week 2: Code Sprint

This is the week of the Code Sprint. Naturally, there will be a lot to talk about. I have spent a little while learning about Qt by reading the code for talkeditor.py and TalkDetailsWidget.py, and Googling the names of methods I didn't understand. I didn't spend as much time on this before the sprint as I would have liked to: however, the code is slightly less intimidating to me than it was before, so that's good. Years ago when I took my first-year computer science course, we learned Java, and one of the things we learned how to use was the Javax/Swing package, so that's the totality of my experience with GUI packages before this.

Friday, 11:00 AM (Toronto): As I write this, it is Friday morning. Joseph Yeung has talked to us about what is expected of us in this course, and the importance of communicating and asking questions.

It is a little difficult to work when everybody is talking quietly. If everybody were yelling, it would all be white noise, and I could work fine, but when it's just one person talking every few moments, then my mind wants to pay attention to each person as they talk.

It is still a little intimidating to be around the other students in this project. It seems like everybody else has done internships and work experience somewhere, so everybody else has already had plenty of experience with programming with other people in the real world. Meanwhile, all I've done is take computer science courses (many of which involved more pencil-and-paper theory than actual programming) and write little programs for my own amusement. I hope that the mentors will keep this in mind when deciding on my grade at the end of this semester -- I strongly doubt that I will be as productive as my teammates on any absolute level, but I think that I will make a lot of personal progress, in the sense that I will be much more skilled than I was when I started.

Friday, 2:50 PM (Toronto): I'm taking some time to write some more because I am currently installing Sphinx, which is apparently required to run the test suite.  "Test suite" is a phrase I hadn't heard until today, as is the phrase "code base."

Michelle Craig went to each table and told us about how, each semester, at least one student fails this course. Naturally, I don't want to fail, so I will make sure to put in 10 to 12 hours each week, as I promised in my project proposal. However, I still worry that that won't be enough to make sufficient progress.

I have tried to be honest about where I am now, what I expect to be able to do, and what I am learning each week. I know that I am encouraged to talk to a mentor if I get stuck on anything. At this point, I don't think I've gotten stuck on anything that I haven't mentioned to a mentor yet; I've just been making very, very slow progress. This is an important distinction to make. Even today, in the six hours since starting this morning, I have learned how to run the test suite, what it means in practice to switch from branch to branch in Git, and a bunch about the Qt library, including a bit about how translation works. I also literally just noticed that the files "requirements.txt" and "dev_requirements.txt" can be run with pip, e.g. "pip install -r requirements.txt" (full disclosure: I wouldn't have noticed it if Francisco hadn't pointed it out to me, so thank you, Francisco). I didn't know any of that before. To an untrained observer, it might look like I haven't accomplished anything today, but compared to where I was yesterday, I believe I've accomplished quite a bit.

One issue is that, in some cases, there are things that I literally just didn't know enough about to ask a coherent question. Like I said, I hadn't heard the term "test suite" until today, so how could I know that Freeseer had one, let alone how to run it?

Friday, 5:00 PM (Toronto): I have figured out how to use QMessageBox to ask questions (e.g. "Save changes to current talk? Save/Discard/Cancel") and I've learned a little bit about how information is exchanged between the table that lists all the talks, and the TalkDetailsWidget (apparently Qt has these things called "Signals" and "Slots", something I just found out today). This might not seem like a lot, but I consider that to be huge progress for me towards figuring out how to fix Issue #501. I spent a lot of today figuring out how the "talk_selected" method worked. Tomorrow, I will try to learn more about the other related methods in talkeditor.py. I suspect it won't take as long -- I have learned a lot today.

Saturday, 11:50 AM (Toronto): More learning about Qt by reading and playing around with talkeditor.py and looking at the Qt documentation. I now know a little something about QtDataWidgetMapper, and about Model/View pattern.

I am doing this with the goal of solving Issue #501. I have sort of figured out how saving works. The reason I am looking at QtDataWidgetMapper is to get a better understanding of how selecting a talk from the list works.

Ultimately, my vision is to have something like this: The user selects a talk from the list, by either pressing enter or clicking on it. If their current talk hasn't been saved, then a message box comes up that says "Save changes in current talk?" with the options Save, Discard, or Cancel (Save is the default selection). If the user selects Save, then the changes are saved before the new talk is selected. If the used selects Discard, then the changes are discarded before the new talk is selected. If the user selects cancel, then the talk with unsaved changes remains selected.

Saturday, 3:40 PM (Toronto): Time flies. I have volunteered to give a short presentation to the other students on what Freeseer is and what we intend to accomplish this semester. I am banking on the fact that, although I might not have the most technical knowledge, I like to think of myself as a decent public speaker. We'll have to see whether I'm correct.

I haven't yet finished solving #501. However, I am making progress -- if nothing else, I'm learning more and more about Qt every minute. At one point I thought I might have been stuck, but it occurred to me that, if I'm working on the Save feature on the Talk Editor, it might be a good idea for me to familiarize myself with database.py (when I say "it occurred to me", I mean "Joseph Yeung explicitly mentioned the importance of the database when I mentioned I was working on Issue #501").

Saturday, 5:00 PM (Toronto): The presentation went fine, as far as I can tell. The audience was laughing. Whether they were laughing at me or with me, I might never know, but laughter is laughter. I'll go ahead and call that a success.

Sunday, 9:30 AM (Toronto): Since this is the last day I have to see my teammates in person, I will spend a bit of time considering questions that I want to ask in person before leaving Toronto. When I was in high school and through some of my university studies, I had the unfortunate habit of failing to notice when I was confused by something -- after all, in a lot of classes, you can get by through rote memorization or BS-ing. This is something I am working hard to remedy, but it takes conscious effort.

Sunday, 11:00 AM (Toronto): I have made another pull request. If my first pull request (changing a space in the Copyright notice on a file, which was bad because the notice was copied directly from somewhere else and shouldn't be altered) was a 0 out of 10, I would like to think that this new one deserves at least a 2.4 out of 10, in the sense that at least there's a good idea behind it -- I added an instruction in the Basic guide for Contributors, explaining how to install the requirements and dev requirements.

For the remainder of the day (that is, until 12 noon) my plan is to familiarize myself with database.py, since it might be relevant to understanding the Save function in the talk window. I notice that PyQt4 has something called QtSql, and database.py imports QtSql from PyQt4. It seems like it might be a good idea for me to learn a little something about Sql. My current level of knowledge is that Sql has something to do with databases -- that's about it. I won't waste the entire semester learning about the theory of databases, but it seems to me that it might be to my advantage to at least get a bird's-eye view of the subject, for this course and beyond.

Monday, 11:40 AM (Burnaby): I'm back. I now have a bunch of laundry to do and a bunch of homework to catch up on. I still intend to put in my 10 to 12 hours of work this week, but it will probably be rather low-stress work. I don't believe this will be a problem -- I am still within my projected schedule as outlined in my Project Proposal, and in fact a little bit ahead (I've already done some hands-on experimentation with Qt and become quite familiar with talkeditor.py).

There have been some issues with the pull request I made yesterday. I would like to spend some time addressing that in the coming week. In addition, this week I intend to learn a little bit about SQL, and keep plugging away at #501 -- at this point, I am learning a little bit about how saving information to the talk database works, hence my desire to learn about SQL and QtSql. I suspect I will get stuck at some point, at which point I will do my best to articulate my confusions, either to the mailing list or IRC depending on how long I ramble on.

In yesterday's meeting, Joseph addressed some of my concerns about my own ignorance. He advised me not to worry, and said that, in a course like this, the amount of progress you make is more important than your absolute number of contributions. This was somewhat reassuring -- I have tried to approach this course with the motive of learning the skills it takes to contribute to a project like this, not with the intention of getting an easy grade.

TL;DR:

What I did: Went to Code Sprint, met mentor Joseph and the other students in the program. Experimented with Qt and familiarized myself with talkeditor.py and TalkDetailsWidget.py. Made a pull request related to Issue #432.

What I intend to do: Figure out how the talk database works, hopefully getting a bird's-eye view of how Sql works in the process. Attempt to address concerns about Issue #432 pull request.

No comments:

Post a Comment