Skip to content

Instantly share code, notes, and snippets.

View JackLaBarba's full-sized avatar

Jack LaBarba JackLaBarba

  • Pittsburgh, PA
View GitHub Profile
@JackLaBarba
JackLaBarba / google-small-changes.md
Created November 16, 2022 16:07
Google SWE book - Write Small Changes

Write Small Changes

Probably the most important practice to keep the code review process nimble is to keep changes small. A code review should ideally be easy to digest and focus on a single issue, both for the reviewer and the author. Google’s code review process discourages massive changes consisting of fully formed projects, and reviewers can rightfully reject such changes as being too large for a single review. Smaller changes also prevent engineers from wasting time waiting for reviews on larger changes, reducing downtime. These small changes have benefits further down in the software development process as well. It is far easier to determine the source of a bug within a change if that particular change is small enough to narrow it down.

That said, it’s important to acknowledge that a code review process that relies on small changes is sometimes difficult to reconcile with the introduction of major new features. A set of small, incremental code changes can be easier to digest individually, but more

import Ember from 'ember';
export default Ember.Component.extend({
people: ['donatello', 'michelangelo']
});
@JackLaBarba
JackLaBarba / gist:c1b3ad311340021b461f
Created April 23, 2015 22:55
Ember.$ + pushPayload
fetchImages: function() {
var modelURL = this.store.adapterFor('collection-item').buildURL('collection-item', this.get('id'));
var promise = new Ember.RSVP.Promise((resolve, reject) => {
Ember.$.post(`${modelURL}/scrape_images`).then((payload) => {
Ember.run(() => this.store.pushPayload('collection-item', payload));
resolve(this);
}, reject);
});
return this.isLoadingWhile(promise);
},
diff --git a/.gitignore b/.gitignore
index 1b6af0b..d615ede 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,4 +20,3 @@ spec/fixtures/*.yml
config/database.yml
.DS_Store
*.swp
-test/fixtures/
diff --git a/config/routes.rb b/config/routes.rb