Skip to content

Instantly share code, notes, and snippets.

View jkthorne's full-sized avatar
💭
caffeinated

Jack jkthorne

💭
caffeinated
View GitHub Profile
<strong>The Problem</strong>
I recently have come across and interesting problem with an inadequate solution. This a project which has gone through converting the names on there domain objects but has maintain there Types. An object called Foo would previously be called foo but now has a name of bar. Along with this rename there was an external reference that had to be changes to represent the same object we will call this an external_id. This exteranl_id was added but pointed to existing domain concepts.
<code># pre rename
foo = Foo.new
foo.name #=&gt; "foo"
foo.id #=&gt; 1
# post rename
foo = Foo.new
Foo.name #=&gt; "bar"
@jkthorne
jkthorne / gist:9698128
Last active August 29, 2015 13:57
loading env profiling
$ b rake environment -rprofile
% cumulative self self total
time seconds seconds calls ms/call ms/call name
15.89 60.57 60.57 315688 0.19 3.89 Array#each
8.37 92.47 31.90 84833 0.38 1.42 Array#map
5.81 114.61 22.14 80449 0.28 0.42 Array#include?
4.05 130.04 15.43 142598 0.11 0.15 Rack::Mount::StrexpParser#next_token
3.76 144.39 14.35 4831 2.97 61.49 Kernel.require_without_backports
3.35 157.17 12.78 96939 0.13 0.21 Regin::Parser#_next_token
2.95 168.43 11.26 3159192 0.00 0.00 Symbol#to_s
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
8 processes for 121 tests, ~ 15 tests per process
Run options: --seed 45915
# Running tests:
Run options: --seed 39899
# Running tests:
Run options: --seed 12033
@jkthorne
jkthorne / gist:5760191
Created June 11, 2013 20:11
rbx-2.0.0-rc1 build log
This file has been truncated, but you can view the full file.
/var/folders/4h/k23w0qd55dbcvf1f93v7b1jc0000gn/T/ruby-build.20130611160505.11966 ~
HTTP/1.0 200 OK
Content-Type: binary/octet-stream
Content-Length: 471759
Connection: keep-alive
Date: Fri, 08 Feb 2013 17:33:11 GMT
Last-Modified: Wed, 12 Dec 2012 18:53:11 GMT
ETag: "36c852831d02cf90508c29852361d01b"
Accept-Ranges: bytes
Server: AmazonS3
8 processes for 222 tests, ~ 27 tests per process
Run options: --seed 55779
# Running tests:
Run options: --seed 88
# Running tests:
Run options: --seed 32480