Wednesday, June 28, 2006

Bug fixing is fun (not)

Bugs that still exist in the code:

  1. Newly created tabs that are selected do not cause the tab bar to scroll along to make it the right-most tab.
  2. If a tab is currently selected and is to the immediate right/left of the tab bar then there is no divider.
  3. The current implementation does not obey the Full Keyboard Access rules that are currently in place <- a massive headache!
It took me longer than I expected to fix some of these bugs today. I will need to try and rattle through these tomorrow morning so I can get onto the tab-dragging code before Friday. After I have fixed these final bugs - and it has already been suggested that the first one might require an additional patch to fix, and I've not even thought about the third, but it is related to the first - I will post another video of the behaviour and perhaps a Universal Build that people can play with over the weekend.

Rant, apology

I ranted at somebody who has been a great help to me so far. I didn't mean to rant directly at him, I should have posted my concerns to my blog and made them more general instead of them sounding like me shouting at one person in particular.


Monday, June 26, 2006

Visual representation of M1

Since tomorrow is a 20% day I have decided to post a short movie this evening. The hope is that by the time I return on Wednesday morning there will be some reasonable feedback based on what you see.

I used iShowU to create this Quicktime movie. It cost me $20 and I'm pretty happy with it so far. No, I didn't get iShowU for free and I am not being forced to promote it.

So, without further ado, a tab-scrolling Camino demonstration! (4.6MB)

Bugs that still exist in the code:

  1. Newly created tabs that are selected do not cause the tab bar to scroll along to make it the right-most tab.
  2. The current scroll buttons do no indicate whether or not it is possible to scroll further in that direction.
  3. Resizing the window while scrolled away from the left-most tab causes re-draw problems.
  4. If a tab is currently selected and is to the immediate right/left of the tab bar then there is no divider.
  5. Upon closing a tab that is right-most in the tab bar the tabs are not resized correctly. This is a regression from the first patch submission to the second patch submission.
The only open bug that causes me any concern is the first one. Bruce has suggested that it might take a further patch to fix that problem.

Some open problems that I'd appreciate feedback on:
  1. If a user has 100 tabs open, how can we make it easy for them to scroll to the tab that they want to get to?
  2. How should a user be able to determine how many tabs they have in the active window?
  3. How animated should the scrolling transition in the tab bar be?
I have no idea how many people read this blog daily, so I hope that it is not too much of a bandwidth hit for the host!

Progress on Milestone 1

Spent today attempting to bug fix, make some good progress and only have 4 'bugs / features' of my code to iron out:

1. Newly created tabs do not cause the tab bar to scroll to make it the right-most tab.
2. The current icons do not indicate whether or not you can scroll any futher in that direction.
3. The left-most visible tab index is not being changed when you resize the window.
4. If a tab is currently selected and it is to the immediate left or right of the tab bar then there is not divider drawn.

My code is currently undergoing it's second review by Bruce Davidson and Nick Kreeger. They are firm but fair and their feedback is really constructive. I need to watch my indentation and the way I set out my if { ... } else { ... } statements, watch how I name variables, and watch my comments.

Since tomorrow is my 20% day - true Google style, without the massive Google paycheck - I plan to have these problems ironed out by the end of Wednesday. I also plan to post the small video that I promised earlier on Wednesday evening.

Ian rightly pointed out that my patch will never make it into the trunk by the weekend - I will make a post when it eventually gets in there.

First patch submited, bug fixing continues

I submitted my first patch on Friday. The code doesn't quite work, but as Mike predicated the review process has been pretty valuable. I've been fixing the nits and picks in the patch this morning and plan to spend this afternoon ironing out the redraw bugs that are plaguing the code.

I'm hoping that by Wednesday I can have this patch ready for a final submission and hopefully it will be r+ and in the trunk by the weekend for those of you who use the nightly builds to play with.

When I iron out these bugs I will be posting a small Quicktime Movie file of what a scrolling tab bar looks like - this is for those of you not wanting to use nightly builds but are still interested in seeing the progress.

Thursday, June 22, 2006


Nick Kreeger, one of the Camino developers, has written one of the most superb little Widgets I've ever used!

If you write code for Camino and you don't have this then go get it.

Wednesday, June 21, 2006

My end of month assessment

This is probably going to be a long post, this is a warning.

I decided to write this because Mike has to submit an evaluation of me on the 30th June, but I do not have to submit an evaluation of him until 5th September and I thought he might like to know more about how I've been doing. This is my evaluation of my first month as a Summer of Code student.

Exactly 4 weeks ago today I was informed by Google that I had been accepted to the Summer of Code Program. I was pretty excited upon hearing the news. I had spent about 2 weeks meticulously preparing my proposal and chatting with the Camino developers on their IRC channel to hone my proposal to something that either Mike or Mark would be interested in. I was in the middle of my junior honours exam diet at the time which put even more pressure on writing a good proposal.

After celebrating with a few beers and a few friends I started on my proposed schedule. I almost immediately consulted the community to see if they could suggest anything additional to my proposal. There were probably about 100 comments between the mailing-list and the MozillaZine forum - some of them posed interesting questions, some of them were not quite as interesting...

One of the most important things for me to do during this project was to be as transparent as possible with the community. When Aaron and Hakan came to the WWW Conference in Edinburgh and we met up for a beer I remeber Aaron saying to me "If you think you want to do something that will benefit the community, then go for it!" I'm not sure if that was before or after a few beers :)

During this time I purchased a copy of Cocoa Programming for OS X (an essential text-book for people who want to learn Cocoa, as recommended by Hakan), a copy of the Objective-C Pocket Reference, Cocoa in a Nutshell, and The C Programming Language. I religiously read and work through 2 chapters of Cocoa Programming for OS X every weekday. I also take time to make notes and build daft applications to help me experiment.

At the end of the community consultation the Camino developers, and some assorted lurkers joined in our IRC conversation to discuss everything that people had suggested. We chatted for about 90 minutes and to be honest we cut out most of the suggestions as OFFTOPIC, or WONTFIX. A wiki page was created as as result and I now use that as a central location to keep focused, on topic information about my project available.

Mike and I begun to meet every Friday to discuss my progress, my concerns, his thoughts, his concerns. This was one of the first things that we agreed should happen so that we don't get to the end of the summer and I've done nothing.

I have grown to hate XCode with a passion - it drains life from me. It breaks all the time and sometimes it doesn't pay any attention to anything I try to tell it to do. I had the same experience with Eclipse. Give me vim and some command line tools any day of the week!

I had a bit of a rocky time during my first implementation week due to my exam results trickling out day by day and causing me some severe stress and lack of sleep. Thankfully Mike didn't roar at me for this but took the time to let me know that if I didn't let him know about these things then there wasn't much he could do to help me.

This week has been much more productive, I posted some images earlier on showing my progress and I am planning to have something in BugZilla by Thursday night, Friday night at the latest.

As I wrote this post I recieved an e-mail from LH at Google informing all SoC students:

... if your mentor does not feel you've made
sufficient progress on your project, you will be dropped from the
program and no further payments will be issued to you.
I'm hoping that this is not going to be a problem, but I will be working double-time to make sure that I get my patches submitted to BugZilla before 26th June. I'm not going to ask Mike directly about what he is going to write because as it says on the Student FAQ:
Mentors evaluations of students will be reviewed by Google's program administrators, but won't be released to students unless requested by the mentoring organization's administrator(s). Students reviews of mentors will be shared with Google's program administrators and with the mentoring organization's administrator(s), but not with the student's mentor unless requested by the student. In the case where the mentoring organization's administrator and the mentor are one and the same, the student evaluation will be shared with the mentor. In some cases, Google's program administrators may need to share the results of the evaluations with the student and/or the mentor to arbitrate when payment should not be made; should this need arise, all parties will be notified in advance.
Mike has never said to me that I need to work harder, so I reckon that as long as I reach my first milestone I stand a good chance of being kept on.

As a result of this e-mail from LH, the importance of me getting my patches submitted to BugZilla by the weekend have just increased ten-fold.

I suppose I should talk about the Google side of things now. I have still not received my first $500 pay cheque. It looked like we would be getting O'Reilly Safari Bookshelf accounts but nothing has come of that. Oh, I got a free leather notebook from Google...

Things that I need to do ASAP:
  1. Submit my proof of enrollment to Google
  2. Submit my academic transcript to Google
  3. Fill in the abstract for my project
  4. Get my patches into BugZilla by Friday
  5. Buy some new trainers

Some implementation images (at last I hear Mike say!)

Less tabs than the width of the tab bar

More tabs than the width of the tab bar

This is what happens when you resize Camino

You will be using the buttons at either side to direct the tab bar to the tab you want to be at. I plan to implement scroll all the way if you double-click a scroll button.

When you resize the Camino window these scroll buttons appear and disappear automatically.

Obviously we will need somebody like Jasper to make this look as beautiful as we all expect from OS X applications.

I need to get back to work on making the tab bar scroll in a more elegant manner because it is really ugly at the moment! I have until Friday to get his done because my Mentor needs to start filing a report that is due on 30th June.

Just wanted to share these screenshots with everybody :)

Edit: I made some implementation changes based on feedback from Camino developers.


This is an essential tool for any Cocoa developer and since I use it all the time I thought that I should link to the site.

Tuesday, June 20, 2006

Battling with a MacBook, and Safari vs Camino

It took a few hours to get this MacBook to build Camino in a similar fashion to what I was used to on my iBook. I decided to write a little guide so that others can do the same. You can find that guide here.

It took me 48 minutes to compile from scratch which is exciting considering it took 1 hour 59 minutes on my iBook.

On the topic of Safari vs Camino, compare the following screenshots of the Blogger Create Post tool as viewed in Safari and Camino respectively.

Monday, June 19, 2006

Distractions, distractions

Apple sent me a MacBook today which was very nice of them.

Spain are playing Tunisia in the FIFA World Cup Finals today and I'd really like to watch the match.

I have lots of work to do today in order to reach my first milestone.


Friday, June 16, 2006

Weekly Meeting 16/6

Mike and I met for the second time today. These weekly meetings are great because they make sure that we always speak to each other at least once a week.

I've had a bit of a slow week because I had other things on my mind. Mike reminded me that if things are troubling me, or I think they might be affecting my work that I need to let him know right away so that my milestones can be adjusted appropriately. He let me know that he can't do anything to help me if I don't keep in touch with him.

It was great to hear Mike saying these things because I've heard it all at University but I've never really believed it. But he seems to be genuinely determined to help me achieve my goals this summer. It's good to feel like somebody really is looking out for you. I hope my dissertation supervisor is like this next year.

We spoke about whether or not I should implement the scrolling tab bar overflow in a similar fashion to Dashboard. I'll be looking into this on Sunday.

Mike told me that it'd be in my interest to get a patch submitted by next Friday so I can actually go through the Camino review process. We also spoke about how much help I could get from the community without being a chancer and how I could use the community to my advantage.

Mike is off to California next week so we will be 8 hours apart. He told me that he'd be checking his e-mails all day every day so we can make sure I reach my first milestone.

Sunday, June 11, 2006

Implementation sketches complete

I have completed my implementation sketches for my project. My scanner was an absolute pain in the arse and kept on scanning things in at a skew angle, or at 1200x1200 DPI (for no apparent reason).

Tabs will be able to be re-ordered through drag / drop within the same window.

Tabs can be dragged out of a window to create a new window, or to a different existing window and the second image

Tab overflow will be extended to include 2 clickable arrows (one at either side of the tab bar) when the user has more tabs than the size of the tab bar.

I would really appreciate any feedback to the Comments as soon as possible.

Saturday, June 10, 2006

What should be the new name for this blog?

I have been informed by several Mozilla related blog aggregators that my blog must only contain Mozilla related content in order to be aggregated. I cannot guarantee that in the future I will not write about personal stuff in this blog, so I think I will change it from to something else.

What should I call it? It needs to have some kind of relation to either me, or to my project, or preferably to both.

Suggestions in the comments please :)

Friday, June 09, 2006

First weekly meeting with my Mentor

Mike and I had our first weekly meeting today.

We started off by discussing the outcome of the meeting of Camino developers yesterday. We narrowed down the list even further and came up with a definitive 7 tasks that I should complete by the end of this project. This list has been appended to the Summer of Code 2006 page on the Camino Wiki.

We agreed that integrating tooltips would be easy to achieve and could easily be removed if it was a performance hogger. We also agreed that Tab Expose should not be tackled this summer because it was likely that I would rush it and things would be ugly. We are going to spend this summer thinking about the best way to implement it and hopefully at the end of the summer we will have a concrete idea that I can work on during University next session.

We set my first milestone to be to implement draggable tabs within a single window to be the Friday 23th June 2006. This ties in quite nicely with the evaluation that Mike has to write on the 26th June concerning my progress. Hopefully he will be able to write good things!

We set some tentative milestones beyond that - implement dragging tabs between windows and drag to create new windows by Friday 7th July; implement a scrolling tab-bar by 28th July. Mike pointed out that most of these milestones are going to need user testing, prototyping and feedback to make sure that I am implementing them in a way that users are comfortable with, so some of these milestones will probably slip. That is why it looks like I am finishing 3 weeks early. It's pretty damn certain that I wont!

My immediate goal is to produce a series of annotated sketches to outline in detail exactly how I plan to implement draggable tabs so that Mike and the other Camino developers can offer feedback on my implementation thoughts.

The end of a busy week

You know that you have had a busy week when you have not been flooding your blog with posts.

I have had some problems with my new domain and hosting. The company who I purchased the domain from will not allow me to change the nameservers so I had to change the DNS entries instead. They still have not got back to me to tell me why I cannot do this.

I have been working on bug 235863 this week. It has been a nice step into Objective-C and Cocoa. I have nearly finished my patch for it but have a few peculiar problems. Jasper Hausen has been working on a new icon for this and hopefully I can submit this for review by the end of the weekend.

The Camino developers met yesterday to discuss the the feedback received from the community over the last 2 weeks. Obviously every piece of technology that I wanted to use during the meeting broke - the MozillaZine Forums and the Camino Wiki.

There is a new page on the Camino Wiki and it will be a nice central location for everybody to pay attention to the details and not the blurb that I post here. At the moment registration is disabled on the wiki.

One of the Summer of Code Mentors from Adium dropped in on our discussion because Kent Sutherland is working on integrating PSMTabBarControl with Adium. There is a chance that between Adium and Camino we might try to present a uniform tab-implementation in an attempt to try to allow users of both the same experience. These ideas are still in their infancy, but there is certainly no harm in keeping in contact with the people at Adium.

I have my first weekly meeting with Mike today. I think this week we plan to roughly set out milestones for my progress and to discuss things that I have been doing so far. I hope I've been doing the right kind of things so far. Perhaps not enough coding, but I am working on remedying it.

The FIFA World Cup starts today, I am still not sure who I will support since Scotland failed to qualify. I am torn between the Czech Republic and the United States of America. I have thought about choosing a team based on how much I like their away strip, but that is a little bit vain!

Monday, June 05, 2006

Taking a look at the market

Over the weekend I took some time to read through some of Apple's fiscal reports to see what could be inferred about Camino's potential user base. Since OS X 10.0 arrived in 2001 Apple have sold 17,024,000 Macintosh units. You can find this information here and here.

The Camino trunk is already OS X 10.3 or newer only. Since OS X 10.3 was released October 2003 that means that Camino is only able to target 7,824,000 users (who have a compatible system out of the box). (It was pointed out to me that support OS X 10.2 was becoming impossible because many of the bugs were OS-related and there is not much we can do about that. There is a bugzilla entry that relates to this here)

It is relatively obvious that many users upgrade their Operating System, but we cannot infer anything about the number of people who are upgrading to a sytem that Camino is compatible with.

As things stand it would be great if we were able to have 1% of our easily reachable user base using Camino (78,240). It's pretty difficult to find any statistics about how the current user base of Camino so hopefully by the end of the summer we will have a system in place to help us keep track.

Friday, June 02, 2006

A new domain coming next week.

I purchased a new domain for myself yesterday and hopefully will have everything ready to go on Monday. I will probably host my blog there and everything else related to my project.

The reason for this is that I'd like to be able to see how many people are reading about my work
and without adding an ugly counter to this Blogger page I couldn't see how to do it.

Will spend tomorrow comparing Webalizer and AWStats to see which one I will prefer to use.

The last entry in this blog will announce the URL of my new domain.


John Pannell from Positive Spin Media got in touch with me at the beginning of the week to let me know about his Safari-style tabs implementation and wondered if I would be interested in working with him over the summer. It appears that Adium are shifting to use this as their codebase for tabs, so perhaps there might be some future in his implementation.

He has allowed me to paste his e-mail here for all to see, any thoughts about his proposal would be appreciated.
Date: Sun, 28 May 2006 21:32:43 -0600 [29/05/06 04:32:43 AM BST]
From: John Pannell
Subject: Summer of Code: Tabs

Hi Desmond-

I was cruising my referrer logs when I found a number of hits stemming from your Camino forum entry regarding your SoC tabs project. Just wanted to drop you a line and FYI you to a tabs implementation I've been working on...

Many of the features outlined in your proposal are in place, and the control is BSD-licensed, so you can gain some inspiration for your efforts. The control is designed to be hooked up to an NSTabView... not knowing the internals of Camino's implementation, I can't say if this will be of help to you or not

Coincidentally, another SoC'er is working with the Adium project to improve PSMTabBarControl. The Adium people have chosen this as a possible future direction for their tabs, as their existing tab code is apparently a little crufty and confusing. The student's name is Kent Sutherland, more info on his site...

If PSMTabBarControl integrates well into Camino's architecture, perhaps we could join forces to really polish things out. Many of the requests I'm seeing on your forum entry are more Camino architecture than tabs per se.

Anyway... just a heads up. Good luck and congrats on your summer of code!


John Pannell
Positive Spin Media