Luke Crouchteam fortress 2 enable steam community ingame

Another quick google-search-turned-post to help others looking for a solution to this problem.

After my last Steam upgrade (Mac client) the community overlay stopped working in Team Fortress 2. This breaks a number of features, including the "Invite" button when creating a party. This is the solution that worked for me:

1. In Steam Library, right-click Team Fortress 2 and choose Properties
2. UN-CHECK "Enable Steam Community In-Game"
3. Quit Steam
4. Re-open Steam
5. RE-CHECK "Enable Steam Community In-Game"

Overlay starts working again!

Robert KaiserPreserving Software: Museums, Archives, Libraries

As I mentioned before, I attended an event on preserving software at the US Library of Congress last month. Jon Ippolito from the University of Maine wrote up a great summary of who was there and what we discussed, so I won't go into those details and leave you with his words on that.

Instead, I'll do multiple short posts on my impressions and thoughts of the event and the subject, probably over the next few weeks.

The attendance consistent mostly of people from the existing software preservation community in the US, the majority of those people knew (of) each other already, apparently. In addition, we had some people from the software creation community - Microsoft's (sole) archivist probably belongs to both the preservation and software communities, then we had a guy from GitHub, and finally, Otto and me from Mozilla.

One thing that I learned with regard to the preservation community is that there are basically three types of projects they operate: museums, archives, and libraries.

Museums only collect a small collection of large milestones in history, but try to get as much on those as possible so they can build up a great exhibit for the public to learn about our and their past.
Archives build up large collections of items with the main intent of preserving them as ideally as possible and usually without any intent to provide them to the public, the items are only available to sporadic researchers. There may be metadata collected on the items that may be available to a larger public, though.
Libraries are somewhat in between: They build up larger collections of items and try to preserve them, but with the intent of some public to have regular access to them, often in a very controlled manner, e.g. via reading rooms.

On this software preservation summit, we had a number of representatives of all three kinds of projects: Museums such as the Computer History Museum, the Museum of Modern Art or the MIT Museum, archives such as Microsoft's, NIST's NSRL (National Software Reference Library - yes, "Library" is a bit of a misnomer there) or the Internet Archive, and libraries such as the Astrophysics Source Code Library, university libraries or, of course, the Library of Congress.

In terms of software preservation, we found that those different organizations and those doing different kinds of collections, can not just learn from each other, they can also help each other: Not every one of them wants every piece of software coming in, depending on what exactly they collect, so it may make sense to forward some pieces to other projects.

It was interesting for us as outsiders to the preservation community to see what those people are doing and how they are organized. In future posts, I'll get more into how and where we as software producers can work with them.

Al BillingsCal's Dreambox

A few weeks ago, it was announced that there was now a 3D printing vending machine over at UC, Berkeley (aka "Cal") now. This is the creation of Dreambox, some startup or somesuch doing 3D printing vending machines. Without a lot of data, I sent my trusty minion (I mean "friend"), Zed Lopez, over to take a look at it for me. He took a few photos with his phone and I put them up as a flickr set.

IMG_20130611_141435

As you can see, the Dreambox basically consists of a Replicator 1 from Makerbot Industries (I mean Stratasys) in a box that dumps prints into the drawers beneath it. Dreambox has put up a video which helpfully shows their process:

While I'm happy to see more exposure to 3D printing for the public, this whole thing seems like a bit of a bad idea. Printers like this that print in plastic are notoriously finicky things, with prints often coming out badly if conditions aren't right or if the printer is simply not maintained and cleaned well. I don't know how an unattended Replicator 1 sitting in a box is going to do well with printing materials on a reliably basis. I certainly wouldn't want to own this Dreambox and have to maintain it on a regular basis.

There is some hope that the machine will be upgraded or better though. I got a note from Dreambox this morning (where I had made an account) mentioning that the whole machine was going offline at the end of this week while they upgraded it. I assume they are going to make some changes to make it more reliably, maybe upgrading the printer to a new model.

If anyone makes any prints on this machine, I'd love to hear more about how the process was for you as a normal user.

Rob CampbellHowto Create a List of Bugs in a Blog Post

For the merging of Firefox 23, I created a list of bugs I attached to this blog. That became the basis of a post on Hacks describing the features in that release. If learning to use advanced search features in Bugzilla doesn’t sound like your kind of thing, don’t worry, you don’t have to read it!

This is how to create that list of bugs using Bugzilla, the Page Inspector in Firefox Developer Tools and maybe a bit of Scratchpad to fix the styling.

Since we have a lot of components in Firefox Developer Tools land, I’m going to use the Bugzilla Search interface rather than the more convenient Quicksearch API. You can certainly use that, but for this job, I think the Search screen is a bit easier.

First, setup your components. Your lists should look like this:

Screen Shot 2013-06-19 at 2.55.58 PMNote that I’ve selected RESOLVED, VERIFIED and CLOSED for my Status and FIXED for my resolution.

Next, click the Search by History option and enter the date range between this merge and the last. In this case, May 13th to June 24th.

Screen Shot 2013-06-19 at 2.58.37 PMNow you should be able to hit the Search button at the bottom of the page and get back a list of bugs. Sweet!

If you want to grab the list to plop into a blog post or Your Publishing Venue of Choice, you can open up the Page Inspector on this page (right click, Inspect Element, navigate the breadcrumbs until you find the table element) and then right clicking the element and picking “copy outer html”. This’ll copy the entire page fragment onto your clipboard for pasting into your editor.

You might want to select a different set of columns first. I just use Bug ID and Summary.

If you want to add or change the existing styling on the table rows, you can open a Scratchpad or Console and do something like:

[].forEach.call(document.querySelectorAll("tr"),
  (row) => row.removeAttribute("class"));

… and again for the TD elements.

Brendan EichThe Cookie Clearinghouse

As you may recall from almost six weeks ago, we held the Safari-like third-party cookie patch, which blocks cookies set for domains you have not visited according to your browser’s cookie database, from progressing to Firefox Beta, because of two problems:

False positives. For example, say you visit a site named foo.com, which embeds cookie-setting content from a site named foocdn.com. With the patch, Firefox sets cookies from foo.com because you visited it, yet blocks cookies from foocdn.com because you never visited foocdn.com directly, even though there is actually just one company behind both sites.

False negatives. Meanwhile, in the other direction, just because you visit a site once does not mean you are ok with it tracking you all over the Internet on unrelated sites, forever more. Suppose you click on an ad by accident, for example. Or a site you trust directly starts setting third-party cookies you do not want.

Our challenge is to find a way to address these sorts of cases. We are looking for more granularity than deciding automatically and exclusively based upon whether you visit a site or not, although that is often a good place to start the decision process.

The logic driving us along the path to a better default third-party cookie policy looks like this:

  1. We want a third-party cookie policy that better protects privacy and encourages transparency.
  2. Naive visited-based blocking results in significant false negative and false positive errors.
  3. We need an exception management mechanism to refine the visited-based blocking verdicts.
  4. This exception mechanism cannot rely solely on the user in the loop, managing exceptions by hand. (When Safari users run into a false positive, they are advised to disable the block, and apparently many do so, permanently.)
  5. The only credible alternative is a centralized block-list (to cure false negatives) and allow-list (for false positives) service.

I’m very pleased that Aleecia McDonald of the Center for Internet and Society at Stanford has launched just such a list-based exception mechanism, the Cookie Clearinghouse (CCH).

Today Mozilla is committing to work with Aleecia and the CCH Advisory Board, whose members include Opera Software, to develop the CCH so that browsers can use its lists to manage exceptions to a visited-based third-party cookie block.

The CCH proposal is at an early stage, so we crave feedback. This means we will hold the visited-based cookie-blocking patch in Firefox Aurora while we bring up CCH and its Firefox integration, and test them.

Of course, browsers would cache the block- and allow-lists, just as we do for safe browsing. I won’t try to anticipate or restate details here, since we’re just starting. Please see the CCH site for the latest.

We are planning a public “brown bag” event for July 2nd at Mozilla to provide an update on where things stand and to gather feedback. I’ll update this post with details as they become available, but I wanted to share the date ASAP.

/be

Mic BermanThree Ways an Executive Coach Transforms Your Impact!

As an executive coach, I’ve seen people’s careers transformed by coaching. Many of the world's most admired companies, from Google to Goldman Sachs, invest in coaching, and annual spending on coaching in the U.S. is estimated at roughly $1 billion, according to Harvard Business Review. Yet I find that many people still don’t know what executive coaching is, how it works and what it can do for them. Here’s some insight.

Coaching defined

Simply put, coaching is personal training that helps professionals reach their goals, no matter where they are in the workforce – entry-level, CEO and everything in between. Much like a personal trainer works your body, an executive coach works your mind, helping you develop the mental strength, emotional intelligence and instinctive ability to problem solve and relate with others in the workplace.

Coaching uses a proven methodology of inquiry, called powerful questions, that’s been around for decades. The process is designed to leverage your unique personality and strengths, and it does so not by giving you the answers but by helping you learn to ask and answer the right questions on your own throughout your career’s myriad challenges.

The profession is governed by the International Coach Federation and has several internationally renowned schools, such as the one I attended: The Coaches Training Institute, the largest and oldest coach training school in the world.

What can an executive coach do for you?

Be a trusted sounding board.

I have found that most leaders thrive when they have a trusted guide who has walked in their shoes and is a truly unbiased source of feedback. Very few career and workplace challenges are brand new; a person’s experience or lack thereof is usually the variable. A good coach has no skin in the game other than your success as you’ve defined it, and will help you anticipate, problem-solve and build internal partnerships with the skill of a seasoned professional.

Support you with transitioning to a new role or career.

With most new roles come high expectations and unfamiliar territory, such as managing former peers or taking on managerial duties after years of virtual autonomy. Research shows when someone assumes a new or different leadership role, they have a 40% chance of demonstrating disappointing performance, and 82% of newly appointed leaders derail because they fail to build partnerships with subordinates and peers. An executive coach will help you transition effectively and build others’ trust in your ability to do the job.

Reveal derailing behaviour or blind spots.

According to Harvard Business Review, 2 out of 5 new CEOs fail in their first 18 months on the job – not for lack of competence, but due to hubris and other self-limiting behaviors. Whether you’re a CEO or receptionist, understanding the impact you have with your actions versus the impact you want to have can literally make the difference between being good and being great at what you do. Sometimes discovering a blind spot means helping people uncover their true purpose or higher calling, along with the fears that prevent them from acknowledging and acting on it.

It’s important to note that a good coach – versus a mentor, colleague, therapist or even a trusted friend – will hold you accountable for reaching your goals and will play an active role in helping you achieve your desired success.

Shared rewards

After decades of success working with many talented leaders at some of the world’s best-known brands, I decided to make my own transition to executive coaching and I am thrilled to have just passed my CTI written exam.

As a coach, I’m trained to ask the questions that compel people to achieve what they truly want. Watching that transformation in my clients has made me completely fall in love with the practice of coaching. What I love most is that those who seek coaching are naturally capable human beings who can overcome and soar beyond their imaginations. And when they do, it’s miraculous for both of us.

The coaching methodology itself pushes me to continuously improve both in my coaching and in my life, so I get to practice what I preach. Coaching speaks to my values as a person – eg, about being, at times, fiercely courageous in holding my clients accountable to achieving their goals and I love the simplicity and purity of that design.

If you want to know more, contact me!

PS: to all of you CEOs and organizational leaders: people are your largest asset, how are you investing in them?

Next: How to Hire a Coach

***********

John O'DuinnInfrastructure load for May 2013

  • #checkins-per-month: We had 6,041 checkins in May 2013. This is down from last month’s 6,364 checkins, and down from our record of 6,433 in Mar2013.

    Overall load since Jan 2009

  • #checkins-per-day: We had 293 checkins checkins on 21may. During May, 21-of-31 days had over 200 checkins-per-day – thats almost every working day. Only 7-of-31 days had over 250 checkins-per-day, much lower than usual. Unusually, we never exceeded 300 checkins-per-day any day this month – first time in many months.
  • #checkins-per-hour: Checkins are still mostly mid-day PT/afternoon ET. For 5 of every 24 hours, we sustained over 10 checkins per hour. Heaviest load time this month was 1pm-2pm PT (12.5 checkins-per-hour).
  • As usual, our build pool handled the load well, with >95% of all builds consistently being started within 15mins. Our test pool continues to improve. All the hard work by RelEng, ATeam and IT is paying off, we’re seeing more test jobs being handled with better response times. The peak for May was 54,195 test jobs on 23may. Still more work to be done here, but encouraging.

    As always, if you know of any test suites that no longer need to be run per-checkin, please let us know so we can immediately reduce the load a little. Also, if you know of any test suites which are perma-orange, and hidden on tbpl.m.o, please let us know – thats the worst of both worlds – using up scarce CPU time and not being displayed. We’ll make sure to file bugs to get tests fixed, or disabled – every little bit helps put scarce test CPU to better use.

mozilla-inbound, birch/b2g-inbound, mozilla-central, fx-team:
Ratios of checkins across these branches remain fairly consistent. mozilla-inbound continues to be heavily used as an integration branch, dropping slightly to 24.2% of all checkins, yet still consistently far more then all other integration branches combined. mozilla-central increased slightly to 2.3% of checkins.

The “birch as b2g-inbound” experiment continued to be a great success, and with 4.2% of this month’s checkins landing here, birch has already become the 4th busiest branch (after try, mozilla-inbound and gaia-central). Birch is also helping reduce pain of any mozilla-inbound closures, and further proving the lure of sheriff-assisted-landings to developers. Given the success of this experiment, bug#875989 tracks setting up b2g-inbound on a permanent basis.

The lure of sheriff assistance continues to be consistently popular, and as usual, very few people land directly on mozilla-central these days. The fx-team branch saw an increase to 2.1% of checkins, which I believe can be attributed to the increased help with landings from sheriffs (and sometimes gps) this month.

Infrastructure load by branch

mozilla-aurora, mozilla-beta, mozilla-b2g18, gaia-central:
Of our total monthly checkins:

  • 1.7% landed into mozilla-aurora, slightly lower than last month.
  • 1.2% landed into mozilla-beta, slightly lower than last month.
  • 1.7% landed into mozilla-b2g18, slightly higher then last month.
  • 5.9% landed into gaia-central, same as last month. gaia-central continues to be the third busiest branch overall, after try and mozilla-inbound.

misc other details:

  • Pushes per day
    • You can clearly see weekends through the month. Its worth noting that we had >200 checkins-per-day almost every working day in May. This
      has been true for a few months now, so it is starting to feel like 200 checkins-per-day is the new “normal” for Mozilla. #Pushes this month

    • Pushes by hour of day
        Mid-morning PT is consistently the biggest volume of checkins, specifically between 1pm-2pm PT, with 12.5 checkins-per-hour.

      #Pushes per hour

Hal WineInter Repository Operations

Inter Repository Operations

[This is an experiment in publishing a doc piece by piece as blog entries. Please refer to the main page for additional context.]

Mozilla, like most operations, has the Repositories of Record (RoR) set to only allow “fast forward” updates when new code is landed. In order to fast forward merge, the tip of the destination repository (RoR) must be an ancestor of the commit being pushed from the source repository. In the discussion below, it will be useful to say if a repository is “ahead”, “behind”, or “equal” to another. These states are defined as:

  • If the tip of the two repositories are the same reference, then the two repositories are said to be equal (‘e‘ in table below)
  • Else if the tip of the upstream repository is a ancestor of the tip of the destination repository, the upstream is defined to be behind (‘B‘ in table below) the source repository
  • Otherwise, the upstream repository is ahead (‘A‘ in table below) of the source repository.

Landing a change in the normal (2 repository case: RoR and lander’s repository), the process is logically (assuming no network issues):

  1. Make sure lander’s repository is equivalent to RoR (start with equality)

  2. Apply the changes (RoR is now “Behind” the local repository)

  3. Push the changes to the RoR
    • if the push succeeds, then stop. (equality restored)

    • if the push fails, simultaneous landings were being attempted, and you lost the race.

      When simultaneous landings are attempted, only one will succeed, and the others will need to repeat the landing attempt. The RoR is now “Ahead” of the local repository, and the new upstream changes will need to be incorporated, logically as:

      1. Remove the local changes (“patch -R”, “git stash”, “hg import”, etc.).
      2. Pull the changes from RoR (will apply cleanly, equality restored)
      3. Continue from step 2 above

When an authorized committer wants to land a change set on an hg RoR from git, there are three repositories involved. These are the RoR, the git repository the lander is working in, and internal hggit used for translation. The sections below describe how this affects the normal case above.

Land from git – Happy Path

On the happy path (no commit collisions, no network issues), the steps are identical to the normal path above. The git commands executed by the lander are set by the tool chain to perform any additional operations needed.

Land from git – Commit Collision

Occasionally, multiple people will try to land commits simultaneously, and a commit collision will occur (steps 3a, 3b, & 3c above). As long as the collision is noticed and dealt with before addition changes are committed to the git repository, the tooling will unapply the change to the internal hggit repository.

Land from git – Sad Path

In real life, network connections fail, power outages occur, and other gremlins create the need to deal with “sad paths”. The following sections are only needed when we’re neither on the happy path nor experiencing a normal commit collision.

Because these cases cover every possible case of disaster recovery, it can appear more complex than it is. While there are multiple (6) different sad paths, only one will be in play for a given repository. And the maximum number of operations to recover is only three (3). The relationship between each pair of repositories determines the correct actions to take to restore the repositories to a known, consistent state. The static case is simply:

Simplistic Recovery State Diagram

Simplistic Recovery State Diagram

Note

  1. The simplistic diagram assumes no changes to RoR during the duration of the recovery (not a valid assumption for real life). See the text for information on dealing with the changes.
  2. States “BB” & “BA” are not shown, as they represent invalid states that may require restoring portions of the system from backup before proceeding.

In reality, it is impractical to guarantee the RoR is static during recovery steps. That can be dealt with by applying the process described in the flowchart to restore equality and using the tables below to locate the actions.

The primary goal is to ensure correctness based on the RoR. The secondary goal is to make the interim repository as invisible as possible.

Key RoR <-> hggit hggit <-> git Interpretation Next Step to Equality
Ae Ahead equal someone else landed pull from RoR
AA Ahead Ahead someone else landed [1] pull from RoR
AB Ahead Behind someone else landed [1] back out local changes (3a above)
ee equal equal equal nothing to do
eA equal Ahead someone else landed [2] pull to git
eB equal Behind ready to land push from git
Be Behind equal ready to land [2] push to RoR
BA Behind Ahead prior landing not finished, lost from git [3] corrupted setup, see note
BB Behind Behind prior landing not finished, next started [4] back out local changes (3a above) from 2nd landing

Table Notes

[1](1, 2) This is the common situation of needing to update (and possibly re-merge local changes) prior to landing the change
[2](1, 2) If the automation is working correctly, this is only a transitory stage, and no manual action is needed. IRL, stuff happens, so an explicit recovery path is needed.
[3]This “shouldn’t happen”, as it implies the git repository has been restored from a backup and the “pending landing” in the hggit repository is no longer a part of the git history. If there isn’t a clear understanding of why this occurred, client side repository setup should be considered suspect, and replaced.
[4]

Lander shot themselves in the foot - they have 2 incomplete landings in progress. If they are extremely lucky, they can recover by completing the first landing (“hg push RoR” -> “eB”), and proceed from there.

The deterministic approach, which also must be used if landing of first change set fails, is to back out second landing from hggit and git, then back out first landing from hggit and git.) Then equality can be restored, and each landing redone separately.

DVCS Commands
Next Step Active Repository Command
pull from RoR hggit hg pull
pull to git git git pull RoR
push from git git git push RoR
push to RoR hggit hg push

Note

that if any of the above actions fail, it simply means that we’ve lost another race condition with someone else’s commit. The recovery path is simply to re-evaluate the current state and proceed as indicated (as shown in diagram 1).

Flowchart to Restore Equality

Flowchart to Restore Equality

Flowchart to Restore Equality

Benjamin KerensaOpen Source Bridge 2013: Day 1 Recap

Open Source Bridge 2013, an open source conference produced by Stumptown Syndicate, kicked off today for its 5th annual event in Portland, Oregon.  I spent the entire day and part of the evening networking with attendees and catching some of the amazing sessions and here is my report.

Keynote

James Vasile opened this year’s Open Source Bridge with the first keynote of the week and he chose a serious topic: how we are living in an age of surveillance and that we need to create solutions to protect free speech.  Vasile referenced recent events like the Edward Snowden’s leak of the National Security Agency’s PRISM program and Internet Censorship in the Middle East.

Vasile talked fondly of the importance of open tools on the internet and technologies like encryption and pointed out that policy makers will not bring change.

Sessions of Interest

The first session of the day I attended was “Taming Your Inner Cowboy Coder – A Simple And Sane DevOps Workflow” a talk given by Greg Lund-Chaix and Evan Heidtmann. The talk discussed the tools and best practices for devops while working in development and production environments.

Next up was “DIY Electric Vehicles” a talk given by Ben Kero who works at Mozilla. Kero had informative slides and a even more informative talk as he shared his expertise in a hobby he has picked up: building DIY Electric Vehicles. Kero decribed the possibilities of making electric-powered bikes and cars and the anatomy of such vehicles and the basics of how to get started.

13 11 300x225 Open Source Bridge 2013: Day 1 RecapThe final talk of the day I got to attend another talk by Ben Kero who gave a highlight of Firefox OS and a short history of the mobile technology that led up to Firefox OS. The talk was packed with great slides and useful information and Kero stayed after to answer questions of people who were interesting in making apps or even porting Firefox OS.

I look forward to day two of Open Source Bridge tomorrow and the 5th Year Anniversary Party this Thursday at the Oregon Museum of Science and Industry. If you happen to be attending Open Source Bridge this week, don’t forget to nominate a hard-working open source contributor for the Open Source Citizenship Award (which will be given out on Thursday), consider a donation to the nice folks at Stumptown Syndicate, and be sure to come to the Firefox OS Hackday tomorrow night!

 

 

 

Byron Joneshappy bmo push day!

the following changes have been pushed to bugzilla.mozilla.org:

  • [883330] Clone of a secure bug defaults to IN-secure (not hidden)
  • [883013] googlebot is indexing more pages than it should
  • [864504] Brand Engagement project initiation form that spits out a bug by default
  • [884177] add simple instrumentation to process_bug.cgi

Filed under: bmo, mozilla

Jim ChenNow you can debug Fennec on x86

The Android GDB (JimDB) Wiki and pre-built binaries now include instructions and support for Android on x86. Not only is it useful on the growing number of x86 devices, it is also useful on the x86 emulator included in the Android SDK (for developers without access to a device). Presently, the x86 version is entirely separate form the ARM version - you would need both versions in different directories if you have devices on both platforms.

The updated GDB also has limited support for on-demand decompression on Android. If you've been noticing random seg faults when debugging Fennec, the new version will ignore these seg faults. See "Random segmentation faults when debugging Fennec" and "monitor set ignore-ondemand" in the Wiki for more information.

Next up, I will be working on offering a B2G version of JimDB with similar functionality and benefits as the Android version. See the dev.b2g posting for the discussion. Let me know what you think!

Konstantinos AntonakoglouYouTube HTML5 Switch v0.1.7 & News

Hello!

Long time no see! I’ve been busy outside the blog-sphere and I’ve got some news to share. First of all, I upgraded my Firefox Add-on to version 0.1.7. So here is the link:

https://addons.mozilla.org/en-US/firefox/addon/youtube-html5-switch/

All in all, the important addition is that you can now use the hotkey Control+Y instead of pushing the button on the toolbar. Plus, I think it now has no other issues for most new versions of Firefox. I need to point out that I get most of the help from the SDK’s documentation which is great, but, to anyone interested, don’t hesitate to contribute to its content! Restartless add-ons rule!

You may use it and see if it works on YouTube (yeah it works, at least for Firefox 21.0 w/ Fedora Linux) using this video:

Yes! It’s the first video of the band I play with, directed by Kostas Gounaris. Cool huh? :)

I hope you’ll like it as we put a lot of effort to complete it and guess what? There’s also going to be a short film based on the song. I’ll let you know!


Blake WintonDrawing lines with CSS.

One of the things I’m working on as part of my job1 at Mozilla is a tool to make it easy for designers to create mockups that are linked to live bugs, similar to the ones at Are We Pretty Yet. Now, I’ve got the background showing up, and the bugs overlayed on top of it, but as it stands, I’m requiring the designers to draw the lines connecting the bugs to the various areas in the mockup right on the mockup itself! This is obviously a fairly terrible idea, since it makes it much harder than it should to move stuff around after the fact, and requires a ton of up-front planning when creating the initial image. But what are my other options?

I thought for a while about layering a canvas element over the mockup; it would let me draw whatever shapes I wanted to, but passing the click events through to the mockup seemed like it would be fairly annoying, and I don’t think the connecting lines should appear in front of the boxes showing the bug details, which adds another wrinkle. Then, over lunch, I started to wonder what it would look like if a 1px by 1px black square got stretched and rotated with CSS… So I took some time after lunch, and played around a little, and it seems like it just might work! Give it a try, let me know if you have any ideas to make it better, and feel free to take the idea anywhere you think it might be useful!

Update: In the comments, Andrew points out that I could use a 1px by 1px span instead, which would let me change the background colour much easier, so I’ve linked to his jsfiddle instead.


  1. Sometimes I still can’t believe how lucky I am to get to do this stuff all day, and get paid for it!  

Doug BelshawPrivacy, the NSA and Web Literacies [DMLcentral]

My latest post for DMLcentral is now up. Entitled Privacy, the NSA and Web Literacies I focus on what we can actually do in the wake of the NSA surveillance revelations. And no, I didn’t choose the accompanying photo. ;-)

Read it here: http://dmlcentral.net/blog/doug-belshaw/privacy-nsa-and-web-literacies

(in other news, you might like prism-break.org and Mozilla’s work around the Web Literacy Standard)

Jason SmithWebRTC Test Day on June 21st

WebRTC Test Day on June 21st

Come help test WebRTC in Desktop Firefox and Firefox for Android this Friday on June 21st!


Seif LotfyGNOME Music: Phase Two and more…

Before I start blogging about the progress of GNOME Music, I would like to announce my happiness (as well as the whole gnome music team) that we now have 3 students sponsored to hack on GNOME Music. Eslam Mostafa (SoC), Shivani Podar (OWP) and Sai Suman Prayaga (SoC) all three of them deserved they internships, showing dedication and patching like crazy before SoC, keeping Vadim, Guillaume and me very busy.

Also I would like to welcome Arnel Borja and Fabiano Fidêncio to the team with their immense contributions, and ofcourse the allmighty Giovanni Campagna (who hacks everything in GNOME by now)

The last couple of weeks have been very hectic here, nevertheless we triumphed over phase of one of developing GNOME Music:

  • Set basic infrastructure
  • Implement Grilo Querying
  • Implement Albums View
  • Implement Songs View
  • Implement Artist View
  • Implement Playback support
  • Clean up and port to Glade

Now phase 2 is shaping up nicely:

  • Implement Playlist View
  • Implement Selection functionality on all views
  • Implement Repeat/Shuffle
  • Implement Actions
  • Clean up

So if you are interested in joining us with the development please feel free to hang out with us on #gnome-music on irc.gnome.org

Currently its only usable via JHbuild. Anyhow for more info like code and bugzilla check out https://live.gnome.org/Music

Here are some screenshots for tempting :D

Screenshot from 2013-06-17 21:16:14

Screenshot from 2013-06-17 21:16:33

Screenshot from 2013-06-17 21:16:46

Screenshot from 2013-06-17 21:18:54

Screenshot from 2013-06-17 21:19:58

 

Screenshot from 2013-06-17 21:19:26

flattr this!

Jared WeinPicking Up The Crumbs

A few days ago a new feature landed in Firefox Nightly that makes closing multiple tabs easier than it was before.

I often find myself in situations where I have multiple tabs that I opened only to look at for short periods of time. Sometimes I reach this state while reading articles on Hacker News or looking at funny pictures on Reddit. At the end of looking at the tabs, it would be nice if Firefox had a way to close these ephemeral tabs so you can get back to your previous work quicker.

Close Tabs to The Right

Well, Firefox now does! If you open lots of tabs from Reddit and then want to close all of the tabs to the right of Reddit, just right-click on the Reddit tab and choose “Close Tabs to the Right”. It’s easy and quick!

Why “close tabs to the right” and not “close tabs to the left”? When we open new tabs they appear on the end, and so naturally tabs that have a longer lifetime end up being promoted to the start-side of the bar. This leads us towards the situation where closing tabs “to the right” is a simple way of closing the ephemeral tabs.

Users who are using Firefox with a right-to-left locale such as Hebrew or Arabic should see the equivalent “Close Tabs to the Left” feature.

Huge thanks go out to Michael Brennan who contributed the patches and automated tests for this feature! Unless something drastic happens, this feature will find its way to Firefox Release in just over 12 weeks in Firefox 24.


Tagged: firefox, mozilla, planet-mozilla, usability

Irving ReidAdd-on Manager progress: Almost done!

Felipe has a full suite of r+ for his work on AddonRepository.jsm in Bug 853389, and I’m in the middle of handling review comments for the XPI Database changes in Bug 853388. I need to update based on the review comments, implement asynchronous loading of the JSON database, and add some telemetry so we can track performance and correctness of the new version. Once that is done, we’ll be ready to land on Nightly.

I’ve implemented a DeferredSave module based in the discussion in my previous blog post; I suspect it’s something that will be useful to others trying to convert to asynchronous saving of data blobs. Check it out at https://bugzilla.mozilla.org/attachment.cgi?id=762461.

Kim MoirResources for learning Python

When I started working at Mozilla, I didn't know Python very well.  All of the code that drives our continuous integration is written in it so I've had a spent a lot of time becoming more proficient.  I've taken a number of free self-study classes/tutorials that others might find useful getting up to speed with Python.

Google Python class  - Two day class that describes how to manipulate strings, dictionaries, lists. File I/O, regular expressions and sorting algorithms.  Class lectures that were recorded at a Google training event are available on youtube, and the exercises are pretty straightforward with a solution key to check your work.  All the exercises are done using the Python installation on your local machine.

Code academy has a Python class.  I did the exercises for the topics that weren't covered in the Google class, including list comprehensions, lambda expressions and OO in Python.  The exercises are completed and validated on the website.

The best course I've taken so far has been the nine week Interactive Programming in Python class offered by Coursera. Coursera is a company that offers university courses for free.  You receive a grade and certification of completion,  but not an actual credit at the institution. The Python course I took is in conjunction with Rice University.  For this course, you have to register for the course when it's run and complete the work each week.   There are an hour or so of video lectures, a quiz or two and an assignment to complete for around 8-10 hours of work each week.  After you submit your assignment, you're asked to review the work of five other students.  This is how to scale marking assignments for the thousands of students enrolled in the class :-).  The code for your assignments is written in the browser,  on the CodeSkulptor website.

Syllabus for coursera course
Each week the assignment is to implement a different game which was a lot of fun.   We also learned how to implement the calculations for velocity, reflection and collisions to make the objects in our games appear as a realistic game.   The final project is to implement a version of the Asteroids game complete with missiles and exploding rocks.  I've also never done much with a the UI aspects of programming in the past, so it was interesting to learn how to incorporate these elements.
Screenshot of final asteroids game
This iteration of the course is almost over and the next one starts in October.  Essentially the course provides lots of time to practice writing code, which is the only path to getting better.  I found the course to be really well organized, and the video lectures were succinct in getting to the point of the lecture.  No profs going off on tangents about random subjects :-)

Mr. Releng also took this course at the same time I did as he is also using Python at work.  I said to him one day that I certainly wouldn't wanted to have attended all my university courses online as I always liked to ask questions in class.  With the pre-recorded lectures, the only way to ask questions is on the associated forums.  He agreed, but said while this was probably not the future of university, it was certainly great for continuing education.

Other Python resources I looked at  include http://www.learnpython.org/.  The pyvideo website includes talks from many of the PyCon and related conferences here which are interesting to watch.

What resources did you use to learn Python?

Kim MoirLessons learned organizing a technical event

I was on the organizing committee for Releng 2013.  This was the first time I've been involved in organizing a technical event.  I thought my experiences might be useful to others in the same situation thus this blog entry:-)

Reaching out to potential speakers
Three of the people on our organizing committee were researchers.  I was the only release engineer.  My goal was to get as many release engineers as possible to submit talks and attend the workshop.  I asked for suggestions from my coworkers and LinkedIn contacts to try to reach people that might be interested in submitting a talk.  I also wrote to multiple release engineering oriented mailing lists and Google+ groups.  I had a query for #relengcon and @relengcon mentions on Twitter.  If people mentioned that the relengcon sounded interesting, I replied to them and suggested that they submit a talk.  I also posted information about the workshop on several release engineering LinkedIn and meetup.com groups.  It's often a good idea to contact the organizer of a group and ask them to send text crafted by the organizers to their members.  Receiving a message from someone they already know lends some validity to the message, versus just another person adding to their inbox noise.

Carl and Gareth from Netflix talk about self-service build and delivery
Academic vs. Industry
Releng 2013 was a workshop under the larger ICSE academic conference.   The submission process was much more formal than the industry conferences I've attended in the past.   There were two types of submissions: a formal paper or an abstract for a talk.  There were strict submission guidelines with respect to the format of the talk abstract.  In contrast, the submission process for most industry conferences seems to be "submit a paragraph summarizing your talk into a form on web page".  Very easy.  The different approach stems from the fact that proceedings from academic conferences are usually published.  Academics often need the promise of publication to secure funding to attend a conference.  

Funding
This workshop had effectively zero budget.  ICSE workshops don't get any funding from the fees paid to the larger ISCE conference.   Attendees had to pay registration fees to attend the workshop whether they had a talk accepted or not.  Many industry conferences offer a reduced registration fee for speakers.  Since this was a first time event, I really concentrated on encouraging people to submit talks and register for the event.  Now that the event was a success, I would feel comfortable approaching a company and asking them to sponsor it so we could reduce speaker fees.  We had some funding from a research institution for one of our keynote speakers.  I reached out to Mozilla developer relations who provided some t-shirts,  mugs and stickers.  In the future, I'd also reach out to other companies for swag donations :-)

Recording of sessions
The cost of hiring a company to record the talks was prohibitive given our lack of budget.  Again, now that the first workshop was a success, this could be another item that could be sponsored. 

Post-workshop dinner organization
The OpenTable website is a great resource to see the availability of seating at  of various restaurants in several US cities.  It also links to their respective ratings.  This was easy way to make reservations at restaurants for dinner, especially since none of the organizers live in the Bay area.

Image ©photographus, http://www.flickr.com/photos/misspixels/8480711076/in/photostream/ under Creative Commons by-nc-sa 2.0
 
Panel
I had never moderated a panel before.  I found this article was quite helpful on how to successfully moderate a panel.  I spent quite a bit of time before the event thinking of panel questions and we also sought input from our attendees in a survey.   As for participants on the panel, I reached out to release engineers who didn't present a talk but looked like they had a wealth of release engineering experience on their LinkedIn profiles.  Sometimes diversity is just asking different people!

Speaker gifts
We wanted to give speaker gifts to our fine keynote speakers.  I was unsure what a typical speaker gift comprised so I asked on Twitter.   The answers ranged from fancy pens, laptop bags, local bottles of wine and local cookbook.  Another person suggested that the gift be something carried on the plane if the speaker wasn't local.  In fact, they usually personalized the gift by presenter and shipped it to their home to avoid dealing with airline hassles regarding gifts.  Release engineering is about building things.  Bram suggested Lego as a speaker gift.  I liked this idea a lot and added it as one of the items in the speaker gift bag.



In the end the workshop went pretty well.  The most important thing was to get people who are passionate about release engineering in the same room.  And that's where the interesting conversations begin and you make connections with people.  That's what really matters in the end.  

If you've been involved in organizing a technical event what advice do you have?

Francesco LodoloSummit 2013 planning assembly: a wonderful begin

Note: this is a guest post from Iacopo Benesperi, a fellow Mozillian from the Italian community.

This week-end took place in Mozilla’s Paris office the Summit 2013 planning assembly: a gathering of about 65 people from all around the world and representing all areas of the Mozilla project, with both paid staff and volunteers, aimed to plan and shape the next Summit, that will take place the first week-end of October in Bruxelles, Toronto and Santa Clara.

TL;DR: it’s been a great assembly. If we manage to accomplish at the next Summit half of the things we’ve discussed in this week-end, it will have been the best Mozilla event ever.

The aim of the assembly was not to define a schedule for the event and fix everything but to talk about which are the important topics that animate the Mozilla project these days, start to discuss them and shape them in a way so that we can come out with a good format for the Summit to address them and try to give and propose solutions for them. To do this, all the planning committee has taken interviews to fellow Mozillians in the last month to have a wider view of which is the temperature of the project in these days and act as a representative for the comments expressed.

I went to Paris without a clear idea of what we would have accomplished there, but I’m impressed with the result we had.
First of all, this assembly was facilitated by people of unconference.net, who proposed a peculiar way to proceed with it. I was a bit skeptic with the method proposed, but it turned out that some of their methods are really great (like unpanel) and we will definitely adopt them for the next Summit, while some others still look like rubbish (I may still be proved wrong).
The second important fact is that we talked little about technology and a lot about Mozilla, its community, its communication (internal and external) and the interactions between its components and people. On one hand, as Gandalf pointed out, this is a sign that we trust implicitly our technology and the fact that it will be discussed at the Summit, because this is a big portion of what Mozilla is about. On the other hand, it’s a sign that there’s a general awareness, not only among community members but also (finally) among employees and paid staff and board of directors that we have communication problems between the different parts of the projects and especially between paid staff and volunteers, and the time is now mature to address and try to solve them. What I’m talking about is not only communication to get things done but also communication related to the decision-making process.

So, it will be interesting to experiment discussions around different time-zones and locations. I will probably post more about the assembly and the planning for the Summit in the next days, when ideas and thoughts will have settled down a bit and I’ll have had the time to read all the ideas and documentation we produced during this two days. What I felt important to communicate immediately is the fact that the next Summit will be a wonderful occasion to talk not only about our technologies but also about who we are, what we want to do and where we want to go. It will be an occasion for the community to teach and mentor the newest community members and more importantly all the new employees to let them understand and feel the power and importance of our community and it will be, in general, an occasion to have our voice finally be heard and taken into consideration not only in the tasks at hand, but in building the new policies and guidelines that will drive all the project in the future.

I’m sure we’ll try, in the next months, to provide some initial information and documentation about what have been discussed and decided so far so that you can arrive at the Summit prepared to give your contribution to the conversation, so that we can take the most out of the Summit and make it really matter in our future.

As I said at the beginning: if we manage to discuss and propose solutions to half of the problems and concerns raised during this two days, we will have had the best Mozilla event ever; one that will have strengthened and made our project more mature.

Aaron TrainDiscover and Help Test WebRTC in Firefox for Android and Firefox on Desktop on Friday June 21st, 2013

This upcoming Friday, we would love for you to solicit your support towards testing and contributing to the process of qualifying a new developer-release version of Firefox for Android and Firefox on Desktop both on the Nightly channel as part of our rapid release testing cycle. We will be focusing on the process of discovering, using and testing WebRTC.

WebRTC is a free, open project that enables web browsers with Real-Time Communications (RTC) capabilities via simple Javascript APIs. The WebRTC components have been optimized to best serve this purpose. The WebRTC mission is to enable rich, high quality, RTC applications to be developed in the browser via simple Javascript APIs and HTML5. The WebRTC initiative is a project supported by Google, Mozilla and Opera.

This QA event, this Friday, is open to all those interested: newcomers, experienced testers, developers, and anyone interested in testing early builds of Firefox on the Nightly channel.

We would like for you to use the new version of Firefox on your Android phone and desktop or laptop machine, and take a close look at the latest Nightly builds in order to assist us in identifying any noticeably major issues found with our WebRTC implementation, and ensure that all feature functionality that is included in this upcoming release is on its way to a feature and testing complete state.

To cover the work throughout the whole day we have created an EtherPad test-plan. Please feel free to read and use it as a companion during the day’s event. There will be moderators at hand in the IRC channel: #testday, to answer any questions you have.

Together with your help we want to make this event a success and ensure the high quality of WebRTC support in Firefox for all of our users world-wide. If you have time on Friday June 21st, 2013, please join us on IRC, we will have Mozilla community and testers on hand to help answer any of your questions.

Your testing and feedback is highly valuable, and we hope to see you attend our test day event.

Michael VerdiGetting people to the right place is half the work

A while back I wrote about how much better some of our articles perform when they are linked to from some external place (in context of course). Here’s another example. Back on May 14th, we released Firefox 21 with a new feature called the Firefox Health Report. The FHR includes a graph of startup times. If you have some particularly long startup times we display a tip that suggests you reset Firefox and links to the help article on how to do that.

Before Firefox 21 and the health report, the reset article was getting rated helpful 60% – 65% of the time. Now that we’re showing the article to thousands of people each day who have a Firefox issue that the reset might be able to fix, the article is being rated helpful upwards of 82%. That’s huge — about a 25% improvement.

reset-fhr

Doug BelshawWeeknote 24/2013

This week I’ve been:

  • Presenting and running workshops on Open Badges at a CRA seminar (Monday, Birmingham).
  • Meeting lots of people/organisations at the Mozilla London office to explore ways they can use badges. People like Creative Skillset, OCR, Livity and Inspir.ed.
  • Booking travel for the coming weeks.
  • Running a webinar on Open Badges for Learning Pool (slides here)
  • Ordering more business cards. The other ones didn’t turn up and, as 20th-century as they feel, I’m often in a position where I need to give them out.
  • Catching up with the audio from the Web Literacy Standard community call, hosted by Carla.
  • Hosting the Open Badges community call for the first time for a while.
  • Talking some more and reaching out to various people within Mozilla about Firecloud.
  • Writing a post for DMLcentral about the NSA, Mozilla and privacy that I hope will go live on Monday.
  • Claiming back expenses for speaking at recent events.
  • Meeting with my newest colleague Meg Cole via Skype.
  • Getting some training on interviews with the media from Erica Sackin.
  • Participating in a great day of networking, sharing and planning for a new city-wide learning co-operative (potentially powered by badges!) hosted by the University of Salford.

This week I’ve done loads of stuff myself, but my colleagues have been even busier. This week Mozilla has, well done pretty much everything:

Next week I’m presenting at the Learning and Skills Group (London, Tuesday) and moderating a session on ‘Digital Skills for Work and Learning’ at the EC Digital Agenda Assembly 2013 (Dublin, Wednesday). I’m also looking forward to working with the Mozilla comms team on next month’s beta release of the Web Literacy Standard.

Christian HeilmannImage masking with HTML5 Canvas

I just added a small demo to my GitHub showing how you can do image masking by using the canvas element.

masks

All you need to do is add the canvasmask.js script and add a class of mask to each image you want to mask. You also need to provide a PNG file as the mask using the data-mask attribute. For example:

<img src="red-panda.jpg" 
     alt="Red panda" 
     class="mask" 
     data-mask="centerblur.png">

This will take the centerblur.png file and apply it as a mask to red-panda.jpg – in effect taking the alpha of each pixel and change the alpha of the original pixel to that.

You can see it in action here and get the code on GitHub.

Under the hood, all I do is loop through all the pixels of the images (after copying them to two canvas elements) and apply the alpha values (every 4th value in the pixeldata array) of the PNG to the image. Simple, really :)

As mentioned by Jake Archibald on Twitter there is no need to loop over the pixels of the images, all you need is to copy the mask first, then change the canvas compositing to source-atop and add the image. Done. The script does that now, and thus is much faster.

Frederic WenzelAdd-on Notifications Are Hard

Over the years, I have written a handful of Firefox add-ons, and I need notifications quite frequently. Why? Most of my add-ons do something in the background at the user's request, and when it's done, the user wants to know. Alternatively, if my add-on attempts to do something and fails, the user would see nothing happen at all, unless I somehow tell them.

In real life, this is supposed to look something like this example, from "Copy URL":

Copy URL notification

The Mozilla Add-ons SDK even has a convenient API for it. Easy, right?

Sadly, not so fast: While the SDK is supposed to abstract all of this neatly away from me and "just work" on Linux, Windows, and OS X, the behavior is inconsistent, owed -- on OS X, anyway -- to the wonky state of notification support on the operating system level.

To Growl or not to Growl

I've ran into issues with notifications repeatedly over time, and employed a number of solutions so far. Spoiler alert: I am happy with none of them.

OS X 10.7 and below relied on a third-party tool called Growl to support notifications. If you had it installed, the SDK's API would work just great. Sadly, if you didn't have it installed, notifications would silently be swallowed. Worse yet, I was unable to detect if this happened, so I had no way to implement a fallback mechanism.

The OS X 10.8 "notification center" was supposed to fix this, but apparently, it will only display our notifications if the browser does not have the focus. In other words, it's completely useless for in-context notifications.

I considered all that a very poor user experience and instead of using the SDK's API, I implemented my own notifications module called "simple-notify" that would detect the availability of the notifications service (i.e., Growl or any other platform-specific service) first, and if none was found would employ a fallback mechanism.

The ugly but reliable notifications bar

The fallback mechanism I use is the once-ubiquitous, gray, Firefox notification bar:

Copy ShortURL notification bar

It is shown in context, grabs the user's attention (perhaps a little too much) and, most importantly, it is reliably available on all platforms.

This notification bar has its downsides: For example, it's fairly intrusive and not easily ignored. My add-ons usually auto-close it after a few seconds. If I didn't do that, the bar would persist until closed by the user. This solution also can't handle more than one notification at a time: A second notification will overlay the previous one.

HTML5 Notifications API

Luckily, there's hope. The W3C Notifications API landed in Firefox 22, which (at the time of writing) is the next upcoming release version. If the Add-ons SDK is updated to use this API, this should finally allow me to use one line of code for notifications, not a few dozen.

In the context of a page, I can even use it already (without Add-ons SDK support), with two caveats:

  • To remain backwards compatible (for a while, anyway) I'd still have to implement a fallback mechanism. Once Firefox 22 is the current release version, however, I could relax that rule and just live with the fact that users of previous versions may or may not receive notifications.
  • The W3C standard (rightly) requires to ask for permission before a website can issue notifications. Add-ons should be able to use notifications without explicit permission step.

I'm looking forward to the time when all this will smoothly work as expected!


I'm blogging about once a week in 2013, on various topics. This is my fifteenth post of the year.

Laura ThomsonDXR: code search and static analysis

I asked Erik Rose from my team to blog about his work on DXR (docs), the code search and static analysis tool for the Firefox codebase.  He did so on the Mozilla Webdev blog, so it would show up on Planet Mozilla. Today, it was pointed out to me that the Webdev blog is not on Planet.

It’s a great post, summarizing all the things he’s done in the last few months.  Go read the article: DXR digests the Firefox codebase.

Blake WintonDrawing lines with CSS.

One of the things I’m working on as part of my job1 at Mozilla is a tool to make it easy for designers to create mockups that are linked to live bugs, similar to the ones at Are We Pretty Yet. Now, I’ve got the background showing up, and the bugs overlayed on top of it, but as it stands, I’m requiring the designers to draw the lines connecting the bugs to the various areas in the mockup right on the mockup itself! This is obviously a fairly terrible idea, since it makes it much harder than it should to move stuff around after the fact, and requires a ton of up-front planning when creating the initial image. But what are my other options?

I thought for a while about layering a canvas element over the mockup; it would let me draw whatever shapes I wanted to, but passing the click events through to the mockup seemed like it would be fairly annoying, and I don’t think the connecting lines should appear in front of the boxes showing the bug details, which adds another wrinkle. Then, over lunch, I started to wonder what it would look like if a 1px by 1px black square got stretched and rotated with CSS… So I took some time after lunch, and played around a little, and it seems like it just might work! Give it a try, let me know if you have any ideas to make it better, and feel free to take the idea anywhere you think it might be useful!

Update: In the comments, Andrew points out that I could use a 1px by 1px span instead, which would make it much easier to change the colour of the line, so I’ve linked to his jsfiddle instead. :)


  1. Sometimes I still can’t believe how lucky I am to get to do this stuff all day, and get paid for it!  

Ben SimonOnce a Mozillian …

It is with a bit of sadness and a lot of excitement that today is my last day working for Mozilla — I start on Monday at Greenpeace’s Digital Mobilisation Lab, with a specific focus on climate campaigns around the world.

I’ve had a wonderful time at Mozilla. I’ve gotten to work with some exceptional people while making the world a better place, and I’m extremely proud of how far we’ve come in my corner of things since I arrived (23x email list, 4x donations, thousands involved in Webmaker, millions in SOPA/PIPA/ITU/PRISM, and more). Thanks so much to everyone who made it possible!

And I’m very excited to start at Greenpeace. I’ve long had a nagging feeling that what I should really be doing is working on climate change — it’s such an urgent issue, and there are so many bad actors trying to directly stop any progress in fighting it, that I feel it’s important to do what I can with as much time as I can. And I love a good fight.

So, more to come on that front.

But they say “Once a Mozillian, always a Mozillian” for a reason — I’ve every intention of remaining involved in the fight to keep the web open, secure, and hackable. It’s something we all need.


Naoki HirataVM for B2G

It took a while to hunt down a site that allowed for free hosting of 50 gigs or more and then post the file up.  There are certain modifications I had made from yesterday to the image as well.

  1. There are certain files I shouldn’t host for the unagi, so having the directories pulled for them didn’t’ make sense.  I decided to get rid of those.  instead it’s a ~/Project/B2G folder that’s waiting for you to config.sh with whatever device you have. see
    https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Preparing_for_your_first_B2G_build
  2. I decided to download the marionette test cases and also install virtualenvwrapper and virtualenv.  see:
    https://developer.mozilla.org/en-US/docs/Marionette/Running_Tests
    and
    http://doughellmann.com/2008/05/virtualenvwrapper.html
  3. I also have a separate ~/Projects/gaia folder so that you can build your own gaia.  Here are some tips and tricks :
    https://wiki.mozilla.org/B2G/QA/Tips_And_Tricks#B2G_Compiling_Gaia

The username is Ubuntu and the password is reverse:


https://mega.co.nz/#!9w9ihJwB!YF-zymendf-uzLnhYlssjUFcW9l6XJp31Vx4uyEoDn8


Filed under: mobifx, mobile, Planet, QA, QMO, Uncategorized Tagged: B2G, gaia, mobifx, mobile, Planet, QA, QMO

Nicholas NethercoteMemShrink’s 2nd Birthday

June 14, 2013 is the second anniversary of the first MemShrink meeting.  This time last year I took the opportunity to write about the major achievements from MemShrink’s first year.  Unsurprisingly, since then we’ve been picking fruit from higher in the tree, so the advances have been less dramatic.  But it’s been 11 months since I last update the “big ticket items” list, so I will take this opportunity to do so, providing a partial summary of the past year at the same time.

The Old Big Ticket Items List

#5: Better Script Handling

This had two parts.  The first part was the sharing of immutable parts of scripts, which Till Schneidereit implemented.  It can save multiple MiBs of memory, particular if you have numerous tabs open from the same website.

The second part is lazy bytecode generation, which Brian Hackett has implemented and landed, though it hasn’t yet enabled.  Brian is working out the remaining kinks and hopes to land by the end of the current (v24) cycle.    Hopefully he will, because measurements have shown that it can reduce Firefox’s memory consumption by 5% or more on common workloads!  That’s a huge, general improvement.  Furthermore, it significantly reduces the number of things that are allocated on the GC heap (i.e. scripts, strings, objects and shapes that are created when bytecode for a function is generated).  This reduces pressure on the GC which makes it less likely we’ll have bad GC behaviour (e.g. pauses, or too much memory consumption) in cases where the GC heuristics aren’t optimal.

So the first part is done and the second is imminent, which is enough to cross this item off the list.  [Update:  Brian just enabled lazy bytecode on trunk!]

#4: Regain compartment-per-global losses

Bill McCloskey implemented zones, which restructured the heap to allow a certain amount of sharing between zones. This greatly reduced wasted space and reduced memory consumption in common cases by ~5%.

Some more could still be done for this issue.  In particular, it’s not clear if things have improved enough that many small JSMs can be used without wasting memory.  Nonetheless, things have improved enough that I’m happy to take this item off the list.

#3: Boot2Gecko

This item was about getting about:memory (or something similar) working on B2G, and using it to optimize memory.  This was done some time ago and the memory reporters (plus DMD) were enormously helpful in improving memory consumption.  Many of the fixes fell under the umbrella of Operation Slim Fast.

So I will remove this particular item from the list, but memory optimizations for B2G are far from over, as we’ll see below.

#2: Compacting Generational GC

See below.

#1: Better Foreground Tab Image Handling

See below.

The New Big Ticket Items List

#5: pdf.js

pdf.js was recently made the default way of opening PDFs in Firefox, replacing plug-ins such as Adobe Reader.  While this is great in a number of respects, such as security, it’s not as good for memory consumption, because pdf.js can use a lot of memory in at least some cases.  We need to investigate the known cases and improve things.

#4: Dev tools

While we’ve made great progress with memory profiling tools that help Firefox developers, the situation is not nearly as good for web developers.  Google Chrome has heap profiling tools for web developers, and Firefox should too.  (The design space for heap profilers is quite large and so Firefox shouldn’t just copy Chrome’s tools.)  Alexandre Poirot has started work on a promising prototype, though there is a lot of work remaining before any such prototype can make it into a release.

#3: B2G Nuwa

Cervantes Yu and Thinker Li have been working on Nuwa, which aims to give B2G a pre-initialized template process from which every subsequent process will be forked.  This might sound esoteric, but the important part is that it greatly increases the ability for B2G processes to share unchanging data.  In one test run, this increased the number of apps that could be run simultaneously from five to nine, which is obviously a big deal.  The downside is that getting it to work requires some extremely hairy fiddling with low-level code.  Fingers crossed it can be made to work reliably!

Beyond Nuwa, there is still plenty of other ways that B2G can have its memory consumption optimized, as you’d expect in an immature mobile OS.  Although I won’t list anything else in the big ticket items list, work will continue here, as per MemShrink’s primary aim: “MemShrink is a project that aims to reduce the memory consumption of Firefox (on desktop and mobile) and Firefox OS.”

#2: Compacting Generational GC

Generational GC will reduce fragmentation, reduce the working set size, and speed up collections.  Great progress has been made here — the enormous task of exactly rooting the JS engine and the browser is basically finished, helped along greatly by a static analysis implemented by Brian Hackett.  And Terrence Cole and others are well into converting the collector to be generational.  So we’re a lot closer than we were, but there is still some way to go.  So this item is steady at #2.

#1: Better Foreground Tab Image Handling

Firefox still uses much more memory than other browsers on image-heavy pages.  Fortunately, a great deal of progress has been made here.  Timothy Nikkel fixed things so that memory usage when scrolling through image-heavy pages is greatly reduced.  However, this change caused some jank on pages with lots of small images, so it’s currently disabled on the non-trunk branches.  Also, there is still a memory spike when memory-heavy pages are first loaded, which needs to be fixed before this item can be considered done.  So this item remains at #1.

Summary

Three items from the old list (#3, #4, #5) have been ticked off.  Two items remain (#1, #2) — albeit with good progress having been made — and keep their positions on the list.  Three items have been added to the new list (#3, #4, #5).
Let me know if I’ve omitted anything important!

Robert O'CallahanDeveloper Parallelism

In Gecko we've often had N large projects be implemented by just one person each. This has some benefits; in particular it can be quite efficient, since coordination costs are low. It's also a good way to reduce the amount of code learning developers have to do. Another approach is to put N people to work on one large project, and hopefully get it done in roughly 1/N of the time. I think the latter is probably a better way to work. I think we get better reviews, since at least for me, I do much better reviews in code I've actually hacked on than in code I've never touched. It means that if someone gets hit by a bus --- or worse still, leaves Mozilla --- we've got people who we know can work on the code. Projects getting completed faster means there's less bitrot to deal with. It makes us more agile (I hate that word though). Perhaps most importantly, it's more fun.

Most of our projects go through a startup/prototyping phase where we write some new code and get things basically working. Then there's a grind phase where we get the code working on all platforms, iron out the corner cases, fix all the regressions, fix all the fuzz bugs, write tests, and get it landed. The latter phase is usually a lot more work than the startup phase, but it's also the phase that parallelizes across developers fairly easily. So I think we should consciously try to work this way: when a project enters the grind phase, we should shift developers onto it until it's over the line. We've done some of this recently with fixing rooting hazards in JS, and in the layers refactoring.

In cases like OMTC there's some flexibility since getting the project "over the line" isn't all-or-nothing. Having people individually bring up platforms one-by-one works OK and brings incremental benefits. Same goes for converting code from XPIDL to WebIDL. So for those, the benefit of having a lot of people pile on is reduced (especially, in a conversion project, if we know that for some reason or another we will never be able to completely eliminate the stuff we're converting from).

In any case, I hope that from now on, for any project of significant size we have at least two people working on it during the grind phase, to capture the benefits I mentioned above. If someone sees this not happening, let me know and we'll fix it :-).

Frederic Wenzelimagetwist 1.1 now twists even harder

I just released a new version of imagetwist!

Everyone's favorite image rotation add-on can now apply EXIF-based "auto-rotation" to any image on a page. Also, if you want to go back to the original image, I added an option to restore it (previously, you would have to reload the page).

Here's what the new right-click menu looks like:

imagetwist 1.1 menu items

If you're curious, there are a few more features waiting to be implemented, such as mirroring of images (for front-facing cell phone cameras) and a nice rotation transition. But those will have to wait for a future release.

Download the latest version of imagetwist from the Mozilla Add-ons website!


I'm blogging about once a week in 2013, on various topics. This is my fourteenth post of the year.

Jared WeinXPCShell test output changes

Those of you using XPCShell tests may notice some slightly improved output from the test macros that landed recently on mozilla-central.

Previously, if you called do_check_null(null), you would get an output that was similar to:

[TEST-PASS] null == null

However, if you tried do_check_null("null"), you would get an output that was similar to:

[TEST-FAIL] null == null

This isn’t very helpful, and I ran into this exact issue while working on some code that uses observers. Since the data is passed as JSON, when JSON.stringify(null) is called the result is “null”. The test runner showing null == null as a failure isn’t too helpful :-P

With this recent change, all string arguments will be adorned with double-quotes.

This means that calling do_check_null("null") will now output:

[TEST-FAIL] "null" == null

The same change was made for all of the other do_check_* and do_print macros.


Tagged: mozilla, planet-mozilla, tdd, unit testing

Alexander SurkovAccessible Mozilla: Tech overview of Firefox 23

Here's a list of core accessibility improvements in oncoming Firefox 23 (will be available as beta 24 June).

ARIA


A non standard extension of ARIA was introduced. Now Firefox recognize a "key" ARIA role which is mapped to push button role on IAccessible2/ATK layer. It is supposed to be used for on-screen keyboards and dialpads. AT can use  xml-roles object attribute to pick up that role.

HTML


* A major change of this release is we don't longer create a flat hierarchy for HTML selects (see bug). Say you have a HTML select having optgroup elements like

  <select>
    <option>item
    <optgroup label="group">
      <option>subitem
    </optgroup>
  </select>

then we used to have an accessible hierarchy like:

  combobox - HTML select
   option - HTML option (item)
   heading - HTML optgroup
   option- HTML option (subitem)

Firefox 23 exposes the following hierarchy:

  combobox - HTML select
   option - HTML option (item)
   grouping - HTML optgroup
     option - HTML option (subitem)


* Another change is HTML5 input@type=range is now accessible. It's exposed as a slider role and implements the value interface, i.e. you can obtain min, max and current values and step. Also it fires value change events.

Nasty bugs


A bug where JAWS lost the virtual buffer was fixed. The patch was back ported to Firefox 22 and Firefox 21.

Another bug was that we lost inactive document occasionally. So if the user didn't interact with the document and the document wasn't self updated via JavaScript then it could be not accessible for screen readers (see bug).

ISimpleDOM support


Yet another ISimpleDOM interface (ISimpleDOMText) was tear offed as continuation of this work.

Other bug fixes


* A selection bug where we wrongly claimed that unfocused text area has a selection was fixed.

* We don't prune children anymore for number of roles like text entry, menu items and etc if they have complex trees. In other words, if for example a text entry has anything else than a plain text then you will see that in hierarchy (see bug). So if you do

  <div role="textbox"><span role="button"></span></div>

then you will get a button inside the text entry.

Peter BengtssonIn Python you sort with a tuple

My colleague Axel Hecht showed me something I didn't know about sorting in Python.

In Python you can sort with a tuple. It's best illustrated with a simple example:

>>> items = [(1, 'B'), (1, 'A'), (2, 'A'), (0, 'B'), (0, 'a')]
>>> sorted(items)
[(0, 'B'), (0, 'a'), (1, 'A'), (1, 'B'), (2, 'A')]

By default the sort and the sorted built-in function notices that the items are tuples so it sorts on the first element first and on the second element second.

However, notice how you get (0, 'B') appearing before (0, 'a'). That's because upper case comes before lower case characters. However, suppose you wanted to apply some "humanization" on that and sort case insensitively. You might try:

>>> sorted(items, key=str.lower)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: descriptor 'lower' requires a 'str' object but received a 'tuple'

which is an error we deserve because this won't work for the first part of each tuple.

We could try to write a lambda function (e.g. sorted(items, key=lambda x: x.lower() if isinstance(x, str) else x)) but that's not going to work because you'll only ever get to apply that to the first item.

Without further ado, here's how you do it. A lambda function that returns a tuple:

>>> sorted(items, key=lambda x: (x[0], x[1].lower()))
[(0, 'a'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A')]

And there you have it! Thanks for sharing Axel!

As a bonus item for people still reading...
I'm sure you know that you can reverse a sort order simply by passing in sorted(items, reverse=True, ...) but what if you want to have different directions depend on the key that you're sorting on.

Using the technique of a lambda function that returns a tuple, here's how we sort a slightly more advanced structure:

>>> peeps = [{'name': 'Bill', 'salary': 1000}, {'name': 'Bill', 'salary': 500}, {'name': 'Ted', 'salary': 500}]

And now, sort with a lambda function returning a tuple:

>>> sorted(peeps, key=lambda x: (x['name'], x['salary']))
[{'salary': 500, 'name': 'Bill'}, {'salary': 1000, 'name': 'Bill'}, {'salary': 500, 'name': 'Ted'}]

Makes sense, right? Bill comes before Ted and 500 comes before 1000. But how do you sort it like that on the name but reverse on the salary? Simple, negate it:

>>> sorted(peeps, key=lambda x: (x['name'], -x['salary']))
[{'salary': 1000, 'name': 'Bill'}, {'salary': 500, 'name': 'Bill'}, {'salary': 500, 'name': 'Ted'}]

Erin Knight2M Better Futures

President Clinton just stood on stage and told the world how important and ‘good’ the work on badging is. It was surreal. It was awesome. 

image

We are at CGI America and he was announcing the commitment to action that we made with the MacArthur Foundation and UC Irvine, to drive 1 million jobs and 1 million education opportunities in the next 2 years through open badges. That means connecting individuals to real things - jobs, school credit, admission, etc. - through badges. 

The commitment is super exciting because it’s open and welcoming to organizations and partners to plug in and help us get there. (Join us!) From the conversations at the first day of meetings alone, I don’t think its going to be hard to reach. Help us blow past 2M! Let’s go for more!

CGI is also an exciting stage to launch this on because this meeting includes over 1000 organizations that are zeroed in on workforce development and jobs. They are the movers and shakers. They have the pull and reach to really connect badges to real opportunities. 

I need some champagne.

-E

John O'DuinnHOWTO use an unlocked Android phone in Portugal

Here what I used in my trip to Portugal in Jun2013, in case others find this helpful:


Disclaimer:

  • In the US, buying a cellphone “out-of-contract” is not the same as buying a cellphone “unlocked”. All of the following only works for an unlocked phone. Make sure your phone is unlocked before you get on the plane.
  • Different cellphone companies have different policies on this. AT&T declared that, despite my being a multi-year customer, with no contract, they would not unlock my phone per policy. T-Mobile said upfront that they would need ~40days from date-of-purchase of “out-of-contact” phone before I could ask to have it unlocked. On the 40th day, when I asked T-Mobile to unlock my phone, they sent me the phone unlock codes within 48hours.
  • Make sure your phone supports GSM. Sounds obvious, but still needs to be said, as most countries use GSM.

  • Buy a “LycaMobile” pay-as-you-go SIM card. I bought mine at the train station in Lisbon, but they are also for sale on most small street corner stores. While there are several mobile companies selling pay-as-you-go, I went with Lycamobile because they had the best price for all-you-can-use data at 4G speeds, great high speed coverage everywhere I went, and no hassle about using your cellphone as a hotspot. Oh, and comparable prices for voice calls and text messaging.
  • Disassemble your phone to swap out sim card, insert new LycaMobile sim card and power up the phone.
  • On the phone, enter “*#123#″ and press dial (typically, the green handset button). This connects you to an automated service that tells you your balance.
  • To find out what your lycamobile phone number is, dial “*#122#”
  • Assuming that all works, you should now attempt to call any local number. By habit, I call the mobile phone of the person at the store selling me the SIM card.
  • Cultural tip: I never setup voicemail – as discovered in my other recent trips, most people dont both leaving voice messages on cellphones anymore – if they cant reach you when they phone, they hangup and send you a text message instead.
  • Now that you can make/receive calls, to make my Android 2.2 phone transmit/receive data, I had to add the following APN settings:
    * on home screen, go into “settings”
    * go into “wireless & network settings”
    * go into “mobile networks”
    * go into “access point names”
    * if there is not already a “data.lycamobile.pt” APN, then create one as follows:
    ** Name = data.lycamobile.pt
    ** APN == data.lycamobile.pt
    ** Proxy == Not set
    ** Port == Not set
    ** Username == impt
    ** Password == impt
    ** Server == Not set
    ** MMSC == Not set
    ** MMS proxy == Not set
    ** MMS port == Not set
    ** MCC == 268
    ** MNC == 04
    ** Authentication Type == Not set
    ** APN Type == Not set
    …hit save, and go back to “Access Point Names”.

  • verify that this new “data.lycamobile.pt” APK is present, and is selected.
  • verify that “Use only 2G networks” is not selected.
  • Reboot the phone to see if that helps.
  • At this point you should be able to make/receive calls, send/receive text messages, surf the web, use your cellphone as GPS, and use your cellphone as a wifi hotspot.
  • To check your account balance dial “*122#”.
  • When you need additional credits, buy a one-time use scratch-refill “top up” card at almost any corner store, and follow the instructions on the back. You’ll receive a text message with the new balance when the credits are added to your account.

Andrew HalberstadtA Mercurial extension to version multiple patch queues

qqver is a Mercurial extension that forces mq to version all patch queues in the same repository. The syntax is the exact same as when doing normal patch queue versioning (i.e 'hg init --mq'), except the repo is created one directory higher so it is able to track all patch queues. As with stock queue repos, new and existing patches are added automatically.

qqver solves a very specific use case, it probably isn't useful for the majority of Mercurial users. If you answer yes to both of the following questions, you might want to look into qqver:

  1. Do you like to work with multiple patch queues in a single repository (i.e using hg qq)?
  2. Do you like to version your patch queues with mq's patch versioning system (i.e using the --mq flag)?

Versioning all patch queues in the same repo makes it a lot easier to create and manage remote repos, e.g on an hg.m.o user repository. Instead of having to create N user repositories for N patch queues, you only need to create one.

qqver works by monkeypatching the mq extension in an unobtrusive way. This gives it some nice properties. First, the syntax is the exact same as what you are already used to:

# create queue repo and push remote
hg init --mq
hg commit --mq
hg push --mq

Another nice property is that it is fully compatible with Steve Fink's mqext extension. This means if you want to autocommit your patch queue anytime you make a change, you can easily do so by configuring mqext. One thing I'd still like to implement, is to monkeypatch mqext so it adds the current patch queue to the commit messages (in addition to the patch name).

Installation

hg clone http://hg.mozilla.org/users/ahalberstadt_mozilla.com/qqver/

Then edit your ~/.hgrc file and add:

[extensions]
mq=
qqver=<path/to/qqver>

Note that the mq extension needs to be installed, otherwise qqver makes no sense! Also note that this is still fairly untested, so please let me know of any problems you encounter or features you'd like implemented. Or feel free to send me a patch ;).

Pascal FinetteMaking a difference. One app at a time.

Take away the Apple propaganda. Take away the fact that Apple's products are prohibitively expensive in a lot of these settings. Look at it purely from a vendor-unrelated perspective.

This is it. This is precisely the reason why I am in tech. And this is one of our greatest opportunity to change lives and make this world a better place. Through technology. Combine this with the notion of creating economic opportunity and (our) technology has the potential to become one of the most powerful change agents around.

Making a difference. One app at a time.

P.S. For those of you who read this in their RSS readers or can't see the embedded video for other reasons – here's the video on YouTube.

Sriram RamasubramanianShare Quickly

Android’s ActionProviders are a really nice feature. They provide a nice way to show an alternative or a secondary context in an activity. ShareActionProvider takes them to another level. The secondary context of showing a list of shareable activities is available as a menu item. In addition, they show the most frequently used Activity for quick sharing. But they come with a downside. As the name says, ActionProviders can only be present in an ActionBar. Most of the popular android apps don’t use an ActionBar as it is very limiting. Firefox for Android has the same problem, as it doesn’t use an ActionBar. How do we provide the user with such a fast and easy access to the most frequently used activity?

Since Firefox for Android uses a custom menu, adding an ActionProvider logic inside a ListView was easy. Analogous to the ShareActionProvider, the main menu item gives the list of shareable activities as a SubMenu, and the most frequently used app is shown along with the actual menu item. To use the same metrics as Android for the frequency calculation, we chose to use the same underlying model. Android’s implementation of storing and receiving applications from an XML file, ordering the applications based on a time based weight is available in ActivityChooserModel. (Note: When used, one would have to copy this file to their code base, as this file is an internal file).

Share menu item with the more frequently used application for sharing quickly.

Share menu item with the more frequently used application for sharing quickly.

While working on this feature, I was left with so many puzzling discoveries!

  • While setting an Intent with ShareActionProvider for the first time, it calls ActivityChooserModel’s setIntent(). This triggers reading the list from the history file by calling readHistoricalDataImpl(). The problem here is that, even though the comment — oops, just a comment! — says everything is done off the UI thread, the reading of a file from the disk and parsing it happens in the UI thread. This causes StrictModeViolation, and hogs the UI.
  • ShareActionProvider’s setShareIntent() should be used sparsely. Though one of the Android articles touches this, the reason is not explained. Let’s say the application is a photo sharing application and it needs to update the image date when the user flips through the gallery. Calling setShareIntent() sounds the easiest way. However, setShareIntent() rebuilds the list every single time. And, as I mentioned earlier, setShareIntent() runs on the UI thread. This would result in UI jankiness. Instead, it’s better to store the Intent that was given to the ShareActionProvider, and update the EXTRA parameters in it, leaving the ACTION and MIME type intact. This way, the intent remains the same, and the data varies, without doing any work on the UI thread. But hey, there is not getter for this method! So, it’s our responsibility to store it in our class.
  • Even getters in this file wants to ensure a consistent state. In case something had changed with the list of activities, either it loads them all once again, or reads from the disk. Which thread will this run on? Clicking on the Share icon, would ask the ActionProvider to get a list of activities. The event handling runs on the UI thread. This in turn ensures a consistent state and returns the items back on the UI thread. So, every setter or getter will (usually) be run on the UI thread and could cause considerable work to be done on the main thread.
  • Lets say, some other application wants to expose Share with a custom ActionProvider like Firefox for Android. When they try to use the ActivityChooserModel, there is a reference to PackageMonitor. Unfortunately this file is internal and has a lot of other internal dependencies. Commenting the related code will leave the history file, and the list in a stale state if some other shareable app is installed/uninstalled while this app is in the background.

Phew! Basically ShareActionProvider is some sort of a UI hog, if not used correctly. ActionProviders cannot be used outside of ActionBar, even though they provide a nice paradigm. Why Android, why?


Byron Joneshappy bmo push day!

the following changes have been pushed to bugzilla.mozilla.org:

  • [875744] Bug history messed up when two comments are made private
  • [881400] form.reps.mentorship is broken when using the mozilla skin
  • [881603] fix the mozilla skin’s footer
  • [881348] Do not display the Excluded list when sending bugmails
  • [860810] Add a default search to new users’ saved searches that appear in the footer
  • [882059] [sentry] fix “use of uninitialized value” warnings, and ignore some errors/warnings
  • [849090] Mozilla theme doesn’t show UI to add a tag to a bug

Filed under: bmo, mozilla

Kyle HueyCycle Collection

Cycle Collection:

I gave a talk about the cycle collector at the Rendering Meetup in Taipei last month.  Chris Pearce had the foresight to record it, and now it is available on people.m.o for anyone who wants to watch it.

Justin LebarMac OS 10.9 Browser Benchmarks

Apple's page describing Mac OS 10.9 contains a comparison of the performance of Safari, Chrome, and Firefox. I've reproduced it below since I expect Apple will take the page down soon.

Apple's browser benchmark results

The data is bunk, of course. SunSpider is a terrible benchmark, and without workloads specified for the memory usage and power consumption measurements, the results mean nothing.

(In case you're wondering, the footnotes referenced under the graph specify the hardware and browser versions used. They also say that "Performance will vary based on system configuration, network connection, and other factors," which reminds me of the first frame of this xkcd.)

But to focus on the crappy benchmarking here would miss the point: Did you notice that Safari's memory usage gets equal billing with its JS speed? That's amazing! Just a few years ago, nobody talked about memory usage. I'd like to think we (and in particular Nick) can take some credit for that.

Will Kahn-GreeneElasticUtils v0.7 released!

What is it?

ElasticUtils is a Python library for building and executing Elasticsearch searches.

v0.7 released!

Turns out I haven't announced an ElasticUtils release since August 2012. Why? Partially because up until now, I always had deep-seated problems with ElasticUtils and wasn't excited about announcing yet another version with things I disliked in it.

I feel really good about v0.7 for a variety of reasons. Let me tell you some of them:

  1. We switched from pyes to pyelasticsearch. I'm really happy with this.

  2. There was a monumental effort to fix sharp edges in the API, generalize bits that needed generalizing, improve the quality of the software, improve the test suite, improve the docs, ...

    Doing a git diff --stat tells me:

    65 files changed, 6164 insertions(+), 2716 deletions(-)
    

    That's a lot of change for a small project like this.

If you're using ElasticUtils, I highly encourage you to update to v0.7. We're using it on Input and Support already.

For the complete list of what's new, What's new in Version 0.7.

Many thanks to everyone who helped out: Erik Rose, Jannis Leidel, Rob Hudson, Steve Ivy, Will Kahn-Greene (oh, that's me!), Chris McDonald, Ricky Rosario, James Socol, Giorgos Logiotatidis, Mike Cooper, Grégoire Vigneron, Chris Sinchok and Brandon Adams.

If you have any questions, let us know! We hang out on #elasticutils on irc.mozilla.org.

[Comments]

Kat BraybrookeMozilla's Maker Party 2013 Starts, With Extra Candy for Creatives!

image

Since my last post about Make Things Do Stuff, a national campaign aiming to mobilize 10,000 young makers in local communities across the UK this summer, many of you asked an important question - what about my nation? I’m happy to say your moment has arrived - it’s time for this year’s global Maker Party hosted by Mozilla.

A Party to Start All Parties

Starting June 15th and rolling all summer long, we’ll give communities and individuals around the world the resources to celebrate the Open Web together through meeting up, making cool stuff and teaching others.

With hundreds of events and activities already planned, from workshops to design sprints to code-a-thons to mashup sessions to father-daughter hackjams, and a bunch of freely-available tools like Popcorn, Thimble and X-Ray Goggles, Maker Party will be the moment of the summer for community-driven inspiration amongst aspiring and veteran makers alike. —>

A Big Opportunity for Creative Makers

For the creatively inclined partiers amongst us, whether you’re a maker or a mentor, Mozilla’s  Webmaker Content Team (we’re a small but enthusiastic group of folk) offers an additional opportunity to step up, get your work featured and become a source of inspiration for makers across the Web. We want to see your best Makes on Thimble and Popcorn, your craziest Maker Party ideas and your most irresistible-to-share remixes — and we want to share them with potential and veteran makers across the globe!

How To Get Your Makes Featured

To give the best Makes the attention they deserve, we’ll crawl through the Maker Party world each day to find the next best thing — so if you have a great Make ready for sharing, let us know by tagging it with the hashtag #webmakerwin on Tumblr, Twitter, Popcorn or Thimble. Details on each type of submission are below:

  • On Thimble, add the line <meta content=”webmakerwin” name=”webmaker:tags”> to the <meta> part of your page HTML (this should be somewhere at the top!)
  • On Popcorn, tag the project “webmakerwin” under the ‘Publish’ tab when you save it
  • On Twitter and Tumblr, tweet the URL of your #makerparty Make using the tag #webmakerwin so we can find and RT it!

Contact Us + Join the Community

Want a bit of mentoring, need help starting, or want to join the creative movement? We’ll be available throughout Maker Party for those who need a bit of creative inspiration in the form of templates, example Makes, online tutorials and in-person Webmaker demo sessions.

To get in touch, join our community of creatives on the Mozilla IRC (Freenode) channel “#makesmiths” or on the G+ Makesmiths group and say hello. We love meeting others who are interested in leading through creativity! And don’t forget to join the main Maker Party list to hear the latest news.

Let’s start the party!

Aaron KlotzDetecting Main Thread I/O with SPS

In bug 867762 I am landing I/O interpose facilities for SPS. This feature will allow main thread I/O to be displayed in the profiler UI.

There are a few components to this patch. Classes that implement the IOInterposerModule interface are responsible for hooking into an arbitrary I/O facility and calling into IOInterposer with those events.

The IOInterposer receives those events and then dispatches them to any registered observers. For the purposes of SPS there is only one observer, ProfilerIOInterposeObserver, however I wrote this keeping in mind that we may eventually want to use the I/O interpose facilities for other purposes (such as shutdown write poisioning).

For bug 867762 I have implemented two modules. NSPRInterposer hooks into NSPR file I/O and generates events whenever a PR_Read, PR_Write, or PR_Sync occurs. The second module, SQLiteInterposer, leverages the SQLite VFS that we use for telemetry to tap into reads, writes, and fsyncs generated by SQLite. In the future we expect to expand this into several additional modules. Some ideas include a module that uses Event Tracing for Windows to read events from the Windows kernel and a module that interposes calls to read, write, and fsync on Linux.

On the observer side of things, for now we simply insert a marker into the profiler timeline whenever main thread I/O is reported. Here is a sample screenshot of the markers in action (the pink stuff for readers who are unfamiliar with SPS markers):

In bug 867757 (under review) this will become more sophisticated, as SPS will immediately sample the callstack of the thread whose I/O has been intercepted. This annotated stack will be inserted directly into the timeline.

There will need to be some UI changes for this to be presented in a reasonable way, but with both existing patches applied the data is already useful. By firing up Cleopatra and filtering on either NSPRInterposer or SQLiteInterposer, you can isolate and view the main thread I/O stacks:

Hopefully these patches will prove to be beneficial to our efforts to eliminate main thread I/O.

Robert O'CallahanMeeting Absenteeism

I have a bad habit of missing meetings that I should (and want to) attend. This is inexcusable given that my meeting load is actually very light.

I have identified a few contributing factors. Many of these meetings are outside normal work hours (especially early in the morning, given my timezone), so sometimes I fail to check my calendar before I go to bed and wake up after the meeting. Sometimes I want to wake up but forget to set my alarm, or set it incorrectly. Sometimes the alarm just fails to wake me up. Sometimes I know about the meeting and I'm awake and working, but I get caught up in something and don't realize that the time has arrived. I use Google Calendar and GMail, and when people send time change notification emails Google Calendar adds them as new meetings instead of replacing the existing one, which sometimes confuses me about when the meeting is. I quite often quit and restart my browser, which means my Google Calendar tab often isn't really loaded and can't produce notifications. Most of my meetings are teleconferences of some kind, and sometimes I don't plan ahead and when I try to join the meeting, I find that Vidyo isn't working or some other technical problem prevents me from joining the meeting immediately. None of these issues are excuses, since this isn't a very hard problem.

I could try setting up the FxOS calendar app, but I'm not very vigilant about keeping my phone charged so that might not help much. Maybe I should do that and also ensure that I have a desktop calendar app capable of producing audible notifications, that launches on startup. To some extent I may just have to be trained by pain and humiliation.

Until that happens, consider this blog post an apology for the meetings I've missed, and an apology in advance for the meetings I miss in the future. Also, consider this a blanket permission and indeed recommendation to contact me by whatever means necessary when I've agreed to a meeting but I'm not there --- IRC, email, cellphone, even my home phone. The numbers are in the Mozilla phonebook.

Jordan SantellJetpack's Places API Proposal

Places, Firefox's bookmark and history management system, is coming to Firefox Add-on SDK for add-on developers to easily manipulate bookmarks and query browsing history. Current API proposal, examples, and design decisions below!

Jetpacks

read more

Ben Adidano user is an island

US government agencies appear to be engaged in large-scale Internet surveillance, using secret court orders to force major Internet companies to provide assistance. The extent of this assistance is a topic of debate. What’s clear, though, is that the process itself is opaque: it’s impossible to know how broad or inappropriate the surveillance may be.

OK, so what do we do about it?

told you so, never shoulda trusted the Cloud

Some folks see this as vindication: we never should have trusted the Cloud. Only trust yourself, generate your own keypairs, encrypt all traffic, host your own email, etc. Servers are evil and should be considered leaky stupid passthroughs for fully encrypted data.

First, this is naive. If government agencies believe they have the authority to monitor all Internet traffic, would they hesitate to create viruses that infect and monitor endpoints? Would they hesitate to force software and hardware vendors to build secret backdoors into their products? It is the engineer’s mistake to believe that Law Enforcement will stop cleanly at technical abstraction layers. If the goal is total surveillance, the financial means immense, the arm-twisting strength unlimited, the oversight inexistent.. what would you do in their position?

Second, if, like me, you agree that technology experts have a duty to build solutions that matter to laypeople, it’s also irresponsible. None of these paranoid solutions are accessible to laypeople. Can you imagine Grandpa with his fingerprint-activated USB-key holding his RSA-2048-bit secret key and surfing the Web via Tor proclaiming “not me, I will fight the man!” Yeah. (And if you’re thinking “no Grandpa, not RSA! Elliptic curves!” well, thank you for making my point for me.)

So enough with this la-la land of users as fortified islands communicating via torpedo-proof-ciphertext-carrying submarines. People engage with others by way of intermediaries they trust, for that is the basis of all human interaction and commerce since the dawn of time. Let us build systems, both technical and legal, that start there.

protect user data wherever it lives

We can build systems that start with respect for the user and her data, wherever it lives. On Facebook servers, on Google servers, on self-hosted servers, on private computers. Encrypted or not encrypted. We can and should use cryptography to secure channels from those who would disrespect user data, reduce data collection to that which is useful, and generally build defense in depth against bad actors. We should stop wasting time on systems that impose the resulting complexity on users. Government access to user data should follow a clear, transparent process that is consistent wherever the data happens to be stored, however it happens to be encrypted.

Let’s build that system together. Not by barricading ourselves on our lonely islands of encryption and onion-routing. But by building the legal and technical framework we need to respect users and their data. Mozilla and Google have started. I’m hopeful many more will join.

Sean MartellAs a designer

I’m going to talk to you about being a designer, but of course this applies to [INSERT PORTION OF LIFE HERE]. There are other articles out there that speak to what I’m about to say, but hey, I want to talk too and this is my article. Many voices.

As a designer, what an age we live in. People everywhere are coming online within social networks, blogs and other sites sharing ideas and inspiring the masses with a collective outpouring of creativity. As a designer, it is amazing to have the ability to play and be inspired by thousands upon thousands of my peers just by simply seeing their work tweeted or shared in a portfolio site online. What an awesome resource the Internet is for creativity and anyone first stepping into the design world.

As a designer, it is also terrifying.

Why would any designer out there want to become high enough profile in their profession that thousands or millions of people get to see their work? How badly would that person have to hate themselves to put up with the onslaught of feedback that can be defined simply as deconstructive? Maybe someone might think they ripped off another designer and their career would be over before it even started. Do they even have any original ideas or are they just interpretations of what others have already done? What if everyone hates their work? Wait… who is “everyone”?

I know, right? Frig that. I’m just going to stare at this wall for the rest of the day.

Imposter syndrome is something lots of us are talking about these days. It leads to fear in one’s abilities, fear in being excited about your work, fear in the impact your work may have, fear in the lack of impact… self doubt is a huge gronk of a beast as a designer. So when I see current events like the deluge of hate towards the iOS 7 redesign or someone ripping apart #the #latest #design #story, I can’t help but think that all this deconstructive criticism and rage is simply unfiltered bullying. What else is it? Are these haters doing anything to offer guidance or help with any of the concerns they may have? No. Are these people at the very top of their field in design that they now know the One True Way to design a product, brand or piece of art? Mostly no, but sadly sometimes they are damn close and should know better. Do these haters actually care that there are individuals behind these designs and not just faceless companies? Again, in most cases, probably not.

Here’s something I learned over the years. The haters are the minority. They shout to be heard and unfortunately the haters sometimes become the majority in numbers within the feedback you do get. That is only because everyone else is just enjoying your work, or respects it enough to not offer criticism without purpose. If they over-the-moon love it, they’ll comment. If they want to offer constructive advice, they’ll comment.

So as a designer, what can you do?

Lead. Lead by example. Learn to love the helpers and ignore the haters. Inspire others, don’t belittle them. Be constructive, not destructive. Embrace fear. Allow the challenge of taming that fear to lead you to that amazing creative spark that everyone sees shining through the final piece. Love what you do, regardless of what others say. If you love your work, it shows. Don’t be afraid to show it off, but remain humble – allow some of that imposter syndrome to keep you in check so you’re not seen as a diva.

If you’re just beginning as a designer, be it through school or just as a side experience, welcome! Embrace any fears you may have because for the most part they stick around the whole way through your career. Love them and they’ll keep you humble and a designer others want to work with. You’ll find your place.

If you’re a designer now, I salute you. Keep all of this in mind and be sure to inspire, nurture, mentor, aid, encourage, all other designers. We’re not competition. We’re family. Don’t let a paycheque make you a hater.

As a designer, don’t be a bully. Just play.

Robert KaiserLinguistically Mistaking Phrases

I've been back from my vacation and the Preserving Software summit at the Library of Congress for more than a week now, but still haven't blogged about anything, and I recently didn't blog too much at all, mostly because I always fear it takes up too much time. In the last few days, I decided I'll do shorter posts but do them more often, so I hopefully get to communicate more of what's going around in my head (thoughts on that summit will follow as well when I get around to them). Here's the first installment of this, let's see how it goes.

I just listened to a "Fireside Chat" (sorry, only available to Mozillians) with Brendan Eich, conducted by Pascal Finette. One thing that did strike me there was the use of two phrases, by each of them, and their chances of being mistaken from the point of view of English/German crossover.

Pascal, a native German (his accent gives that away as well), is using "a couple" (e.g. "of times", etc.) in many questions in this interview. Now, the interesting thing there is that in German, we're using "ein paar" (which literally translates to "a couple") a lot, usually meaning "an undetermined amount larger than one but smaller than 'a lot'". We are very tempted to use this the same way in English, as it comes very naturally to us - but in US English, I notice that "a couple" usually means "(more or less) exactly two", so when we mean "some probably between 4 and 7 times", we may end up saying "a couple times" and the US English native speaker understands "twice". Oops. We better had said "a few times". I learned this in detail when I requested to stay "a couple weeks" in the office around a work week and thought there would be later discussion of how many weeks exactly, when the other side was "OK, he wants two weeks, he'll get two weeks". Note that in German there is "ein Paar" (different capitalization) which means the same as "a couple", but in most cases we just say "zwei"/"two" so it can't be mistaken.

On the other side, Brendan starts the reply to some questions with "that's a good question" - which, as I learned over the years, is a usual phrase to compliment the person the question came from and say that this is an important issue to ask and talk about. Now, in German, this literally translates to "das ist eine gute Frage" - which we usually say when we recognize that it's an interesting question but we still need to think about this and don't have any really fitting answer, often coming up with one as we go on this. If you're a native German speaker, be aware that English speakers don't usually have that connotation to this phrase, actually they're often happy someone asked this because it's something they have thought about long and hard and have come up with a really good answer for already. If you're not a German speaker, be aware that those who are might understand it this way and be surprised or take your answer as weaker instead of stronger as you intended.


I'm sure there's tons of other misunderstandings between phrases in different languages for sure, I'm mentioning those two because I heard them in this "chat", it's (the) two languages I know quite well, and they're even in the same language family (in linguistics called "Germanic languages") - and still run into things like that.
I'm always interested about such nuances, if you have any to share, feel free to comment here or blog about them yourself, here in this global Mozilla community, it's always nice to learn from each other! :)

ArkyAfrican Network For Localization (ANLoc) Conference 2013

Traveled to Johannesburg, South Africa, to attend African Network For Localization (ANLoc)'s Terminology and Localisation in Africa and Beyond Conference earlier this year. It gave me an opportunity to learn the history of African languages in cyberspace and meet the people behind various multilingual initiatives. The conference brought together language professionals, academics and open source developers to learn about terminology development and localization platforms.

Language is the key for unlocking the potential of Africa. The African Network for Localization (ANLoc) is a non-profit that supports African language technology development. The ANLoc partners were instrumental in the numeration and standardization of 100 African languages. The ANLoc partners and sub-projects developed Unicode fonts, keyboard input systems, translation tools and terminologies for African languages. They also devised training programs for building sustainable volunteer driven localization communities.

The conference featured technical talks, break-out sessions and brainstorming sessions. There were in-depth discussions on the various facets of multilingualism in cyberspace in context to African languages, the challenges of translating computing terms in African languages, the use of machine translation methods and the development of linguistics resources such language dictionaries and terminologies. The conference organizers maintained a good balance of discussions, along with practical hands-on workshops. The size of conference made interactions easier. It was good to meet Mozilla localization contributors from over 10 African languages during this event.

The African Network For Localization (ANLoc) conference group photo

ANLoc's project localized widely used open source Mozilla Firefox web browser in many African languages. The ground realities of mobilizing and sustaining communities in Africa are apparent. Finding contributors is difficult. Most contributors refrain from volunteering due to economic reasons. The overall economic development and access to digital technologies is limited to few regions in Africa. The availability of Internet has improved but the cost is still prohibitively high. I shared my community building experiences from similar resource constrained environments across the world.

Participated in break-out sessions on developing style guides for localization and Mozilla localization processes.
The FirefoxOS localization sprint was organized as part of the event. The localizers worked in groups to translate Mozilla FirefoxOS mobile operating system using Pootle web translation platform.

FirefoxOS localizations in African languages
Developing localization style guides workshop

Talked about Android Internationalization and adding African language fonts and keyboard support to Android. Android currently supports few major African languages: Swahili, Amharic, Zulu and Afrikaans, but more African language coverage is needed. Cheap Android devices are flooding the African market. Today, the first internet experience for many is not on a desktop computer but on mobile phones. Mobiles play a great role in accessing information and even transfering money.

The brainstorming sessions were very interesting. The problems discussed were both at an economic and social level. These problems are similar in nature to the countries where I have been working for the past few years.

The lack of availability of African local content on the internet was a major hurdle. The African diaspora spread across the world and few local governments and non profit organizations were involved in developing local language content. The tide seems to be turning now, with increasing availability of the Internet on mobile phones. Social media and user generated content is now bridging the gap.

ANLoc Brain-storming Session on african languages

This conference gave me a framework for my future activities in Africa. I'll be traveling to East Africa to participate in Tech4Africa Nairobi Tech Day and organize localization hackathons. Such events will help us work on Mozilla Firefox in some of the major languages and help build sustainable Mozilla communities in Africa.


Hub FiguièreC++ 11 in your project

C++ 11 is now available in both gcc and clang. That mean it is really available where it matters.

Using C++ 11 in your project (with autoconf).

First if you use autoconf, you have to detect it. The autoconf archive has a macro. Download the .m4 definition and put it in your m4 directory in your project.

In the configure.ac, add the following line:

AX_CXX_COMPILE_STDCXX_11(noext,mandatory)

Make sure it appears after

AC_GNU_SOURCE

This is will make configure detect C++11 support, without GNU extension (I tend to avoid these in general) and fail if it doesn't exist. If you prefer to make it optional, read the above documentation that has more details.

The interesting features

I'm interested in several features from C++11.

  1. auto to automatically deduct the type where it can. Ever gotten annoyed by the long type name for iterators of containers? Just use auto instead.
  2. Lambda: now you can write lambda functions like in Python or JavaScript. This is overly convenient when you iterate over containers or use std::for_each().
  3. The smart pointers: I was using the one from Boost, then the one from std::tr1::. Just replace with std::
  4. std::bind and std::function to replace Boost own versions.

There are more, I'll talk about it when I get to look at them.

Nicholas NethercoteMemShrink progress, week 103–104

I’m back from vacation.  Many thanks to Andrew McCreight for writing two MemShrink reports (here and here) while I was away, and to Justin Lebar for hosting them on his blog.

Fixes

areweslimyet.com proved its value again, identifying a 40 MiB regression relating to layer animations.  Joe Drew fixed the problem quickly.  Thanks, Joe!

Ben Turner changed the GC heuristics for web workers on B2G so that less garbage is allowed to accumulate.  This was a MemShrink:P1.

Bas Schouten fixed a gfx top-crasher that was caused by inappropriate handling of an out-of-memory condition.  This was also a MemShrink:P1.

Randell Jesup fixed a leak in WebRTC code.

Changes to these progress reports

I’ve written over sixty MemShrink progress reports in the past two years.  When I started writing them, I had two major goals.  First, to counter the notion that nobody at Mozilla cares about memory consumption — this was a common comment on tech blogs two years ago.  Second, to keep interested people informed of MemShrink progress.

At this point, I think the first goal has been comprehensively addressed.  (More due to the  fact that we actually have improved Firefox’s memory consumption than because I wrote a bunch of blog posts!)  As a result, I feel like the value of these posts has diminished.  I’m also tired of writing them;  long-time readers may have noticed that they are much terser than they used to be.

Therefore, going forward, I’m only going to post one report every four weeks.  (The MemShrink team will still meet every two weeks, however.)  I’ll also be more selective about what I write about — I’ll focus on the big improvements, and I won’t list every little leak that has been fixed, though I might post links to Bugzilla searches that list those fixes. Finally, I won’t bother recording the MemShrink bug counts.  (In fact, I’ve started that today.)  At this point it’s pretty clear that the P1 list hovers between 15 and 20 most of the time, and the P2 and P3 lists grow endlessly.

Apologies to anyone disappointed by this, but rest easy that it will give me more time to work on actual improvements to Firefox :)

Jared WeinAnimating and transitioning display:none elements

The current release of Firefox introduces a nice animation when opening and closing the Find bar. Upon opening the Find bar, the toolbar fades in and slides up. Exiting the toolbar will make it fade out and slide down.

As you may or may not know, the user interface for Firefox is implemented using XUL+HTML/CSS/JavaScript.

We use the XUL hidden attribute, which is very similar to the HTML5 hidden attribute, to hide the Find bar when it is dismissed. The presence of the hidden attribute sets display:none on the referenced element. If you’ve ever played around with CSS Transitions or Animations, you’ve probably noticed that display is not a transitionable property.

To maintain add-on compatibility, as well as code simplicity, we wanted to keep using the hidden attribute. Doing so also allowed us to leave the JavaScript unchanged.

This poses a hard problem. If display is not transitionable, how could we animate the behavior here? It turns out that visibility is a transitionable property.

The various states of visibility are atomic. There is no defined behavior for what should happen when an element transitions from visibility:hidden to visibility:visible or visibility:collapse. However, we can use a zero second duration to make the change happen at the instant that we want.

This brings us to our solution:

findbar {
  transition-property: margin-bottom, opacity, visibility;
  transition-duration: 150ms, 150ms, 0s;
  transition-timing-function: ease-in-out, ease-in-out, linear;
  margin-bottom: 0;
  opacity: 1;
}

findbar[hidden] {
  /* Override display:none to make the transition work. */
  display: -moz-box;
  visibility: collapse;
  margin-bottom: -1em;
  opacity: 0;
  transition-delay: 0s, 0s, 150ms;
}

To explain how this works we’ll start by looking at findbar[hidden], since it’s the default state for the Find bar.

When it is hidden, we will force it to be displayed (using display:-moz-box, which is an internal-to-Gecko display value, you could replace this with display:block or display:inline as needed). We then set visibility to collapse, which will effectively make the element invisible and also not consume any space (except for margins, which is important here). We then use a negative margin-bottom to force the element to be placed just out of view of the browser window. Setting opacity here is used to fade the element in and out. I’ll describe the transition-delay last.

When the Find bar is shown, we set margin-bottom to zero which will slide the toolbar up. We also set opacity to one which will make it fade in. The opposite happens in reverse when the Find bar is dismissed.

The key here is the transition-delay that is set in the findbar[hidden] case.

When the Find bar is hidden and transitions to being visible, we don’t have a transition-delay applied. This causes the visibility to change immediately at the beginning of the animation. The Find bar becomes visible and then it slides and fades in to view.

When the Find bar is visible and transitions to being hidden, we delay changing the visibility until the margin and opacity transitions have completed. Running the visibility transition immediately in this case would cause the element to disappear instantly, which would ruin the animation.

That explains how I implemented the Find bar transition in Firefox without affecting themes or having to change JS. It’s a pretty cool technique for showing and hiding elements, and has opened the doors to implementing some other types of animations in the Firefox user interface. Let me know what you think! :)

Update: I’ve been told by Frank Yan that this won’t work on non-XUL content since display:-moz-box is needed to get the visibility:collapse to work as needed. Still a cool technique to see!


Tagged: CSS, firefox, mozilla, planet-mozilla

Mike ConleyScummVM ported to HTML5?

This was just brought to my attention, and I’m pretty stoked! I haven’t actually looked at the source or done much in the way of investigation, but if it’s legit, then this is really, really exciting. :)

Maybe not as exciting as porting Unreal 3 to the web, but, well, I’m old-school. :D

UPDATED: Thanks everybody for alerting me to the broken link. Fixed it now.

Niko MatsakisOn the connection between memory management and data-race freedom

As I alluded in the previous post, I have noticed an interesting connection between memory management and data-race freedom. I want to take a moment to elaborate on this, becaause the connection was not obvious to me at first, but it ultimately drives a lot of the Rust design decisions.

First, I believe that if you want to guarantee data-race freedom, and you want to support the cheap transfer of mutable state between tasks, then you must have a garbage-collector-free subset of your language. To see what I mean by “cheap transfer of mutable state”, consider something like double-buffering: you have one drawing and one display task exchanging buffers (so there are only two buffers in total). While the drawing task is preparing the next frame, the display task is busy displaying the current one. At the end, they exchange buffers. In order to prevent data races in a scenario like this, it is vital that we be able to guarantee that when the buffers are exchanged, neither task has any remaining references. Otherwise, the display task would be able to read or write from the buffer that the drawing task is currently writing on.

Interestingly, if we wanted to free one of those buffers, rather than send it to another task, the necessary safety guaranty would be precisely the same: we must be able to guarantee that there are no existing aliases. Therefore, if you plan to support a scenario like double buffering and guarantee data-race freedom, then you have exactly the same set of problems to solve that you would have if you wanted to make GC optional. Of course, you could still use a GC to actually free the memory, but there is no reason to, you’re just giving up performance. Most languages opt to give up on data-race freedom at this point. Rust does not.

But there is a deeper connection than this. I’ve often thought that while data-races in a technical sense can only occur in a parallel system, problems that feel a lot like data races crop up all the time in sequential systems. One example would be what C++ folk call iterator invalidation—basically, if you are iterating over a hashtable and you try to modify the hashtable during that iteration, you get undefined behavior. Sometimes your iteration skips keys or values, sometimes it shows you the new key, sometimes it doesn’t, etc. In C++, this leads to crashes. In Java, this (hopefully) leads to an exception.

But whatever the outcome, iterator invalidation feels very similar to a data race. The problem often arises because you have one piece of code iterating over a hashtable and then calling a subroutine defined over in some other module. This other module then writes to the same hashtable. Both modules look fine on their own, it’s only the combination of the two that causes the issue. And because of the undefined nature of the result, it often happens that the code works fine for a long time—until it doesn’t.

Rust’s type system prevents iterator invalidation. Often this can be done statically. But if you use @mut types, that is, mutable managed data, we do the detection dynamically. Even in the dynamic case, the guarantee that you get is much stronger than what Java gives with fail-fast iteration: Rust guarantees failure, and in fact it even points at the two pieces of code that are conflicting (though if you build optimized, we can only provide you with one of those locations, since tracking the other causes runtime overhead right now).

One reason that we are so intolerant towards iterator invalidation is because we wish to guarantee memory safety, and we wish to do so without the use of universal garbage collection (since, as I just argued before, it is basically unnecessary if you also guarantee data-race freedom). Without a garbage collector, iterator invalidation can lead to dangling pointers or other similar problems. But even with a garbage collector, iterator invalidation leads to undefined behavior, which can in turn imply that your browser can be compromised by code that can exploit that behavior. So it’s an all-around bad thing.

Therefore, I think it is no accident that the same type-system tools that combat iterator invalidation wind up being useful to fight data-races. Essentially I believe these are two manifestations of the same problem—unexpected aliasing—in one case, expressed in a parallel setting, and in the other, in a sequential setting. The sequential case is mildly simpler, in that in a sequential setting you at least have a happens-before relationship between any two pairs of accesses, which does not hold in a parallel setting. This is why we tolerate &const and &mut aliases in sequential code, but forbid them with closure bounds in parallel code.

In some way this observation is sort of banal. Of course mutating without knowledge of possible aliases gets you into trouble. But I think it’s also profound, in a way, because it suggests that these two seemingly unrelated issues, memory management and data races, cannot be truly separated (except by sacrificing mutability).

Most languages make no effort to control aliasing; if anything, they use universal garbage collection to prevent the end user from having to reason about when aliasing might exist to a given piece of data. This works well for guaranteeing memory is not freed, but as I’ve suggested, it can lead to a variety of incorrect behaviors if mutation is permitted.

This observation has motivated a lot of the research into ownership types and linear types, research which Rust draws on. Of other recent non-research languages, the only other that I know which takes the approach of controlling aliasing is Parasail. Not coincidentally, I would argue, both Rust and Parasail guarantee data-race freedom, while most langauges do not.

Vladan DjericPerformance Update, Issue #3

This is a post summarizing the activities of the Performance team over the past week. You can see the full weekly Engineering progress report for all teams here: https://wiki.mozilla.org/Platform/2013-06-11.

  • Mark Reid joined the Perf team. He will be working on the Telemetry backend reboot
  • Dhaval Giani joined the Perf team as a summer intern. Dhaval is a Master’s student at the University of Toronto where he works on detecting bugs in applications of RCU locking. Dhaval’s first internship project is storing Firefox caches in volatile (purgeable) memory on Android & B2G (bug 748598?)
  • bug 867757, bug 867762: Aaron Klotz is extending the Gecko Profiler to support arbitrary annotations
  • bug 881578, bug 881575, bug 879957: I wrote a few small improvements to reduce startup I/O
    • bug 880296: We need to load fewer DLLs on startup
  • Nathan Froyd is looking into improving Firefox startup on Android
  • bug 813742: Nathan is also working on parallelizing the reftest and crashtest suites
  • bug 872421, bug 880664: Yoric landed a module loader for chrome workers
  • bug 853388: Irving & Felipe continue to work on converting Addon Manager storage from SQLite to JSON, and moving its I/O off the main thread

The team blogged about their work:

Niko MatsakisData Parallelism in Rust

Rust currently has very strong support for concurrency in the form of actors which exchange messages and do not share memory. However, there are many tasks for which actors are not a good fit. The unbounded lifetime of actors means that they cannot safely access stack-allocated memory from another task, even if it is immutable. Actors cannot share memory except through the relatively clumsy (and somewhat expensive) mechanism of Arc structures (which stands for “atomic reference count”), meaning that if there are large data structures they can be a pain to access. Arc is also inapplicable to data structures that transition between mutable and immutable and back again.

I was recently pointed to the paper “Three layer cake for shared-memory programming”, which describes perfectly the direction in which I would like to see Rust go. Message passing is retained at the top-level, but within an actor, you have support for fork-join concurrency. I’ve been calling these fork-join tasks “jobs”. Within a job, you can get yet more concurrency via SIMD primitives.

To that end, I’ve been working on promising design for fork-join concurrency in Rust. I am very pleased both because the API looks like it will be simple, flexible, and easy to use, and because we are able to statically guarantee data-race freedom even with full support for shared memory with only minimal, generally applicable modifications to the type system (closure bounds, a few new built-in traits). The scheme also requires no changes to the runtime; it can be implemented simply as a library.

In particular, the existing borrow checker rules, which were aimed at preventing dangling pointers, turn out to be extremely well-suited to this task. I find this very interesting and very heartening as well, and I think it points to a kind of deeper analogy between memory errors in sequential programs and data races in parallel programs. I will elaborate on this theory in a later post.

The API

The API is based on a fork-join model. There are a number of helper functions, each of which starts up a number of parallel jobs and returns when those jobs have completed. The API builds on Rust’s type system to statically guarantee data-race freedom. Under typical usage, in fact, the API even guarantees deterministic results, though this guarantee can be voided by making use of locks, ports, and certain other advanced types.

I have adopted the term job to distinguish the lightweight parallel tasks that from Rust’s normal tasks. Although both can be used for parallel execution, they are quite different in most other respects. For example, jobs all share the same memory space as their parent task, whereas tasks are strictly isolated from one another. Jobs also have a fixed lifetime, whereas tasks run asynchronously. In general, executing a parallel job is supposed to act exactly as though the text of that job were inlined into the task body, modulo certain observable timing differences (and nondeterminism around locks and message ordering).

To some extent, the API that I’m going to discuss is a strawman. Expect changes to the details, of course. Also, I only present the primitive operations here; there will be a number of higher-level wrappers for common operations (like parallel map and reduce and so forth). In keeping with the “three layer cake” idea, these higher-level primitives may employ SIMD as well.

Parallel execute

The most primitive method in Parallel arsenal is parallel::execute(jobs), which takes an array of closures and executes the closures in parallel jobs (well, at least potentially—it may opt to run them sequentially if insufficient parallel resources exist). Once these jobs complete, execute() returns.

These closures are permitted to share memory and capture values by reference. We will see later that the type checker will validate that if one of these jobs writes to a particular value, then none of the other jobs can access it; you are allowed however to access the same data so long as all jobs treat it as immutable.

To make the usage more concrete, here is an example that uses parallel::execute to sum up the values in a binary tree in parallel. Note that no heap allocation is required at any point in the iteration, which is nice from a performance point of view.

struct Tree {
  val: uint,
  left: Option<~Tree>,
  right: Option<~Tree>,
}

fn sum_tree(tree: &Tree) -> uint {
  let mut left_sum = 0;
  let mut right_sum = 0;

  parallel::execute([
    || left_sum = sum_opt_tree(&tree.left),
    || right_sum = sum_opt_tree(&tree.right),
  ]);

  left_sum + right_sum + tree.val
}

fn sum_opt_tree(tree: &Option<~Tree>) -> uint {
  match tree {
     Some(~ref t) => sum_tree(t),
     None => 0,
  }
}

The type of execute() is:

fn execute(jobs: &[fn:Isolate()])

Here the fn:Isolate() means “a closure that only closes over state that is either shared or isolated from other threads”. I’ll explain this bound and the other details of static safety checking shortly.

Parallel divide

The other primitive parallel operation is divide(), which takes a mutable slice and a closure. It will divide up the slice into a number of subslices and invoke your closure on it; the precise means that it uses to divide the subslice is unspecified. You can also configure divide() with the minimum granularity that it should use when dividing the array (for example, you might prefer to be called back with subslices that are a multiple of 10 items).

In a way, execute() is more fundamental than divide(), as you can implement divide() using execute() by recursively dividing the array in half. However, I choose to call divide() a second primitive because it can be far more efficient to divide the array using other strategies, such as determining how many worker threads are available and just chopping the slice into N equal parts (of course this will depend on the workload).

The reason that divide() provides you with a mutable subslice, rather than say a pointer to an individual element, is that often there is setup work that can be shared between consecutive elements when processing an array. Consider the following example, which treates a vector v as a 2d array, and invokes the closure f in parallel with each element in the array and its x and y coordinate. In this case, the initial computation of x and y from the index in v is relatively expensive, as it requires division, but updating x and y is very cheap. Using divide(), the initial division can be amortized over a large subslice.

fn update_two_dim<T>(v: &mut [T],
                     width: uint,
                     f: fn:Share(&mut T, x: uint, y: uint)) {
  assert!(v.len() % width == 0);                     
  do parallel::divide(array, 1) |slice, offset| {
    let mut (x, y) = (offset % width, offset / width);
    for slice.each_mut |p| {
      update(p, x, y);
      x += 1;
      if x == width {
        x = 0;
        y += 1;
      }
    }
  }
}

The type of divide() is:

fn divide<T>(data: &mut [T],
             granularity: uint,
             job: fn:Share(&mut [T], uint))

You’ll note that the type of the closure is different from execute(). Whereas before we had fn:Isolate, for divide() we have fn:Share. This is in fact a tighter bound that only permits content that can safely be accessed in parallel by multiple threads. The difference is due to the fact that, with execute(), each closure got its own parallel job, but with divide(), the same closure will be called simultaneously from multiple jobs.

Checking safety

So how can we guarantee that these APIs are used safely? For example, what ensures that the user doesn’t write a program like this one (variations on this example will serve as examples through this section):

fn compute_foo_and_bar(dataset: &[uint]) -> (uint, uint) {
    let mut foo = 0;
    let mut bar = 0;
    parallel::execute([
        || foo = compute_foo(dataset),
        || foo = compute_bar(dataset), // <-- Bug here!
    ]);
    (foo, bar)
}
fn compute_foo(dataset: &[uint]) -> uint { ... }
fn compute_bar(dataset: &[uint]) -> uint { ... }

In this example, the function compute_foo_and_bar() creates two closures, one of which creates compute_foo() and one of which invokes compute_bar(). The two closures run in parallel. However, there is a slight bug: both closures write to foo, though presumably the author meant for the second closure to write to bar. Therefore, this program will be rejected as racy: let’s see how the borrow checker comes to that conclusion.

Desugaring closures

In fact, this conclusion falls out of the normal borrow checker safety rules for closures (more accurately, it will fall out of those rules once I fix them). The way the borrow checker handles closures is essentially to “desugar” them into the pair of a struct that contains pointers and a fn pointer. To see what, let’s examine the first closure from our example in more detail:

|| foo = compute_foo(dataset)

If we wanted to model this closure more precisely, we could consider it as the pair of an environment struct and a function. It would look something like this:

struct FooEnv {
    foo: &mut uint,
    dataset: &[uint]
}

fn foo_fn(env: &mut TheEnv) {
    *env.foo = compute_foo(env.dataset);
}

This means that the call to parallel::execute would look something like this:

parallel::execute([
  // Roughly equivalent to `|| foo = compute_foo(dataset)`
  (&FooEnv {foo: &mut foo, dataset: dataset}, foo_fn),

  // Roughly equivalent to `|| bar = compute_bar(dataset)`
  (&BarEnv {bar: &mut foo, dataset: dataset}, bar_fn),
])

This is in fact the kind of code that gets generated at runtime. The interesting thing about looking at closure creations this way is that we can apply the standard Rust borrowing rules to them. In particular, we see that there are two mut borrows of the variable foo, and those borrows have overlapping lifetimes, which is not permitted.

The role of closure bounds

As the previous example showed, the borrow checker’s normal rules already gives us many of the guarantees we require. We covered specifically how the borrow checker handles closures, but in general the borrow check guarantees that:

  • &mut T pointers are the only way to modify the memory that they point at (thus guaranteeing that if job A has an &mut pointer, no other job can be writing that memory);
  • &T pointers are immutable (thus guaranteeing that if job A has a &T pointer, no job can be writing to that memory).

However, there are several guarantees that the borrow checker does not provide which are unnecessary in a sequential context but become important when discussing data races:

  • Although &mut T pointers are the only way to mutate the memory they point at, they are not the only way to read the memory they point at. Both &const T and @mut T can produce read-only aliases; thus is one job holds an &mut T and another an &const T, the two jobs could race.
  • The Rust standard library includes a number of types that include “interior mutability”, meaning mutability inherent in the type itself, vs imposed from the outside. Examples are @mut, RcMut, and Cell. Many of these types are not threadsafe, with the notable exception of RwArc, which employs mutual exclusion.
  • Managed pointers like @T and @mut T are currently not safe to pass between parallel jobs, though in the case of @T this is an implementation limitation and not a theoretical one.

What all this means is that if the parallel::execute() accepted an array of any old closures, it could be sure that those closures would not race on any &mut T or &T values that they may have access to, but races could arise if those closures had access to &const T values (not to mention @mut T, Cell, and so on).

There is a similar danger for parallel::divide(). Unlike execute(), which accepts an array of closures and executes each one from its own parallel job, divide() accepts a single closure and it invokes that same closure many times in parallel. This means that if the closure were close over an &mut pointer, that same pointer would be available to many threads, and thus races could arise.

Enter closure bounds

We prevent both of these scenarios with closure bounds. A closure bound is a limitation on the kinds of values that a closure can contain in its environment. This is directly analogous to the bounds that appear on type parameters in generic functions. For example, if we declare a generic function f like so:

fn f<T:Freeze>(v: &[T]) { ... }

The bound :Freeze on T indicates that T may only be used with values that are freezable (which means “no interior mutability”, so e.g. @mut and Cell are excluded). Similarly, the type fn:Freeze() would indicate a function whose environment contained only freezable values.

As currently planned, closure bounds are less general than the bounds which appear on type parameters, in that they are limited to the “built-in” traits like Freeze and Send. These traits differ from other traits in that they offer no methods and you never explicitly implement them. The traits are used to describe properties of the data in question, like whether it may be mutable, and the compiler just decides automatically whether a given type belongs to this trait or not. Normally, the compiler would never consider a closure type fn() to be a member of such a trait, because it does not know what data the closure contains, but this does not necessarily apply to bounded closure types. For example, the type fn:Freeze() is itself a member of Freeze.

Perhaps in the future we can extend closure bounds to arbitrary traits. For example, a type like fn:Eq() might permit deep comparison of closure environments, or fn:Clone() could permit deep cloning. I haven’t thought deeply about this, though, and it would presumably require some sort of impl based on reflection.

Closure bounds apply to “desugared” environments

One thing that is not entirely obvious is that closure bounds refer to the desugared references found in a closure environment. Recall that a closure like || foo = compute_foo(dataset) in fact desugars to an environment where foo is represented as an &mut pointer:

struct FooEnv {
    foo: &mut uint,
    dataset: &[uint]
}

This means that such a closure would not be considered to meet the bound Freeze, because in its environment the field foo is an &mut pointer, which is not freezable. This is true even though the type of the variable foo is just uint, which does meet Freeze.

As a side-effect, a closure of type fn:Send() can only exist as a coercion from an environment-less function, since any true closure will have borrowed pointers of some kind in its environment, and they are not sendable.

Hat tip: Promising Young Intern bblum first expressed this view of closure bounds. It is much cleaner than the formulation I had before, which included some ad-hoc rules to achieve the same effect.

execute and the Isolate bound

You may recall that the parallel::execute() fn was declared as fn execute(jobs: &[fn:Isolate()]). As the type indicates, it accepts an array of closures that carry the Isolate bound. The Isolate bound accepts “all values that can be transmitted and isolated to a single parallel job”, which in practice means:

  • &mut T where T:Isolate
  • &T where T:Isolate
  • Scalar values like uint, int, etc
  • Structs, tuples, and enums if all components can be isolated, and the types are not internally mutable
  • The “atomic ref count” type Arc
  • The “mutex” type RwArc
  • Closures that can be isolated (i.e., fn:Isolate(T1, T2) -> T3, where T1, T2, and T3 need not meet any bound in particular)

Note that this list excludes both &const T and @mut T, as well as types like Cell, Rc, and RcMut that employ internal mutation. The list still includes a number of mutable types, however:

  • &mut T is safe because, as discussed previously, if one closure has access to an &mut T, then none of the other closures has access to that same value.
  • Arc is safe because its reference counters are maintained atomically.
  • RwArc is safe because it uses a mutex to guarantee that any mutation which occurs is always threadsafe.

The Isolate bound excludes all managed data. More discussion on this topic is found below.

divide and the Share bound

The divide function is declared as follows:

fn divide<T:Isolate>(data: &mut [T],
                     granularity: uint,
                     job: fn:Share(&mut [T], uint))

Note that the job closure requires the Share bound, which specifies data that can be safely shared amongst many parallel jobs (meaning, the same value can be accessed simultaneously by many jobs at once). The data that is being divided only requires the Isolate bound, since that data will never be accessible to multiple jobs at a time.

The definition of Share is a subset of Isolate that excludes &mut:

  • &T where T:Share
  • Scalar values like uint, int, etc
  • Structs, tuples, and enums if all components can be shared, and the types are not internally mutable
  • The “atomic ref count” type Arc
  • The “mutex” type RwArc
  • Closures that can be shared (i.e., fn:Share(T1, T2) -> T3, where T1, T2, and T3 need not meet any bound in particular)

Note that it is still safe to share RwArc (the mutex type).

Relationship of Isolate and Share to existing bounds

Rust already has two “built-in” bounds, Freeze and Send, which are both somewhat more strict that Isolate and Share (Freeze, for example, would reject RwArc, and Send would reject all &T or @T values). I think the full hierarchy is as follows:

Isolate
  Share
    Freeze
    Send

Here the indentation is intended to indicate an inclusion relationship. In other words, anything that meets Send or Freeze meets both Isolate and Share, but not vice versa. Similarly, anything that meets Share meets Isolate, but not vice versa.

Extending to permit sharing of managed data

In general we can implement a minimal version of this scheme with no changes to the runtime. The parallel job dispatching can be implemented as a library building on the existing scheduler. Unsafe code would be used to “leak” the closures outside of one task and into another. This is safe because we know that parent thread will be blocking, and thus the stack-allocated closures will remain valid; data-race-freedom is then guaranteed by the mechanisms I have already discussed. Once the jobs are executed over on the tasks, messages are sent back and the execute or divide function returns and permits the main thread to resume executing.

If we wanted to allow @T values to be passed to parallel jobs, we would have to make some deeper changes. First, this is incompatible with the non-atomic reference counting and cycle collection mechanism we use today. Even when we move to a tracing collector, though, we will have to generalize the collector to permit multiple parallel jobs to access in parallel. This is still a more limited setting than a full-on cross-process garbage collector, as you find in JVMs, but it will nonetheless add significant complexity. Similar issues arise in PJS; I have a blog post coming out soon that will discuss some of our plans in that regard, most of which apply equally to Rust, though not entirely, because the Rust model is more general than PJS.

Note that nothing prevents parallel jobs from allocating and using @T and other values internally. This is fine; we are guaranteed that these values cannot outlive the parallel job because the closure cannot closure over any location that could store such values, and the closure argument and return types must always meet the Isolate bound.

Summary

This post summarizes my current thinking about how to achieve ligher-weight data parallelism in Rust. The critical differences between the parallel jobs described here and the existing tasks are that jobs would have access to borrowed pointers and thus to data found in the stack frame and even, to some extent, managed heap of the parent task. Jobs would always have a fixed lifetime and follow a fork-join pattern. Parallel jobs as I describe form the “second layer” in the “three layer cake” of parallel programming, enabling fork-join parallelism while retaining deterministic semantics (modulo the use of RwArc). They can also form the basis for a number of higher-level APIs and combine well with future extensions to support SIMD.

Mitchell BakerTotal Surveillance

Imagine you live in a world where the buildings are glass and you can’t ever close the curtains. Imagine the floor is glass, the ceiling is glass and all the walls are glass. There are no curtains, no window shades, no shutters and you can’t make your own. We’re heading into this world online. A robust network, cheap sensors and massive data manipulation builds the equivalent of glass houses.

The question today is whether we can have curtains. Whether any business or ecosystem provides curtains and whether we can make our own. Today we have very little ability to close the curtains in commercial activities. Websites are technically able to track *everything* we do, from how long we stay on a page to what ads attract us to how to travel from one website to the next. The data about you can be sold to others. Online data can be combined with data from your physical world and made available or sold to others  Telephone providers know when we make a phone call, where we made it from, who we called, how long we talked, our regular patterns of calls, and more.

Now we know that the U.S. government is gathering significant quantities of this data. Currently it’s understood to be using only “metadata” about phone calls for U.S. citizens, and to be using the actual content as well for foreign nationals. Now we also know that the inability to pull the curtains applies to governments as well.  We can also wonder how many other governments are collecting these types of data.

Now is the moment to ask — do we care?  Do care how much our government watches us, tracks us without our knowing it? Do we care how  the U.S. government treats the citizens of friendly, allied states? Do we care if other governments emulate the U.S. and gather this data?   How do businesses, organizations and individuals approach the US knowing the scope of online activities that are being monitored?  How much do other governments do this — either to  citizens or to foreign nationals?

How do we balance between civil rights and national security?

At Mozilla we have a long, deep focus on individual control of online life, including the degree of privacy a person wants. We build products to promote this goal, and we will continue to do so. In essence, we try to provide the option of pulling the curtains for individual citizens.

However, products do not make government policies. This is the role of  citizens. We urge all citizens to get involved with the issue of wholesale government surveillance. It will determine the realities of  online life going forward.  Our online houses are become increasingly built of glass. Our lives our increasingly visible to whomever wants to look.

Let’s ask ourselves: do we want to live in a house or a fishbowl?

Christian HeilmannInbox gold: The Psychology of the Internet Troll

I get a lot of emails regarding my blog and many people offer to write guest posts, give me infographics to publish or blatantly ask for google juice for their services. This can get annoying, especially when it is obvious spam or link farmning or the people sending me mail don’t even bother reading my blog beforehand.

From time to time, you do get some gems though, like the other day when Jack Collins contacted me with this email:

Hi Christian, My name is Jack, and I’m hoping to get in touch with you about a video I helped create that explores the psychology of internet trolls. I saw this post “De-trolling the web – don’t post in anger“, and thought you and your readers might find some value in it. The video highlights the phenomenon of the online disinhibition effect. Let me know if it’s something you’d be interested in seeing or sharing, and I can forward it along. Thanks for your time, Jack Collins

I was intrigued, answered Jack and got a second mail with the link to this video. I love it – it is a great example how to present research information in a short, informative and creative way. Whilst I am utterly tired of rage comics and consider them a massive waste of bandwidth and perceived creativity it makes sense to use them here to show what the research was about. I learned a few things, for example I did not know trolling came from fishing and that there were even trolls on ham radio in the past. The best, however is the advice at the end.

Trolling is not a game of solitaire. Unless we want to actively suppress freedom of speech, the only way to beat a troll is to not play the game.

In other words – don’t feed the troll.

A strange game. The only winning move is not to play. How about a nice game of chess?

You can watch the video and read the transcript of The Psychology of the Internet Troll or use the embed below.

Created by AcademicEarth.org

Pascal FinetteCreating Economic Opportunity through Firefox OS

I believe one of the most exciting aspects of Firefox OS is its potential to create economic opportunity (and doing so in new and innovative ways). It also brings up some of the more interesting questions. Let me explain:

Apple announced today that they paid out 10 billion USD to their iOS developers both through direct app sales as well as in-app purchases. 5 billion USD of those were paid out just last year (which points to accelerated growth of the iOS ecosystem). According to Apple this represents 74% of the total market for mobile phone app purchases (with Android accounting for 20% and others for the remaining 6%).

Further take into account that mobile phones are not only creating direct economic opportunity through their app stores but also enable numerous other forms of generated revenue and you get an interesting picture (e.g. e-commerce which originates from a mobile phone; eBay reported 13 billion USD in gross merchandise sales going through their mobile app in 2012 alone).

Consider that Firefox OS plays a different game – both from a technical as well as a target market perspective (using the Web as the platform, thus being much more open and targeting emerging markets respectively) and the really fascinating question becomes: Outside of the obvious economic opportunities "direct on-device commerce through app stores" and mobile/e-commerce as well as content consumption (music, videos, books) – which other forms of economic opportunity can we enable and drive through the device? And in this context: What can we (Mozilla) do to foster and/or enable this?

We are already seeing interesting opportunities especially in emerging markets – from mobile banking for the previously unbanked (e.g. Safaricom's and Vodafone's M-Pesa) to market information systems for farmers (using SMS messaging - e.g. Intuit's Fasal) and much more.

I strongly believe that "we (mostly) don't know what we don't know". That this is likely one of the biggest opportunities we have with Firefox OS. And that it will mostly be the communities/entrepreneurs on the ground who will create and capture these opportunities.

The question remains: What can we, as Mozilla, do to inspire, enable, foster and grow these ventures? What is missing? What do we need to create to make this happen?

EDIT June 11th: Eric Tyler pointed out the following projects in addition to the ones I listed - The World Bank's M2Work Competition, Wikipedia Zero, Souktel as well as the World Bank's Maximizing Mobile report.

Joey ArmstrongHow you can help with moz.build conversions.

If you would like to help out with moz.build conversions simply begin maintaining build information within the moz.build file along with porting existing Makefile.in content. Logic to support individual variables will need to exist within mozbuild before porting can take … Continue reading

Gervase MarkhamGSoC 2013 Project List

The Google Summer of Code students got chosen 2 weeks ago, and I am pleased to list the 21 projects being done under the Mozilla banner – a new high for the Mozilla project. The name of each student is linked to the location where they will be posting weekly updates on their progress, if you want to follow along with a project you are interested in. I’m sure they would appreciate any help or advice you have :-) Please make them feel welcome!

Project Student Mentor
Improving Text Selection and Rotation in PDF.js Srishti Srivastava Bill Walker
Designing Hacktivities (Meemoo) Matthias Brown Forrest Oliphant
Dynamically Configurable Actions add-on (ZAP) Alessandro Secco Simon Bennetts
Autosuggest Search Engines (Firefox) Sankha Narayan Guria Matthew Noorenberghe
Clearer Add-on Installation (Firefox) Sachin Hosmani Jorge Villalobos
Enhanced Customization APIs (Firefox) Riadh Chtara Kris Maglione
Additional JavaScript Protocol Plug-ins – Yahoo! (Instantbird) Quentin Headen Patrick Cloke
Awesometab (Instantbird) Nihanth Subramanya Benedikt Pfeifer
Profile in the Cloud (PiCl) Client (Firefox OS) Akshay Katyal Jed Parsons
Prototype HTTP/2 Server Gábor Molnár Nick Hurley
Debug Symbol Generation (Rust) Michael Woerister Josh Matthews
Implement Branch Prediction (IonMonkey) Wei Wu Nicolas B. Pierron
Make Firefox Developer Tools Compatible With Thunderbird Philipp Kewisch Mike Conley
Security Report (Firefox) Kailas Ravsaheb Patil Mark Goodwin
CSS Generation Tools (MDN) Gabriel Ivanica Jean-Yves Perrier
Unit Tests for Mozbase Anhad Jai Singh Clint Talbert
Backend Connectors for Ensemble (Thunderbird) Jonathan Demelo Mike Conley
Localization Dashboard Berker Peksag John Karahalis
FileLinks in Instant Messages Instantbird) Atul Jangra Florian Quèze
Sample Apps for Firefox Marketplace Developer Hub (Firefox OS) Andre Alves Garzia Marcos Caceres
about:memory for Real People (Firefox) Abhishek Choudhary Felipe Gomes

Avi HalachmiTabstrip #4 - Vsync, newtab, talos, paint starvation

I’ve been slightly behind with my blog updates and there has been some great progress recently, so this post covers a bit more than usual.

Vsync

Vsync has finally landed on Windows Nightlies not long ago. This means that Firefox will now synchronize its paints with the actual refresh rate of the monitor (if available), which is essential for properly smooth animations. This will work (and is enabled by default) on Windows Vista and later with DWM enabled (“Aero” themes). This also works with WebGL content such as Epic Citadel (demo).

Without vsync, Firefox uses 60hz refresh rate by default, which works relatively decently with 60hz displays, but fails badly at displaying properly smooth animations on monitors with other refresh rates (50hz on quite a few laptop displays, 100hz monitors, etc).

However, the current implementation synchronizes with the main display only, so if using a multi-monitor setup, Firefox windows on secondary monitors might not gain from this.

You can control the refresh rate manually by modifying layout.frame_rate at about:config (and restart Firefox). The default value is -1 which means “Use vsync if available or 60hz otherwise”. Any other integer value > 0 will force that specific refresh rate.

Naturally, if Firefox can’t animate specific content quickly enough to keep up with the designated rate, then the actual rate will be lower.

about:newtab

about:newtab is the default page when opening a new empty tab - with the thumbnails of recently visited pages. It was affecting tab animations badly, to the point of displaying as little as a 3 frames slideshow on low-end systems while animating the tabstrip after pressing the + button to add a tab.

Tim Taubert from the Firefox team has done some extensive work recently on several bugs which fall into two categories:

  • Enable newtab preload by default. Newtab preload means that Firefox prepares the newtab page in the background, such that when opening a new tab it’s already rendered and therefore could be quickly displayed with very little processing. It has been working for a while but disabled by default due to accessibility issues. Tim removed this blocker, as well as simplified the preload mechanism and made sure that background preload doesn’t happen during animation. This landed about a week ago and newtab preload is now enabled by default on nightlies.

  • Prevent unnecessary reflows of the newtab page. Reflow is the process of re-calculating the layout of the page, e.g. after window resize, and it’s relatively CPU intensive. Tim discovered that newtab causes unnecessary reflows on several cases, some of them related to preload. He fixed them and also added an automatic test to detect if new reflows are accidentally introduced over time.

The result of all this work is that animating a new tab with the newtab page is now almost as smooth as opening a blank tab, with few further potential improvements to be worked on soon. Well done!

Talos

Bug 590422 (remove timers averaging filter) landed more than two months ago and should greatly improve timers accuracy, but it caused few regressions which are still being worked on. Talos tscroll was already modified as a result - which landed about 2 weeks ago, and recently tsvg regressions from this bug were examined as well.

As it turned out, tsvg was rendering SVG animations at 100-200ms intervals, and measuring/reporting the overall runtime as representative of SVG performance. At 4 of the 7 animation tests within the tsvg suite, more than 95% of the time was spent inside setTimeout with the browser completely idle. This resulted in tests which in practice represent the accuracy of timers more than anything else.

To make sure the overall runtime represents actual SVG performance, we should iterate the animation frames as fast as possible. We could do this with setTimeout(loop, 0), but since Firefox renders to screen at 60hz, and it’s usually smart enough to delay reflow calculations until it’s absolutely necessary, we could end up fully processing only one in few frames when the SVG iterations are quicker than 60Hz, and at tsvg they’re much quicker than that.

To make sure each frame is fully processed on each iteration, we should therefore use requestAnimationFrame (fondly nicked rAF) - which makes sure that once we’re back at the callback, whatever layout changes which we introduced were already fully processed and flushed by Firefox. However, rAF iterates at 60hz by default (or vsync rate), which is usually not fast enough to stress our SVG tests. The solution is to set layout.frame_rate to a high enough value (during these tests) which causes Firefox to iterate and fully-process each frame as fast as possible. Joel Maher helps a lot with testing and deploying the new tsvg tests, and we hope to land it soon.

Making tsvg iterate ASAP also brought us back to tscroll. The recent change of tscroll was to use rAF instead of setTimeout for scroll iterations. However, while it represents scroll smoothness under normal conditions, it doesn’t detect small regressions - since Firefox isn’t actually being stressed and the scroll doesn’t limit our iteration frequency. But stressing the browser with ASAP iteration will lose the real-world simulation of normal refresh rates. So we don’t have a single approach to satisfy both of these needs.

We’re still considering this, but it seems talos will eventually run tscroll twice: once @60hz to make sure we can keep up at real-world scenarios, and once with ASAP iterations to detect performance regressions at much higher resolutions.

Paint starvation

While working on tsvg with ASAP iterations, we noticed that Firefox sometimes appears frozen for the entire animation (typically less than 1 second) - it only shows the last animation frame. While this happened when rAF was set to iterate ASAP, we discovered that there are scenarios under perfectly normal conditions which would exhibit exactly the same symptom.

This is now bug 880036. It shows is that if, for some reason, Firefox can’t iterate frames as fast as it wants to (60hz by default), then it may spend too much time on these iteration and prevent other event types from being handled on time. The most noticeable one is the paint event, since it makes Firefox appear frozen, but possibly other events are starved as well.

A patch which seems to fix the issue was already posted, but since this freeze appears to ‘fix’ itself after about 2s, we want to first understand this unfreeze mechanism, and possibly fix it instead of posting a patch to cover up for another bug.

Kim MoirReleng 2013 Recap

On May 20, we held the Releng 2013 workshop in San Francisco.  By all accounts it was a success!  I was unsure what to expect given that this was a first time for this workshop.   It seemed to be a topic that generated a lot of interest.  We had around 80 attendees which to my understanding was the highest attendance of any workshop at ICSE this year.   It was great to have so many people interested in release engineering and research in the room.  It was also fantastic to meet my co-organizers Bram, Foutse and Christian in person after working to organize this event since last fall.

The night before the workshop, I went out to dinner with the other organizers and some of their professor and post-doc colleagues.  I was struck by how enthusiastic they were about release engineering topics and interacting with industry.  One of them said  "We want to make sure that we're working on relevant problems." 



There were two keynotes at the workshop.  The opening keynote was Release Engineering as Force Multiplier by John O'Duinn of Mozilla.  The afternoon one was by Roman Scheiter of LinkedIn and entitled Against All Odds – Completely Overhauling Linkedin's Release Process.  Both were fantastic accounts of how the build, test and release pipelines at these companies were improved to make the organizations as a whole more effective.  It was an interesting contrast in that LinkedIn
moved from branch based development model to trunk based continuous integration while Mozilla moved from trunk based continuous integration to branch based development model.

One of the researchers commented that if you have negative results, you don't publish a paper.  So they were somewhat surprised to see the openness from those from industry on the things we did wrong.  My understanding is that's not that common in academia given the push to be the first to publish a new result.  A different culture.

Some highlights for me from the other talks:
  • The software delivery model at Netflix by Curt Patrick and Gareth Bowles (development islands, no release engineers, their team provides tooling for self-serve builds)
  • Hal Wine from Mozilla on using Hg and Git on the same codebase (many asked why - that sounds crazy!)
  • Jim Buffenbarger from Boise State University gave a talk on amake which includes automatic dependency processing
  • Akos Frohner and Boris Debic from Google gave a talk about the continuous release process at Google and which included some incredible numbers (100 million unit tests run a day!).  Boris also had some great things to say about the value of release engineering such as  "Release engineering should taught in business school, not in computer science classes.  It has real business value, and developers can learn it later. " "Startups should hire release enginners early, otherwise they will have to drain the swamp later".  "Companies that don't do release engineering well don't compete well in the marketplace."  Definitely words of wisdom.
  • Dustin Mitchell from Mozilla gave a talk on the Buildbot continuous integration framework.  Later that afternoon, Moses Mendoza and Matthaus Owens from Puppet Labs presented how they build their packages for their consumers  and mentioned that they hoped to collaborate with Dustin and learn more about Buildbot.  Which was great - so glad that the workshop encouraged this collaboration.
  • Ryan Hardt, a post-doc from University of Wisconsin (Milwaukee) gave a talk about Formiga, an Eclipse plug-in for refactoring Ant code which looks very promising. 
  • Peter Rigby  from Concordia University described  DCVS systems facilitate different workflows between developers as opposed to more centralized systems.  Very interesting!
At the end of the day, I had the honour of moderating the discussion panel. The panel started out with professors Mike Godrey from Waterloo and Gunther Ruhe from the university of Calgary, as well as practitioners Jason Newblanc from Salesforce and Curt Patrick from Netflix.  Discussions included what topics needed more research (dependency analysis), to  a discussion of the skills do you look for when hiring a good release engineer (communication skills above all).  Given that one of the main goals of the workshop was to bring together researchers and release engineers it was very gratifying to hear from the researchers on the panel how happy they were that they had the opportunity to learn from the presentations earlier in the day.  After a while the panel shifted to include new members with new topics, and then we wrapped up to head to post-workshop dinners where the discussions continued.





Several attendees mentioned to me that they were happy to attend the workshop because it validated the release engineering work that they do is important.   I'm very fortunate to work at Mozilla on a large release engineering team where there are many people who love to talk about build optimization and automation.  But many release engineers work in organizations where they are the only ones who are interested in this subject.   To bring all these people together was a great experience!

We would like to thank everyone who attended the workshop.  Thank you to our session chairs who timed the talks and ensure that we stayed on schedule.   Thank you to Juliana Saraiva, our student volunteer, who helped with setup and throughout the day with audio and visual issues. 
A special thanks to all of our speakers.  Having been a speaker in the past, I understand all the work that goes into preparing talks on top of your regular day jobs and truly appreciate the effort that made this workshop successful.  At the end of the day, there was a resounding show of hands from attendees that they would like to attend another workshop.  In fact, several companies volunteered to  their space to host events which is very generous.   Please follow @relengcon on twitter for more information on upcoming events.  Many of the papers and presentations are available on the web site.  If your slides are missing from the web site, please email them to Bram.

Also thank you to my colleagues at Mozilla for arranging our releng work week to be same week so many of us could attend, despite it being a Canadian holiday weekend.  You're all amazing :-)

Christian HeilmannIrregular shape rollovers with Canvas and PNG

Creating rollovers is easy. Much easier than it was in the past with the infamous MM_mouseover at least. It gets tricky though when you want to have the rollover only happen on a certain shape and not only in a rectangular area.

There are many solutions to this, like SVG masking or adding lots of rectangular overlays that make up the desired shape, but I wanted to have a simple solution. You can see the solution working here in this GIF:

rollover triggered on irregular shapes

What I am doing here is adding PNGs (courtesy Game Icons) with transparency to the HTML and give them a class of rollover:

<img 
     src="bottle.png" 
     alt="bottle vapours" 
     class="rollover">
<img src="burning-embers.png" 
     alt="burning embers" 
     class="rollover">

The transparent part of the PNG will be what should not trigger the rollover, and all other pixels should.

The JavaScript is pretty simple and based on the principles used in the letterpaint game I just explained on Mozilla Hacks.

  • Loop over all images with the class “rollover”
  • Add a mouseover, mouseout and mousemove event to each
  • On mouseover, take the image and copy it to an invisible Canvas element
  • On mousemove, find out the x and y position of the mouse cursor and read the colour of the pixel at this position from the canvas
  • If the pixel has an opacity of 0, it is transparent, which means remove the “over” class from the image.
  • If the pixel is not opaque, add the class “over” to the image.

You can try this out here.

The source code is on GitHub.

This seems to be a very simple way to have irregular shaped rollovers. You could enhance the hover() function to also react differently depending of which part of the shape you are on. You can also add touch handlers easily. The only caveat is that the images and the JavaScript need to be on the same domain or the canvas is not allowed to access the pixels of the image.

David BoswellLots going on with community building, part 3

I haven’t had a chance to blog much lately, but there is a lot to share about what’s been going on with community building projects.

We’ve handled a large spike in interest from people wanting to participate in the project after the Get Involved page was featured in promotions about Mozilla’s 15th anniversary.

inquiry_spike4

To handle this increase in interest, we’re encouraging teams to try new things and are seeing encouraging results—for instance, Mozilla Hispano has been rethinking how they connect with new volunteers.

We’ve also been looking at tools to help deal with larger numbers of potential contributors. A Systems and Data Working Group has been formed to identify community building functionality priorities and evaluate systems to meet those needs.

jobvite_audit_recording

Once people start participating, we are looking into the best ways to recognize them. Dia from the People team has worked with a university to let a student get credit for their contributions and she’s turned this into a template other teams are excited about using.

student_letter_screenshot

I’ve also really enjoyed helping with a project to collect stories of Mozilla’s history. Once we have a compelling history, I think there’s a lot of potential to recognize contributors by showing how their contributions directly helped Mozilla reach new achievements.

history_timeline

I hope to share more often about other community building efforts going on, but my recent blogging history isn’t very encouraging. To keep up with the latest community building news, join us for the regular Grow Mozilla calls.


Erik VoldOn Scriptlets

I was working late last night on Sidebars for the Add-on SDK, when I saw an email for Bug 774065: Replace bookmarklets with “user-script buttons”, and thought that’d be easy, plus I need a break from debugging.

So an hour and a half later I had created Scriptlet for Firefox.

Scriptlets

A Scriptlet is a new add-on type that is the combination of a button and a bookmarklet, and it can re-use any existing bookmarklet.

Typically I find that I lose my bookmarklets because they get lost in my mountain of bookmarks, so I never use them, even tho there are some useful ones out there, and they are extremely easy to make.

Scriptlets are much easier, for starters they are completely separated from bookmarks, but they also include toolbar buttons which can be moved to any part of the user interface that I want. This means that Scriptlets can be moved to the add-on bar, the navigation bar, toolbars, and lots of other places!

How To Install Scriptlets

In order to install a Scriptlet, right-click on a bookmarklet, and click the ‘Make Scriptlet’ button. Once this is done you find the Script in the add-on manager

Scriptlets Provide Toolbar Buttons

Once you make a Scriptlet a toolbar button will be automatically added to your navigation bar (aka navbar). See the top right of your browser.

Scriptlets Are Add-ons

Because Scriptlets are treated as first class add-ons they can be managed in Firefox’s Add-on Manager. This will be where you enable/disable, or uninstall a Scriptlet.

New Features For Scriptlets

One idea I’m thinking about is making the button a togglable button, this way Scriptlets will be automatically added to pages that you visit after the page loads. This will come after the SDK team launches the new UX modules near the end of Q2 whcih is coming soon.

Links

Enjoy!

Byron Joneshappy bmo push day!

the following changes have been pushed to bugzilla.mozilla.org:

  • [880315] malformed sql generated as a result of bug 879055
  • [858486] Make SecureMail not die if insidergroup is undefined
  • [694713] Clarify the field descriptions on the guided bug entry form
  • [880968] OpenGraph extension is double-encoding titles (&ndash; visible when sharing a link on facebook)

Filed under: bmo, mozilla

Daniel GlazmanCSS Flexible Box is Best New Web Technology 2013!

I am extremely pleased to announce that a work done by the W3C CSS Working Group received last week a Net Award as Best New Web Technology 2013 from .net magazine for the CSS Flexible Box Layout Module. This is a bit of an achievement for the CSS Working Group itself, the authors/contributors/editors of the specification, and the W3C. Mucho congrats to all the members of the CSS Working Group and contributors to www-style, you guys rock!

Net Award Best New Web Technology 2013 for CSS Flexible Box Layout Module

Planet Mozilla BlogPlanet Additions: Class Of 6/9/2013

Monica Chew (feed) – Monica is a software engineer who likes user sovereignty, tab sovereignty, tests, documentation, and shipping code. She works on the security and privacy team.

Jordan Santell (feed) – Jordan Santell joined the Jetpack team as a JavaScript developer, working on API design and new Addon-SDK features. Loving creating APIs, node.js, build tools, Web Audio, and heavy metal. Creator of dancer.js, ogg.js and poet.

Kat Braybrooke (feed) – Kat Braybrooke (keyboardkat) is an open designer and anthropologist who has just joined Mozilla in London as Hacking Popular Culture Liaison, aiming to help enable the next generation of web users to become web builders with the Webmaker team. In her previous work with the Open Knowledge Foundation (http://okfn.org), she coordinated the world’s first Open Knowledge Festival 2012 in Helsinki and built the Open Book, a crowdsourced publication about openness around the world (http://theopenbook.org.uk). She is a co-founder of the Open Design Working Group and has a MSc Digital Anthropology from University College London for a 2011 ethnography on the role of gender embodiment and identity amongst F/LOSS hackers in Europe.

Sandip Kamat (feed) – Sandip Kamat is part of the Product Management team at Mozilla working on Firefox OS. He has spent most his working life in mobile technologies & launching cool devices. His previous companies include Motorola (yes, worked on both the product series: RAZRs and DROIDs) and Siemens Mobile. When not flight-hopping, he lives in San Diego. Apart from his family & kids, he also loves the sun and the ocean there.

Jack Moffitt (feed) – I’m a hacker and entrepreneur based in Albuquerque, New Mexico. I currently work for Mozilla Research on Servo, a new, experimental, parallel web browser engine. I have founded several startups built on XMPP technology including Collecta, a real-time search engine for the Web, and Chesspark, a real-time, multi-user gaming platform.

Eddy Bruel (feed) – Eddy Bruel joined the Jetpack team as a platform developer about two years ago. He likes to stick close to the metal, making C++ his language of choice. His interests include language design and compiler construction. As such, he primarily hacks around in SpiderMonkey whenever he gets the chance. A firm believer that open source is as much, if not more about people than it is about code, Eddy started this blog not just to share his own experiences, but to get more involved with the community as well.

Ludovic HirlimannThunderbird and Lightning/calendar bugday³


Hello Thunderbird and Lightning/calendar enthusiasts. We need your help! Help us to make the next “big release” of Thunderbird, Thunderbird 24, the best release ever.

On June 12 skilled help will be available via online chat to assist you, for as little or as long as you like, in doing the following:

  • Help other users by checking their bug reports to see if you can reproduce the behavior of their reported problem
  • Get advice about your own bug report
  • Help other users in the support forum to see if a user needs to file a bug report


No coding or special skills are required. And you don’t need to be an expert or long term user of Thunderbird.  You simply need to be using Thunderbird to help other Thunderbird users. Or to help with calendar issues you need to be a user of Lightning.

Just a little bit of your time will contibute to making Thunderbird and/or Lightning better for yourself and for others. Please see the details at https://wiki.mozilla.org/Thunderbird:QA_TestDay:2013-06-12

We look forward to having your help, and seeing you online in the chat area.

Sincerely,
The Thunderbird QA Team

Selena DeckelmannAdaCamp day 1: Allies workshop, OPW, The likeability paradox and depression/activism

This is a recap of my first day at AdaCamp SF. My first post in this series was about the opening reception.

Allies Workshop

I started the day with the 2 hour Allies workshop. Valerie Aurora led this session, with the intention to train a number of new people on how to give the workshop. I took a ton of notes, so here goes, without much editing:

The presentation starts with 15 minutes of introductory slides, which are Creative Commons licensed. We answer the question “why is men fighting sexism important?” There’s a visualization at the start of the number of women involved in FOSS (not many – 2%) and Wikipedia (slightly more, but still not many). We got sidetracked on a slide that had a bit of jargon on it – introducing the idea that we don’t have a gender binary, but for the purposes of the discussion today, “man” will mean “cis white male”, as that’s typically who will be participating in the allies workshop.

I failed to take notes on this (probably because I was intensely paying attention!).. There was a part about the purpose of speaking up. When you decide to speak up about sexism, you’re often not doing so to educate someone who has made a mistake, or is being a jerk. You’re helping a group set a boundary and showing everyone listening in what is ok and not ok. Super important point for me!

There’s a reminder to not be scared of the discussions about to happen. They will be uncomfortable possibly awkward, and that’s ok. When men speak out about sexism they do not get the same responses that women do. They are often publicly supported and privately criticized — the opposite of what happens to many women. The workshops will be a 7-minute discussions, followed by summaries and reflections to the group. These discussions are the times to ask questions, even seemingly foolish questions. Val asks that everyone respond authentically (my word, not hers) when questions are asked. This is a safe place for Allies to find the answers to difficult problems.

Then we went into some example scenarios. We did three scenarios that were prebaked and then one that a participant brought up. I’ll save my notes on these discussions for another time. I really enjoyed the time I spent on this, and learned quite a bit from my group.

The Likeability Paradox

In the book Lean In, there’s a section about the difficulty of being liked vs being respected when you are a woman leader. This discussion was by far the best large-group of the day for me, and extremely well-moderated. I wrote down lots of phrases: bossy, “risk theater”, damning with faint praise, competition between women == disdain, acceptable level of emotional discourse, the difference between “earning respect” and “earning like”, likeabliity == emotional catering, gendered insecurity about a woman’s place, the amount of time it takes to earn respect vs first impression likeability, orgs maximize stability by ignoring these kinds of problems.

There was the start of a great discussion about dog whistle adjectives, adverbs and verbs that subtly and not-so-subtly remind women of their role and place. Are there words we can choose to describe “aggressive” behavior, for example, that are less gendered and more fair to both men and women? Example was asking an employee to “be more aggressive”, when what the manager really meant was they wanted more “decisiveness”. Another person said they started using “inspire” instead of “convince” in their activist work.

There was a short discussion asking “what is respectibility” and how do we unpack that term. This brought up some experiences people have had with being questioned consistently about their qualifications — “the veracity of contribution is questioned” and “what has ‘this woman’ ever done for this community?” Another comment was that by speaking less as a manager, and “planting seeds that employees then run with and come to the same conclusion” a woman had found it much easier to get her employees to do what she wanted. There was quite a bit of discussion about how problematic recommending “speak less” is, even if it is an effective tactic. Upon reflection, I think what was problematic was the framing, rather than the management tactic. Men who are managers clearly use this tactic as well, and it is effective.

Later, Sumana tweeted a link to this piece in Politico about Jill Abramson.

Depression and activism

I mostly came to this session for tips from those in attendance. Here’s what I wrote down:

  • Ask for a big chunk of time off to recharge
  • Structure time for fun
  • Only work when you really want to — give yourself permission to relax when you feel like crap!
  • Consider flipping your “alarm” system to management – start talking about how busy you are when you’re at 70% capacity, rather than 150%!
  • Be selfish with your time and energy

Internal strategies:

  • Try cognitive behavioral therapy (there are great books: Mind over mood, Panic attack)
  • Flip negative self talk, going even so far as to rewrite personal stories in the best possible light

IBM had suicide prevention training for new folks working on-call. A hacker training school has a weekly 2-minute “talk about your life” time.