Skip to content

Instantly share code, notes, and snippets.

View addamh's full-sized avatar

Addam Hardy addamh

View GitHub Profile

Keybase proof

I hereby claim:

  • I am addamh on github.
  • I am addamh (https://keybase.io/addamh) on keybase.
  • I have a public key whose fingerprint is 5864 BB19 7BE9 6165 6EBA 2E85 117B 95DE E2A6 1EDF

To claim this, I am signing this object:

@addamh
addamh / styles.rb
Created February 7, 2014 03:14
style call
def styles
vins = params[:vins].split(',')
@style_packages = {}
vins.each do |v|
response = Rails.cache.fetch("edmunds/#{squish_vin(v)}/styles", :expires_in => 2.seconds) do
begin
tries ||= 3
squish_package = Edmunds::SquishVin.new.squish_vin(squish_vin(v))
squish_package["years"].first["styles"]
rescue RestClient::Forbidden => e
2014-01-22 02:21:25.094 ppd[31125:70b] -[PPDDealership copyWithZone:]: unrecognized selector sent to instance 0x1d773670
int distance = 10;
int numberOfTiles = 2;
int[] length = {1, 5};
int[] cost = {1, 4};
int cheapest = cheapest(distance, numberOfTiles, length, cost);
@addamh
addamh / gist:7095679
Last active December 26, 2015 04:48
revunit ios posting
We are looking for a passionate and agile minded Senior iOS Developer. An engineer who is interested in every aspect of the iOS SDK and excited by the darkest corners of the Objective-C API. From the nitty-gritty of choosing which accuracy level within CoreLocation fits a specific need to ensuring compliance with the iOS HIG, we’re looking for someone who can understand our clients’ business problems and have the technical chops to ensure that the iOS implementation solves them. Many of our projects are pushing the boundaries of the device capabilities, so a strong understanding of low level factors like impact to battery life and networking performance is critical..
Requirements:
• 4+ years experience in iOS development or the ability to show us you have the skills regardless of how long you’ve been working professionally.
• Deep understanding of Objective-C and the iOS SDK. You can fact check NSHipster posts and you know what the Friday Q&A is.
• Have deployed multiple apps to the AppStore.
• Experience
@addamh
addamh / gist:7088839
Created October 21, 2013 18:46
car.json
{
"styles": [
{
"id": 101353967,
"name": "4dr SUV (3.5L 6cyl 6A)",
"make": {
"id": 200001623,
"name": "Lexus",
"niceName": "lexus"
},
import java.io.*;
import java.util.*;
public class Main {
private static int global_assignments;
static private void printArray(int[] array)
{
for (int i = 0; i < array.length; i++) {
System.out.print(array[i] + " ");
Logout
My Submissions
Back to Algorithms HW1
Quicker Sort
As good algorithms students, you are aware that in the average case, quicksort runs in O(n*lg(n)) time, and insertion sort runs in O(n^2) time.
@addamh
addamh / addam-hardy.pub
Created October 10, 2013 05:10
My PGP public key for addam.hardy (at) gmail.com
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
mQINBFJWNjEBEAC2uIY0aPe3rO7Mq/OXMYf7/YVD1ZiIpk7RSsxXzuulDXcK7xpY
FmOaUC44hLXBkiu1y01yhVQYkdTmRDt2Pr5PtmMoFKfXlC+8LhVIp+ka58DMZ+4f
7sMxoA/d+Io7CffyWhkmXrrXu+kX/q0OO0cT4ZvxN+WFEs2AIBffW/ewhcPI6/ER
GNeY8ELcT6MhCQvh6tjvr0mbGEtGY0RWRg8+DDfBl90xY9PrgfkB1udPpCS+WyHa
N4FkoVlidpe4hIyKLF3GZmbAMmRcTuZcDTw6faLpii/euqduxs1XagQanYefLlDq
whFQgApJLwVPiId1DKj8ElUHGcVf96uV9Si+iW/Jg2TU0vz7g1Fjm5VLByk5sN8I
XCBFcYB6myvATdmePHVDeTN+TUyQKQwCkZHvLm1K4xq1ZyorrnCrFkKmoEQ904fD
The Ten Commandments of Egoless Programming
1. Understand and accept that you will make mistakes.
The point is to find them early, before they make it into production. Fortunately, except for the few of us developing rocket guidance software at JPL, mistakes are rarely fatal in our industry. We can, and should, learn, laugh, and move on.
2. You are not your code.
Remember that the entire point of a review is to find problems, and problems will be found. Don’t take it personally when one is uncovered. (Allspaw note – related: see below, number #10, and the points Theo made above.)