Software Development in Brisbane

Archive for the ‘Ephox’ Category

Swing Text APIs

Friday, August 29th, 2008

At Ephox we are pretty heavy users of the Java text APIs. In some respects the EditLive! team probably knows more about them than anyone in the world. In a Creative Coding Afternoon recently, I was doing some work on a cool plugin for EditLive! (it might make it into a future release of Enterprise Edition), and after spending time getting angry with the Swing document (some of the anger was justified). I had an epiphany. I expect that the actual revelation will not matter to any outside of Ephox (ok so people who want to work for ephox might be interested), but I'm going to share it anyway.

The Swing Document model != the DOM. Don't expect it to look like the DOM. Don't expect it to be the HTML DOM. The subclass HTMLDocument is not the DOM. While you can access all the information in the DOM, you should not expect there to be a direct mapping between concepts in the DOM and in the Swing Document model. You can expect all the information in the DOM to be available in the Swing Document model, but it isn't going to look exactly like the DOM. The Swing Document model is a generic model for presenting a document for us in a rich text editor, which means the DOM is transformed to work with the Swing Document model.

Once you can get your head around this, the Swing Text APIs can begin to make more sense (although I'm still grumpy about the lack of working with the java.util.collections properly).

Fun in Boston

Thursday, November 29th, 2007

I’m sitting typing this from my hotel room in Boston looking out over MIT, having just finished my morning conversation with my wife (skype is great), and thinking back over the past couple of days. I’ve had a great time in Boston, really enjoying the city. It’s a nice old town with an enjoyable skyline, and the rivers are beautiful.

For the interested, I ran a workshop at the CMPros workshop held on the Monday. It was titled “Open Standards and the Convergence of Wikis and Content Management Systems” (slides), and after a brief introduction the workshop focused on discussion around wikis and content management systems. We had some good discussions with people sharing their experiences with both content management systems and wikis. I’ll be running a webinar with Ephox talking about this, and soem of the coming directions in Content Collaboration in the next week. Drop me a line if you are interested.

cocktail-party-sign.jpg

The Gilbane Boston conference itself has started in earnest now. Tuesday night was the big kick-off for us at Ephox, as we were the proud hosts of a cocktail party, held in the hotel (picture taken by Marco). It was a good night with some really great conversations with some interesting people. Conversations ranging from geography to business (even touching on WYSIWYG editors and content management systems), to obscure technical jokes about metadata and tags.

Yesterday and today have been spent in a combination of manning the Ephox booth, and talking to some of the other vendors ont he floor. My focus has been looking for opportunities for future collaboration, and there looks like some great opportunities.

It has also been great meeting some of the San Mateo based Ephox team face-to-face, getting to know Antony and Marco as more than a voice at the other end of a phone line. They are great guys to work with, and have been doing a great job at helping to make sure that people get to see and know the great products that Ephox has.

An AJAX Iteration

Friday, September 21st, 2007

I'm currently unwinding after only just managing to see all the cards1 move from the "this iteration" column2 to the "done" column3 on our XP storyboard.  While the estimates had us coming in at the same spot as earlier iterations, it ended up being quite a bit tighter than the earlier ones had been.  

There are a few reasons why, but the biggest cause would be the fact that we were moving from the comfortable world of Java actions into world of some heavy ajax ui.  I spent some time working with libraries and researching how to do things like JSON in Java, and AJAX popups.  It was a fun and stretching iteration, with plenty of prettiness to show for the work.

I learnt a lot including:

 AJAX with Prototype is great.  Prototype provides all the methods you want in the library.  I would consistently find the methods I would want in the library such as $('id') (to find an element with an id), and the serialize methods for forms are really nice. Kudos to the prototype team for a great library.

Scriptaculous provides nice effects that build on prototype.  The Autocompleter is worth the price of admission.

The popup library by Stuart Rackham works really nicely.  He doesn't have access to Safari so hasn't tested it there, but now I have, and while not all the features work, it is possible to produce nice popups that work in Safari with this library.  He has built this on top of Scriptaculous and prototype and he has done a great job.

JSON for passing around data is cool.  The whole eval on the client thing is a bit scary, but (almost as I expect now) at least prototype provides a nice evalJSON method to help alleviate a little my security paranoia. Of the millions of JSON libraries available, the standard java one works ok. (what's not to like about a library with a license that includes the text "The Software shall be used for Good, not Evil."  Mightier JSON libraries exist that do all kinds of magic, but the simple approach is working to start us off.

 

The biggest missing piece in my JavaScript Development is the fact that it isn't TDD. There seem to be bits and pieces out there, but nothing that is jumping out and saying "use me I just work.". The main reasons I am wanting to do Test Driven Javascript are for quality and pleasure. Doug spent some time researching options for acceptance testing of E2 front to back (including the javascript), which will definately help out the quality, but it still would be great to have a viable TDD option.

I never would have expected to say this, but it has been fun doing the JavaScript and AJAX in the past iteration. It really is much better than in the past, and I can see it only getting better.

1 – The card contains a unit of work

2 – The list of cards we are planning on getting done in the iteration, but haven't started working on yet

3 – The list of things we have finished this iteration.

Eight Months at Ephox

Wednesday, September 5th, 2007

Given that it's been a while since I last posted about life at Ephox, and a bit has changed since then I thought I'd go ahead and do an update.

First of all, as well noted elsewhere, I've moved from product management back into development.  I made the move back into development a few months ago, and I've been loving it.  The foray into product management was an interesting trip, educational, and helped me to better realise where my strengths and passions are.  I love building software that meets peoples needs, and I particularly love doing this in a web environment (J2EE/Rails/whatever).

So for the past couple of months I've been really enjoying working on E2.  It's pretty cool, and I can really see where it will fit in with Ephox and how it can make peoples lives better.  I'm really excited about E2, and I'm looking forward to when it gets released to the wild.  We've started dogfooding some of the initial features internally, and it is shaping up to be a great product.

Another bit of news in the past while is that I'll be presenting at the CMPros summit in Boston.  I'm looking forward to presenting a talk that is loosely related to some of the ideas I've been thinking about lately.

It's been a fun and challenging period of time, being able to work with cool technologies, cool people, and cool toys.

Quote of the Day

Thursday, August 30th, 2007

(taken completely out of context)

update — a little bit of context is helpful ;) — the statement was made (by an unnamed Ephox developer) while writing a test for some code.

I know the behavior and it involves no logic

A Somewhat Questionable Pair of Commit Messages

Friday, July 13th, 2007

Andrew recently mentioned that I'm working on E2 currently.  We dog food all our products, and automatically deploy updates to our internal systems.  While doing some work on E2 I discovered that it isn't currently automatically updating.  In troubleshooting this I noticed that the line saying to do this was commented out.  The svn log had the following messages:

commit xxx: ADDED: Automatic deployment for E2
commit xxx+1: REMOVED: Automatic deployment for E2

Less than fully helpful when trying to work out why the automatic deployment was removed.

Good Management

Sunday, June 3rd, 2007

Warning: if you are looking for an angry rant you won't find it here, instead this is a article about a truly good manager.

Like most people who have been in IT for as long as me, I’ve worked with some pretty dodgy management over the years. There have been times where I was sure Scott Adams was sitting in my cube farm, stealing ideas for dilbert.

I came to Ephox knowing that this wouldn’t be the case. I came knowing that I was going to be working for a good manager, Brett. Brett takes management, leadership and people seriously, as you can see in his recent blog post about a leadership course he is attending. Here he talks about what he has been learning about management and leadership, and how much he already understands and implements. You may read it, and think that he is perhaps self-deluded, but as someone who has been working for Brett, I can vouch for the fact that this isn't the case. Brett really does get people management. He understands the importance of putting people over process, and it makes a huge difference. It is his valuing of people that played a key part of my wanting to come to Ephox in the first place, and makes being a part of his team great.

Another thing that Brett does well is keeping commitments. In a recent InfoQ article on agile, there was the quote: ”…one of the quickest ways to take the wind out of a person’s sails is to break a commitment…”

I can’t think of a single commitment that Brett hasn't worked really hard to keep. He does well at making the right commitments, and sticking by them. One real instance of this that really sticks out in my mind was when I was nearing the end of my time in support. I could see that there might be value in me holding off transitioning (and I was willing to do so), but Brett stuck with his word, and made sure that I was able to transfer to development. It was great that Brett put in the work to ensure that this happened, and this commitment help keep my motivation high.

Brett spent time working on his management skills, and I really think this investment has paid off. Brett does really well at leading his team of developers, and creating an environment where we want to be. Having a good engineering manager is going to be a key part of helping Ephox to grow, enabling us to hire and keep good engineers.

Three Months at Ephox

Friday, April 27th, 2007

 I've been at Ephox for three months now, and the ride is continuing to be a good experience. I've had the pleasure of spending most of the past month in development. It was quite strange finishing up the support, with me actually being sad to leave.  I was really getting into the customer interaction, and being able to help people come to some good positive solutions.

Moving out from support to development was a happy transition to make.  I went as far as to move desks getting closer to poking Doug and AJ.  I had a blissful first week of development, getting into the swing of things before Andrew (the CEO) came to visit.  I was really getting into the swing of being a happy code monkey, and Just a programmer, when Andrew shook things up, and we heard of plans for a restructure introducing more product managers, with the goal of better working as a company.  I am now going to join AJ, and Damien, and be a product manager.  AJ and Andrew have already started talking about what this might involve, and I'm really looking forward to what the new role has to offer.  Given the fact that I came to Ephox to code, it is ironic that I will have spent more time in support than coding, and I'm going to be a manager.  That said, I am definitely looking forward to the new role, and to the opportunity to be the customer voice (or as Dan North used to put it, "The Truth").  I've always been keen on delivering software that meets peoples needs, and one of my key responsibilities in this role will be guiding the development of EditLive! to ensure that we continue to meet expectations.  There is plenty to learn, and I'm excited about the new opportunities to grow.  

The month of coding has been fun.  I've learnt some things about JavaScript, and we got to add some nice features to EditLive.  I also got to learn more than I ever wanted to know about IWWCM.  My respect for Jack (our resident IWWCM expert) has gone up immensely (not that I didn't respect him before).  It has been nice to loosely be a part of the work that has been put into improving the stability, startup experience, and performance of the Editor, and I look forward to continuing to be able to influence the direction of EditLive!

Migrating to FreeMarker

Thursday, March 29th, 2007

… or Adding the red button

AJ mentioned that we have automated the build and release process. After spending much of the morning hearing everyone talking about wanting to push the “big red button” for a release, and hearing how it was “too hard”, to update the html, I decided to go ahead and work out what needed to happen. What an interesting world I discovered.

The webapp in need of the red button is basically a servlet which calls out to the various parts of the world (our various build ). This works fine, but sometimes gets a bit hard to maintain (ok so some things are very hard to maintain). So (rather than doing a huge change), I figured that I could drop in a templating engine, and use the servlet to merge the template. I knew that Velocity is a bit old hat now, so went for a bit of a google, and (after a short diversion into another non-maintained option), I found FreeMarker. Having heard of it in the past, and knowing that it was the tool of choice for WebWork, I thought I’d give it a go.

My first test was to create a hello world web app from scratch.

I ended up with a very basic servlet that I’ve attached.

Basically it creates a configuration:

1
configuration = new Configuration();

tells the config that templates are found in the templates sub directory of the current class.

1
configuration.setClassForTemplateLoading(this.getClass(), "templates");

retrieves the template:

 

1
template = configuration.getTemplate("start.html");

creates a map of data to merge with the template: 

1
Map freeMarkerData = new HashMap();

1
freeMarkerData.put("user", "Mr Man");

1
 and finally merges the data with the template: 

1
 template.process(freeMarkerData, response.getWriter());

The hello world spike done (at home), all I needed to do was repeat the process at work with the real servlet. Replacing the html from the magic servlet, one template at a time.

Of course the first template to be created on our deployment applet was the one with the Big Red button.

Dreyfus Model of Skill Acquisition At Ephox

Thursday, March 29th, 2007

I recently read PragDave's blog talking about the Dreyfus model of skill acquisition. As I am generally interested in going back to first principles, I went to the library and borrowed the book From Novice to Expert: Excellence and Power in Clinical Nursing Practice, which Dave cites. It makes for an interesting read discussing the way in which expert nurses use a mixture of intuition, and observations to come to conclusions, and to guide their treatment of patients.

The book presents the research of Dreyfus into learning, and the five stage progression of learning from Beginner to Advanced used in the Dreyfus model (Orginally mentioned in a 1980 paper by Dreyfus and ,Dreyfus ). 

  • Novice/Advanced Beginner (Advanced Beginner was added in From Novice to Expert), 
  • Competent, 
  • Proficient, 
  • Expert, and 
  • Master (not listed in From Novice to Expert), this is a state that experts enter into from time to time.

It has been obvserved that people display different performance characteristics (especially problem solving techniques) at each level. Novices use basic rules, and often struggle in working out how to best apply the rules to a situation, where as Experts often use a strong sense of intuition gained through experience to guide what they do. The concept is that as one gains more mastery in a skill, they are increasing in their ability to apply abstract rules to concrete situations.

While reading about these levels, I have been trying to apply them to Software Development, and my understanding of myself and the situation I am in currently (of course I am not the first to do so). The Dreyfus model is not the most cutting edge, and a search of http://scholar.google.com will show much of the controversy about this. It does, however, seem to work for me, and has been useful in helping me understand myself and the world.

In self-reflection, I know that I would consider myself as at least nearing the expert status in some areas of software development (particularly in web development). I will often move in an intuitive way when building new features in a test driven way.

I would also see myself as being pretty close to being an expert in the use of IntelliJ. It is a great IDE that I can now intuitively use to navigate through code, write code, and improve code.

When it comes to the Ephox EditLive! codebase, however, I am painfully aware of the fact that I am not an Expert. At best I would approach a degree of being proficient, and this is mainly based on my experience in other areas.

There are probably two main reasons for my not firing on all cylenders currently. We are using Eclipse (I know that it is much closer to IntelliJ than in the past, but I am not yet thriving in this environment) I am still learning the Ephox codebase, and the specifics of this environment. Just as nurses need to adopt to different clinical environments, I am having to adapt to the EditLive! codebase, and the domain of Applet based html editing.

AJ is currently the true expert in the EditLive! codebase. He has been around while most of the code was written, has a strong sense for where the pain points are, particularly in some of the libraries we are dependant on. When working out a solution to a problem he will often use his intuition to guide where he is going with his analysis.

There is more to the Dreyfus model than a way of categorising people. There are some interesting implications for the learning strategies that people should try and apply based on what stage of proficiency they currently are at. The ways in which a beginner moves on to being a novice are very different to what will help a proficient person move on to being an expert. The general learning techniques are:

  • Novices and Advanced Beginners need to learn the basic rules, and be given feedback to help bring behaviour into conformance with the rules. In IT, Pair Programming is a great technique for this.

     Interestingly the Dreyfus article talks about a compentent person being able to the perceive the meaning phrases or aspects — such as a pilot talking about "verging on stall conditions" — and being able to respond to these aspects following guidelines. This seems to dovetail nicely in with the ideas of the pattern movement. So perhaps the advanced beginner should start learning some basic patterns. 

  • Competent people benefit from simulations that help them further develop their application techniques. Being able to apply the patterns that they have learnt, and through the use of simulations know how to apply them.
  • Proficient people learn best through case studies.
  • Experts will also learn through their experience, and continue to learn and develop their understanding, occasionally entering the state of Mastery.

I am going to be taking some of the lessons learnt form the Dreyfus model, trying to create situations where I can learn in appropriate ways. As I would see myself as at least nearing the proficient stage, I will be pushing myself towards learning through the use of case studies. For the work at Ephox this will involve questions like:

  • How did you isolate and fix a particular bug? 
  • Talk to me about the integration with Alfresco.
  •  What did you learn through adding "Track Changes" support in the editor?

I believe this will be the best type of learning for me to be doing, and the fastest way for me to move on to a better standard of performance.

Another application point is in documentation. We have a rich Advanced API, with a decent volume of documentation, but it doesn't always make it easy for people to know how to use it.  The advanced Java Developer would be looking for the examples of how to use the EditLive! API.

A final application point I wonder about is the use of the "Guideline for Reporting Critical Incidents" to help gather good case studies for developers to work with.

The Dreyfus Model of learning is a useful tool for software developers, and I think we should try and use these techniques to work towards being better developers of software.