martes, 13 de diciembre de 2016

Front-end performance improvements

Defer loading of javascript

This code should be placed in your HTML just before the </body> tag (near the bottom of your HTML file). I highlighted the name of the external JS file.
<script type="text/javascript">
 function downloadJSAtOnload() {
  var element = document.createElement("script");
  element.src = "defer.js";
  document.body.appendChild(element);
 }
 if (window.addEventListener)
  window.addEventListener("load", downloadJSAtOnload, false);
 else if (window.attachEvent)
  window.attachEvent("onload", downloadJSAtOnload);
 else window.onload = downloadJSAtOnload;
</script>
Reference: https://varvy.com/pagespeed/defer-loading-javascript.html

Loading Javascript Asynchronously

Async allows the script to be downloaded in the background without blocking. Then, the moment it finishes downloading, rendering is blocked and that script executes. Render resumes when the script has executed.
<script async src="foobar.js"></script>
Reference: https://www.keycdn.com/blog/blocking-the-dom/

XHR Eval

In this technique, an XMLHttpRequest (XHR) retrieves the JavaScript from the server. When the response is complete, the content is executed using the eval command.
var xhrObj = getXHRObject();
xhrObj.onreadystatechange =
    function() {
        if ( xhrObj.readyState == 4 && 200 == xhrObj.status ) {
            eval(xhrObj.responseText);
        }
    };
xhrObj.open('GET', 'A.js', true); // must be same domain as main page
xhrObj.send('');

function getXHRObject() {
    var xhrObj = false;
    try {
        xhrObj = new XMLHttpRequest();
    }
    catch(e){
        var progid = ['MSXML2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0',
'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP'];
        for ( var i=0; i < progid.length; ++i ) {
            try {
                xhrObj = new ActiveXObject(progid[i]);
            }
            catch(e) {
                continue;
            }
            break;
        }
    }
    finally {
        return xhrObj;
    }
}

XHR Injection

Like XHR Eval, the XHR Injection technique uses an XMLHttpRequest to retrieve the JavaScript. But instead of using eval, the JavaScript is executed by creating a script DOM element and injecting the XMLHttpRequest response into the script.
var xhrObj = getXHRObject(); // defined in the previous example
xhrObj.onreadystatechange =
    function() {
        if ( xhrObj.readyState == 4 ) {
            var scriptElem = document.createElement('script');
            document.getElementsByTagName('head')[0].appendChild(scriptElem);
            scriptElem.text = xhrObj.responseText;
        }
    };
xhrObj.open('GET', 'A.js', true); // must be same domain as main page
xhrObj.send('');
Reference: https://www.safaribooksonline.com/library/view/even-faster-web/9780596803773/ch04.html

Script in Iframe

Iframes are loaded in parallel with other components in the main page. Whereas iframes are typically used to include one HTML page within another, the Script in Iframe technique leverages them to load JavaScript without blocking.

Non-Render Blocking CSS

If you are going for completely non-render blocking CSS then you really only have one good option, and that is to inline your CSS.

Other references


  1. Render blocking javascripts
    https://varvy.com/pagespeed/render-blocking.html
  2. Perceived Web Performance – What is Blocking the DOM?
    https://www.keycdn.com/blog/blocking-the-dom/



martes, 29 de noviembre de 2016

Story "dragging"

Problem
A feature isn't necessarily implemented 100% in one sprint (e.g. because it's still in QA and thus, not yet "done"). So if e.g. 90% of the work for one feature has been done in one sprint, it is not reflected in the burndown chart, since the respective feature is still not set to "done".
Discussion
Stories "dragging" through means they are too large for a single sprint, and should be decomposed further. Counting partial points, or re-estimating afterwards would only hide that issue, hurting the team long term.

So if your team targets 40 points each sprint, and the 8 point story is NOT completed this sprint, the team only delivers 32 points. But next sprint this large story will be completed quickly, allowing the team to actually meet their 40 point commitment, AND pull another story into the sprint delivering ~48 points. The average of the two sprints is still 40, and the velocity remains true.

References

Velocity


Velocity is measure of long term planning .

A classic example is this- suppose a team averages 85 points a game so far this season (lets say 10 games played). It is safe to say they will average 85 points over the next 5 games, but NOT safe to say they will score exactly 85 points next game. They could score 70, 100, or anything else.

jueves, 24 de noviembre de 2016

Column constraints

Setting Column Constraints


Setting constraints on each workflow state is a crucial part of Kanban (although you can use it in sprint board too), so that you can ensure that work is continually flowing through the pipeline. You may also find it handy in Scrum, so that you can see bottlenecks early, and adjust the scope of your sprint.

Constraints trigger a visual indicator when a maximum or minimum number of issues appear in a column. You can specify constraints for all columns, or just some of them. If a column constraint is exceeded, then the column will change color, as follows:
  • Column colored red — Maximum number of issues exceeded
  • Column colored yellow — Minimum number of issues not met
Please note:
  • The values of the column constraints will appear at the top of each column you set them for. These values don't have any impact on the number of issues displayed in the columns.
  • Column constraints apply to the total number of issues in a column, regardless of whether issues are hidden by a Quick Filter.

miércoles, 23 de noviembre de 2016

Hooks

A hook is a PHP function that is named foo_bar(), where "foo" is the name of the module (whose filename is thus foo.module) and "bar" is the name of the hook. Each hookhas a defined set of parameters and a specified result type. To extend Drupal, a module need simply implement a hook.


Jira quickref


Managing issue type schemes

  1. Choose > Issues. 
  2. Select Issue Types > Issue Type Schemes to open the Issue Type Schemes page, which displays all existing issue type schemes, their related issue types and their associated projects.

Flagging an issue


You can flag an issue to indicate that it's important. The card of a flagged issue is displayed in yellow in the Scrum backlog, Active sprints of a Scrum board, Kanban backlog (if enabled), and Kanban board, with the 'flag' icon replacing the priority icon.


You can later get only flagged cards using JQL. Because the flag for an issue is stored in a custom checkbox field named "Flagged" with only one value: Impediment, you can find flagged issues: Flagged = Impediment.

How do I move issues from one board to another

You don't.
Boards are views of lists of issues, they don't hold any issues really. To "move" an issue, you change the boards. You should create your new board, and make sure it includes the issues you want to "move". Then go to the existing board, and change the filter so it no longer includes the issues.

References

Metatag

The Metatag module allows you to automatically provide structured metadata, aka "meta tags", about a website. In the context of search engine optimization, when people refer to meta tags they are usually referring to the meta description tag and the meta keywords tag that may help improve the rankings and display of a site in search engine results. In addition, the module provides support for meta tags (Open Graph Protocol from Facebook, Twitter Cards from Twitter) that allow control of how content appears when shared on social networks.

References