Skip to content

Instantly share code, notes, and snippets.

@iamvery
iamvery / widget.rb
Last active December 26, 2015 11:49
An idea of how to affectively create a single class with a "duck type" based on the given `kind`. Without much work, this could be extended to apply to an ActiveRecord model, for example. You'd probably want to use `after_initialize` rather than overriding the AR model's `initialize` method.
module First
def do_something
puts 'doing something first'
end
end
module Last
def do_something
puts 'doing something last'
end
master ● » hitch one two
What is the group email? e.g. dev@hashrocket.com will become dev+therubymug+leshill@hashrocket.com
test@example.com
First Person and Second Person <test+one+two@example.com>
master ● » hitch
First Person and Second Person <dGVzdEBleGFtcGxlLmNvbQ==+one+two@dGVzdEBleGFtcGxlLmNvbQ==>
master ● » more .hitchrc
---
:current_pair:
- one
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rspec' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/usr/local/bin/tmux -S /var/tmux/pairing attach" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5h3yGI6PFe1dMga9Yyf5AMAzH3TjrqCbgR7iX7gLOX49oARw/GTmnuteTjv5l+9D7Lqona/4uNreIer+4qyYSyukEdaKE0qNA2ZFMU7uxivjR9/ffiaAyT/+piouE3ybERcdN80Y55+/UuQ6G1Vcs5JnrUc3jg/1l6TyJKoC61ybNb5cuIocRfAkCyZ5iRR6FZPJvm9aah97Md6SbDdxqcKg8Eo0isv/HcDyylIAyOO49LM5n+PuuG8KBoIdllALFoD5a30cx9dTeV/pfQDRbrXOl1geXDhkR90uMLFAHI0TDFKw0DmTVxPybYnPw3IC4fLAnvqUSZoedyl5rvgmZ https://github.com/iamvery
no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/usr/local/bin/tmux -S /var/tmux/pairing attach" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8ailyNHzGBRylfz4EfRFGve1dEz1/NTptFzQphjQUkmFpAHrnu8CqxE/Fxh3YJ1yYa4gqScTMujjuCQnLC6kCuPnqhGFRQSzi26enNT1jSVMs7xH+fjIORi4wJRqa/YfOM/FyIAf1j/biNjCdyHH2hoJpdBR12Y8TcgwoWNGBhLjFfW0kuM+uWvGxZT2fsgUaOav/BxiEaZG0SVIa4/gnm6PN60isTdI0UEvbUYXN3c6BxsNhrVt6G3bnD+ZbyAXx0+yYNAGUQmeiZvMzh69FoooouYOKH9/RPNYLzXIw6lA+iTuVnLHZcGhvV4U0LtAMX/m3/RfGgXx9XdAmEFOv https

How do solo developers practice code review?

Thanks for the question, Danny! I can't answer this from experience, but I have some ideas:

1. Ask a friend

This was your idea, and it's a good one. The only problem is you're going to have to have some good friends to jump into this for you, but you'll both be better for it :).

2. Pair programming

describe 'time' do
it 'fails here' do
time1 = Time.now
sleep(0.1)
time2 = Time.now
expect(time1).to be_within(0.1).of(time2)
end
it 'passes here' do
time1 = Time.now
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,
» bin/rake routes
Prefix Verb URI Pattern Controller#Action
api_articles GET /api/articles(.:format) api/v1/articles#index
POST /api/articles(.:format) api/v1/articles#create
new_api_article GET /api/articles/new(.:format) api/v1/articles#new
edit_api_article GET /api/articles/:id/edit(.:format) api/v1/articles#edit
api_article GET /api/articles/:id(.:format) api/v1/articles#show
PATCH /api/articles/:id(.:format) api/v1/articles#update
PUT /api/articles/:id(.:format) api/v1/articles#update
DELETE /api/articles/:id(.:format) api/v1/articles#destroy
module Api
module V1
class ArticlesController < ApplicationController
def index
articles = [
{ id: 1, name: 'The Things' },
]
render json: articles
end
end

Farticles API

This is an example of a versioned Rails API using HTTP "accept" headers rather than including the version in resource URIs.

Getting started

Requirements