Blog



All timestamps are based on your local time of:

[ « Newer ][ View: List | Cloud | Calendar | Latest comments | Photo albums ][ Older » ]

Android Beam (NFC) support in Fennec2013-03-13 19:16:54

Last week I landed bug 726335 which adds support for sharing the currently visible tab URL via Android Beam in Fennec. I also had two follow-up patches because I forgot to check the API levels in which the relevant APIs where added... doh! But anyway, if you have two Android NFC-enabled devices running ICS or higher, and Nightly (FF 22) running on one or both of them, you can hold the devices back-to-back until the Android Beam UI shows up, and then tap the screen to share the current tab's URL.

We should be Beam-compatible with the stock browser, so if the device you're sending the URL to doesn't have Fennec installed they can still open the URL in the stock browser, and you should be able to receive URLs sent from the stock browser in Fennec. Note also that if you are currently on a private browsing tab, this feature is disabled.

While sharing the current tab's URL is an obvious starting point, there are probably other things that could be shared over NFC. What else would you like to be able to share from Fennec?

[ 7 Comments... ]

The Power of Introverts2013-02-10 19:18:55

I recently finished reading Quiet: The Power of Introverts in a World That Can't Stop Talking by Susan Cain, recommended to me by my girlfriend. We're both introverts and, as a result, often have to deal with some friction in the extrovert-centric society we live in. I've mostly made my peace with this, and to be honest, didn't think the book would be particularly useful. However, I underestimated the amount of insight and value that comes from thinking about and researching a topic for many years, as Susan Cain has done here. The book is most definitely a worthwhile read.

The book goes into some depth about research that has been done about the biological and psychological differences between introverts and extroverts. According to the book, somewhere between 20 and 50 percent of humans are introverts (although of course introversion is more of a gradient than a sharp distinction), and so the chances are good that you deal with both kinds of people on a regular basis. Dealing with them effectively, and in particular harnessing their productivity (e.g. at work) requires understanding what makes them tick and what turns them off. The book covers this really well and has plenty of advice for both introverts and extroverts.

The proportion of introversion is higher in disciplines like software engineering just because the nature of the task involves long periods of focus and concentration and some degree of "living inside your head". Speaking from personal experience, I know that many of the Mozillians I interact with daily are introverted to a significant degree, although of course there are many who are not as well.

Culturally, Mozilla provides a lot of freedom for contributors to shape their own environment and work in the way that suits them best. However, there are still times when an extroverted streak comes into play. Work weeks, for example, are usually a source of many extrovert-centric activities. The book has some useful advice on strategies for introverts to make the most of, and recover from, such situations.

Susan Cain also discusses some of the larger effects of western society's bias towards extroversion. For example, schools are increasingly designed to reward extroversion at the expense of the introverted schoolchildren who have just as much (or more) potential and talent. I found the discussion of that topic to also be pretty interesting and I suspect it might be one of the reasons that online learning solutions like the Khan Academy are becoming so popular.

Overall it's a pretty good book and I would it recommend it to anybody.

[ 0 Comments... ]

AWSY now available for mobile2013-02-01 16:29:39

The MemShrink team (and John Schoenick in particular) have been maintaining Are we Slim Yet (AWSY), a memory usage tracker for Firefox. It has been quite useful in monitoring Firefox's memory usage over time and catching regressions. I recently got a similar benchmark working for Fennec. It's a little more sketchy because it runs on a device plugged in to the box under my desk that freezes every once in a while, but the data it's generating still seems to be quite reliable, and lets us find memory usage regressions in Fennec.

You can find the data at areweslimyet.com/mobile. It gets run on all working inbound builds, so the regression ranges tend to be pretty tight. For the most part regressions in the "Start" and "StartSettled" data lines are the most interesting since those indicate startup baseline memory regressions.

If you have ideas on how to improve AWSY, please file an issue (or even better, pull requests!) in the github repository at Nephyrin/MozAreWeSlimYet.

[ 4 Comments... ]

Diagnosing mercurial patch rejects2013-01-07 13:47:37

Even though I've switched to using git for my day-to-day mozilla work, there are times when I have to apply patches to my mercurial tree using mq. Sometimes applying the patches fails because something changed, and it's not easy to figure out what changed, specially if the patch is large. To solve this problem, I wrote a little bash/perl script, inspect-rejects.

To use it, stick it on your $PATH, and invoke it on the source file for which rejects were generated. For example, if rejects were generated for layout/base/nsRefreshDriver.cpp, invoke it on that file:

$ hg qpush --move try-avi
applying try-avi
patching file layout/base/nsRefreshDriver.cpp
Hunk #1 FAILED at 936
1 out of 1 hunks FAILED -- saving rejects to file layout/base/nsRefreshDriver.cpp.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh try-avi
$ inspect-rejects layout/base/nsRefreshDriver.cpp


What this does is print out the "original" version of the code (context lines and "-" lines) from the reject file into a temporary file, and then opens vimdiff with that temp file and the source file as it is in your tree. This allows you to compare what the patch thinks your file should look like and what your file actually looks like, and allows you to quickly identify differences. You can even edit your in-tree file directly in the vimdiff editor to match what the patch expects it to look like, and then run patch on the rejects file to apply it!

$ inspect-rejects layout/base/nsRefreshDriver.cpp
2 files to edit
# edit layout/base/nsRefreshDriver.cpp to match the expected context
$ pushd layout/base && patch < nsRefreshDriver.cpp.rej && popd
~/zspace/mozilla/layout/base ~/zspace/mozilla
patching file nsRefreshDriver.cpp
~/zspace/mozilla


If you do this, you'll probably want to undo your changes afterwards - I leave automating this part as an exercise to the reader.

[ 1 Comment... ]

iTunes2012-12-25 15:12:46

I have a hard time putting into words just how much I hate iTunes. With undecipherable icons, inexplicably disabled menu item actions, and constantly crashing, it's nearly impossible to actually watch the content you pay for. It's a shining example of how not to design software. With alternatives like that it's no surprise that so many people download their content illegally instead.

[ 0 Comments... ]

Guns, Germs, and Steel2012-12-15 00:56:17

Another book review: Guns, Germs and Steel, by Jared Diamond. I found this book really interesting although the subject matter may not appeal to everybody. It basically covers the history of the human race over the last 13,000 years (since the beginning of agriculture) and explains why certain cultures and societies are the "dominant" ones in the world today. When I started reading the book I had my doubts that any one book could successfully explain this, but I came away pretty convinced. Also, it won the Pultzer Prize in 1998, if that sort of thing appeals to you.

One thing I really liked about the book is that Diamond tries really hard to be as scientific as possible in his theories and explanations by citing natural experiments as evidence. The sheer volume of field experience and historical knowledge that he brings to bear on the question is pretty impressive.

The other thing that I found cool about the book is that it reminded me of Hari Seldon and psychohistory from Isaac Asimov's Foundation universe. It seems very much like if you took the explanatory power and analysis in GGS and applied it to the state of the world today, you'd end up being able to predict the future in the same broad strokes that psychohistorians were able to do in Foundation. Of course, that's not actually true because it's a lot easier to see what factors were important in the past than it is to guess what factors will be important in the future, but it still makes me wonder.

[ 0 Comments... ]

A twist in the tale2012-12-06 00:22:25

Hah, I should have seen this coming: Providers of Free MOOCs Now Charge Employers For Access To Student Data. Remember, if you're not paying for it, you are the product.

[ 0 Comments... ]

The Omnivore's Dilemma2012-11-28 18:50:27

A book that I read recently is The Omnivore's Dilemma, by Michael Pollan. For uninteresting reasons I actually ended up reading both the Young Reader's edition and the regular edition. I highly recommend the Young Reader's edition, and only moderately recommend the regular edition.

The book traces 4 different meals back to their ingredient components. Doing so provides a pretty good picture of what the food industry is like (at least in North America), and was quite eye-opening. This is one of those books that has no real pre-requisites to fully understand, and almost certainly has something new for everybody. More importantly, it doesn't try to change your mind about anything - the author describes what he found, as well as his own feelings and thoughts on the topics; what you choose to do with the information is entirely up to you.

The reason I recommend the Young Reader's edition over the regular edition is simply that it's got 90% of the content in about 60% of the words. The regular edition has a lot of the author waxing philosophical and/or poetic and those bits weren't really that interesting to me. There were also some additional tidbits of information here and there but not enough to be worth it for the average reader.

[ 0 Comments... ]

Project 256meg and tab zombification2012-11-02 15:27:48

The main thing that I'm working on these days is "Project 256meg" (aka bug 792131). The goal of the project, as the name implies, is to get Fennec working well on phones with only 256 MiB of memory. There are a large number of older ARMv6 Android devices out there which have less than the 512 MiB of memory that we currently require for Fennec. Having Fennec run well on these devices would allow all of those people to use it as well.

One of the changes I landed recently was to "zombify" tabs under certain conditions. Zombifying a tab unloads the content loaded in the tab, thereby freeing up most of the memory associated with that tab. The tab itself remains, and remembers the URL it was on, so that when the user switches to it, it will resurrect itself by re-loading the content. The behaviour is quite similar to what Android itself does with activities - it will close activities in the background silently if needed, and open them again if the user switches back to them.

In bug 784040 we added code that zombifies all of the background tabs when we get a low-memory event from the system. In bug 792143 and bug 803575, we added some additional conditions to zombify individual tabs to prevent excessive memory usage before it happens. Specifically, when a new tab is opened, the least-recently-used background tab is zombified, if it hasn't been used in some amount of time (controlled by the browser.tabs.expireTime pref; defaults to 1 hour; -1 to disable). This behaviour is enabled by default on low-memory devices and is turned on dynamically on high-memory devices after we receive the first low-memory event on those devices.

I'm planning to also add some telemetry to see how often these events get triggered in practice, so that we can tune the behaviour as we go. However if you feel like your tabs are getting turned into zombies too often for your liking, let me know (either file a bug or comment here) and we can investigate.

[ 10 Comments... ]

Final warning: stakface.com going away2012-10-12 16:46:00

According to my server logs, there are still 13 people subscribed to this blog via Google Reader that are using a stakface.com URL to get the RSS feed. Please update the URL in Google Reader to point to https://staktrace.com instead of http://stakface.com. You must do this manually since Google Reader doesn't respect the 301 Permanent Redirect http response I've been sending it for over a year now.

I plan to let the stakface.com domain registration lapse, so if you don't update you will be deprived of all of the wonderfully brain-rotting posts I've been sending your way.

[ 0 Comments... ]

[ « Newer ][ View: List | Cloud | Calendar | Latest comments | Photo albums ][ Older » ]

 
 
(c) Kartikaya Gupta, 2004-2025. User comments owned by their respective posters. All rights reserved.
You are accessing this website via IPv4. Consider upgrading to IPv6!