mozilla

Mozilla Nederland LogoDe Nederlandse
Mozilla-gemeenschap

Rubén Martín: Bringing better support to regional communities

Mozilla planet - vr, 28/08/2015 - 13:00

During this third quarter, one of the main goals for the Participation team at Mozilla is to better support Reps and Regional communities.

We want to focus our efforts this quarter in 10 countries to be more efficient with the resources we have and be able to:

  • Tailor country profiles and a community health dashboard.
  • Develop a mid-term plan with at least three communities.
  • Systematize a coaching framework with volunteers.

As part of the Reps/Regional group I’m currently involved in these efforts, focusing in three European countries: Germany, France and UK.

During the past and following weeks I’ll be meeting volunteers from these communities to know more about them and to figure out where to get some information that would help to develop the country profiles and the community dashboard, an important initiative to have a clear overview about our community status.

Also, I’m working with the awesome German community to meet and work together in a plan to align and improve the community in the next 6 months.

On top of all the previous things, we are starting a set of 1:1 meetings with key volunteers inside these communities to bring coaching and support in a more personal way, understanding everyone’s views and learning the best ways to help people’s skills and motivation.

Finally, I’m working to improve the Reps/Regional team accountability and work-flow productivity exploring better ways to manage our work as a team and working with the Reps Council to put together a Rep program profile doc to understand better the current status and what should be changed/improved.

You can know more about the Participation team Q3 goals and key results, as well as individual team members goals, in this public document and follow our daily work in our github page.

Categorieën: Mozilla-nl planet

Mozilla dicht meerdere lekken in Firefox 40 - Security.nl

Nieuws verzameld via Google - vr, 28/08/2015 - 10:08

Mozilla dicht meerdere lekken in Firefox 40
Security.nl
Mozilla heeft een tussentijdse en ongeplande update voor Firefox uitgebracht die meerdere lekken verhelpt. Via één van de twee verholpen kwetsbaarheden zou een aanvaller in het ergste geval systemen volledig kunnen overnemen. Het bezoeken van een ...

en meer »
Categorieën: Mozilla-nl planet

Emily Dunham: Apache Licenses

Mozilla planet - vr, 28/08/2015 - 09:00
Apache Licenses

At the bottom fo the Apache 2.0 License file, there’s an appendix:

APPENDIX: How to apply the Apache License to your work. ... Copyright [yyyy] [name of copyright owner] ...

Does that look like an invitation to fill in the blanks to you? It sure does to me, and has for others in the Rust community as well.

Today I was doing some licensing housekeeping and made the same embarrassing mistake.

This is a PSA to double check whether inviting blanks are part of the appendix before filling them out in Apache license texts.

Categorieën: Mozilla-nl planet

Software-update: Mozilla Firefox 40.0.3 - Tweakers

Nieuws verzameld via Google - vr, 28/08/2015 - 08:02

Tweakers

Software-update: Mozilla Firefox 40.0.3
Tweakers
Mozilla Firefox 2013 logo (75 pix) Mozilla heeft een derde update voor versie 40 van zijn webbrowser Firefox uitgebracht. In versie 40 is onder meer ondersteuning voor Windows 10 toegevoegd, worden nu ook downloads op Windows gecontroleerd op ...

en meer »
Categorieën: Mozilla-nl planet

Christian Heilmann: ES6 for now: Template strings

Mozilla planet - vr, 28/08/2015 - 05:33

ES6 is the future of JavaScript and it is already here. It is a finished specification, and it brings a lot of features a language requires to stay competitive with the needs of the web of now. Not everything in ES6 is for you and in this little series of posts I will show features that are very handy and already usable.

If you look at JavaScript code I’ve written you will find that I always use single quotes to define strings instead of double quotes. JavaScript is OK with either, the following two examples do exactly the same thing:

var animal = "cow";   var animal = 'cow';

The reason why I prefer single quotes is that, first of all, it makes it easier to assemble HTML strings with properly quoted attributes that way:

// with single quotes, there's no need to // escape the quotes around the class value var but = '<button class="big">Save</button>';   // this is a syntax error: var but = "<button class="big">Save</button>";   // this works: var but = "<button class=\"big\">Save</button>";

The only time you need to escape now is when you use a single quote in your HTML, which should be a very rare occasion. The only thing I can think of is inline JavaScript or CSS, which means you are very likely to do something shady or desperate to your markup. Even in your texts, you are probably better off to not use a single quote but the typographically more pleasing ‘.

Aside: Of course, HTML is forgiving enough to omit the quotes or to use single quotes around an attribute, but I prefer to create readable markup for humans rather than relying on the forgiveness of a parser. We made the HTML5 parser forgiving because people wrote terrible markup in the past, not as an excuse to keep doing so.

I’ve suffered enough in the DHTML days of document.write to create a document inside a frameset in a new popup window and other abominations to not want to use the escape character ever again. At times, we needed triple ones, and that was even before we had colour coding in our editors. It was a mess.

Expression substition in strings?

Another reason why I prefer single quotes is that I wrote a lot of PHP in my time for very large web sites where performance mattered a lot. In PHP, there is a difference between single and double quotes. Single quoted strings don’t have any substitution in them, double quoted ones have. That meant back in the days of PHP 3 and 4 that using single quotes was much faster as the parser doesn’t have to go through the string to substitute values. Here is an example what that means:

<?php $animal = 'cow'; $sound = 'moo';   echo 'The animal is $animal and its sound is $sound'; // => The animal is $animal and its sound is $sound   echo "The animal is $animal and its sound is $sound"; // => The animal is cow and its sound is moo ?>

JavaScript didn’t have this substitution, which is why we had to concatenate strings to achieve the same result. This is pretty unwieldy, as you need to jump in and out of quotes all the time.

var animal = 'cow'; var sound = 'moo';   alert('The animal is ' + animal + ' and its sound is ' + sound); // => "The animal is cow and its sound is moo"

Multi line mess

This gets really messy with longer and more complex strings and especially when we assemble a lot of HTML. And, most likely you will sooner or later end up with your linting tool complaining about trailing whitespace after a + at the end of a line. This is based on the issue that JavaScript has no multi-line strings:

  // this doesn't work var list = '<ul> <li>Buy Milk</li> <li>Be kind to Pandas</li> <li>Forget about Dre</li> </ul>';   // This does, but urgh… var list = '<ul>\ <li>Buy Milk</li>\ <li>Be kind to Pandas</li>\ <li>Forget about Dre</li>\ </ul>';   // This is the most common way, and urgh, too… var list = '<ul>' + ' <li>Buy Milk</li>' + ' <li>Be kind to Pandas</li>' + ' <li>Forget about Dre</li>' + '</ul>';

Client side templating solutions

In order to work around the mess that is string handling and concatenation in JavaScript, we did what we always do – we write a library. There are many HTML templating libraries with Mustache.js probably having been the seminal one. All of these follow an own – non standardised – syntax and work in that frame of mind. It’s a bit like saying that you write your content in markdown and then realising that there are many different ideas of what “markdown” means.

Enter template strings

With the advent of ES6 and its standardisation we now can rejoice as JavaScript has now a new kid on the block when it comes to handling strings: Template Strings. The support of template strings in current browsers is encouraging: Chrome 44+, Firefox 38+, Microsoft Edge and Webkit are all on board. Safari, sadly enough, is not, but it’ll get there.

The genius of template strings is that it uses a new string delimiter, which isn’t in use either in HTML nor in normal texts: the backtick (`).

Using this one we now have string expression substitution in JavaScript:

var animal = 'cow'; var sound = 'moo';   alert(`The animal is ${animal} and its sound is ${sound}`); // => "The animal is cow and its sound is moo"

The ${} construct can take any JavaScript expression that returns a value, you can for example do calculations, or access properties of an object:

var out = `ten times two totally is ${ 10 * 2 }`; // => "ten times two totally is 20"   var animal = { name: 'cow', ilk: 'bovine', front: 'moo', back: 'milk', } alert(` The ${animal.name} is of the ${animal.ilk} ilk, one end is for the ${animal.front}, the other for the ${animal.back} `); // => /* The cow is of the bovine ilk, one end is for the moo, the other for the milk */

That last example also shows you that multi line strings are not an issue at all any longer.

Tagged templates

Another thing you can do with template strings is prepend them with a tag, which is the name of a function that is called and gets the string as a parameter. For example, you could encode the resulting string for URLs without having to resort to the horridly named encodeURIComponent all the time.

function urlify (str) { return encodeURIComponent(str); }   urlify `http://beedogs.com`; // => "http%3A%2F%2Fbeedogs.com" urlify `woah$£$%£^$"`; // => "woah%24%C2%A3%24%25%C2%A3%5E%24%22"   // nesting also works:   var str = `foo ${urlify `&&`} bar`; // => "foo %26%26 bar"

This works, but relies on implicit array-to-string coercion. The parameter sent to the function is not a string, but an array of strings and values. If used the way I show here, it gets converted to a string for convenience, but the correct way is to access the array members directly.

Retrieving strings and values from a template string

Inside the tag function you can not only get the full string but also its parts.

function tag (strings, values) { console.log(strings); console.log(values); console.log(strings[1]); }   tag `you ${3+4} it`; /* =>   Array [ "you ", " it" ] 7 it   */

There is also an array of the raw strings provided to you, which means that you get all the characters in the string, including control characters. Say for example you add a linebreak with \n you will get the double whitespace in the string, but the \n characters in the raw strings:

function tag (strings, values) { console.log(strings); console.log(values); console.log(strings[1]); console.log(string.raw[1]); }   tag `you ${3+4} \nit`; /* =>   Array [ "you ", " it" ] 7   it \nit */

Conclusion

Template strings are one of those nifty little wins in ES6, that can be used right now. If you have to support older browsers, you can of course transpile your ES6 to ES5, you can do a feature test for template string support using a library like featuretests.io or with the following code:

var templatestrings = false; try { new Function( "`{2+2}`" ); templatestrings = true; } catch (err) { templatestrings = false; }   if (templatestrings) { // … }

More articles on template strings:

Categorieën: Mozilla-nl planet

Cameron Kaiser: 38.2.1 delayed due to hardware failure

Mozilla planet - vr, 28/08/2015 - 04:14
TenFourFox 38.2.1 was supposed to be released to you today but the hard disk used for compiling it blew up sometime yesterday and I've been recovering data from the drive and the last backup instead. The G5 version was built before the disk died, and does check out, but the other three builds haven't been yet. Let this be a reminder that DiskWarrior can fix a lot of things but not hardware failure (and people complaining of random faults in TenFourFox, please check your hardware first -- the symptom here was random freezes because the electronics kept dropping the drive off the SATA bus unexpectedly), so Data Rescue is busy getting the recoverable pieces off it and the rest I can restore from the file server. Both tools belong in your Power Mac bug-out bag and both still support PowerPC, so please support those vendors who still support us. It should be repaired enough to resume builds hopefully late tonight but I don't have an estimated time of release (hopefully no later than Sunday). It includes two Mozilla fixes and will also include a tweak for TenFourFox issue 306.

In the meantime, a fair bit of the wiki has been updated and rewritten for Github. I am also exploring an idea from bug 1160228 by disabling incremental garbage collection entirely. This was a bad idea on 31 where incremental GC was better than nothing, but now that we have generational garbage collection and the nursery is regularly swept, the residual tenured heap seems small enough to make periodic full GCs more efficient. On a tier 1 platform the overhead of lots of incremental cycles may well be below the noise floor, but on the pathological profile in the bug even a relatively modern system had a noticeable difference disabling incremental GC. On this G5 occasionally I get a pause in the browser for 20 seconds or so, but that happens very infrequently, and otherwise now that the browser doesn't have to schedule partial passes it seems much sprightlier and stays so longer. The iBook G4 saw an even greater benefit. Please note that this has not been tested well with multiple compartments or windows, so your mileage may vary, but with that said please see what you think: in about:config set javascript.options.mem.gc_incremental to false and restart the browser to flush everything out. If people generally find this superior, it may become the default in 38.3.

Categorieën: Mozilla-nl planet

Gervase Markham: Top 50 DOS Problems Solved: Sorting Directory Listings

Mozilla planet - vr, 28/08/2015 - 00:29

Q: Could you tell me if it’s possible to make the DIR command list files in alphabetical order?

A: Earlier versions of DOS didn’t allow this but there’s a way round it. MS-DOS 5 gives you an /ON switch to use with DIR, for instance:

DIR *.TXT /ON /P

would list all the files with names ending in .TXT, pause the listing every screenful (/P) and sort the names into alphabetical order (/ON).

Users of earlier DOS programs can shove the output from DIR through a utility program that sorts the listing before printing it on the screen. That utility is SORT.EXE, supplied with DOS. … [So:]

DIR | SORT

diverts the output from DIR into SORT, which sorts the directory listing and sends it to the screen. Put this in a batch file called SDIR.BAT and you will have a sorted directory command called SDIR.

I guess earlier versions of DIR followed the Unix philosophy of “do one thing”…

Categorieën: Mozilla-nl planet

Daniel Stenberg: Content over HTTP/2

Mozilla planet - do, 27/08/2015 - 22:56

cdn77 logoRoughly a week ago, on August 19, cdn77.com announced that they are the “first CDN to publicly offer HTTP/2 support for all customers, without ‘beta’ limitations”. They followed up just hours later with a demo site showing off how HTTP/2 might perform side by side with a HTTP/1.1 example. And yes, the big competitor CDNs are not yet offering HTTP/2 support it seems.

Their demo site initially got critized for not being realistic and for showing HTTP/2 to be way better in comparison that what a real life scenario would be more likely to look like, and it was also subsequently updated fairly quickly. It is useful to compare with the similarly designed previously existing demo sites hosted by Akamai and the Go project.

NGINX logocdn77’s offering is built on nginx’s alpha patch for HTTP/2 that was anounced just two weeks ago. I believe nginx’s full release is still planned to happen by the end of this year.

I’ve talked with cdn77’s Jakub Straka and their lead developer Honza about their HTTP/2 efforts, and since I suspect there are a few others in my audience who’re also similarly curious I’m offering this interview-style posting here, intertwined with my own comments and thoughts. It is not just a big ad for this company, but since they’re early players on this field I figure their view and comments on this are worth reading!

I’ve been in touch with more than one person who’ve expressed their surprise and awe over the fact that they’re using this early patch for nginx to run in production. So I had to ask them about that. Below, their comments are all prefixed with CDN77 and shown using italics.

nginx

CDN77: “Yes, we are running the alpha patch, which is basically a slightly modified SPDY. In the past we have been in touch with the Nginx team and exchanged tips and ideas, the same way we plan to work on the alpha patch in the future.

We’re actually pretty careful when deploying new and potentially unstable packages into production. We have separate servers for http2 and we are monitoring them 24/7 for any exceptions. We also have dedicated developers who debug any issues we are facing with these machines. We would never jeopardize the stability of our current network.

I’m not an expert on neither server-side HTTP/2 nor nginx in particular , but I think I read somewhere that the nginx HTTP/2 patch removes the SPDY support in favor of the new protocol.

CDN77: “You are right. HTTP/2 patch rewrites SPDY into the HTTP/2, so the SPDY is no longer supported after applying the patch. Since we have HTTP/2 running on separate servers, we still have SPDY support on the rest of the network.”

Did the team at cdn77 at all consider using something else than nginx for HTTP/2, like the promising newcomer h2o?

CDN77: “Not at all. Nginx is a clear choice for us. Its architecture and modularity is awesome. It is also very reliable and it has a pretty long history.

On scale

Can you share some of the biggest hurdles you had to overcome to deploy HTTP/2 on this scale with nginx?

CDN77: “Since nobody has tried the patch in such a scale ever before, we had to make sure it will hold even under pressure and needed to create a load heavy testing environment. We used servers from our partner company 10gbps.io and their 10G uplinks to create intensive ghost traffic. Also, it was important to make sure that supporting tools and applications are HTTP/2 ready – not all of them were. We needed to adjust the way we monitor and control servers in few cases.

There are a few bugs in Nginx that appear mainly in association with the longer-lived connections. They cause issues with the application layer and consume more resources. To be able to accommodate HTTP/2 and still keep necessary network redundancies, we needed to upgrade our network significantly.

I read this as an indication that the nginx patch isn’t perfected just yet rather than signifying that http2 is special. Perhaps also that http2 connections might use a larger footprint in nginx than good old http1 connections do.

Jakub mentioned they see average data bandwidth savings in the order of 20 to 60 percent depending on sites and contents with the switch to h2, but their traffic amounts haven’t been that large yet:

CDN77: “So far, only a fraction of the traffic is running via HTTP/2, but that is understandable since we launched the support few days ago. On the first day, only about 0.45% of the traffic was HTTP/2 and a big part of this was our own demo site. Over the weekend, we saw impressive adoption rate and the total HTTP/2 traffic accounts for more than 0.8% now, all that with the portion of our own traffic in this dropping dramatically. We expect to be pushing around 1.2% – 1.5% of total traffic over HTTP/2 till the end of this week.

Understandably, it is ramping up. Still, Firefox telemetry is showing at least 10% of the total traffic over HTTP/2 already.

Future of HTTPS and HTTP/2?

Whttp2 logohile I’m talking to a CDN operator, I figured I should poll their view on HTTPS going forward! Will the fact that all browsers only support h2 over HTTPS push more of your customers and your traffic in general over to HTTP, you think?

CDN77: “This is not easy to predict. There is encryption overhead, but HTTP/2 comes with header compression and it is binary. So at this single point, the advantages and disadvantages zero out. Also, the use of HTTPS is rising rapidly even on the older protocol, so we don’t consider this an issue at all.

In general, from a CDN perspective and as someone who just deployed this on a fairly large scale, what’s your general perception of what http2 means going forward?

CDN77: “We believe that this is a huge step forward in how we distribute content online and as a CDN company, we are especially excited as it concerns the very core of our business. From the new features, we have great expectations about cache invalidation that is being discussed right now.

Thanks to Jakub, Honza and Tomáš of cdn77 for providing answers and info. We live in exciting times.

Categorieën: Mozilla-nl planet

Air Mozilla: "JavaScript of the Future: Asynchronous functions in ES7" Presented by Mariusz Kierski

Mozilla planet - do, 27/08/2015 - 22:30

 Asynchronous functions in ES7" Presented by Mariusz Kierski Mariusz Kierski - JavaScript of the future: Asynchronous functions in ES7

Categorieën: Mozilla-nl planet

Air Mozilla: "It's All About That Automation!" Presented by Koki Yoshida

Mozilla planet - do, 27/08/2015 - 22:30

"It's All About That Automation!" Presented by Koki Yoshida Koki Yoshida - It's all about that automation!

Categorieën: Mozilla-nl planet

Air Mozilla: "Building vs. Shipping Software" Presented by Karim Benhmida

Mozilla planet - do, 27/08/2015 - 22:30

"Building vs. Shipping Software" Presented by Karim Benhmida Karim Benhmida - Building vs shipping software

Categorieën: Mozilla-nl planet

Air Mozilla: "Life is Hard" Presented by Jonathan Almeida

Mozilla planet - do, 27/08/2015 - 22:30

"Life is Hard" Presented by Jonathan Almeida Jonathan Almeida - Life is Hard

Categorieën: Mozilla-nl planet

Air Mozilla: "Saving the World from Bad Experience" Presented by Jatin Chhikara

Mozilla planet - do, 27/08/2015 - 22:30

"Saving the World from Bad Experience" Presented by Jatin Chhikara Jatin Chhikara - Saving the world from bad experience

Categorieën: Mozilla-nl planet

Air Mozilla: Intern Presentations

Mozilla planet - do, 27/08/2015 - 22:30

Intern Presentations Bernardo Rittmeyer Jatin Chhikara Steven Englehardt Gabriel Luong Karim Benhmida Eduoard Oger Jonathan Almeida Huon Wilson Mariusz Kierski Koki Yoshida

Categorieën: Mozilla-nl planet

Air Mozilla: "SIMD in Rust" Presented by Huon Wilson

Mozilla planet - do, 27/08/2015 - 22:30

"SIMD in Rust" Presented by Huon Wilson Huon Wilson - SIMD in Rust

Categorieën: Mozilla-nl planet

Air Mozilla: "I Promise CATs" Presented by Gabriel Luong

Mozilla planet - do, 27/08/2015 - 22:30

"I Promise CATs" Presented by Gabriel Luong Gabriel Luong - I Promise CATs!

Categorieën: Mozilla-nl planet

Air Mozilla: "Revamping the Sync Experience" Presented by Edouard Oger

Mozilla planet - do, 27/08/2015 - 22:30

"Revamping the Sync Experience" Presented by Edouard Oger Edouard Oger - Revamping the Sync Experience

Categorieën: Mozilla-nl planet

Air Mozilla: "Firefox Helps You Log In" Presented by Bernardo Rittmeyer

Mozilla planet - do, 27/08/2015 - 22:30

"Firefox Helps You Log In" Presented by Bernardo Rittmeyer Firefox Helps You Log In: Seamless password management for your daily browsing.

Categorieën: Mozilla-nl planet

Mozilla WebDev Community: Beer and Tell – August 2015

Mozilla planet - do, 27/08/2015 - 22:21

Once a month, web developers from across the Mozilla Project get together to spend an hour of overtime to honor our white-collar brethren at Amazon. As we watch our productivity fall, we find time to talk about our side projects and drink, an occurrence we like to call “Beer and Tell”.

There’s a wiki page available with a list of the presenters, as well as links to their presentation materials. There’s also a recording available courtesy of Air Mozilla.

openjck: Discord

openjck was up first and shared Discord, a Github webhook that scans pull requests for CSS compatibility issues. When it finds an issue, it leaves a comment on the offending line with a short description and which browsers are affected. The check is powered by doiuse, and projects can add a .doiuse file (using browserslist syntax) that specifies which browser versions they want to be tested against. Discord currently checks CSS and [Stylus][] files.

The MDN team is looking for sites to test Discord out. Work on the site is currently suspended (which is why it’s a side project, openjck and friends won’t stop working on it) so that feedback can be gathered to determine where the site should go next. If you’re interested in trying out Discord, let groovecoder know!

peterbe: Activity and Fanout.io

Next up was peterbe, with an update to Activity. The site now uses Fanout.io and a message queue to improve how activity items are fetched from GitHub and other sources. The site queues up jobs to fetch data from the Github API, and as the jobs complete, they send their results to Fanout. Fanout’s JavaScript library maintains an open WebSocket with their service, and when Fanout receives the data from the completed jobs, it notifies the client of the new data, which gets written to localStorage and updates the React state. This allows Activity to remain structured as an offline-ready application while still receiving seamless updates if the user has an internet connection.

There’s a donation jar near the exit; for just $25 you can pay for an hour of time for an Amazon engineer to spend with their family. Checks may be made payable to No Questions Asked Laundry, LLC.

If you’re interested in attending the next Beer and Tell, sign up for the dev-webdev@lists.mozilla.org mailing list. An email is sent out a week beforehand with connection details. You could even add yourself to the wiki and show off your side-project!

See you next month!

Categorieën: Mozilla-nl planet

Pagina's