See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
#/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
This is a list of technical concepts that a good Front-End Developer would know | |
* Language Basics | |
* syntax | |
* types (what JavaScript's basic types are; how to check if a value is a particular type) | |
* equality (the concept of truthy/falsy; the difference between `==` and `===`) | |
* objects and arrays (when to use one over the other) | |
* Debugging effectively with developer tools | |
* Breakpoints | |
* Profiling |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
var Dialog = React.createClass({ | |
render: function() { | |
// 1) render nothing, this way the DOM diff will never try to do | |
// anything to it again, and we get a node to mess with | |
return React.DOM.div(); | |
}, | |
componentDidMount: function() { | |
// 2) do DOM lib stuff | |
this.node = this.getDOMNode(); |
Ext.data.writer.Json => overrides4.2.js | |
XERO.Application => XERO\app\Application.js | |
Ext.util.Router => XERO\app\Router.js | |
Ext.Router => XERO\app\Router.js | |
XERO.widget.Menu => XERO\base\Menu.js | |
Ext.ButtonManager => XERO\button\Button.js | |
Ext.Buttons => XERO\button\Button.js | |
Ext.button.Button => XERO\button\Button.js | |
XERO.column => XERO\column\DemoColumns.js | |
XERO.combo.settings.AddressFinder => XERO\combo\AddressFinder.js |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Note: Up to date version now at https://github.com/lukehoban/es6features
ECMAScript 6 is the upcoming version of the ECMAScript standard. This standard is targetting ratifcation in December 2014. ES6 is a significant update to the language, and the first update to the language since ES5 was standardized in 2009. Implementation of these features in major JavaScript engines is underway now.
See the draft ES6 standard for full specification of the ECMAScript 6 language.
ES6 includes the following new features: