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.

New bug to work on

So I went to IRC to ask around for implementations/bugs that would be found useful in Bespin. Jviereck helped me out once again by suggesting this one implementation that he was hoping to get around to involving the 'TM Smartmove' option, which in other words, means that if you have 4 spaces and tabstop/width is 4 and you press left or right while in the editor, the cursor will move 1 tab instead of 1 space. Very common in many editors so it only makes sense that Bespin should have it too!!
It's only a matter of time, now...

Thursday, April 8, 2010

Bespin Working Again

I updated my Bespin pull after a couple of days of trying to understand why it's not working properly and it is now looking and working better than ever. It appears that it has a new title screen which gives it a whole new initial look. I tried to reproduce the 'code-commenting failing to show' bug but it was unsuccessful and I was unable to reproduce the bug. Now to find another bug to work on, unfortunately Java and C++ are taking up a lot of my time and the last week of school is upon us. I need more time!!! I was kind of hoping that strike happened lol because I knew that it was going to be hard to keep up with everything but it did not and now I fall behind. I will do my best to complete the next two bugs as soon as possible.

Sunday, April 4, 2010

Bespin Not Working Again...

It had been a little while since I had worked on Bespin, being so busy with a number of other assignments the past month, but I remembered that jviereck had mentioned a bug regarding the issue of code commenting failing to display on page load until start of comment appears. I tried to reproduce this bug but unfortunately I could not load up Bespin client anymore. I pulled the newest Bespin from the repository and it came up like the attached picture. Hopefully I can resolve this soon so I can get working on some code commenting bug or any other.

I haven't been getting enough time to work on open source stuff due to assignments keeping me busy, but I'd really like to because I really enjoy it. I also look forward to starting work on my prj666 project come the summer. Just have to get these assignments out of the way...

Tuesday, March 30, 2010

Helping Out

So last night I was working away on C++ while talking to Harjinder and he was telling me that he was having some issues with a bug for Bespin. He said that jviereck wanted him to do the 'indent' bug, where it jumps 4 spaces to the right when tab is pressed. He was able to solve that part on his own but he wanted some help with the 'unindent' portion when you press shift + tab. I spent some time in text.js and found something in Canon/keyboard.js that could be the code for detecting whether shift was being held down. It was late so we ended early, but we'll be getting back to it shortly. I also have to do two bugs by the end of OSD and I'm pretty jam-packed with other homework...this will undoubtedly be a busy few weeks.

Thursday, March 25, 2010

Filesystem Prototype


A quick prototype of what the filesystem could look like for our new Processing.js IDE. It is very similar to the Bespin file-system in terms of design, but it seems to follow the colour scheme and layout of the Processing.Js Prototype up until this point. We will exchange our ideas of what the filesystem should entail at our next meeting and see where that takes us.

Wednesday, March 17, 2010

Week 8

I have been studying this prototype that was given to us last week to try to gain a better understanding of the code behind a web-based IDE such as the one we are going to make. It seems very interesting, as it is in a multitude of files and languages already and it is quite early in the process. Like, the current prototype is as basic and as skeletal as it gets and it is already separated into 5 files including one of just pictures. I think it is more compressed than it could be even, as all the buttons are in one .png file and seem to be cut from the .png file using css. That is some skillful programming. I have thought of an idea of what the file system should look like but have yet to put it on paper/e-paper and share it among the team. That is the next step...

Wednesday, March 10, 2010

Week 7 - PRJ566

Over the last few weeks I have been looking into Bespin and what makes it function. There is a huge repository of files but I have found that the majority of files for the User Interface lie within the bespinclient/plugins/supported/Editor directory. I had been looking at one file in particular, mainly the text.js file within the subdirectory 'Editor'. It contained all of the code for the user-interface view, excluding scrollbars and the panel that popped up for commands. I found that interesting because we will need to do something similar for our editor once we begin to code it. I thought I would manipulate some code to get a feel for what was going into the editor, so I played around with it for a bit and was able to turn the blinking effect of the cursor on, off, and change the speed of it. It is surprising how much goes into such a small feature. It was a taste of all that will need to be done for our editor. It shocked me how much you need to jump around through all the code to find exactly what you are looking for, as well (such as the colour of the background of the editor, so that the cursor could be turned to that colour, giving it the appearance of 'disappearing').

We also heard from Robert at the end of the week with a new prototype. It is looking pretty good, I can't wait to get working on the real thing and see how nice we can make it, as well as the following it gets.

Thunderbird Build


I did the thunderbird build lab over the reading week. It involved updating a file so that it no longer displayed non-links in the link format.

I was having trouble building thunderbird first of all. I tried a number of times to rebuild but it kept getting this one error that would not allow me to open thunderbird. Whenever I ignored it or aborted it, the command prompt window would stop responding and close, and when I pressed cancel it closed it. A few days later I re-built it, however, and was successful.

I tried to reproduce the error but didn't realize that it would only reproduce once it was saved as a draft. I can attribute Scott's blog for that little tidbit. Since I had already read Scott's blog, I had a good idea of how to solve the issue. I opened up the mozTXTToHTMLConv.cpp file in the mozilla/netwerk/streamconv/converters directory and changed the necessary code, retested it and sure enough, success on all accounts (see picture).

Patch can be found here
Bug can be found here

Wednesday, February 24, 2010

Firefox - debug build

I am on my way to doing that Firefox Lab from ever so long ago (2 weeks) but I just had the regular Firefox build on my computer so I had to go back and build the debug version. Unfortunately, I spent some of last night and today trying to figure out why it kept saying update.exe.manifest in mozilla-central/toolkit/mozapps/update/updater/ was not found (aside from the obvious, the file not being there)...it seemed it should be there but after trying a number of rebuild commands and talking on IRC in the #developer channel trying to get some ideas and having them say to do things I had already tried, I decided to scrap it all and start from scratch. I did basically the same thing I did in the beginning except this time I made the .mozconfig file contain the settings for the debug build in the first place rather than just the original build, and waited for an hour or more for everything to complete (hg clone ___ and make -f client.mk) and sure enough, updater.exe.manifest was there.
Should have just done that from the beginning...
Tomorrow will be a day of labs. I intend to do the Firefox Lab as well as the lab about fixing a bug in Thunderbird. It shall be good fun...isn't it always?? :)

Sunday, February 21, 2010

Uploaded Patch For Bug # 540112

Introduction
I was able to complete my bug over the course of the weekend after a few frustrations and getting reacquainted with a language that I had not used for a good two years. It was nice to revisit it and it feels good to get that patch done and uploaded. Details about the bug can be found on my wiki.

Specifications
For my bug, I had to make the text-cursor in the editor blink when the editing area had focus, like a cursor regularly does in a text-editor. The file that I had to edit was

bespinclient/plugins/supported/editor/views/text.js
.

There wasn't too much editing in regards to this patch, but I had to make a timer function which called the drawInsertionPoint function, which placed the cursor on the page, and I had to make it so it would blink...so I used a boolean that would change every time the function was called so it would either colour the cursor the same colour as the background or colour it the colour that the cursor is supposed to be (blue). I had a lot of help from Julian Viereck in finding the right file and about the file system of Bespin. When I was struggling with getting it to work, Harjinder helped me to debug it and we worked together to find what was wrong with it. He was a huge help.

What I learned

  • Learned how to iterate through large pieces of code
  • Learned that I should check to see if the bug is still current/test it to see if the issue is still occuring
  • Memorized how to update my files using Mercurial (hg pull -u). Previously, kept forgetting that syntax
  • Learned how important communication is in the open source community
  • When you work together you're bound to resolve the problem quicker because each person has a different approach to the problem, more things are noticed, and different solutions are brought to the table
Conclusion
The cursor now blinks in Bespin and my code is up for its first review. I hope it gets accepted but either way I am looking forward to the constructive criticism.

My Idea - Prototype 1

The previous prototype was a collective prototype written by all of us, but it was before we really discussed with Robert the specifics of what he hoped this prototype to become. Last Friday, on February 19th, the specifics had been outlined and a more specific prototype could be made with the information that he gave. With this, I created:


Here is a short description of why I did what I did on this prototype:

- I used Robert's early template of what it could look like as a starting point and added buttons using Paint to come up with my product.

- DASH is an invention by Steven on his version of the prototype, which was submitted first, so I thought I'd just go with it. It could be our codename for the creation process...(Derek Anthony Steven Harjinder)

- MyFiles is where the user will go to load files that he has previously created and saved. It is in an area above their controls that they will so frequently use (play/pause, stop, reload) so sublminally they will unconsciously know where it is because they will so frequently see it out of the corner of their eyes and register in their memories without them realizing it/having to look. That's the plan anyway...

-New and Save are side by side beside the play controls, easy to access and in plain site.

-Beside Save are the tabs, that will contain the files that are opened simultaneously. The file that is on the forefront will be bolded and underlined in the tab for clarification that it is the one that is being displayed at the moment.

-I thought there could be an 'Examples' field for syntax examples and little demo programs that the user could run, if they are new or just feel like procrastinating, to get a feel for processing.js and understand what it is and how it is different than other languages if they did not already know. It could be a way to learn syntax/processing.js all from within the confines of our IDE.

-About, beside the IDE's name, is simply stating information about the IDE's developers and what it's purpose is.

-Help is more about the particular functions and buttons within the IDE

-Reference is where they could look up the list of Processing.js functions, and the search bar underneath would be where they would look up specific functions tailored to what they are looking for.

-The left panel is where the coding would go and the right panel is where the action would take place (IE the processing.js code would run after pressing the 'play' button. The left panel is transparent and you would be able to see through it, only it would have a transparency effect, as is why the fellow on the left's line is lighter blue (it is supposed to symbolize that it's being viewed through another panel).

I thought the play button could also turn into a stop button because I don't know what the difference between pause and stop would be, except maybe that stop might clear the right panel, but then reload would also do that but I guess reload would more 'reset' the right panel and keep it going, and pause could just 'freeze' it in place.

Anyway, it is just my first idea of what this prototype could look like, and there will be some definite changes in the future.

Bug 540112

I have been working on my bug for quite some time now, which seems to be, for the majority, trying different things to make it work and reviewing my JavaScript...I am a little out of practice with JavaScript at the moment as I have not done it since second semester in INT222. I missed it, it's a good language...unfortunately nothing I do to make this cursor blink is working...I will need to use an SC.Timer to make it blink but I think I'd have to pass parameters into the timer, as the function that draws the cursor has two parameters: rect, and context. I remember having to make or call a fire method, or something like it, to fire off the function in question but that would also need parameters and you can't send in parameters with the timer's action property.
What I have now is...

The cursor drawing function...

_drawInsertionPoint: function(rect, context) {
var range = this._selectedRange;
var characterRect = this.get('layoutManager').
characterRectForPosition(range.start);

context.save();

context.strokeStyle = this.get('theme').cursorStyle;

context.beginPath();
context.moveTo(characterRect.x + 0.5, characterRect.y);
context.lineTo(characterRect.x + 0.5,
characterRect.y + characterRect.height);
context.closePath();
context.stroke();

context.restore();
},

The timer function...

_cursorBlinkTimer: function() {
this._cursorBlinkTimer = SC.Timer.schedule({
target: this,
action: '_fireDrawInsertionPoint', /*Had _drawInsertionPoint but can't pass in parameters with this */
interval: 250,
repeats: true
});
},

I thought it needed some sort of other method to send in the parameters but that would need to be called using parameters in the action: property above so that couldn't work...

_fireDrawInsertionPoint: function(rect, context) {
if(this.get('isFirstResponder')) {
drawInsertionPoint(rect, context);
}
},

The place that calls the cursor drawing function...

_drawSelection: function(rect, context) {
if (this._rangeIsInsertionPoint(this._selectedRange)) {
this._drawInsertionPoint(rect, context); //Thought this had to be this._cursorBlinkTimer()
} else {
this._drawSelectionHighlight(rect, context);
}
},



So I'm in a bit of a bind and have been looking around for quite some time but am not coming up with much to go on. I even asked Yahoo Answers lol and they said the way it was coded would be tricky. A fellow on irc told me that I should look into property-observing functions of SC...for something like an isCursorVisible property...I've been looking but haven't been coming up with much and that is much different than what I have done so far but anything is acceptable as long as it works and is it good taste. Hmm. Tricky.

Saturday, February 20, 2010

Firefox Build Finally Complete

And I have successfully built FireFox finally!! I scrapped my old cygwin gcc which seems to be a bit of a failure and traded it in for one packaged with this 'mozilla build' toolkit containing what seems to be everything we need to build mozilla tools ??? Well, it works, I've succeeded, and I will be working on the bug and the lab simultaneously now. Excellent.

Trying to complete my build of FireFox to work on lab

Sooo I am having a bit of trouble with my bug so I thought I would let my mind dwell deep into the caverns of JavaScript and hopefully it would come up with something while I tried to build FireFox. Unfortunately, while trying to build FireFox, after installing the SDK and hoping that it would all be good from here on out, it's telling me that my gcc that came with cygwin can not execute binary files??
To be exact...it says...

checking for gcc... cl
checking whether the C compiler (cl ) works... no
configure error: installation or configuration problem: C compiler cannot create executables.
*** Fix above errors and then restart with "make -f client.mk build"


Now...why in the world wouldn't my C compiler be working properly. It's obviously detected and it is evident that it is there...why in the world...would it...not be...working?
Frustrating.

Latest Bug 542578 Also Outdated

Well, Mr Patrick Walton, who seems to be a lead developer on Bespin, gave me bug 542578 yesterday when I found out that my bug was outdated and asked him if there are any current ones available. Unfortunately, that bug was also outdated...so this morning I was talking to a Mr Julian Viereck and he gave me a tried, tested and true bug that he said he wanted to work on but he'd save it for someone just starting out with Bespin. Lucky for me, I am that fellow, and he's guided me along with finding its location. I was somewhat frustrated last night after finding out that bug after bug seems to already be resolved, but after a good night's sleep and a bug truly in need of fixing, my mood is lifted and I am feeling much better.
Thank you Mr Julian Viereck, you have made my day...

Friday, February 19, 2010

Initial Project Plan - Bug 540112

I'll be working on Bespin for Mozilla and have requested to be assigned a few bugs I found on Bugzilla. I have requested to contribute to issue 516852, about how the scrollbar cursor doesn't change to the correct cursor when it's over the custom scrollbars in the editor, and issue 521823 about how commented code doesn't display as being 'greyed-out' when the cursor is near the bottom of the file, but becomes greyed out once you move the cursor to the top of the comment block. I chose to work on these two issues because I thought it would give me an introduction to the Bespin code, give me some access to the code, and begin my understanding of the inner-workings of Bespin. Unfortunately, I was denied working on issue 521823, due to the fact that 'it's unclear to me(Kevin Dangoor) when we will bring the debugging functionality back. There are significantly more important things on our plate than that...'. That is unfortunate because I was looking forward to working on it a lot, but that will have to wait. It also appears that bug 516852 has already been resolved so that is also out of the picture. My latest and hopefully final bug for this iteration is bug number 542578. Apparently, adding new lines to the buffer causes a one pixel wide line in the color of the selection to appear on the left side of the editor view.
UPDATE: I just found out late last night that the bug in question...542578...is also a thing of the past and have been blessed, finally, with a bug that needs to currently needs to be fixed. This bug is bug number 540112 about how the Bespin cursor doesn't blink when it's inside the text editing area. Well, I'm going to fix that right now.



Background

Bespin is an online IDE developed by Mozilla Labs. It allows users to create and edit code, similar to Microsoft Visual Studio, from within a web-browser with no client-side installation necessary. It will allow multiple users to work on and discuss a single piece of code/program collaboratively. It is also a piece of open-source software...a very attractive option to developers everywhere.



Progress Tracking

I will be tracking this progress on my wiki. I will also post things that other developers would find important on the issue page (540112). They will be able to follow me through my wiki and through my posts on the issue pages listed above. I expect to have looked at the code for these issues by February 19th and to have issue 540112 finished by February 20th. Yes, there's not a lot of time but this bug is due the week of February 15th and according to all logic, Saturday is still a part of the week. Sometimes you run into obstacles and you just need to kick them down and run over them a few times, and that is what I plan on doing. This little setback of my original bug not really being a bug anymore will not keep me down.

Different Versions of Each Release

As stated previously, I don't have long to do it so I'm going to tackle it head on. It shouldn't be too big anyway, at least I hope not. For issue 540112, I plan on it being done for February 20th. I will then continue to work on more bugs to help out the mozilla community. I will discuss my issues with Julian Viereck for assistance and guidance with the issue. He has already been a big help in guiding me to it's general location and giving me a truly current bug.

Overall

I will be using JavaScript since that is what the majority of files in Bespin are coded in. It has been a little while since I've used it but I reviewed it while working on the last fail of a bug, so it's coming back to me. I was talking to Julian Viereck on irc about the issue and he said it was still open and needed to be resolved. I will use Google for help with syntax as well as clarify my questions about the issue with Julian Viereck. I've already experienced a few barriers, namely the bug I was working on previously and spent a good amount of time on was obsolete, but I am sure to experience new barriers as time progresses. I will be talking to people over irc and learn on my own using google to overcome barriers. We shall see how it works in the end. I think it'll be good to look around in bespin some more but understanding it all is pretty impossible since it's a massive repository.

My Bespin Bug Was Outdated!!

So I have been working on this bug for a number of hours now and was curious as to how some of the things I did was not fixing the issue. It seemed like they really should have...but then I thought I'd check something out. I went on the bespin client located at http://bespin.mozilla.com and realized that some things were much different between that one and mine. On the online version, the cursor is an I while it's in the Bespin editor, but on my local copy, it stays as the regular windows arrow. This is really the only difference I care about...the others are things like...the front page is different (mine has Italian or some foreign language on the start-up page while the Bespin one just has instructions, but I'm sure they tweaked that), and there are no buttons on the top in mine whereas there are buttons on the top in the online one. On irc, they said that the button issue and the foreign language differences were supposed to happen, but at that time I didn't think to ask whether the cursor should be an I, as I didn't realize it was supposed to be.

Unfortunately, I was just on IRC talking to pwalton and it seems that the issue has been resolved and it was outdated. http://bespin.mozilla.com uses version 0.0.4 and the recent version is 0.0.7. Joy!!!!!!!!!! That was a good use of a multitude of hours. Well, so much for that. He assigned me to another bug now...bug # 542578. So, I better get to work. I'll make another initial project plan for it since the last one is obsolete.
Joy.
I guess life is in fact winning this round.

Thursday, February 18, 2010

Bug in Bespin ... the search...

After a few hours of searching in and around the area that was given to me inside my bug listing on bugzilla, I believe to have found the section in which the error lies. Inside bespinclient/plugins/supported/Editor/views there's a couple of javascript files called scroll.js and scroller.js. Around line 278 in scroller.js, the code begins focusing around whether the scrollbar is highlighted and has code such as:

_isHighlighted: function() {
return this._isMouseOver === true
this._mouseDownScreenPoint !== null;
},

which is just the first of many similar lines but that goes to show you it's discussing whether the scrollbar is highlighted based on the mouse-event, which is pretty close to focusing on my bug, being that the custom scrollbar doesn't change when the mouse scrolls over the scrollbar. It just stays as the regular mouse cursor, and that ain't right...unfortunately my brain is pretty fried right now due to my 3 hours of sleep last night so I will have to resume it in the morning. Wish me luck, world.

Problem with bespin locally

So I finished my java and int522 and was wanting to do some work on the bug, but unfortunately when trying to open up a local copy of bespin, the below image is what I saw...
Why? I'm not sure. I followed the instructions on the website to a tee but unfortunately that's how it goes sometimes. It is 4 am right now so unfortunately no one is on IRC to ask but I'm sure the solution is just out of reach. I shall resume my endeavours tomorrow, finally...I've been waiting for the moment to be able to work on this bug but unfortunately sometimes life likes to throw little obstacles at you...well we'll see who'll win this round 'life'.
Quite tired.


Features of Web Based Processing.js Editor

We are well on our way in the design and prototyping of how we believe the new web-based Processing.js editor should work and the features that it should have (at least in the early release that we will be working on). We plan to have, of course, the regular options that any editor should have, being the ability to save and load files that have been created within the editor, as well as a 'create' function which displays a new editor tab with a dialog box popping up asking what they would like to name the file. The editor will be on a server with its own database containing a filesystem which allows users to access their files from any location. The editor will also have syntax highlighting which will improve the readability of the code, which in turn will improve the efficiency of the developer.

Processing.js's code is also known as sketches. There will be an area where the user can test their code out and see it in action. There will be a play button and a reload button that will give them easy access to perform these tasks. There will also be quick reference to processing.js syntax and documentation, allowing the user to search for processing.js functions to check a) if they exist, b) how they can be used and c) syntax examples.

Tonight, Harjinder, Steven, Anthony and myself collaborated and came up with a prototype located below of one of the ways that this editor could look. Under the 'Active' tab is where the proposed demonstration of the code that has been compiled using the 'play' button can be found, and Reference is where the processing.js references can be found. They can also be searched for using the search box beside it. When Reference is pressed, the processing.js references will likely be sorted in alphabetical order. We think that the below looks like a nicely designed IDE but it is just one of the ways that it could be designed, and we are still in the early stages. No matter how beautiful it looks like in the end, which it undoubtedly will, we will enjoy working on it and it will definitely be both a good experience and incredibly rewarding.





Monday, February 15, 2010

Did some testing for processing.js 0.5

I was sitting on irc the today, in processing.js, and was asked to do some testing for processing.js. A colleague and I went through the list of examples/demonstrations of what processing.js can do and reporting if they acted differently in different browsers, or did nothing at all. There were a few instances where the example did nothing and another couple of instances where it behaved unexpectedly. All in all, I found it interesting looking at the source code and seeing processing.js in further action. There was a list of like 50+ examples and we had to go through them all and saw a large variety of processing.js's power. The language does not seem to be a difficult one and I look forward to working with it further in my work with Bespin and beyond...

Built Bespin Locally

In order to have full access to the files and to be able to test the environment properly, I have just built Bespin on my Windows laptop. I had to use cygwin and treat my computer like a Unix OS and I must say, it does a good job. The download/clone went flawlessly and I am now able to work on the bugs more effectively. I was unsure where to begin looking for the 'scrollbar cursor does not change' code in the repository but looking back at my bug page, a fellow by the name of Julian has implemented some code that could be useful for my bug. It seems that the code he edited was in this file:

plugins/supported/Editor/views/canvas.js


and is called from this file:

plugins/supported/Editor/views/text.js


This seems like a good place to start looking. Thank you Julian, wherever you are...

Thursday, February 11, 2010

Must get working on these bugs

I've been working on this C++ assignment for like a week straight. I worked on it prior, but didn't go hardcore on it until recently. C++ has always been my weakpoint, and I plan on it getting better this semester. There's supposed to be a strike for the colleges, and who knows, maybe that is a hidden blessing. I think I need some more time to review C++, since it was my weakpoint and now we are supposed to do intelligent things with it, I have better brush up on it before it 's too late. I spent so much time on it that I haven't been able to keep up with my project for OSD. I am trying to find the code for this syntax highlighting business now..I didn't want to do it last minute. i don't know why I am so weak with C++, but that needs to change. It took up way too much of my life, time, schedule, and other things I should have been doing. I could have multitasked, and I tried, but everytime I'd go to another task I'd think I had a resolution to the problem I was faced with in my C++ assignment. Definitely need to get to work on bespin...now to find that code...

Wednesday, February 3, 2010

Firefox Build

I began by typing into Google 'download firefox source code' and stumbled across this page. It was nice enough to give me a link to the source code and some guidance that winzip and winrar don't (at least at the time the article was written) have the ability to extract .*bz2 and .tar files properly, and to do it with 7-zip. I extracted it into a directory on my computer and proceeded to look for instructions on how to build Firefox on the web.

I opened up a few websites, but only really looked at one page in particular. The author seemed to explain things very well, and it was clear and easy to follow. He said he was new at building Firefox, as was I so that was a promising commonality, but the main difference is he did it on visual studio 2005 and I was running it on visual studio 2008, so I had to change a few things in the batch setup file, being the directory.

It was all good and well until we came to the .mozconfig file that we had to create. The first error was that it was saying I didn't have it set to create .mozconfig.mk automatically. After I fixed that, it was saying I didn't have MOZ_PROJECT_CO or something along those lines set to a variable, yet scanning through the files I found a MOZ_PROJECT_CO=browser line, so I do not know what it was talking about there. I went searching on the web and stumbled across this page from mozilla that had this set up for the .mozconfig file

echo '. $topsrcdir/browser/config/mozconfig' > mozconfig # let's build Firefox...
echo 'mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-release' >> mozconfig # ...in this directory...
echo 'mk_add_options MOZ_MAKE_FLAGS="-j4"' >> mozconfig # ...quickly.


however that didn't work either, and had the same moz_project_co issue. I was two seconds away from asking in the firefox channel of irc and had typed out half of the message, but then on my way to pastebin to paste what was happening, I decided to try something. I made a combination of the two and ended up with this...

# Building Firefox Trunk with Debugging
. $topsrcdir/browser/config/mozconfig > mozconfig

# Put all obj files in one place, not in src tree
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-objdir >> mozconfig
ac_add_options --disable-static
ac_add_options --enable-shared

# Debug Build Setup Options
ac_add_options --disable-optimize
ac_add_options --enable-debug

# I'm using Canvas for my work
ac_add_options --enable-canvas


and voila! after a quick

make -f client.mk checkout


it began!! Success!! At least for the checkout... There were a few 'command not found's at the beginning of the build but that was something in the .mozconfig file and it seemed to have been minuscule. The line numbers of the issues were, 3, 8, and 12, and those are the lines that are blank, so of course no command is found on a blank line...

I then ran

make -f client.mk build


hoping that it would all work out, but unfortunately it did not. It said to build the installer, I would need makensis, and to build without the installer, to reconfigure using --disable-installer. It is late now, and I am tired, so I thought I would speed up the process and disable the installer. Lo and behold, it ran for a little bit longer but ... not long enough ... as a new error has been brought to the surface...an error unlike any other...and error, full of unorganized and very confusing lines.

/cygdrive/c/proj/mozilla/build/cygwin-wrapper /cygdrive/c/proj/moztools/bin/nsinstall -m 644 ../mozilla-config.h /cygdrive/c/proj/mozilla/config/nsStaticComponents.h ../dist/include
/cygdrive/c/proj/mozilla/build/cygwin-wrapper: line 75: /cygdrive/c/proj/moztools/bin/nsinstall: Permission denied
/cygdrive/c/proj/mozilla/build/cygwin-wrapper: line 75: /cygdrive/c/proj/moztools/bin/nsinstall: No error
make[4]: *** [export] Error 1
make[4]: Leaving directory `/cygdrive/c/proj/mozilla/firefox-objdir/config'
make[3]: *** [export_tier_base] Error 2
make[3]: Leaving directory `/cygdrive/c/proj/mozilla/firefox-objdir'
make[2]: *** [tier_base] Error 2
make[2]: Leaving directory `/cygdrive/c/proj/mozilla/firefox-objdir'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/c/proj/mozilla/firefox-objdir'
make: *** [build] Error 2


...Yea. Sooo...I guess something is wrong with cygwin-wrapper. That, or permission is denied to nsinstall. or both...line 75 in cygwin-wrapper is simply

exec $prog $args

Prog being the first argument after exec is run, and args being what follows after that...
I guess the issue is that nsinstall's permission is denied. I looked at it in windows explorer, and it does have a little administrators icon on the icon. Time to look to irc and see what they say...
I asked irc and there is no response. It is troublesome because recently my internet is not really working at home and I am stuck at the library most of the time. The only time my internet works reliably is after midnight...other than that downloads will stop not far in and productivity is hindered. I asked some irc folks but I guess it's too late for a response? Either way, I will continue to pick away at it, at 2 in the morning, after 5 unsuccessful hours in the library...maybe if I download these mozilla build tools, things will get better.

I downloaded the build tools that are defined as a prerequisite on Mozilla's development wiki, but unfortunately, it encountered a new error...

make[1]: Leaving directory `/c/proj/mozilla'
make -C /c/proj/mozilla/firefox-objdir
make[1]: Entering directory `/c/proj/mozilla/firefox-objdir'
Makefile:45: /cygdrive/c/proj/mozilla/config/config.mk: No such file or directory
Makefile:69: /cygdrive/c/proj/mozilla/browser/build.mk: No such file or directory
Makefile:91: /cygdrive/c/proj/mozilla/config/rules.mk: No such file or directory
make[1]: *** No rule to make target `/cygdrive/c/proj/mozilla/config/rules.mk'. Stop.
make[1]: Leaving directory `/c/proj/mozilla/firefox-objdir'
make: *** [build] Error 2

No rule to make target mozilla/config/rules.mk ehh ... well, that's odd because there's a rules.mk in the mozilla/config directory, so why do you need a rule to make it?? Bah!
I tried to just build it with the command make -f client.mk as it says in mozilla's site... only adding -B at the end to make all targets...and I will hope for the best. Sleep would be nice, but I think it's a thing of the past since I have to work on some C++ which is due tomorrow and I have not been able to find the time to work on it. I haven't watched tv for so long :(. I have re-enabled the installer to be built by the way since I am taking another route and using the mozilla build tools. An installer is definitely an integral part of any application, and it should be there.
Whoa...it's been running for a good 10 minutes. I may have something here. Maybe all I ever needed was that -B...never mind. Same problem. I don't understand why it's saying it's not making rules.mk when, for one, it's already made, and two, I did set a rule to make all targets (also known as rules.mk)...

make -B -f client.mk build ???
please.
nope
make -B -k -f client.mk build?
nope


So I have decided to scrap everything and just go with what it says on the mozilla developers website. If this works, then ... good. It should, why wouldn't it...? I have just run the first step, being

hg clone http://hg.mozilla.org/mozilla-central/


but it is taking forever. It's been about a half an hour and I don't think it's even half through. I can thank my internet connection for that. I am going to bed. In the morning, I will continue with the

make -f client.mk


Anndddd I tried to run make -f client.mk but unfortunately, I do need the Windows 7 sdk. The biggest problem with that is finding a connection that'll be able to get it in less than 6 hours, since it's 2.5 gb. My connection won't do it, since the sun is up and it'll continuously drop, but I am at school now and have begun the download...only 10 hours left...then hopefully there will be some success.

Friday, January 29, 2010

Working on Bespin Bugs

I'll be working on Bespin for Mozilla and have requested to be assigned a few bugs I found on Bugzilla. I have requested to contribute to issue 516852, about how the scrollbar cursor doesn't change to the correct cursor when it's over the custom scrollbars in the editor, and issue 521823 about how commented code doesn't display as being 'greyed-out' when the cursor is near the bottom of the file, but becomes greyed out once you move the cursor to the top of the comment block. I chose to work on these two issues because I thought it would give me an introduction to the Bespin code, give me some access to the code, and begin my understanding of the inner-workings of Bespin. Unfortunately, I was denied working on issue 521823, due to the fact that 'it's unclear to me(Kevin Dangoor) when we will bring the debugging functionality back. There are significantly more important things on our plate than that...'. That is unfortunate because I was looking forward to working on it a lot, but that will have to wait.



Background

Bespin is an online IDE developed by Mozilla Labs. It allows users to create and edit code, similar to Microsoft Visual Studio, from within a web-browser with no client-side installation necessary. It allows multiple users to work on and discuss a single piece of code/program collaboratively. It is also a piece of open-source software...a very attractive option to developers everywhere.



Progress Tracking

I will be tracking this progress on my wiki. I will also post things that other developers would find important on the issue page (516852). They will be able to follow me through my wiki and through my posts on the issue pages listed above. I expect to have looked at the code for these issues by February 5th and to have issue 516852 finished by February 19th. It does not seem to be a very big issue so I do not expect it to take long to resolve.

Different Versions of Each Release

As stated previously, the issue does not seem very large so I do not expect it to take very long. For issue 516852, I plan on it being done for February 19th. I will then continue to work on more bugs to help out the mozilla community. I will discuss my issues with Kevin Dangoor to ensure I am doing everything according to specs.

Overall

I will have to brush up on my JavaScript since that is what Bespin appears to be coded in, in order to complete the bugs I wish to work on.. I have contacted Kevin Dangoor and there is another programmer, Alex. Google will be my best friend when it comes to this assignment, and I plan on using it through every step of the way. I am sure to experience new barriers as time progresses and I hit little annoying bugs that take far too long to fix. I expect to talk to people over irc and learn on my own using google to overcome the barriers, and I expect it to work well. We shall see how it works in the end. It is my first experience working with open source and contributing to a project such as this, so I expect it to be a great learning experience and don't doubt that it will teach me much in terms of contributing to development in the 'real world' and helping me to understand what it's like to contribute my skills outside of corporations (such as RBC, where I did my co-op) and school.


Saturday, January 23, 2010

Joined Some Mozilla Mailing Lists

So I joined some mailing lists from Mozilla that I thought I would find interesting.

The first one: dev-amo, which is discussing the software powering the mozilla add-on website. I thought I'd join because I wish to get involved in some development of addons for mozilla. It may just be discussing the software powering the website, but it looks like a damn cool website and I wouldn't mind hearing about it and what they have to say about it.

The second one: dev-apps-chatzilla, which is discussing the development of ChatZilla, the IRC chat client that is an add-on to Firefox (Firefox has so many add-ons, can anyone really beat it at this point???). I've began using it as my main IRC client and it is really easy to use and nice. I don't really use the mouse with it at all but that's a possibility, and that's always good for users who like the GUIs. If one thing leads to another, maybe getting involved in some development in it would be fun, but for now, hearing about it will satisfy any curiousities I have and it shall be interesting.

The third one: dev-apps-firefox, which is, of course, the development discussions about Firefox. I joined it because I want to keep updated on the general updates and discussions about Firefox and hope to get involved in add-ons with this browser. It is my main browser, as it should be...and everyone else's :-D, and I'd like to hear about what's going on with it. Be in the loop and get the latest news!

The fourth and final mailing list I joined was dev-embedding, which discusses embedding Mozilla code. I believe that to mean general discussions about embedding code into the add-ons and other programs related to Mozilla-type products. I want to learn more about this, so I joined it.

One step closer to being involved in the open source community. Knowledge is power!!!

Experience in Firefox Channel on IRC

I have been sitting and observing the #Firefox irc channel on moznet throughout the night and, by watching what's going on, I can see how effective IRC can truly be. It appears that anyone, even those unknown to anyone, can just pop in at any point in time and ask questions about whatever may me itching their curiousity in regards to Firefox (or whatever the channel they are in is related to), and will in most cases get an answer if someone there is capable of answering that question. It's really a thing of beauty for people who want to troubleshoot their Firefox browser, talk about potential add-ons, and just have general discussions about Firefox's capabilities or lack thereof. I look forward to using irc in my projects and for future projects that I take on in my lifetime. It appears that programmers have another best friend aside from Google, and I can see how once you become a regular user, how involved you can become as well as how knowledgeable you can become, and how you can soon start contributing the knowledge that you have to help those who need it and truly become a part of the community.
It should be fun.

Friday, January 22, 2010

Computer Sciences in an Academic Setting

After reading the article on the Academic source code dust-up symptom of CS education ills, I can further see the inconsistencies between what goes on in the majority of classrooms and what goes on in the real world. It's such a large stretch from not being able to show anyone the code you have created in an academic setting or really discuss it without fear of 'plagiarism' or being declared a cheater, compared to once you're out in the working world, be you at a business or even an open source developer on the world-wide web, since at that point in time, teamwork and being able to properly communicate your knowledge and skillbase becomes so imperative to your success. For 'Kyle's Professor', to argue so vindictively and when he was not winning the fight, to take it to the boss hoping for backup seems so extreme. He was afraid people would find that code and use it for the assignment? Maybe that would prove that they are intelligent students, even if it is just finding another students code on the internet and realizing that it could be used for their own benefit, and maybe they would be able to improve bits and pieces of it and make it their own in a way, as if it was the real world and as if it was a real-life situation. I've heard many times from many professors not to 're-invent the wheel' but then in a scenario like this, I'm sure they'd react much the same. The majority of the time, a programmers best friend is 'google' or their favourite search engine, and that would, in a way, prove that they know how to use the search engine properly to be able to find what they needed to find and use it to the best of their ability. This is legitimate, however, only if the programmer is able to program properly and would have been able to write all of the code they had found, given the necessary amount of time. The professor also had the ability to change the assignment a little bit if he was afraid of people posting their code or showing it to others and thought it would take away from the learning experience...to tell someone that the code that they created and made, spent countless hours on, is not theirs to do what they want with it is pretty absurd.

I agree with Scott in his post here that in the beginning stages of the classroom, individual assignments and testing does play a big role in the learning process at the beginning of their education, but after 3 or 4 semesters it has definitely filtered out the ones who are incapable of programming or lack the patience to learn it, and at that point there are other ways to go about the learning process, such as real-world scenarios and team-building projects. How often do programmers begin with nothing and create the entire program solo? Maybe in their passtime or if they are creating something privately, are greedy and want to keep all the credit and work for themselves, but other than that, they usually have help, and at least post a question or two on the web hoping for a response that will help them along the way, but the rest of the time, some massive amounts of teamwork is involved in the full picture. I think a lot of the problem is that a lot of professors haven't really programmed outside of a school setting and may not entirely understand what programming outside of a school setting is like. When I was in co-op, I was discussing something my professor said or did or something along those lines and my colleague was just like, "But has he ever programmed outside of a school setting?" as if it was quite obvious he had not, and when I said 'no' then he went off on a tangent about how a lot of professors never get out in the world and are hired out of school, and don't fully understand the 'programming world'. They may understand programming, but not the 'programming world'. I find this to be true, and I think those teachers should teach earlier semesters and earlier classes while more experienced programmers who have real-world experience should teach the later classes. At first, we need to have our minds shaped to learn programming; just general programming. But afterwards, when we're in the later semesters, we need to have our minds shaped as if we are going out in the world, and we can't, or shouldn't, go out there blind, unknowing of what it could be like. We should have experience, even if it is just in the classroom, of what the world will be like once we're out there with these new skills and new personas. I do like school and I found a lot of the projects we were meant to do fun, but it is a shame that none of the code will ever be used or seen by anyone else and that it was ultimately pointless except for the grade, and to a lesser extent, the learning process. Now, they're just a bunch of files on my external hard drive...

Friday, January 15, 2010

The Cathedral and The Bazaar

This is a great analogy of how the programming life-cycle runs and works, or can run and work. Up until open-source and the internet began to evolve, it was practically impossible to create a program and work on a task in a bazaar-type atmosphere, or ... style... for lack of a better word. But once the internet became a more widely-used environment, it gave software and computing an edge that it had never been given before. The only ones that were able to band together a large amount of people to work on projects and programs that would, or could, be worth any money were those who already had enough money to find those experts, give them a workspace, and fund them. With the use of the internet, the workspace could be their parents basement, the expert could be a 12 year old kid who's been reading up on programming since they were 6, and the funding could be their parents paycheque which pays the internet bill. The possibilities of what could be are limitless now, if there are enough people who want to contribute. And...with this many people in the world, and with their inexpensiveness of computers in this day and age, there will always be someone.

No longer does the programming life-cycle have to be supremely organized or routine. No longer does the boss have to tell their programmer exactly what they want or does the client have to change their mind a million times to get something that somewhat resembles what they think they want. Now, with the source-code widely available for programs that are desirable to whoever the audience may be, the audience can change the code based on what they want and what they feel would be useful in that software. It may not be 100% organized and there may be bugs in the software, there may be a revision number 1.01390842109482, but it is every step of the way that helps the people working on the software to truly understand what is going on, it is those bugs that make people see what's wrong with the software and how it can be fixed, and it's that reparation that makes the software developers stronger, more knowledgable, and be able to further themselves, their work, their skills, and their software.

Although it may not be orderly, although when software gets published it may not be in perfect working order, and although there is very little consistency and routine in the life-cycle of open source, it is pure brilliance, my friends. Pure brilliance.

Introduction

Hello there. My name is Derek and I'm 23 years old. I've been in school for as long as I can remember.........................and definitely can't wait to get out and into the world to use these skills that have been a long time in the making. I went into programming kind of indecisive whether it was what I wanted to do or not, but over time, and as I learned more about it, I fell back into my roots of nerd-ism and became the computer science dude that God intended for me to be. I used to be on the computer all the time when I was younger and throughout high school for a while but then at the end of grade 12 and after high school I had a bit of a falling out. Shockingly, that was about the time when I had to pick a lifetime career...too bad. Luckily, I decided I would give it a try after two courses that I was unsatisfied with and have stuck with it and dare I say ... fell in love with it? I dare. I did some programming in high school but lacked the concentration since there were females in the class which stole my concentration. That doesn't seem to be a problem in this course...but I worked on a couple of websites in my younger days, and some java and visual basic, as well as Turing (haha) in high school, so I guess that was some kind of an introduction into what I was getting into. High school isn't very in depth though at all when teaching this, and it was all pretty much following examples in a workbook, which isn't the best method of learning I don't find. Not involved enough.

Anyway, that was my ramble. I look forward to working with all of you and shall talk to you in the near future.

Revolution OS

After watching 'Revolution OS', I have a new appreciation for Linux and open-source programming in general. It had never really occured to me that the issues I had run into using programs done by money-hungry corporations could be resolved by going into the code (had it of been available to me) and editing it to become and to do what I had originally wanted it to do, or even just to specialize my programs and my computer to my own standards of what I want it to be, ultimately making it the perfect pc in my eyes. Also, seeing the time-frame that it took for Linux to gain popularity and advance to become a more useful and stable operating system because of the amount of random people on the internet that were interested in partaking in the program, whether it be for their own sake or to help out what they believed to be a good cause was pretty astounding. It only took four years of 'Bazaar-style' solicitation and exposition to go from very few users, I think it was like 1000-10000, to like 3.5 million users or something along those lines. That is an enormous accomplishment and something that each and every one of those programmers that contributed to the life of the program should be proud of, whether it was their intention or not. I look forward to doing some open-source programming and contributing what I have to contribute to those who will either find it interesting, useful, or dull and boring.