Rainbow Update

A new version of Rainbow is out. This new version contains a bunch of tiny fixes that make it 10x more useful I think:

Extract color schemes from images

Extract the color scheme from any image on the page by right-clicking the image and selecting “Extract Color Scheme”:

Preview element colors

There’s now a “Preview Element Color” context menu item that will let you quickly inspect the background/text colors of any element in Rainbow’s color picker:

View last color

View whatever color was last copied/saved from the inspector with the “View Last Color” shortcut in Rainbow’s main menu:

This version also adds a French localization courtesy of Alain Besancon and some much-needed bug fixes.

Anyways, the real news is that 1.4 is the last version I’ll release on this code base barring any new locales or bugs. Soon I’ll be starting a complete re-write that might take awhile. The current code is written by a total JavaScript and programming n00b (me, four years ago) and uses XUL (thus can’t use Jquery or any nice new HTML features).

I’ll be converting it to HTML, modularizing it (starting with https://github.com/harthur/color), and making it a Addon-SDK-based addon and creating a Chrome extension if all goes well.

Dealing With (Not Dealing With) the Open Source Assholes

Jumping into the open source and js world has been a surprising psychological crash course/nightmare for me. There’s something about open source and open forums that encourages socially-inept jerks to deride people and software. It’s especially prevalent in certain communities. It can make you doubt yourself, or even worse, force you to adopt a behavior you don’t want to.

This can be off-putting to say the least. Your world can turn into a crazy, competitive, self-questioning altworld if you’re not careful and there are some things I’ve learned about turning that around.

Go to the right meetups. Meeting some of the people in your community in person can actually be a relief of sorts. People that sound stern on the internet are usually way nicer than expected in real life. But don’t stick around meetups or conferences that aren’t welcoming or have an “Glitterati” feel, being physically in such a high stress environment does nothing good for you, and it’s unlikely your single presence will change anything.

Follow the right people. Twitter and Github are the best things to happen to open source since IRC. But as soon as someone says a software project is “retarded”, unfollow them. Seriously, you don’t need to hear that crap. Follow people that are saying positive things, giving constructive criticism, encouraging people, giving propers where propers are due.

Don’t let anyone cramp your style. Feedback is important and of course you should listen to it. If someone says something negative about your project in an unreasonable way, don’t take it to heart. There’s something good in every project (it’s open source, it already has one thing going for it), no single project is complete crap, keep the good things and learn from the criticism.

All this boils down to basically “surround yourself with good people”, it’s advice that applies to everything, but it’s good to remember that it’s just as important to apply it to your work and hobbies. Tina Fey (<3) sums it up in Bossypants (<3):

When faced with sexism or ageism or lookism or even really aggressive Buddhism, ask yourself the following question: “Is this person in between me and what I want to do?” If the answer is no, ignore it and move on. Your energy is better used doing your work and outpacing people that way. Then, when you’re in charge, don’t hire the people who were jerky to you.

If the answer is yes, you have a more difficult road ahead of you. I suggest you model your strategy after the old Sesame Street film piece “Over! Under! Through!”

Again don’t waste your energy trying to educate or change opinions. Go “Over! Under! Through!” and opinions will change organically when you’re the boss. Or they won’t. Who cares?

Do your thing and don’t care if they like it.

This brings an important point, sometimes you can’t avoid collaborating on a project with a smartass. Take the high road and don’t ever respond to snarkiness with snarkiness. If you get anything from this blog post it’s…don’t let it change you.


I just published replace, a find-and-replace command line utility that others might find useful. I’m always wanting to replace strings spread throughout my code, and never found an easy way to do it. `find` + `sed` can do it, but the syntax is hard to remember and you don’t get easy-to-read feedback on what replacements are made. It’d be cooler if there were a tool devoted to this.

Replace takes a regular expression string (in JavaScript syntax), a replacement string, and files to search (or directories to search recursively when `-r` is specified). It will print out the lines that have been replaced:

screenshot of replace

There are quite a few other options and output choices, check out the GitHub for more information. It requires installing node.js and its package manager npm if you don’t already have them. Then you can install with:

npm install replace -g

Side note: It’s true that JavaScript is still quite a bit slower than bash/C, so it’s good to question why you’d write something like this in Javascript. I blame how nice it is to write programs in node, how nice it is to handle dependencies and distribute programs with npm, and all the really well-done node libraries out there (like colors for coloring console output). This is something I wouldn’t have taken my free time to write in any other environment.

Nightly Tester Tools Update

Nightly Tester Tools 3.0 has been released, containing some new features. Among the added features are Crashme functionality, copying about:support to pastebin, and viewing the pushlog of changes since the last nightly.

Since the update about the future of Nightly Tester Tools, there’s been some discussion around the addon compatibility feature. We decided to take out addon compatibility fixing for individual addons, but left in a checkbox that overrides compatibility checking for all addons. It works in the same way Addon Compatibility Reporter does, but everyone’s encouraged to install ACR to help report compatibility issues to addon authors.

Screenshot of Nightly Tester Tools Firefox menu

Mobile version

Aakash has been working on a mobile version of NTT, with a few of of the same features of the desktop version and a few mobile-specific ones. Nightly Tester Tools 3.0 for mobile has also been released.

Screenshot of mobile Nightly Tester Tools

You can request a feature by filing an NTT bug. Check out the code on Github (mobile code here).

Nightly Tester Tools Resurrection

Some of you may have noticed that the aptly named Nightly Tester Tools addon doesn’t work on nightly builds at the moment. A few months ago Dave Townsend mentioned that the popular Nightly Tester Tools extension was in need of some new owners and an update. A couple of people that work on automation have decided to lead an effort to revive Nightly Tester Tools and make it even better.

You can check out the list of current and proposed features on the wiki. We’re planning on removing a couple features, some of which have been superseded by Firefox features, including: crash report sidebar, session restore, and leak log analysis. Let us know if you use any of these features. In addition, we’re thinking about taking out the extension compatibility fixing. Extension compatibility is the main(/only) reason many people use Nightly Tester Tools, but now there’s the Addon Compatibility Reporter that keeps up to date with the extension compatibility changes (EDIT: many people have protested this and given some good reasoning, so it’s likely this will stay in).

A couple people already working on the effort are harth, jhammel, and aakashd on #qa on irc.mozilla.org. If you have any features you’d like to see in NTT you can of course comment on this blog post, or file a bug in the Nightly Tester Tools component.

If you’d like to contribute code, fork the Github repo. We’re sticking with the old code base for now but are keeping an eye on the Jetpack SDK for a switch at some point.