Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am ianderse on github.
* I am ianderse (https://keybase.io/ianderse) on keybase.
* I have a public key ASCUQZOfMpUaKh6__OOOyrost8yrGhpBg_XWLtiki8U-HQo
To claim this, I am signing this object:
@ianderse
ianderse / gist:24f52d44c09c69274569
Created June 19, 2015 17:27
Ember Coffeescript Failing Test
`import Ember from 'ember'`
`import { module, test } from 'qunit'`
`import startApp from '../helpers/start-app'`
application = null
module 'Acceptance: Find',
beforeEach: ->
application = startApp()
###
@ianderse
ianderse / gist:72a01ec2895bfede748f
Created December 4, 2014 04:28
stupid controller stupid tests
require 'rails_helper'
RSpec.describe Api::V1::FacilitiesController, :type => :controller do
describe "GET index" do
before do
5.times do
Facility.create(name1: Faker::Company.name, phone: Faker::PhoneNumber.phone_number, location_state: 'CO', location_zip: Faker::Address.zip, location_city: Faker::Address.city, location_street1: Faker::Address.street_address, services_text1: Faker::Lorem.sentence, services_text2: Faker::Lorem.sentence, services_text3: Faker::Lorem.sentence)
end
end
@ianderse
ianderse / gist:096869707c167f535f71
Last active August 29, 2015 14:08
Lightning Talk Initial Outline 10/31/14
Start of presentation: http://app.emaze.com/user/ianderse-15a37d05-4cb2-419d-96fe-a5f5ecf90b52
- Mindfulness and Programming
- "The Stress Of Being A Computer Programmer Is Literally Driving Many Of Them Crazy" - Business Insider
- A bit sensationalist, but makes a good point: stress and inability to self-regulate and manage your emotional states can drive you crazy. This isn't unique to programmers, but
"1. Stress causes depression.
2. Perfectionists are more prone to depression.
3. Isolation reinforces depression.
As a software developer, those frequently go along with the job description.” - Timothy King
1. Why do we refactor?
- We refactor to both clean up our code and make it more readable, as well as making it more modular (resiliant to change).
2. What's the difference between "refactoring" and "changing shit"?
- Refactoring has a specific goal.
3. What role do patterns play in refactoring?
- There are certain observable patterns that can clue us in to places that may need refactoring and particular ways to do this.
4. Why do some refactoring patterns seem to be opposites?
- Because there are different patterns and refactoring methods for different situations. One may be better than the other.
5. Does refactoring always make code better?
- As long as it is done in a consistent and intentional manner.