<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>go bold</title>
	<atom:link href="http://blog.christineyen.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.christineyen.com</link>
	<description>another day, another blog</description>
	<lastBuildDate>Thu, 03 May 2012 21:53:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>ARC, Blocks, and retain cycle reminders</title>
		<link>http://blog.christineyen.com/2012/05/arc-blocks-and-retain-cycle-reminders/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=arc-blocks-and-retain-cycle-reminders</link>
		<comments>http://blog.christineyen.com/2012/05/arc-blocks-and-retain-cycle-reminders/#comments</comments>
		<pubDate>Thu, 03 May 2012 21:53:05 +0000</pubDate>
		<dc:creator>christine</dc:creator>
				<category><![CDATA[techy]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[reminders]]></category>

		<guid isPermaLink="false">http://blog.christineyen.com/?p=211</guid>
		<description><![CDATA[I&#8217;ve been neck-deep in Cocoa / iOS / mobile work lately, trying to inhale everything as quickly and thoroughly as possible. Each discovery of a new way of doing things is exciting &#8211; in exploring a new ecosystem, it&#8217;s been a blast being exposed to different design patterns, best practices, and libraries. A fellow YCer [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been neck-deep in Cocoa / iOS / mobile work lately, trying to inhale everything as quickly and thoroughly as possible. Each discovery of a new way of doing things is exciting &#8211; in exploring a new ecosystem, it&#8217;s been a blast being exposed to different <a href="http://thinkvitamin.com/code/ios/ios-design-patterns-target-action-part-1/">design</a> <a href="http://thinkvitamin.com/code/ios/ios-design-patterns-delegation-part-2/">patterns</a>, <a href="http://stackoverflow.com/questions/2367111/when-should-i-use-the-interface-builder">best</a> <a href="http://stackoverflow.com/questions/155964/what-are-best-practices-that-you-use-when-writing-objective-c-and-cocoa">practices</a>, and libraries.</p>
<p>A fellow YCer introduced me recently to <a href="https://github.com/zwaldowski/BlocksKit">BlocksKit</a> (and <a href="https://github.com/pandamonia/A2DynamicDelegate">A2DynamicDelegate</a>), two libraries that rejigger the standard delegate pattern of lots of the normal framework classes into a block. For example, consider the difference between the framework-standard code to show a <code>UIActionSheet</code>:</p>
<p><script src="https://gist.github.com/2589505.js?file=actionSheetStandard.m"></script></p>
<p>And the same logic, with BlocksKit:</p>
<p><script src="https://gist.github.com/2589505.js?file=actionSheetWithBlocksKit.m"></script></p>
<p>This feels sturdier, more compact, and more straightforward &#8211; especially considering my Ruby background. In integrating BlocksKit into my project, though, I started running into whispers about retain cycles &#8211; specifically, a situation in which a class has a strong reference to a block, which in turn has strong references to the local variables (often members of the class!) it might use or call.</p>
<p>After reading a bunch of different blog posts and StackOverflow answers discussing the same issue, I wanted to consolidate / quote a few of the most useful sources. In short, <em>whenever</em> using blocks (especially in ARC-enabled code, which handles most of the memory management for you), developers need to watch out for retain cycles and break them if necessary.</p>
<blockquote><p>Blocks in Objective-C have one more very important difference from blocks in C in handling variables that reference objects. All local objects are automatically retained as they are referenced! If you reference an instance variable from a block declared in a method, this retains self, as you&#8217;re implicitly doing self-&gt;theIvar.</p></blockquote>
<p>source: <a href="http://thirdcog.eu/pwcblocks/#objcblocks">Programming with C Blocks</a>. Click through for code snippets, examples, and a deeper discussion of Memory Management in blocks (section 4.2).</p>
<blockquote><p>The __block qualifier allows a block to modify a captured variable:<br />
<code>
<pre>id x;
__block id y;
void (^block)(void) = ^{
    x = [NSString string]; // error
    y = [NSString string]; // works
};</pre>
<p></code><br />
Without ARC, __block also has the side effect of not retaining its contents when it&#8217;s captured by a block. Blocks will automatically retain and release any object pointers they capture, but __block pointers are special-cased and act as a weak pointer. It&#8217;s become a common pattern to rely on this behavior by using __block to avoid retain cycles.</p>
<p>Under ARC, __block now retains its contents just like other captured object pointers. Code that uses __block to avoid retain cycles won&#8217;t work anymore. Instead, use __weak as described above.</p></blockquote>
<p>source: <a href="http://www.mikeash.com/pyblog/friday-qa-2011-09-30-automatic-reference-counting.html">Mike Ash on ARC</a> &#8211; scroll down to the section on blocks.</p>
<p>In retrospect, I read a good number of these posts when I was first exploring iOS and ARC &#8211; I suppose it&#8217;s a testament to how much content is in some of these articles (or the complexity of changing ecosystems?) that I didn&#8217;t make all of the connections / pick up all of the tips that I should have.</p>
<blockquote><p>You can use lifetime qualifiers to avoid strong reference cycles. For example, typically if you have a graph of objects arranged in a parent-child hierarchy and parents need to refer to their children and vice versa, then you make the parent-to-child relationship strong and the child-to-parent relationship weak. Other situations may be more subtle, particularly when they involve block objects.</p>
<p>In manual reference counting mode, <code>__block id x;</code> has the effect of not retaining x. In ARC mode, <code>__block id x;</code> defaults to retaining x (just like all other values). To get the manual reference counting mode behavior under ARC, you could use <code>__unsafe_unretained __block id x;</code>. As the name <code>__unsafe_unretained</code> implies, however, having a non-retained variable is dangerous (because it can dangle) and is therefore discouraged. Two better options are to either use <code>__weak</code> (if you don’t need to support iOS 4 or OS X v10.6), or set the <code>__block</code> value to <code>nil</code> to break the retain cycle.</p></blockquote>
<p>source: <a href="http://developer.apple.com/library/mac/#releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011226-CH1-SW9">Use Lifetime Qualifiers to Avoid Strong Reference Cycles</a> &#8211; click through for code examples. Unsurprisingly, Apple&#8217;s own documentation is the most thorough &#8211; if only I&#8217;d found it first!</p>
<p>Specifically, I wanted to know how best to handle the case in which I called <code>-dismissViewControllerAnimated:completion:</code> when the user, say, clicked the &#8220;Done&#8221; button on the toolbar:</p>
<p><script src="https://gist.github.com/2589505.js?file=doneButtonStandard.m"></script></p>
<p>Thanks to the Apple docs, we have instead:</p>
<p><script src="https://gist.github.com/2589505.js?file=doneButtonWithBlocksKit.m"></script></p>
<p>Time for a code audit &#8211; I hastily (aka giddily, aka excitedly) integrated BlocksKit yesterday without researching this too closely, but I know that I use blocks often elsewhere in my code, and it&#8217;s time to make sure everything&#8217;s correct before I push my latest set of commits.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christineyen.com/2012/05/arc-blocks-and-retain-cycle-reminders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exercise and the Art of Christine Maintenance</title>
		<link>http://blog.christineyen.com/2011/07/exercise-and-the-art-of-christine-maintenance/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=exercise-and-the-art-of-christine-maintenance</link>
		<comments>http://blog.christineyen.com/2011/07/exercise-and-the-art-of-christine-maintenance/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 05:03:54 +0000</pubDate>
		<dc:creator>christine</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[priorities]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://blog.christineyen.com/?p=206</guid>
		<description><![CDATA[I&#8217;ve never been good at exercising regularly, despite lots of reminders, from many different sources, in various formats, explaining just how necessary exercise is for your { mental well-being, life span, quality of life, focus, self-image }. The last period of time in which I exercised regularly involved several very regimented systems (From Couch to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve never been good at exercising regularly, despite lots of reminders, from many different sources, in various formats, explaining just how necessary exercise is for your { mental well-being, life span, quality of life, focus, self-image }. The last period of time in which I exercised regularly involved several very regimented systems (<a href="http://c25k.com/">From Couch to 5K</a>, <a href="http://hundredpushups.com/">Hundred Push-ups</a>, and Groupon-spurred <a href="http://bikramyogaseacliff.com/">bikram yoga</a>) and lasted for a total of about six weeks. This was a year ago. Before that, the last time I got regular exercise was the summer of 2006, during which I was interning in another city, and living with people who had much better habits than I.</p>
<p>After beginning a startup and doing very little between working and sleeping, I&#8217;ve finally (about six months in) reached a point where my schedule has stabilized a bit, and I&#8217;ve found a routine / set of incentives that I feel like I&#8217;ll be able to stick to for awhile &#8211; at least, I&#8217;ve followed it for the last seven weeks (one week longer than my last attempt) and am still going strong. I&#8217;m tired of having the phrase &#8220;disgustingly sedentary&#8221; float up in my mind when people ask me how I&#8217;ve been, and I&#8217;m looking forward to maintaining my newfound awesomeness. Below, the usual excuses I use to avoid working out, and how I&#8217;ve managed to skirt around them.</p>
<p><strong>Typical Excuse #1: My schedule&#8217;s too fluid, and I can&#8217;t find time to exercise at the gym</strong></p>
<p>My schedule is a bit eccentric, but once I discovered that I have a 24 Hour Fitness one block away from my office, I&#8217;ve found that I tend to come to a natural stopping point at around 1am each night. With a 24 hour gym, I can rarely find a reason to skip the gym before heading home. Plus points: I hate working out around other people, and there are rarely more than 3-4 other people at the gym between 1 and 4am (sometimes, I have the place all to myself!)</p>
<p><strong>Typical Excuse #2: Cardio bores the pants off of me</strong></p>
<p>My most successful stint at exercising regularly (summer of 2006) involved reading lots of Ayn Rand on a stationary bike, also late at night. I realized recently that, by bumping up the font size on my Kindle, I could easily read while running on a treadmill &#8211; and can now run for a previously unimaginably long time without noticing. (And then go for another 20-minute jog because I <strong>need to know what happens next!</strong>)</p>
<p><strong>Typical Excuse #3: I know exercise is good for me, but man it&#8217;s such a time sink</strong></p>
<p>When you&#8217;re running a startup, you work. A lot. And one of the things that I&#8217;ve lost (or have been unable to justify) as a result is my time to read for pleasure. By combining something that&#8217;s good for me and feels productive (cardio/gym) with something that makes me really happy and that I always want to do more of (reading for pleasure), I genuinely look forward to going to the gym and will often spend way more time exercising than I planned.</p>
<p>I was surprised at first with how much happier I&#8217;ve been as a result. I&#8217;m not sure if it&#8217;s actually the endorphins, or the &#8220;badass&#8221;-ness I feel from coming back to the office at 3am and sitting down for another hour or two of work (I mentioned my schedule was nutty), or finally being able to move books off my reading queue, but I&#8217;ve noticed a definite uptick in my mood and body image as a result. I&#8217;ve run something like 75 miles over the last six weeks (I make it to the gym an average of three times a week), and I&#8217;m looking forward to my numbers (I love you, <a href="http://runkeeper.com">Runkeeper</a>!) going ever upward.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christineyen.com/2011/07/exercise-and-the-art-of-christine-maintenance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One-line HTTP server with Python</title>
		<link>http://blog.christineyen.com/2011/07/one-line-http-server-with-python/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=one-line-http-server-with-python</link>
		<comments>http://blog.christineyen.com/2011/07/one-line-http-server-with-python/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 11:39:39 +0000</pubDate>
		<dc:creator>christine</dc:creator>
				<category><![CDATA[techy]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[commandline]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.christineyen.com/?p=202</guid>
		<description><![CDATA[Most of the time, loading HTML files from the filesystem (with the file://localhost/Users/... sort of path in your URL bar) works fine &#8211; remote files are pulled in, Javascript can usually be run, and things are peachy. Every once in awhile, though, you might run into a situation for which the file:// protocol is ill-suited [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the time, loading HTML files from the filesystem (with the <code>file://localhost/Users/...</code> sort of path in your URL bar) works fine &#8211; remote files are pulled in, Javascript can usually be run, and things are peachy.</p>
<p>Every once in awhile, though, you might run into a situation for which the file:// protocol is ill-suited — specifically, if/when you run into an error like this: <code>Cross origin requests are only supported for HTTP.</code></p>
<p>In other words, I ran into this really cool snippet:</p>
<blockquote><p><code><br />
$ cd /home/somedir<br />
$ python -m SimpleHTTPServer<br />
</code></p></blockquote>
<p>&#8230; awhile ago, and needed it a couple of minutes ago, and could barely remember it (<a href="http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python">hat tip to LinuxJournal</a> for being easily Googleable). So I&#8217;m posting it here for posterity, and to augment my clearly failing memory.</p>
<p>Running that command will make, by default, the <code>index.html</code> in <code>/home/somedir</code> accessible at <code>http://localhost:8000</code>.</p>
<p>Or you can pass in the preferred port (<code>python -m SimpleHTTPServer 8080</code>) into the command line instead.</p>
<p>Thumbs up. Onward!</p>
<p>* Also useful: tying this sort of thing to something like <a href="http://progrium.com/localtunnel/">localtunnel</a>, to brainlessly / painlessly broadcast something on your local machine to the interwebs.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christineyen.com/2011/07/one-line-http-server-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non-ActiveRecord::Base serialized has_many attributes in a nested form</title>
		<link>http://blog.christineyen.com/2011/06/non-activerecordbase-serialized-has_many-attributes-in-a-nested-form/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=non-activerecordbase-serialized-has_many-attributes-in-a-nested-form</link>
		<comments>http://blog.christineyen.com/2011/06/non-activerecordbase-serialized-has_many-attributes-in-a-nested-form/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 10:07:10 +0000</pubDate>
		<dc:creator>christine</dc:creator>
				<category><![CDATA[techy]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://blog.christineyen.com/?p=191</guid>
		<description><![CDATA[Per my previous post, I&#8217;m trying to be better about recording &#8220;Duh&#8221; / &#8220;Aha&#8221; moments in my experiments with Rails to 1) improve my learning / general consumer-of-open-source-software habits, and 2) in hopes that I don&#8217;t make similar same silly mistakes again. This post: fields_for with a serialized has_many relationship I&#8217;ve used plenty of nested [...]]]></description>
			<content:encoded><![CDATA[<p><em>Per <a href="http://blog.christineyen.com/2011/06/digging-into-frameworks-and-recording-duh-moments/">my previous post</a>, I&#8217;m trying to be better about recording &#8220;Duh&#8221; / &#8220;Aha&#8221; moments in my experiments with Rails to 1) improve my learning / general consumer-of-open-source-software habits, and 2) in hopes that I don&#8217;t make similar same silly mistakes again.</em></p>
<h3>This post: <code>fields_for</code> with a serialized <code>has_many</code> relationship</h3>
<p>I&#8217;ve used plenty of <a href="http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes">nested forms</a> recently, but always (and now, in retrospect, not always necessarily) with ActiveRecord-based <code>has_many</code> relationships.</p>
<p>Today, I was adding a new attribute to an existing model, and wanted to add some attributes that would simply be attached to the model via a serialized field, rather than any sort of join (similar to the setup in <a href="http://blog.jayfields.com/2007/03/rails-activerecord-serialize-method.html">this post</a>).</p>
<p>I wanted to store a set of BillItems on each User, but since they would be fairly isolated from anything else in the database and be tied strictly to each User, I decided to just attach it to each User.</p>
<p><script src="https://gist.github.com/1026833.js?file=00000_create_users.rb"></script></p>
<p><script src="https://gist.github.com/1026833.js?file=bill_item.rb"></script></p>
<p>And because each User could theoretically have many BillItems, we&#8217;d want to ensure <code>:bill_items</code> was serialized as an Array.</p>
<p><script src="https://gist.github.com/1026833.js?file=user.rb"></script></p>
<p>I was finding, though, frustratingly, that the following form was being generated incorrectly &#8211; only a single <code>bill_item</code> field was represented in the form, and even when sanity checking by iterating over <code>bill_item</code> records manually, the field markup was missing the indices necessary for the form to recognize each field as a separate form parameter. So when the template looked like this:<br />
<script src="https://gist.github.com/1026833.js?file=form.html.haml"></script></p>
<p>The output looked (sadly) like this:<br />
<script src="https://gist.github.com/1026833.js?file=bad_output.html"></script></p>
<p>What <a href="http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-fields_for">the docs</a> missed out on saying (under <strong>One-to-many</strong>) is that: rather than the <code>projects_attributes=</code> attributes writer method just being 1) recommended, 2) worth considering, and 3) available to be replaced by a <code>accepts_nested_attributes_for</code> if <code>:projects</code> were already an association on the model, it&#8217;s actually <b>required</b> for <code>fields_for</code> to correctly nest the fields.</p>
<p><script src="https://gist.github.com/1026769.js?file=form_helper.rb"></script></p>
<p>And, of course, <code>:bill_items</code> not being a proper association, I wasn&#8217;t able to use the standard <code>accepts_nested_attributes_for</code> helper and ran afoul of this. With the correct <code>*_attributes</code> method defined, the form finally displays perfectly, so that <code>bill_items</code> are passed through correctly, as an Array:</p>
<p><script src="https://gist.github.com/1026833.js?file=user-v2.rb"></script><br />
<script src="https://gist.github.com/1026833.js?file=good_output.html"></script></p>
<p>Lesson learned, and <a href="https://github.com/lifo/docrails/commit/c6381657b7c9dbf38d2afad61c61ad000c190927">change committed</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christineyen.com/2011/06/non-activerecordbase-serialized-has_many-attributes-in-a-nested-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digging into Frameworks and Recording &#8220;Duh&#8221; Moments</title>
		<link>http://blog.christineyen.com/2011/06/digging-into-frameworks-and-recording-duh-moments/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=digging-into-frameworks-and-recording-duh-moments</link>
		<comments>http://blog.christineyen.com/2011/06/digging-into-frameworks-and-recording-duh-moments/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 09:30:10 +0000</pubDate>
		<dc:creator>christine</dc:creator>
				<category><![CDATA[techy]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://blog.christineyen.com/?p=183</guid>
		<description><![CDATA[I&#8217;ve been working closely with our intern Cory, and have now been put in the situation of having to explain why Rails is doing X or not doing Y more in the last couple weeks than the whole of the last several months. (It&#8217;s also worthwhile saying that it&#8217;s incredibly nice having someone to bounce thoughts [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working closely with <a href="http://cory.li">our intern Cory</a>, and have now been put in the situation of having to explain why Rails is doing X or not doing Y more in the last couple weeks than the whole of the last several months. (It&#8217;s also worthwhile saying that it&#8217;s incredibly nice having someone to bounce thoughts off of again &#8211; no more coding in vacuum.) After each time one or both of us gets tripped up on something, I&#8217;m reminded to store that bit of knowledge <strong>some</strong>where useful.</p>
<p>I / we / anyone (me) serious about <a href="http://news.ycombinator.com/item?id=949610">improving as a programmer</a> needs to dive in and really understand <a href="http://pragprog.com/titles/jvrails/crafting-rails-applications">how things are put together</a>. With that goal in mind, I&#8217;ve got a couple resolutions to declare:</p>
<p>1. I&#8217;m going to be more diligent about reading Rails code &#8211; I&#8217;ve done my fair share of poking, but I&#8217;m going to be much more stringent about reading documentation <strong>and</strong> code to really understand what&#8217;s going on.</p>
<p>2. I&#8217;m going to stop lurking / being an isolationist <a href="http://github.com/christineyen">on Github</a> and be more proactive about submitting patches, which I&#8217;ve been improving at over the last few months (<strong>especially</strong> for documentation, as I encounter things that end up being &#8220;duh&#8221; moments).</p>
<h3>First up, <code>redirect_to</code>:</h3>
<p><code>redirect_to</code> is an awfully common method in controllers, and most people use it without thinking or looking too deeply at the internals. Cory tried to be a little more correct with one particular redirect_to, though, by adding <code>:status =&gt; :unauthorized</code>, and we found that the controller, in fact, no longer redirected the user. Instead, it displayed a &#8220;You are being redirected.&#8221; message and simply sat there.</p>
<p>Digging into the source shows us that <code>redirect_to</code> works by returning a HTTP response status of 302 to the browser (of course) &#8211; which then knows to look up response&#8217;s <code>location</code> and fetch that instead.</p>
<p><script src="https://gist.github.com/1026769.js?file=redirecting.rb"></script></p>
<p>So when a 4xx response code is passed in, it overrides the default 3xx redirect status code and the browser simply displays the response_body and (seemingly) chokes. I&#8217;ve <a href="https://github.com/lifo/docrails/commit/8da91036c0f6b4caf10e46db07f04d49398eea28">committed a change</a> on the docrails Github project to clarify this point for anyone staring at the documentation in the future.</p>
<p>More up in a second blog post!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christineyen.com/2011/06/digging-into-frameworks-and-recording-duh-moments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How I use ifttt</title>
		<link>http://blog.christineyen.com/2011/05/how-i-use-ifttt/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-i-use-ifttt</link>
		<comments>http://blog.christineyen.com/2011/05/how-i-use-ifttt/#comments</comments>
		<pubDate>Tue, 31 May 2011 23:55:19 +0000</pubDate>
		<dc:creator>christine</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[techy]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[products]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[startups]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.christineyen.com/?p=174</guid>
		<description><![CDATA[I&#8217;ve been having a ton of fun lately playing with ifttt, a service that lets you easily glue together different web services you use / rely on every day. If you remember Yahoo Pipes (wiki), ifttt is based off the same ideas &#8211; but is much easier to approach, think about, and use. There are [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been having a ton of fun lately playing with <a href="http://ifttt.com">ifttt</a>, a service that lets you easily glue together different web services you use / rely on every day. If you remember <a href="http://pipes.yahoo.com/pipes/">Yahoo Pipes</a> (<a href="http://en.wikipedia.org/wiki/Yahoo!_Pipes">wiki</a>), ifttt is based off the same ideas &#8211; but is much easier to approach, think about, and use. There are <a href="http://tdalton.co.uk/2011/05/how-i-use-ifttt/">a couple of</a> <a href="http://craigt.co.uk/2011/05/13/if-this-then-that/">other ifttt flow</a> <a href="http://web-mastered.de/post/4748705681/iffft-dropbox-update">blog posts around</a>, but my favorite blog entries are the ones that show instead of tell &#8211; so, here we go:</p>
<div class="mceTemp mceIEcenter" style="text-align: left;">
<dl id="attachment_176" class="wp-caption aligncenter" style="width: 501px; margin: 0;">
<dt class="wp-caption-dt"><a href="http://blog.christineyen.com/wp-content/uploads/2011/05/ifttt.png"><img class="size-large wp-image-176 " title="ifttt flows" src="http://blog.christineyen.com/wp-content/uploads/2011/05/ifttt-546x1024.png" alt="my ifttt tasks" width="491" height="922" /></a></dt>
<dd class="wp-caption-dd">ifttt tasks, as of 5/31/2011</dd>
</dl>
</div>
<p>The favorite use I found for it so far is my Game of Thrones task &#8211; I love <a href="http://theatlantic.com">The Atlantic</a>&#8216;s coverage but really couldn&#8217;t care less about their other Entertainment articles, and they don&#8217;t have category-specific RSS feeds. This way, I get things delivered straight to my inbox!</p>
<p>And, in the interest of keeping my inbox relevant, I have higher-frequency / immediate-action-required tasks tied to my GTalk, which makes sure that I can react quickly.</p>
<p>(I&#8217;ve noticed that more of my tasks are tied around consumption/notification rather than production. The other blog posts I&#8217;ve linked to above seem to tend toward duplicating/publishing content elsewhere, which is an interesting difference.)</p>
<p>The site is really nicely designed and is genuinely fun to use. Get on the invite list and start creating &#8211; I&#8217;m excited to see what other fun uses I find.</p>
<p><em>Note: Hah, if you look closely, my <strong>Rent reminder</strong>, the second task from the bottom has never fired. Clearly, the service is still in beta. I still use <a href="http://resnooze.com">Resnooze</a> for scheduled email reminders about things, but am looking forward to ifttt stabilizing enough for me to switch!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christineyen.com/2011/05/how-i-use-ifttt/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Heroku database -&gt; Amazon S3 backup via rake task</title>
		<link>http://blog.christineyen.com/2011/05/heroku-database-amazon-s3-backup-via-rake-task/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=heroku-database-amazon-s3-backup-via-rake-task</link>
		<comments>http://blog.christineyen.com/2011/05/heroku-database-amazon-s3-backup-via-rake-task/#comments</comments>
		<pubDate>Sat, 14 May 2011 02:52:40 +0000</pubDate>
		<dc:creator>christine</dc:creator>
				<category><![CDATA[techy]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.christineyen.com/?p=162</guid>
		<description><![CDATA[With Heroku&#8217;s basic database plan, it&#8217;s easy to run heroku pgbackups:capture every once in awhile and save a pg_dump backup of your database &#8211; but it&#8217;s not as easy as it should be to set up automatic backups of your application&#8217;s shared database. By combining Heroku&#8217;s nifty Cron Add-On (runs a Rake task via rake [...]]]></description>
			<content:encoded><![CDATA[<p>With Heroku&#8217;s basic database plan, it&#8217;s easy to run <code>heroku pgbackups:capture</code> every once in awhile and save a pg_dump backup of your database &#8211; but it&#8217;s not as easy as it should be to set up automatic backups of your application&#8217;s shared database. By combining Heroku&#8217;s nifty <a title="Heroku Cron" href="http://addons.heroku.com/cron">Cron Add-On</a> (runs a Rake task via <code>rake cron</code> daily for free) with its existing <a href="https://github.com/heroku/heroku/blob/master/lib/heroku/command/pgbackups.rb">PG Backups support</a>, you can pretty easily get the platform to help you back up your application.</p>
<p>This assumes you have some amazon_s3.yml file in your config with your AWS credentials and your Heroku credentials set in your environment variables.</p>
<p>This currently works under Rails 3.06 and Heroku gem version 2.1.3.</p>
<p><script src="https://gist.github.com/971686.js"> </script></p>
<p>While trying to get this all to work, I borrowed generously from <a href="http://librarymixer.posterous.com/40960547">http://librarymixer.posterous.com/40960547</a> (seemed to work under the Heroku gem version 1.19.1) and <a href="http://metaskills.net/2011/01/03/automating-heroku-pg-backups/">http://metaskills.net/2011/01/03/automating-heroku-pg-backups/</a>, with lots of tweaking necessary to account for gem updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christineyen.com/2011/05/heroku-database-amazon-s3-backup-via-rake-task/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Useful frontend tidbits</title>
		<link>http://blog.christineyen.com/2011/04/useful-frontend-tidbits/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=useful-frontend-tidbits</link>
		<comments>http://blog.christineyen.com/2011/04/useful-frontend-tidbits/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 09:40:32 +0000</pubDate>
		<dc:creator>christine</dc:creator>
				<category><![CDATA[techy]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.christineyen.com/?p=158</guid>
		<description><![CDATA[Some obscure-ish bits worth remembering while trying to navigate my way through this frontend mess (I wanted to stay a backend engineer&#8230;), dumped here for my records. Ran into some issues with &#8220;clear: both&#8221; in one column affecting divs in the other, pretty early on. Remember: When you clear a float you clear all floats [...]]]></description>
			<content:encoded><![CDATA[<p>Some obscure-ish bits worth remembering while trying to navigate my way through this frontend mess (<em>I wanted to stay a backend engineer&#8230;</em>), dumped here for my records.</p>
<p>Ran into some issues with &#8220;clear: both&#8221; in one column affecting divs in the other, pretty early on. Remember:</p>
<blockquote><p>When you clear a float you clear all floats above it in the html. That includes any floated columns you may have. (via <a href="http://www.pmob.co.uk/temp/flclear1.htm">pmob.co.uk</a>)</p>
<p><strong>Unless: </strong>The clear property is applied to an element inside a float itself. In these cases the clear will be restricted to the current parent float.</p>
<p><strong>Or: </strong>The parent element has overflow defined other than visible (e.g. overflow:auto or overflow:scroll). In these cases the clear will also be contained within that parent.</p></blockquote>
<p>Another issue &#8211; had a div full of tiles, each &#8220;float: left&#8221;ed to create a grid of tiles. I wanted an overlay to extend out of the bottom of each tile on mouse over, and kept seeing the overlay covered up by the tile in the next row.</p>
<blockquote><p>If you have 2 elements A &amp; B and element A has a z-index of 2 and B has a z-index of 102 then whenever the elements overlap, B will always be in front of A.</p>
<p>However, if you nest another element C inside element A (which has a z-index of 2) and give element C a z-index of say 500, you may think that element C will remain on top. This is not the case &#8211; element B will remain on top because it has a higher z-index than element A. Element C is a child of element A and <strong>all its children can never be higher than the status of its parent</strong>.</p>
<p>Everything inside element A will always be behind element B as they are placed on the z-axis as a group. (You can of course adjust the order of elements within element A in relation to each other.) (via <a href="http://www.webmasterworld.com/forum83/1164.htm">webmasterworld.com</a>, circa 2003 &#8211; wow)</p></blockquote>
<p>And to think, when I was looking for a job at a 2-5 person startup, I explicitly asked for no frontend work. Le sigh.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christineyen.com/2011/04/useful-frontend-tidbits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nuggets of wisdom from a sad set of goodbyes</title>
		<link>http://blog.christineyen.com/2010/12/nuggets-of-wisdom-from-a-sad-set-of-goodbyes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nuggets-of-wisdom-from-a-sad-set-of-goodbyes</link>
		<comments>http://blog.christineyen.com/2010/12/nuggets-of-wisdom-from-a-sad-set-of-goodbyes/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 07:59:14 +0000</pubDate>
		<dc:creator>christine</dc:creator>
				<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://blog.christineyen.com/?p=142</guid>
		<description><![CDATA[After a year and a half with an amazing group of people (half of which was post-acquisition), I recently gave notice and left what had been my first job out of school. Before  I emailed the entire team, I pulled some of the engineers aside to talk one on one about why I was leaving [...]]]></description>
			<content:encoded><![CDATA[<p>After a year and a half with an amazing group of people (half of which was post-acquisition), I recently gave notice and left what had been my first job out of school. Before  I emailed the entire team, I pulled some of the engineers aside to talk one on one about why I was leaving and how they felt about the direction the team and product was going.</p>
<p>It turned out to be a great decision to talk to my team members individually &#8211; people were able to be more candid about their opinions, and were also able to give advice more freely, knowing the context in which it was being given. What was also interesting was the range of opinions &#8211; some people were stoked for me and were privately envious; some were a little more disappointed by my impatience. After the first couple of conversations, I realized I&#8217;d be letting a lot of wisdom vanish into the ether (my brain) if I didn&#8217;t write them down. So, below are some of the most memorable sound bytes from my conversations:</p>
<p><span style="color: #003366;">&#8220;In the end, a startup is a business &#8211; and businesses succeed based on connections. You can write impeccable code, do lots of user testing, but in the end if you can&#8217;t sell your ideas, you can&#8217;t sell your product, then you&#8217;re sunk.&#8221;</span></p>
<p><span style="color: #003366;">&#8220;User testing is sort of a startup myth &#8211; [people think that if] you have a great idea, do lots of user testing, code it up, and you&#8217;ll be successful.&#8221; <span style="color: #000000;">(not sure what the context of that was)</span></span></p>
<p><span style="color: #003366;">&#8220;The difference, I suppose, between doing something new outside Google is that if you don&#8217;t make it, you die. Here, if you don&#8217;t make it&#8230; you can come back tomorrow and complain about it.&#8221;</span></p>
<p><span style="color: #003366;">&#8220;You&#8217;ll have constraints anywhere. You say that within Google, there are frustrating constraints in the building of the product, but you also have all the building blocks that help you get past other constraints further on. Go talk to investors and see what sorts of constraints THEY place on you&#8221;</span></p>
<p><span style="color: #003366;">&#8220;[In the future], you should make an effort early on to be transparent with your managers if you&#8217;re dissatisfied&#8230; to see what they can do about it.&#8221; <span style="color: #000000;">(In my defense, I had. There was little anyone on my team could have done.)</span></span></p>
<p><span style="color: #003366;">&#8220;We&#8217;ve sort of had our souls sucked out here, haven&#8217;t we?&#8221;</span></p>
<p><span style="color: #000000;">For a couple of the later conversations, when people asked me where I was headed next, I tried to answer, &#8220;Facebook.&#8221; I couldn&#8217;t last a second before bursting out laughing. One big reason I&#8217;m leaving is probably best described at the bottom of <a href="http://blog.redfin.com/blog/2010/10/one_in_five_facebook_employees_has_no_imagination_whatsoever.html">this article</a> (headline: &#8220;One in Five Facebook Employees Has No Imagination Whatsoever&#8221;): &#8220;[A startup is] a different kind of fun, feeling like the whole place would keel over if you didn’t do your part.&#8221;</span></p>
<p><span style="color: #000000;">While it&#8217;s a little terrifying and definitely a bummer that I&#8217;ll no longer work every day with that particular extraordinarily talented team, I&#8217;m eagerly looking forward to the lessons I&#8217;ll learn on my own (trying to prevent everything from keeling over!)</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christineyen.com/2010/12/nuggets-of-wisdom-from-a-sad-set-of-goodbyes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beginning Rejection Therapy</title>
		<link>http://blog.christineyen.com/2010/11/beginning-rejection-therapy/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=beginning-rejection-therapy</link>
		<comments>http://blog.christineyen.com/2010/11/beginning-rejection-therapy/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 18:16:17 +0000</pubDate>
		<dc:creator>christine</dc:creator>
				<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://blog.christineyen.com/?p=140</guid>
		<description><![CDATA[I&#8217;m starting Rejection Therapy and posting my updates on a Posterous blog for now. Follow me there for now, and I&#8217;ll be back to update this blog soon enough.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting <a href="http://rejectiontherapy.com">Rejection Therapy</a> and posting my updates on a Posterous blog for now.</p>
<p><a href="http://rejection.posterous.com">Follow me there</a> for now, and I&#8217;ll be back to update this blog soon enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christineyen.com/2010/11/beginning-rejection-therapy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

