weblog dedicated to software development, philosophy, and theology

Leave a comment

Tagging is Hot! Increased motivation to deliver amazing work!

Just took a break from my studying (3/6 exams left to go!) and got some feedback from the Firefox community of my work:

Kar(In reply to comment #21)
> Timothy, thanks for the reply. I am of the opinion that getting this patch in
> for FF3 is very important for tagging and places intergration plus useability.
> People really are not going to tag 1000+ bookmarks one by one. Do you think you
> will be able to get a patch working for final?

Yes, I understand the concerns in regards to usability and I think this would
provide value to the great improvements of Places.

I believe I can deliver a working patch for final. I am planning to work on it
again this weekend. I am just busy with doing away with exams and all right
now. By next Sat I should be confident to deliver.

DPS911/909 OSD/600/900 – You never know when and who values your hard work!

Keep up the motivation to deliver amazing work!


Leave a comment

And the plot thickens!

A duplicate bug has been identified with my current work in progress (WIP) bug: multi-edit. A user within the community requested for the ctrl-a key stroke to be used in order to edit multiple tags. At first I initally thought my patch incorpated key stroke since the changes that I made to enhance and develop this bug did not have impact on the programmability of the key strokes. However upon further investigation and testing I have identified a problem which needs to be resolved.

– ctrl+a within the tag folder, causes unexpected results: the bookmarks looses their tags.
– standard multiple select key stokes — ctrl+click and ctrl+shift + click comibnations, also causes unexpected results.
– the key stroke, ctrl+a works with regular folders (essentially, non-tags subfolders).

– tag a set of bookmarks with the value of “a”.
– click the “a” tag subfolder.
– enter “, b” to include a new tag.
– select the “search bookmarks” text box to update the tags (ie. trigger the onblur event)

Results: The bookmarks within the “a” tag subfolder disappears. The bookmark location within the regular folders remain the same.

Leave a comment

Demo #2 – Unit Testing

For Demo #2 the only progress I made was fixing the pop-up bookmark editor and assertion problem. It was kind of discouraging to only have this much progress, but nonetheless I’m taking this opportunity to be more self-aware in my unit testing skills.

System enhancements are difficult to perform testing especially if there is no established unit testing framework. It can be very challenging to manage all impacts made especially if you are unfamiliar with the given code base. But nonetheless, reading and understanding all these impacts is essential in order to properly take the necessary actions.

It’s really a privilege to be in school and have the opportunity to refine your skills and knowledge within a luxurious set of deadlines. For the most part, in the real world deadlines really mean ASAP…Well thats all for now. I’m going to keep you guys posted on my self-learning (or re-learning) and hopefully share more of my experience and lessons learned.

Leave a comment

Demo #1 – Places API BugFixing Project

This blog post seeks to provide an update of my DPS911 project: Places API BugFixing Project. This post also provides a storyboard style description of my progress.

Multi Edit or Bug 412002 -should be able to edit tags for multiple bookmarks at the same time, is the current active bug that I am working on. The official bug title explains what the bug hopes to achieve.

Figure 1 – Firefox 3: Places Bookmarks
The new Firefox 3 contains a significant amount of improvements and changes. One change that I want to highlight is the edit bookmark panel. In the FF3 source it is called editBookmarksOverlay.xul. The above link is showing my bookmarks items in the Bookmarks Menu folder.


Figure 2 – Bookmark Item Selected
When a bookmark item is selected the edit bookmark overlay panel loads text boxes that allow for bookmark attributes to be updated.

Figure 3 – Multi-Bookmarks Selected
When a user selects more than one bookmark item, either by using a ctrl+[mouse click] or shift+[mouse click]. The bookmark edit overlay panel loads only the ability to update the Tags bookmark attribute.

Figure 4 – Updated Tags
Here you can see that I have updated the tags from the bookmark items selected in Figure 4. I included the tag “sports” for the and bookmark item. One of the ways the update tag is triggered, is when anytime the textbox focus of the Tags bookmark attribute field is removed. The textbox focus refers to the event when the cursor is placed and exists within a given textbox.

There are problems with a conflicting event. An event triggers a function to change the edit bookmark panel every time a bookmark item is selected. In my current release I have provided a hack that seeks to ensure that the update tag function is called before the algorithm changes the edit bookmark panel. This hack requires more testing as I have noticed inconsistent results.

Figure 5 – Related Problems 1
The first related problem that I have identified with my patch is with the Bookmarks pop-up editor which is triggered every time a Ctrl + k is issued within the browser. The editor is suppose to be more compressed and the “Folder:” field should contain a bookmarks folder location, like Bookmarks Menu or Unfiled Bookmarks.

Figure 6 – Related Problem 2
Continued from the previous Figure, when a user selects the drop down button from the “Folder:” field an Assertion Failure is issued.

Leave a comment

MXR, A DPS911 student’s best friend

I’m loving MXR more and more! I think I’m getting more comfortable with this tool and so I think I’ll raise the bar just a little bit for myself and aim to provide both the last two features that Alex Faaborg suggested for my release 0.6. I’m also planning to clean my code and include the comments and feedback that Dietrich provided.

Here are the ways I think we should consider exposing the ability to tag

multiple pages at the same time:Adding tags:

-multiple selection, editing the tag field in the properties pane
-multiple selection, drag operation to the tag in the left pane
-multiple selection, copy and paste to a tag folder

The one that is fascinating and challenging about developing bug fixes is that you are forced not to program for yourself which again is one key lesson learned in Barb’s Systems classes -my own personal opinion. The job is to take something that has been created and updated by numerous people, use all that and creatively attempt to apply your solution making sure that it not only works but its cohesive with the entire application / system… that’s why I agree with my Stock Broker neighbor’s perspective on computer science: “Computer science? I thought that’s more of a an art than a science…”

Lesson Learned

A lesson learned based on my previous patch thats worth sharing to new mozilla code contributors is when submitting prototype patches –that is code thats not ready to be reviewed for checkin into the source, Firefox full time engineers prefer the following:

> So basically you want me to clean up the code? So in the future when I
> submit prototype code I will just attach the file but not assign it for
> review? The assign for review is something more formal? That's what I wanted
> to talk to you about.

here's how i do it:

1. upload "WIP" (work in progress) patches, no review request, to save
my work, and for drive-by reviews of the approach
2. once you think a patch is ready to be added to the product, ask for review

Progress notes on release 0.6

My initial search for a solution to release 0.6 and some results that stood out and I’m going to further investigate. I just want to describe and share what and how I searched for a solution within MXR.

Used “drag and drop” as a value for “Text Search” field.


* line 740 — * Drag and Drop handling specifically for the Bookmarks Menu item in the


* line 1508 — * Handles drag and drop operations for views. Note that this is view agnostic!

Used “drag and drop” as a value for “Search for” field and filtered the “in files matching” field to query anything with a value of “places”. The filtering by file name (“in files match”) happens when you initially perform a “Text Search” in


* line 115 — case “cmd_paste”:
* line 116 — return this._canInsert() && this._isClipboardDataPasteable();
* line 189 — case “cmd_paste”:
* line 215 — case “cmd_paste”:
* line 216 — this.paste();
* line 342 — * Looks at the data on the clipboard to see if it is paste-able.
* line 343 — * Paste-able data is:
* line 349 — _isClipboardDataPasteable: function PC__isClipboardDataPasteable() {
* line 351 — // pasteable, with no need to unwrap all the nodes.
* line 1138 — * Paste Bookmarks and Folders from the clipboard
* line 1140 — paste: function PC_paste() {
* line 1171 — * Gets a list of transactions to perform the paste of specific types.
* line 1173 — * The types of data to form paste transactions for
* line 1174 — * @returns An array of transactions that perform the paste.
* line 1208 — // Get transactions to paste any folders, separators or links that might
* line 1213 — var txn = PlacesUtils.ptm.aggregateTransactions(“Paste”, transactions);
* line 1216 — // select the pasted items, they should be consecutive


* line 825 — * Constructs a Transaction for the drop or paste of a blob of data into
* line 828 — * The unwrapped data blob of dropped or pasted data.
* line 832 — * The container the data was dropped or pasted into

Leave a comment

Perseverance: Release 0.5

A speaker at my church illustrated perseverance as carrying a heavy load and maintaining this over a period of time. He then stated that building endurances requires taking on this load. This project, along with my other last term courses is going to build some major endurance! I just want to share this and to encourage both the people out in the web and DPS911 students (especially the ones preparing for graduation) to keep persevering! Keep fighting, Keep doing the right thing, Keep producing amazing work! You’re building endurance so that you can continue to persevere on whatever load you’re going to carry!

Release 0.5 Reflections Notes

The process of finding where I need to code came from a top-down approach where I started reading the UI layer to find the targeted functions/components (item selection/properties panel view states and the tag persistence layer). The techniques I used are mainly educated guesses/assumptions and debug “alert” statements to help me trace and walkthrough the code. In this release I also leveraged the MXR repository tool to assist in understanding code. For instance there was a discrepancies I found with a method in the Places View so I shifted my focused to MXR for an answer. The last notable highlight of release 0.5 and the code review is the persistence layer. The persistence layer is encapsulated in a XPCOM class called nsITaggingService. I created a mind map but its a hard copy. I still need to get use to creating a soft copy as I like the traditional manual way –the usability and user experience is much better!

Release 0.5 Status

There are three problems I had encountered. Two are bug related while the other is more on process. The bug related problems can be found as a posted comment filed in Bug 412002. I have also attached my latest patch there as well.
My process problem was a possible patch collision. A patch collision problem is when you create a patch from an outdated source tree on your local directory and attempt to apply it on the current source tree in the repository. I consulted my classmate Cesar about this issue. He informed me that testing out my outdated patch on a separate folder containing the updated source tree would be the best idea. Luckily I had only one block that failed during the patch and was small enough to manually fix it.

Now I want to find out a more efficient method in resolving collision problems with patches!

1 Comment

Bug 412002 – First Impressions

Here are my mock ups for the multi-edit feature that I am planning to enhance for bug 412002. I have attached the mockups with additional comments under the bug number for the community and Mozilla people to review before I begin any major implementation. This is also gives me a chance to understand what the requirements are and to determine what it takes to provide a solution.The following are a list of first impression plans for providing this bug fix:

  1. Find out the function that displays the properties form when (i) a bookmark item is selected and (ii) when a bookmark folder item is selected.
  2. Find out the function that takes care of persistence management.
  3. Modify the code to include the properties form to be enabled when more than one item is selected. Then update the way the persistence management layer so that it includes the latter operation.
  4. I am not sure how identifying two or more items selected works, so I am going to need some additional research in this field if upon finishing item 1 of this list provides no certain solution.