Sunday, April 25, 2010

Release 0.3 - latest patch for Bespin's SmartMove implementation (revised)

I have been working on this bug over the past few days, throughout my flight to Saskatchewan and during time when I wasn't obligated to give my full attention to the family who I am visiting, and I have uploaded the newest patch for the SmartMove implementation. I had to change a couple of files so I found out how to make a diff for multiple files (which is actually just searching through the directory and it throws all the changes together in one big diff file) and uploaded it. Although the releases for class are done, I am definitely not going to stop working on Bespin. It has become somewhat of a hobby, and I like the community around it. I find it interesting in the way it is put together and would enjoy working on it and helping out in its production as a hobby and a pass-time. I can see myself working on it for a long time to come...I'd rather work on it as a hobby rather than for marks because then less pressure is applied and you don't have anything that could be perceived as negativity looming over your head; it's just you and your code and it feels a lot more leisurely and comfortable because the end result won't affect you long-term in any negative way whatsoever since everything you do in the real world is experience, whereas if you do something less than perfect for school, it is your one and only 'iteration' and it could mean a few strikes off the old gpa, which can lead to stress when trying to work on it and it is quite hard to concentrate fully when feeling stressed about what the result could mean to your future.

Anywho, my latest bug patch is below.

The bug page and comment can be found here

The actual patch can be found here

Wednesday, April 21, 2010

Should I really get the latest tip before I start work?

This is like the third+ time this has happened, but it was working fine before but then I ran hg pull -u and it stopped working. I thought maybe my changes didn't merge well together with the latest tip or something so I deleted it and redownloaded it, but sure enough, the same problem. It says something is missing and is having a 401 error. I asked a question in the bespin channel of irc but no one is answering, so I will try again tomorrow. Last time this happened, it fixed itself after no time at all; let's hope this time it's even shorter than last.


Monday, April 19, 2010

Issues with Bug 558783 over the weekend

I had some issues with bug 558783 over the weekend. First, when I began to work on it, I started up bespin but everytime I moved left or right it would stall. It appears that since I was working on it last week, they had updated a few things and 'column' was now referred to as 'col'. When I changed this in the moveLeft and moveRight function, it began to work again. I was worried at first because I was afraid I had uploaded the wrong patch or something and had lost my work. Luckily, this was not the case.

So far on the patch, I have implemented the reference for the smartmove option that Bespin produces when 'smartmove' is typed on the command line. It explains what the command does and how to use it. Right now, the bug is at a point where when the cursor is in the middle of tab spaces, it will jump from the middle of a tab to the end of the tab in the direction pressed, but not when shift is pressed. I have to figure out how to determine whether shift is being pressed and implement it in that situation as well. It also jumps over the entire space if there are two tabs rather than only one tab space. I am having trouble figuring out the logic for that one... I also have to add the actual command to turn the smartmove feature off and code it accordingly. Unfortunately, I have to give it a rest for a bit because my DSA exam and EJB exam are tomorrow. It will be in the back of my mind, however...

Thursday, April 15, 2010

Review of bug for release 0.2

I posted my bug that I fixed for release 0.2 earlier this week and it was reviewed by Jviereck a few days later. He said that there was a few things that were not quite right with the bug fix. These are:
  • When the cursor is within a tab, pressing right or left should bring the person to the end of the tab (if the tab is 4 spaces and the user is column 2 of that tab, pressing right should move the cursor 2 spaces to the right) (mine always moves *set amount of tab spaces*, even if the cursor is inside of a tab).
  • If the user is within a tab space, and say this tab space is on column 1-4 and the cursor is on column 2, if the user holds shift and presses right, the cursor goes to column 4 and highlights column 2, 3 and 4.
  • Add a setting to turn this feature on/off.
I will add these additional features to my smartmove implementation and post it, hopefully by the end of the week, but by Monday at the latest and it shall be my 0.3 and final release (for the course).

Wednesday, April 14, 2010

Week 14

This week was a productive week. We updated our wiki a lot, put up some storyboards, put up some pictures and did as much as we could think of in terms of design. I feel that our wiki has a lot of substance at this point and it has become a good-sized page. It is quite informative with regards to what our product will look like and how it will work. We will have to get in touch with Robert, Mary and Dave to see if there is anything else they'd like to see or have on the wiki that we have not yet put on there.

Monday, April 12, 2010

Fixing Bespin Bug 558783 - Release 0.2

Yesterday I decided to put the Java-EE and the accompanying tribulations to rest for the night and
work on OSD. I had previously spoken to jviereck about a bug involving implementing TM's SmartMove. I was able to accomplish this last night. Much to my advantage, Harjinder had just worked on bug 557135 involving implementing the indent feature, and since TM's SmartMove is basically a fancy way of saying, 'make the cursor jump over a tab where tab was pressed', he had the foundation by knowing that 'tabstop' in the JavaScript files were the default size of a tab. Combined with Skype and TeamViewer (using TeamViewer because Harjinder could not run Skype on Linux and could not run Bespin on Windows), we banded together to work on bug 558783 and successfully completed it before the sun came up. We finished our work at 3:30 am, at which point I was still at the school because my DSL modem at my apartment appears to have broken down and needs to be replaced (at probably one of the worst possible times...).

I encountered a few issues while working on the patch, but for the most part they were mistakes caused by it being a late night and having worked on other things all day. These problems included, but were not limited to:

var line = lines[range.start.end];

instead of

var line = lines[range.start.row];

or little algorithm issues such as:

if(((count * 1) * -1) >= tabstop){
count = tabstop;
count = count * -1;
}
else{
count = -1;
}

in the moveLeft function instead of

if((count * -1) >= tabstop){
count = tabstop;
count = count * -1;
}
else{
count = -1;
}

which would end up making the if statement evaluate count as a negative instead of a positive which would end up having the cursor's behaviour unpredictable and incorrect once the left cursor was pressed. A lot of the time, however, when different changes were made, it would just break the function altogether and when left was pressed, the cursor would be at a standstill.

You can find the bug page here and the source code that was required to implement this smart-move behaviour in Bespin here

Sunday, April 11, 2010

Trouble setting java_home as an environment variable


I have been trying for about a week+ to deploy my java project. I have walked around to numerous computer labs across campus hoping one of them can be set up right, as when I set my own computer to have the jdk as a system variable it does nothing but fail as per the attached pictures. I don't get it?? According to all logic it should be pointing to the JDK at this point, and if not...at least the JDK is being pointed to as an environment variable, yet it still tells me that it can't find the package it needs. I hate it when technical issues halt your performance, in the end making you appear less capable because you can't even set up your computer properly. I have been trying to work this out for so long, have tried everything, have other things I need to be working on but really need to finish this, and for some reason can't because apparently JAVA_HOME isn't pointing to the JDK, which, according to the above printscreen, it is. If there are any readers out there who know why this is happening, please, PLEASE, PLEASE put an end to this nightmare and help me out. I have Bespin Bugs that need to be addressed.