Skip to content

Instantly share code, notes, and snippets.

View markmcspadden's full-sized avatar

Mark McSpadden markmcspadden

View GitHub Profile

I'm writing in response to events that have recently come to light involving a sexual assault at a tech conference. Background information can be found [here][1], [here][2], and [here][3] as well as on twitter and google.


I've been watching this from the sidelines, and I've been wrestling with several questions that I can't seem to shake and that I really don't have answers to.

I wear many hats, both in the tech community and others. I'm a coder, a speaker, a user group organizer, a conference organizer, and even a boss. Each of those roles colors how I see this, but there's one role that is overpowering in my reaction.

See, I'm a Dad. A dad of two beautiful and innocent girls who are 3 and 2. They have their whole lives in front of them and so the questions I'm struggling with are:

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Jacquie Graves on Twitter" />
<Content type="html">
<![CDATA[
<a class="twitter-timeline" data-dnt="true" href="https://twitter.com/pinkgraves" data-widget-id="370740124075585537">Tweets by @pinkgraves</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
]]>
</Content>
</Module>
@markmcspadden
markmcspadden / best_worst_2012.rb
Created December 4, 2012 23:59
My Best and Worst of 2012
# Best/Worst 2012
# WORST
# Recreated as best as I can remember it
class ResourcesController < ApiController
# GET /api/:resource_type
# GET /api/opportunities
# GET /api/offer_performance_objects?query=opportunity_id%3dAF12JFHVN291
@markmcspadden
markmcspadden / hash_transform_keys_benchmarks.rb
Created May 10, 2012 22:02
Benchmarking different ways to transform keys. Run on 100,000 key hash.
class Hash
# Proposed solution
def transform_keys
result = {}
keys.each do |key|
result[yield(key)] = self[key]
end
result
end
def transform_keys!
@markmcspadden
markmcspadden / poly_sti.rb
Created March 23, 2012 21:51
What Rails does with STI classes when using Polymorphic associations
Loading development environment (Rails 3.2.2)
1.9.3p0 :001 > car = Car.new()
=> #<Car id: nil, name: nil, borrowable_id: nil, borrowable_type: nil, created_at: nil, updated_at: nil>
1.9.3p0 :002 > student = Student.new
=> #<Student id: nil, name: nil, type: "Student", created_at: nil, updated_at: nil>
1.9.3p0 :003 > student.save
(0.3ms) begin transaction
SQL (8.8ms) INSERT INTO "staffs" ("created_at", "name", "type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 23 Mar 2012 21:37:53 UTC +00:00], ["name", nil], ["type", "Student"], ["updated_at", Fri, 23 Mar 2012 21:37:53 UTC +00:00]]
(56.4ms) commit transaction
=> true
@markmcspadden
markmcspadden / gist:1590406
Created January 10, 2012 18:33
Internal versioning and releasing
In response to:
Josh Susser - The @rubyrogues topic for tomorrow is Versioning and Release Process. Any questions or particular things you'd like to see us address?
Mark McSpadden - @joshsusser @rubyrogues The versioning/release dance between self maintained services and gems. (When you own the service and the gem.)
Josh Susser - @markmcspadden can you expand on that? I don't quite understand what you're asking. @rubyrogues
--
I've experienced several situations where there's an internal service
(usually Rails, sometimes Sinatra or Rack) that has a corresponding gem.
@markmcspadden
markmcspadden / super.rb
Created January 6, 2012 22:13
Playing around with super in module includes with itchy
class Rubyist
def check_me
puts "Rubyist"
end
end
class Chef
end
@markmcspadden
markmcspadden / 2011_best_and_worst.rb
Created December 6, 2011 17:16
My most shameful and most favorite Ruby of 2011
# Part of the Dallas Ruby "Best and Worst of 2011" showcase at the December 2011 meeting
# http://groups.google.com/group/dallasrb/browse_thread/thread/998dd95dd4677042
# Shame
@followings = current_profile.watch_events # NO LIMIT
# Fav
# Recursive Module Includes - yaml_dot_notation.rb
@markmcspadden
markmcspadden / nested_methods.rb
Created October 28, 2011 15:51
Ruby Nested Methods
# Scott and I came across some nested classes in some code we maintain.
# We then started talking about nested methods...and then started playing.
# After a couple of "Can you?" examples we asked the important "Why would you ever do this?"
# To be clear, I think nested methods are mostly evil (I think Scott agrees)
# Still, just maybe I can create a use case where using nested methods makes sense...
# The case below is something of a social manners exercise.
# Two instances call casual greeting methods (#hi) and interact in that way.
# However, when an instance calls a formal greeting method (#hello) all instances should elevate to formal methods
@markmcspadden
markmcspadden / fluidinfo-extensions.rb
Created April 8, 2011 14:19
Add a SetOfStrings class as a SERIALIZABLE_TYPE to allow a set of strings to be posted as a primitive type
module Fluidinfo
class SetOfStrings < Array; end
SERIALIZABLE_TYPES << SetOfStrings
end
# Use: strings = Fluidinfo::SetOfStrings["a", "b", "c"]