No, I don’t want to write this article. Not at all. But I have to. I recently had to look up a phrase that didn’t mean anything to me so far, the phrase “flame war”. Wikipedia defines “flaming” as “hostile and insulting interaction between Internet users”. So when I learned the meaning of “flame wars” my first thought was: “Ok, I understand, it has something to do with religion.” Usually discussions between religions are hostile and often insulting, and in all cases they state that one party is right and the other is wrong. Regarding religions this might be the only way of discussing things, since religions don’t have solid facts that can be contributed as arguments. They are based [...]
Lexical Dispatch in JavaScript
Using a big switch statement to fake polymorphism is evil. Everybody knows that. But how do you get rid of it? Let’s say you’ve got a method that receives a string describing some state (“normal”, “error” etc.). And depending on the value of that string (state) you want to react. If you ask around, an OOP afficionado might tell you to replace the switch with classes and use polymorphism. Yeah, well, that’s not the greatest of solutions – you just replace an ugly statement with a handful of ugly classes. Functional programming fan would tell you to use pattern matching (A.K.A. “case statement on steroids”), which would work nice…only you’re stuck with an imperative language. Tough luck. So, isn’t there [...]
On Using Jasmine in xpcshell Tests.
Jasmine is a JavaScript framework for supporting behaviour-driven development in your projects. Like most JS frameworks, when used for client side development Jasmine expects an environment that meets certain conditions (e.g. it assumes the existence of a global window object). In Salsita, however, we’re in the business of creating browser add-ons – which happens to mean that most of the time, some of those conditions are not met. In the world of XUL-based Firefox add-ons, code is (or should be anyway) usually structured in code modules, which import each other and are themselves imported from the XUL window in a manner similar to HTML. This provides a nice way to encapsulate the logic into individual files. Furthemore, Firefox add-ons can [...]
Firefox: Product or Platform?
Steve Yegge’s sprawling Amazon vs. Google platform rant (linking to Hacker News as Steve has since pulled his original post) has finally spurred me to expand on something I wrote recently about Firefox: In essence, Mozilla wants to focus on creating the best browser possible. The distractions inherent in maintaining a platform for third-party developers (then XULRunner, now sophisticated extensions) undeniably detract from this goal. But what if being the best browser, in the sense of being truly differentiated from the competition, actually means that Firefox must be a great platform? In tackling the Chrome insurgent by seeking parity with its rapid release schedule, simple extension API, sparser user interface, process-isolated tabs and so forth, Firefox may be losing its strongest [...]
Firefox 7 and Browser Memory Consumption
Firefox 7 is out with an emphasis on improved memory consumption. Mozilla developer Nicholas Nethercote: Firefox 7 uses less memory than Firefox 6 (and 5 and 4): often 20% to 30% less, and sometimes as much as 50% less. In particular, Firefox 7?s memory usage will stay steady if you leave it running overnight, and it will free up more memory when you close many tabs. This sounds like real progress even if the figures cited seem a bit overblown, based as they are on an artificial scenario (opening 150 browser windows on a machine with 16Gb of RAM). Web pages take up RAM mainly because their in-memory representation (DOM) is large. Browsers with a lot of pages open unavoidably [...]
Wonder How Chrome is Growing Market Share? Ask Adobe
Yesterday one of my colleagues started grumbling and swearing even more vociferously than usual. He had installed Adobe Flash in Firefox in order to test some changes to our website and claimed that Google Chrome had been installed as well. “Impossible,” I said. “Remember Google’s motto is Don’t Be Evil. They wouldn’t do anything as sneaky as that.” Nonetheless, my curiosity was piqued and I googled around (oh, the irony!) to see if anyone had reported something similar. Sure enough, this immediately turned up some mozillaZine forum posts and a blog entry by an outraged German blogger. I fired up a clean Windows virtual machine, installed Firefox, headed to the Adobe Flash Update page and — holy hound of hell! [...]
In Defense of Netflix
According to investment blog Seeking Alpha, Netflix is going to lower fourth quarter guidance because, among other things, “Everybody hates the split of the brand into Netflix and Qwikster.” A couple of web comics, Oatmeal and The Joy of Tech, rip into the company even more mercilessly. Press coverage has been almost universally negative. This after its stock has taken a brutal battering in the past few days, plummeting over 40%. As the pundits would have it, Netflix is a basket case run by a bunch of nincompoops who can barely dress themselves in the morning, let alone run a fast-growing media company. The funny thing is until a couple of months ago, they were perceived as having some of [...]
Social Squatting and the Case for Decentralized Identity
Listening to TWiT yesterday, I started wondering again whether domain names are really the best way to identity resources on the web. Just as I griped that salsita.com is unavailable but totally empty, Leo Laporte complained that leo.com is parked and yet he can’t get his hands on it, despite being a tech celebrity with the successful business and consequent cash flow to back him up. The conversation started when someone commented that Kevin Rose (of Digg fame) couldn’t get milk.com for his new company and had to settle for mi.lk instead. (Just my luck that no country has claimed the .ta top-level domain.) The guy who owns milk.com simply isn’t interested in selling. Well actually he’d probably sell for [...]
Discontinuing WebRunner
Perhaps the hardest decision for a software developer to take is to discontinue a moderately successful product. Some products are outright failures and thus relatively easy to let go. Some are runaway hits for which this is not even a consideration. Those that lie in the middle are the problematic ones: they have plenty of fans, some extremely passionate. But after a while you have to ask yourself: is this the most productive way for me to be spending my time? This is the situation with WebRunner today. According to Mozilla Add-ons there are between 5000 and 6000 active users. To put this in perspective, consider that the 100th most popular add-on has almost 200,000 users. At the same time, I [...]
Packaging WebRunner Applications… For Dummies!
For some reason people have been complaining that they don’t understand my tutorial for packaging WebRunner applications. I’m not sure why since when I tried to reread it just now my head started hurting and I had to stop. The good news is that Stefan has created a much more user-friendly tutorial (with screenshots and everything). Thanks, Stefan! The one drawback is that the tutorial is Windows only. If anyone feels like whipping up something similar for Mac and/or Linux, that would be stupendous. As I mentioned in my last post, I have an internal version of a simple packager that I’ve written to automate this process (on Windows and Mac). I’ve had a few requests for it, so I’m [...]

RSS for Just Browsing