tag:paulstraw.svbtle.com,2014:/feedPaul Straw2016-09-04T01:59:50-07:00Paul Strawhttps://paulstraw.svbtle.comSvbtle.comtag:paulstraw.svbtle.com,2014:Post/crockford2016-09-04T01:59:50-07:002016-09-04T01:59:50-07:00Crockford<p><strong>If there is anything inaccurate or inequitable about the following post, please <a href="mailto:paulstraw@paulstraw.com" rel="nofollow">email me</a> or <a href="https://twitter.com/paulstraw" rel="nofollow">send me a tweet</a> to discuss it.</strong></p>
<p>When I was about 11 years old, I started getting into politics. Anyone who has met me in the last 12 years would be blown away to hear that I was initially very conservative. I’m talking “Sean Hannity and Ann Coulter book owner” conservative. However, as I got a bit older, many conversations with great, patient folks led me to rethink nearly all of my early political opinions.</p>
<p>It’s amazing how far a bit of loving explanation can go, even with the most backwards people.</p>
<p>Folks who know me now know just how central social justice concepts are to all of my work. A recurring theme of <a href="https://spec.fm/podcasts/does-not-compute" rel="nofollow">my podcast</a> is how programmers can help make development more friendly to new learners. I helped draft codes of conduct for the Spec, imgix, and slashrocket communities. <a href="https://twitter.com/paulstraw/status/735302996066607104" rel="nofollow">I publicly spoke out</a> against LambdaConf’s decision to allow Curtis Yarvin to speak there. I even <a href="https://twitter.com/paulstraw/status/761063231146164224" rel="nofollow">recently opposed</a> body shaming Donald Trump, a man I could not be more at odds with. I think about this stuff almost constantly, and do my best.</p>
<p>Yesterday, it was announced that <a href="https://twitter.com/nodevember/status/771520648191483904" rel="nofollow">Douglas Crockford was being removed as a keynote speaker at Nodevember</a>. This hit me particularly hard, as Mr. Crockford is someone I have learned a lot from over the years, and have come to deeply respect. As far as I am aware, Mr. Crockford has never been accused of anything beyond being a “grumpy old man” before this incident (a description I imagine he would happily agree with). Unfortunately, there is very little publicly-available information regarding what he did to warrant removal from this event.</p>
<p><strong>Of course, in any code of conduct response situation, there is a chance that the person who was victimized requested that the specific behavior not be made public. This is perfectly acceptable, and is something I am unable to account for in this article for obvious reasons.</strong> However, after several hours of research and listening, I have found nothing to indicate that is the case in this instance.</p>
<p>The following is an account of my findings regarding this incident. Since there is a distinct lack of information from Nodevember about this situation (even in <a href="http://nodevember.org/statement.html" rel="nofollow">their followup post</a>), my research methodology was to find links via replies to the <a href="https://twitter.com/nodevember/status/771520648191483904" rel="nofollow">original tweet</a>, and <a href="https://www.reddit.com/r/javascript/comments/50u77r/douglas_crockford_removed_as_a_keynote_speaker_at/" rel="nofollow">a Reddit thread</a> on the topic that I found by Googling “douglas crockford nodevember”. My investigation of this subject took place starting on Saturday, September 3rd at around 12:00 AM.</p>
<p>—</p>
<h2 id="how-it-started_2">How it started <a class="head_anchor" href="#how-it-started_2" rel="nofollow">#</a>
</h2>
<p>This incident appears to have started with <a href="https://twitter.com/jsdnxx/status/771476480048046080" rel="nofollow">a tweet from @jsdnxx</a>.</p>
<blockquote class="short">
<p>nice list of illustrious dude programmers. notice any omissions?</p>
</blockquote>
<p>After a bit of back-and-forth on what should be done to rectify that lack of diversity and when, Emily Rose <a href="https://twitter.com/nexxylove/status/771503406716334080" rel="nofollow">joined</a> the <a href="https://twitter.com/nexxylove/status/771503661956501504" rel="nofollow">conversation</a>, saying:</p>
<blockquote>
<p>@nodevember one way you could show you actually care about community safety & diversity is by uninviting Douglas Crockford.</p>
<p>@nodevember he has repeatedly shown himself to be actively hostile to fostering inclusivity and many will decline to speak if he is invited.</p>
</blockquote>
<p>Unfortunately, there do not appear to be any examples given of Mr. Crockford’s hostile behavior in the remainder of the thread.</p>
<h2 id="the-one-with-the-gonads_2">The one with the gonads <a class="head_anchor" href="#the-one-with-the-gonads_2" rel="nofollow">#</a>
</h2>
<p>One item that I found brought up a few times is a talk Mr. Crockford gave at Google in 2013, titled “Monads and Gonads”. Certainly, this is a bit of an inappropriate and silly title for a talk. However, it is also not explicitly gendered, as “Gonad” is a term that <a href="https://en.wikipedia.org/wiki/Gonad" rel="nofollow">refers to both testicles and ovaries</a>.</p>
<p>In order to make sure I wasn’t missing anything, I listened to the talk and Q&A session in its entirety with subtitles on (~50 minutes). Aside from learning a fair bit about monads, here were the bits I found that could potentially be considered offensive:</p>
<p>At <a href="https://youtu.be/b0EF0VTs9Dc?t=10m5s" rel="nofollow">10:05</a>, Mr. Crockford says:</p>
<blockquote class="short">
<p>… if you have the chicharrones, you can learn monads without Haskell</p>
</blockquote>
<p>I don’t speak Spanish, but this certainly sounded like a gonad reference to me at first blush. I pulled it up on <a href="https://en.wikipedia.org/wiki/Chicharr%C3%B3n" rel="nofollow">Wikipedia</a>, and apparently “chicharrones” is a pork belly/rind dish that doesn’t look particularly like any piece of reproductive anatomy I’m familiar with. It’s quite possible that either I or Mr. Crockford made some sort of mistake in the translation here; please let me know if that’s the case.</p>
<p>Slightly later at <a href="https://youtu.be/b0EF0VTs9Dc?t=11m45s" rel="nofollow">11:50</a>, Mr. Crockford says the following:</p>
<blockquote>
<p>Now there’s some who will say “No, that’s not true, you don’t dare go that way, otherwise…”, but I say, my friends, if you have the huevos, you can. So what do you say we sack up and look at some monads?</p>
</blockquote>
<p>Was this an appropriate “joke” to make in a conference talk? Certainly not.<br>
Was it even a funny joke? Literally zero percent funny.<br>
Was it exclusionary? Yup.</p>
<p>Was it made in bad faith? <u>Not as far as I can tell.</u></p>
<p>Much later in the talk, at <a href="https://youtu.be/b0EF0VTs9Dc?t=39m00s" rel="nofollow">39:00</a>, there is a final reference to testicles:</p>
<blockquote>
<p>So, that little pair of parens is really easy to overlook, but it turns out it’s really critical to understanding this. So, just leaving it hanging out there like a pair of dog balls, I don’t think is useful to the reader.</p>
</blockquote>
<p>At best, this is a strained metaphor. At worst, it’s an inappropriate, gendered comment.</p>
<p>People (especially those who grew up in different times), often don’t think about these problems in the same way younger folks do. That absolutely doesn’t excuse their behavior, but it also doesn’t mean we should discard them. Whenever possible, it’s best to use mistakes as teachable moments.</p>
<h2 id="the-one-with-the-slutshaming_2">The one with the slut-shaming <a class="head_anchor" href="#the-one-with-the-slutshaming_2" rel="nofollow">#</a>
</h2>
<p>One of the items linked several times in both the Twitter and Reddit threads is a piece by Kassandra Perch from February 2016 titled “<a href="https://medium.com/@nodebotanist/why-i-won-t-be-speaking-at-conferences-with-douglas-crockford-anymore-61bc29f028c8" rel="nofollow">Why I won’t be speaking at conferences with Douglas Crockford anymore.</a>” In their article, Mx. Perch mentions two incidents of Mr. Crockford’s “untenable behavior”.</p>
<p>The first is is a segment in the keynote he gave at the event, “in which he slut-shames the audience”. This talk is called “The Seif Project”, and Mr. Crockford has been giving it repeatedly for a while now (full disclaimer, I saw the last 15 minutes or so of this talk at O'Reilly Fluent earlier this year). Several others have also raised concerns about it on Twitter for slut-shaming:</p>
<p><a href="https://twitter.com/ag_dubs/status/666026590774673408" rel="nofollow">@ag_dubs</a>:</p>
<blockquote class="short">
<p>dat crock just slut shamed the web ?</p>
</blockquote>
<p><a href="https://twitter.com/nebrius/status/697491096926945281" rel="nofollow">@nebrius</a>:</p>
<blockquote class="short">
<p>And now Crockford very subtly slut shamed a lot people with his talk of promiscuity vs commitment #forwardjs</p>
</blockquote>
<p>The specific version of Mr. Crockford’s keynote from ForwardJS is <a href="https://www.youtube.com/watch?v=0w6tZEbrHIY" rel="nofollow">available on YouTube</a>, so I watched the entire thing with subtitles on to find the slut-shaming mentioned by the folks above.</p>
<p>At <a href="https://youtu.be/0w6tZEbrHIY?t=41m30s" rel="nofollow">41:30</a>, Mr. Crockford puts up a slide saying the following:</p>
<blockquote class="short">
<p>The Old Web: Promiscuity</p>
<p>The New Web: Commitment</p>
<p>The Internet of People</p>
</blockquote>
<p>When he switches to this slide, he says:</p>
<blockquote>
<p>… the Old Web was great because it provided promiscuity. It meant that you could go and connect to anything, and you’re probably gonna be ok. You might get shocked and embarrassed, but your machine’s not gonna get taken over, your identity’s not gonna get stolen. … And that’s good, because that allows us to get introduced to things. We used to call it “surfing”, where you could go from one thing to another, and discover stuff, and start forming relationships. Unfortunately, the same thing which allows the promiscuity to work is very bad for dealing with commitment, so that’s what the New Web is for. Now, once I’ve found my bank, I want to make sure from this point on I’m talking to my bank, and I’m not talking to anything which pretends to be my bank.</p>
</blockquote>
<p>As far as I can tell, there is no slut shaming happening here. It’s a bit of a strained metaphor, but not inaccurate or directed at human relationships. In fact, Mr. Crockford explicitly says that the “Old Web” was great <em>because</em> of its promiscuity. His point here appears to be that promiscuity as a whole tends to be at odds with commitment, and that in some cases (such as financial transactions), a “committed relationship” can be more beneficial.</p>
<p>In another segment at <a href="https://youtu.be/0w6tZEbrHIY?t=42m45s" rel="nofollow">42:45</a>, Mr. Crockford mentions committed relationships again:</p>
<blockquote>
<p>Because we’re now connecting things forming relationships, this should work better for connecting people as well. Right now, we have to do all sorts of terrible things, but we can do safer things now, we can have committed relationships between people as well as between companies.</p>
</blockquote>
<p>Again, as far as I’m able to tell, this is not a condemnation of any type of relationship, but rather pointing out that different types of relationships can serve different needs. “Promiscuous” is <a href="https://en.wikipedia.org/wiki/Promiscuous_mode" rel="nofollow">an industry-standard term</a> used in networking, and does not have negative connotations in that context. This reminds me a lot of “master/slave” terminology discussion. Should we improve the words we use to discuss concepts? Always. Is it productive or helpful to shout people down instead of educate them? Rarely.</p>
<p>The second incident Mx. Perch mentions in their article is a discussion with Mr. Crockford about TXJS 2011, where Mr. Crockford said “the talks as the day went on just got stupider and stupider”. As it turns out, Mr. Crockford has <a href="https://plus.google.com/+DouglasCrockfordEsq/posts/9WQ5t2xpVE3" rel="nofollow">publicly clarified</a> this quote himself:</p>
<blockquote>
<p>In 2011 I spoke at TXJS in at the Alamo Drafthouse in Austin. They started serving alcohol in the morning, and people were drinking all day long. As the day went on, the talks got stupider and stupider.</p>
<p>I don’t recommend serving alcohol during conferences.</p>
</blockquote><h2 id="the-one-where-i-finally-finish-this-post_2">The one where I finally finish this post <a class="head_anchor" href="#the-one-where-i-finally-finish-this-post_2" rel="nofollow">#</a>
</h2>
<p>After doing all my research, I was left a bit baffled. There still seemed to be a distinct lack of information about what had actually happened here. I decided that it would make sense to contact Mr. Crockford directly and see if he had anything to say. To that end, I sent him <a href="https://svbtleusercontent.com/jrvpigrsbxtqw.jpg" rel="nofollow">the following message</a>:</p>
<blockquote>
<p>Hey Mr. Crockford,</p>
<p>I’m currently researching an article regarding the recent Nodevember incident, mentioned here: <a href="https://twitter.com/nodevember/status/771520648191483904" rel="nofollow">https://twitter.com/nodevember/status/771520648191483904</a>. Since there is an unfortunate lack of concrete information available on the subject, I was hoping you might be willing to provide me some details around what happened from your point of view.</p>
<p>Of course, I also understand if you can’t or don’t want to discuss this particular issue.</p>
<p>Sincerely,<br>
-paul</p>
</blockquote>
<p>A couple hours later, I received this response:</p>
<blockquote class="short">
<p>It is a mystery to me too.</p>
</blockquote>tag:paulstraw.svbtle.com,2014:Post/bathroom-bill2016-05-13T15:55:31-07:002016-05-13T15:55:31-07:00Bathroom Bill<blockquote class="short">
<p>Who the fuck is Bathroom Bill and how do we make him go away</p>
</blockquote>
<p>— <a href="https://twitter.com/abolishentropy/status/730438511157862405" rel="nofollow">@abolishentropy</a></p>
<p>As a ten-year-old, I had everything figured out. I knew more about any given topic than anyone else, including professionals who had been performing their job for years. Just like every other ten-year-old, I also knew a lot more about life than my parents.</p>
<p>“Well if I don’t get my way, I’ll just stand here in my doorway until you agree with me!” I yelled at my mother. “I’ll stand here all night, if I have to!”</p>
<p>She, of course, walked into another room, while I stood there.</p>
<p>And stood.</p>
<p>…and stood.</p>
<p>It was pretty boring, but I was making a point, right? Really holding the moral high ground in an argument I no longer recall. Sticking to my guns. Look at what an upstanding person I was! Such backbone, wow.</p>
<blockquote>
<p>… if schools don’t knuckle down to force girls showering with boys and force 8-year-old girls to have to endure boys coming into their bathroom, [Barack Obama is] taking money from the poorest of the poor.</p>
</blockquote>
<p>— <a href="http://www.houstonpublicmedia.org/articles/news/politics/2016/05/13/150313/official-texas-will-forego-federal-funds-over-lgbt-policy/" rel="nofollow">Texas Lt. Gov. Dan Patrick</a> on turning down federal money in order to prevent transgender students from using the bathroom of the gender they identify with.</p>
<p>As an adult, I realize that standing in my own doorway only hurt me. It was silly to blame my mom for a decision that I made, out of my own misunderstanding and ignorance. Being the petulant child I was at the time, I kept standing there. I was so angry with my mom, because she couldn’t see how bored I was of being right (she had long since moved on).</p>
<p>Standing.</p>
<p>Standing.</p>
<p>Standing.</p>
<p>Eventually, my dad came home and laughed at me. After that, I never angrily stood in my own doorway again. Only a child blames someone else for the consequences of their own actions.</p>
tag:paulstraw.svbtle.com,2014:Post/mouth-noises2016-05-02T23:17:37-07:002016-05-02T23:17:37-07:00Mouth Noises<p>I am #blessed enough to be a member of the <a href="http://spec.fm" rel="nofollow">Spec podcast network</a>. We just hit a collective total of <a href="https://twitter.com/uberbryn/status/727219434713022464" rel="nofollow">5,000,000 downloads</a>, and it made me reflect a bit on what I’m trying to accomplish with <a href="http://doesnotcompute.fm" rel="nofollow">Does Not Compute</a>, and my work as a whole.</p>
<p>I started breaking computers with code about 17 years ago, in 1999. My toolchain for those first few sites was extremely basic: Notepad.exe and <u>lots</u> of trial and error. I was just a nerdy kid playing with nerdy virtual toys, but something about programming really stuck with me. It was the first time I ever felt truly empowered to create anything I could dream up, without any limitations. I never thought I would be smart enough to be a “real” programmer, but making websites seemed like something <u>anyone</u> could do. Little did I know those first few goofy sites would eventually blossom into my career over the next decade.</p>
<p>I still carry that feeling of empowerment with me to this day. Sometimes it’s expressed in different ways now, like creating silly robots, a podcast, or even sometimes overly-complex circuits in Minecraft. No matter what, the bottom line always remains: With enough effort, computers let me create anything I can dream up.</p>
<p>Last year, <a href="http://twitter.com/seanwashbot" rel="nofollow">Sean</a> and I started Does Not Compute with an unspoken mission. As development evolves and becomes more complex, we want to help make sure new developers don’t feel intimidated or excluded. The magic of the Internet is that everyone can contribute something, regardless of their skill level. As more experienced developers, I see it as part of our duty to keep the barrier to entry low.</p>
<p>If you’ve been programing for a while: Go teach! Teaching can look like pretty much anything you want, from making podcasts, to giving talks, to helping people out in community Slack groups (<a href="http://spec.fm/slack" rel="nofollow">Spec has one!</a>). You’ll be amazed how great it makes you feel, and how much you learn by doing it.</p>
<p>If you’re new to programming: Don’t be afraid to ask! So many people (myself included) learned a lot of what they know by asking questions. There are tons of experienced developers out there who love to lend a hand when they can. That doesn’t mean you’ll get a free pass. It’ll still be lots of hard work, but I guarantee most folks will jump at the chance to help you along the way.</p>
<p>? ? </p>
tag:paulstraw.svbtle.com,2014:Post/you-must-be-this-sad-to-enter2016-02-25T23:44:08-08:002016-02-25T23:44:08-08:00You Must Be This Sad to Enter<p>By now, you’ve almost certainly read the <a href="https://medium.com/@taliajane/an-open-letter-to-my-ceo-fb73df021e7a" rel="nofollow">open letter</a> written by Talia Jane to the CEO of Yelp. If you’re reading this, there’s actually a good chance I’ve talked to you about it directly. It seems to keep coming up, and I wanted to write down my thoughts on some of the arguments I’ve seen raised against Talia.</p>
<h3 id="if-you-can39t-afford-it-don39t-live-here_3">If you can’t afford it, don’t live here <a class="head_anchor" href="#if-you-can39t-afford-it-don39t-live-here_3" rel="nofollow">#</a>
</h3>
<p>To be blunt, she <u>doesn’t</u>. Talia lives somewhere where it cost her nearly $6.00 one-way to get to her job. That’s something like $250 a month in transit fees, in addition to her ~$1200 monthly rent. For those of you unfamiliar with the Bay Area, $1200 a month is quite cheap, even <u>with</u> roommates.</p>
<p>There will always be people here who earn less than others, but affordable housing for all incomes <u>needs</u> to be a priority for this city. Even if you don’t care whether people who earn a low wage can afford to live here (presumably because you’re a horrid, short-sighted troll of a person), at least consider that those human-powered startups we all love so much are made possible by people earning similar wages.</p>
<h3 id="i39m-sure-her-family-is-helping-her-and-she39_3">I’m sure her family is helping her and she’s exaggerating <a class="head_anchor" href="#i39m-sure-her-family-is-helping-her-and-she39_3" rel="nofollow">#</a>
</h3>
<p>Many people don’t seem to realize just how much of a privilege a supportive family really is. There are a ton of people who have no family to lean on, and several elements of Talia’s post pretty heavily indicate she falls into that group.</p>
<p>I’ve seen this argument come up several times, usually in the form of “well when I was having trouble, I just moved back in with my parents”. While it’s really great you were able to do that, it’s insulting and thoughtless to assume everyone else also has that option.</p>
<h3 id="look-at-the-excessive-things-she39s-bought-wh_3">Look at the excessive things she’s bought! What a liar! <a class="head_anchor" href="#look-at-the-excessive-things-she39s-bought-wh_3" rel="nofollow">#</a>
</h3>
<p>Or maybe, <u>just maybe</u>, she was presenting herself on social media as a happy, well-off person even when she actually wasn’t, because that’s pretty much the most human thing in the world.</p>
<hr>
<p>The primary sentiment tying these arguments together is that they all imply a minimum amount of suffering someone must go through before they “qualify” for our sympathy. They reek of Regan-era “welfare queen” scare tactics, projecting our own privileges onto others, and a form of localized xenophobia.</p>
<p>These attitudes are quickly pushing us towards a monoculture, even faster than we’re already headed there. Personally, I want the Bay Area to become a <u>more</u> inclusive and diverse place over the upcoming years and decades. To have any hope of that happening, we need to stop discounting the suffering of others.</p>
tag:paulstraw.svbtle.com,2014:Post/bowers-wilkins-p5-series-2-review2015-11-18T23:26:09-08:002015-11-18T23:26:09-08:00Bowers & Wilkins P5 Series 2 Review<p>These are really comfortable headphones, and that’s coming from someone who usually can’t stand on-ears. They’re quite visually appealing as well, and seem like the perfect size for walking around (I bought them for commuting and work). Isolation is decent, but still lets enough ambient sound in to keep you aware of the environment (another point in the “walking around cans” column).</p>
<p>The inline mic/remote is nice and clicky, but the volume buttons can be a bit awkward to press, since it’s a cylinder instead of the EarPod-style elliptic cylinder/roundrect. I find my fingers looking for the multi-button indent first, then going up or down from there instead of just grabbing the top or bottom right away.</p>
<p>I haven’t heard any microphonics; probably at least in part because of the replaceable cable. It’s a slightly non-standard 3.5mm -> 2.5mm cable, but still better than something soldered in. The actual jack is located underneath the left cup. Both cups are magnetically attached and pop off for cleaning/replacement — super neat.</p>
<p>Finally, sound quality. These are definitely some of the most… “opinionated” headphones/speakers I have (compared to my current regulars: AKG K240, and Beyerdynamic DT 770). In terms of flat frequency response, they don’t even get close Bowers & Wilkins’ own MM-1 desktop speakers (where most of my non-headphone listening happens at the moment). However, since I got these for a commute/work pair and won’t be doing any mixing work on them, flat frequency response wasn’t the primary concern. They’re very pleasant, opinionated in the right ways for casual listening, and most importantly aren’t fatiguing at all.</p>
<p>Recommended.</p>
tag:paulstraw.svbtle.com,2014:Post/nvalt-and-the-outboard-brain2015-02-06T22:41:36-08:002015-02-06T22:41:36-08:00nvALT and the Outboard Brain<p>I have to remember a lot of stuff. If you work with computers, you probably do too. Cory Doctorow popularized the concept of the “<a href="http://archive.oreilly.com/pub/a/javascript/2002/01/01/cory.html" rel="nofollow">Outboard Brain</a>” a long time ago, and it’s still a valid concept. While Cory’s approach was based around blogging, mine has used a simple program called <a href="http://brettterpstra.com/projects/nvalt/" rel="nofollow">nvALT</a> for the last several years.</p>
<p>nvALT is a beautifully simple application that lets you write plain text notes about anything. Its main trick is letting you create or search for notes without having to manually manage creating or saving files; everything happens directly from the search bar at the top. If I need to take down contact information, I can just type “James Hobbs”, hit enter, and immediately start typing phone numbers, company names, or any other relevant information.</p>
<p>Since all files are saved as plain text, they can easily be synced via your service of choice, and edited on any platform (right now, I’m using <a href="http://omz-software.com/editorial/" rel="nofollow">Editorial</a> on iOS). By writing my notes using <a href="http://daringfireball.net/projects/markdown/" rel="nofollow">Markdown</a> syntax, I can also instantly convert them to beautiful HTML or PDF documents using <a href="http://marked2app.com/" rel="nofollow">Marked</a>. This gives me an incredible workflow that scales from one-liner code snippets to documentation for clients; all with no barrier to <u>just start writing</u>.</p>
tag:paulstraw.svbtle.com,2014:Post/rails-usereditable-configuration2015-02-06T22:33:48-08:002015-02-06T22:33:48-08:00Rails User-Editable Configuration<p>When building out a Rails site with a large admin interface, you’ll eventually need to add some system settings that don’t relate specifically to any model. This is an Interesting Problem™, because ActiveRecord ties everything in the database to a model. I’ve recently started using the pattern of a GlobalConfig model to get around this.</p>
<p>First, create a <code class="prettyprint">GlobalConfig</code> model with the standard generator:</p>
<pre><code class="prettyprint lang-bash">rails g model global_config singleton_guard:integer
</code></pre>
<p>Then, do a bit of class customization:</p>
<pre><code class="prettyprint lang-ruby">class GlobalConfig < ActiveRecord::Base
validates :singleton_guard, presence: true, uniqueness: true, numericality: {equal_to: 1}
before_validation :set_singleton_guard
private
def set_singleton_guard
self.singleton_guard = 1
end
end
</code></pre>
<p>Once you’ve got this base, you need a nice way to actually access the config model from your controllers and views. I added this bit to my ApplicationController:</p>
<pre><code class="prettyprint lang-ruby">class ApplicationController < ActionController::Base
# …
private
def global_config
@global_config ||= GlobalConfig.first || GlobalConfig.new
return @global_config
end
helper_method :global_config
end
</code></pre>
<p>From there, you can simply call <code class="prettyprint">global_config</code> from any controller or view. By using an instance variable, we ensure that no matter how many times you access the GlobalConfig this way, it will only make one database call per request cycle.</p>
<p>Now that you’ve got the configuration model all set up, you can add whatever you need (e.g., <code class="prettyprint">rails g migration add_newsletter_signup_cta_to_global_config newsletter_signup_cta:string</code>). Since it’s just a normal Rails model, you can set up forms and validation the same way you would for anything else. Using this pattern, clients can easily swap text, images, toggle site features, and more.</p>
tag:paulstraw.svbtle.com,2014:Post/viewmaster2014-08-30T22:42:27-07:002014-08-30T22:42:27-07:00ViewMaster<p>I’m happy to announce that my first Mac App Store app has been approved and released to the public! It’s a simple menu bar app that shows you the current status and viewer count of a Twitch stream. I created it over the course of a couple days using <a href="http://rubymotion.com" rel="nofollow">RubyMotion</a>, and far too much time tweaking the icon.</p>
<p>If you’re a Mac user streaming with Twitch, you should check it out: <a href="https://itunes.apple.com/us/app/viewmaster-for-twitch/id913092374" rel="nofollow">ViewMaster for Twitch</a>.</p>
tag:paulstraw.svbtle.com,2014:Post/look-at-the-photo-not-the-frame2013-10-04T22:43:27-07:002013-10-04T22:43:27-07:00Look at the Photo, Not the Frame<p>I work with an extremely talented design team, all of whom are unhappy with iOS 7’s new design direction. While I agree there are some rough edges, overall I think the changes will ultimately be for the best, as designers and developers (including Apple’s own) learn to work with the new concepts and design language.</p>
<p>Good “pixel design” is, of course, very important; it has been one of the main ways to provide the “user delight” that designers strive for ever since the first GUI. Very few companies outside of tired examples like Google and Craigslist can even attract users without good design to help sell the product. But computers are now powerful enough to provide that same sense of delight in other ways, one of which is the use of motion, which provides visual interest and context without drawing attention away from the content. iOS 7 utilizes motion in almost every interaction; the parallax effects throughout the system, elastic trays, and home screen icon zooming just scratch the surface.</p>
<p>As I type this into <a href="http://vesperapp.co" rel="nofollow">Vesper</a>, I’m struck by just how much care has gone into what is truly “as little design as possible”. Subtle, well-considered animation and gorgeous typography help create the same sense of wonder that the most ornamental apps inspire on first load, but instead of just being nice to look at, they also improve the actual usage of the application. Every decision that the Q Branch team made serves to make writing more enjoyable; all the design is in service of helping me actually write words on the page. The true soul of every application is its user experience.</p>
<p>Until iOS 7, app design on iOS had been becoming progressively more complex and ornamental; nearly fetishistic. The sudden turnaround isn’t a rejection of beautiful design, it’s a return to caring more about the photograph than the frame.</p>