<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Mike Raimondi</title>
		<description>Mike Raimondi's personal site</description>
		<link>https://mikeraimondi.com</link>
		<atom:link href="https://mikeraimondi.com/feed.xml" rel="self" type="application/rss+xml" />
		
			<item>
				<title>Queuing and Scheduling in Rails with Delayed::Job</title>
				<description>&lt;p&gt;Rails has several popular options for queuing or scheduling tasks. When I was looking at the alternatives for my app &lt;a href=&quot;http://www.gotimevault.com/&quot;&gt;TimeVault&lt;/a&gt; I was faced with something of a difficult choice. Two of the most popular libraries, &lt;a href=&quot;https://github.com/resque/resque&quot;&gt;Resque&lt;/a&gt; and &lt;a href=&quot;https://github.com/mperham/sidekiq&quot;&gt;Sidekiq&lt;/a&gt;, require Redis. At the time, I didn’t want to mess around with an additional component to deploy, so I used &lt;a href=&quot;https://github.com/collectiveidea/delayed_job&quot;&gt;Delayed::Job&lt;/a&gt; instead.
&lt;span id=&quot;more&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Delayed::Job (DJ) supports &lt;a href=&quot;https://github.com/collectiveidea/delayed_job/wiki/backends&quot;&gt;multiple backends&lt;/a&gt;. Most importantly for our purposes, it has solid support for ActiveRecord. There are performance reasons for choosing Redis over ActiveRecord, but for a small learning app these are typically safe to ignore.&lt;/p&gt;

&lt;p&gt;TimeVault allows users to set &lt;a href=&quot;http://en.wikipedia.org/wiki/Pomodoro_Technique&quot;&gt;Pomodoro&lt;/a&gt; timers and receive alerts when they are complete. Each timer has one or more Intervals with a start and stop time. When a timer starts, an Interval is created, which then creates an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IntervalWorker&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;create_interval_worker&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;Delayed&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Job&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;enqueue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;IntervalWorker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;run_at: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;when_to_run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;save&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;DJ supplies an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;enqueue&lt;/code&gt; class method. Here, I’m passing in a new &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IntervalWorker&lt;/code&gt; and using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;run_at&lt;/code&gt; option to delay instantiation of the worker until the interval expires. DJ expects enqueued objects to have a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;perform&lt;/code&gt; method that will be called on execution. Here, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IntervalWorker&lt;/code&gt; calls &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;complete!&lt;/code&gt; on the interval that created it.&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;IntervalWorker&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;initialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;interval_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;vi&quot;&gt;@interval_id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;interval_id&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;perform&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;interval&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Interval&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;where&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;id: &lt;/span&gt;&lt;span class=&quot;vi&quot;&gt;@interval_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;first&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;interval&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;complete!&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;interval&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;present?&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;complete!&lt;/code&gt; ends the interval by setting its &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;end&lt;/code&gt; attribute to the current time. Note how the service object, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IntervalWorker&lt;/code&gt;, is quite simple. All the actual logic is built into the model, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Interval&lt;/code&gt;. This is an example of &lt;a href=&quot;http://en.wikipedia.org/wiki/Separation_of_concerns&quot;&gt;separation of concerns&lt;/a&gt;. Modifying the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Interval&lt;/code&gt; is not a concern of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IntervalWorker&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I highly recommend the &lt;a href=&quot;http://railscasts.com/episodes/171-delayed-job&quot;&gt;Delayed::Job RailsCast&lt;/a&gt; to get started with DJ. Good luck!&lt;/p&gt;

</description>
				<pubDate>Wed, 14 Aug 2013 00:00:00 -0400</pubDate>
				<link>https://mikeraimondi.com/2013/08/14/queuing-and-scheduling-in-rails-with-delayedjob/</link>
				<guid isPermaLink="true">https://mikeraimondi.com/2013/08/14/queuing-and-scheduling-in-rails-with-delayedjob/</guid>
			</item>
		
			<item>
				<title>Smart ActiveRecord Saves</title>
				<description>&lt;p&gt;Imagine you have the following models in a Rails app:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Car&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;has_many&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:wheels&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Wheel&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;belongs_to&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:car&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You could instantiate and save a new car with wheels like so:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;car&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;car&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;wheels&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What if we want to save the car and its wheels to the database as a single &lt;a href=&quot;http://en.wikipedia.org/wiki/Database_transaction&quot;&gt;transaction&lt;/a&gt;?&lt;span id=&quot;more&quot;&gt;&lt;/span&gt; This might be important if we never want a car to be saved to the database without wheels. Makes sense, right? Here’s how we could do that:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;car&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;car&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;wheels&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;build&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;car&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;save&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;build&lt;/code&gt; method instantiates and associates new &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wheel&lt;/code&gt; objects, but does not persist them to the database. ActiveRecord is smart about deferring persistence in this way. When you call &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;save&lt;/code&gt; on the parent object, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;car&lt;/code&gt;, ActiveRecord will also call &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;save&lt;/code&gt; on the child objects. A handy pattern to use with closely coupled objects!&lt;/p&gt;

</description>
				<pubDate>Mon, 29 Jul 2013 00:00:00 -0400</pubDate>
				<link>https://mikeraimondi.com/2013/07/29/smart-activerecord-saves/</link>
				<guid isPermaLink="true">https://mikeraimondi.com/2013/07/29/smart-activerecord-saves/</guid>
			</item>
		
			<item>
				<title>Render Collections Easily With Rails</title>
				<description>&lt;p&gt;A typical Rails &lt;a href=&quot;http://en.wikipedia.org/wiki/Create,_read,_update_and_delete&quot;&gt;CRUD&lt;/a&gt; app will have an index. The index will list a collection of resources, like blog posts. In our &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;index.html.erb&lt;/code&gt; view, we might do this:&lt;/p&gt;

&lt;div class=&quot;language-erb highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@posts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;&amp;lt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will list out the titles for each of our blog posts. However, there is a more elegant way which leverages Rails’ defaults.&lt;span id=&quot;more&quot;&gt;&lt;/span&gt; If we instead do this:&lt;/p&gt;

&lt;div class=&quot;language-erb highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@posts&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Rails will look for a partial in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;app/views/posts&lt;/code&gt; directory with a name equal to the model name. If the model name is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Post&lt;/code&gt;, Rails would look for a file named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_post.html.erb&lt;/code&gt;. We might write it like this:&lt;/p&gt;

&lt;div class=&quot;language-erb highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;By default, Rails provides us with a local variable with the same name as the partial. For more information, check out &lt;a href=&quot;http://guides.rubyonrails.org/layouts_and_rendering.html#rendering-collections&quot;&gt;the documentation&lt;/a&gt;.&lt;/p&gt;

</description>
				<pubDate>Fri, 26 Jul 2013 00:00:00 -0400</pubDate>
				<link>https://mikeraimondi.com/2013/07/26/render-collections-easily-with-rails/</link>
				<guid isPermaLink="true">https://mikeraimondi.com/2013/07/26/render-collections-easily-with-rails/</guid>
			</item>
		
			<item>
				<title>Technical Interview Redux</title>
				<description>&lt;p&gt;The job interview marathon continues, and consequently this will be a short one. But I feel that I omitted a critical, seemingly obvious piece of information in &lt;a href=&quot;http://www.unlimited-code-works.com/2013/07/19/technical-interview-brainfreeze/&quot;&gt;my previous post&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technical interviewing is a skill like any other, and it is built with practice.&lt;/strong&gt; It is a mistake, at least for me, to assume that since I can build awesome stuff I therefore &lt;em&gt;must&lt;/em&gt; possess good technical interviewee skills. In my experience, the two skills seem almost orthogonal. Here’s how I’ve been building my technical interview chops.
&lt;span id=&quot;more&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Develop a system.&lt;/strong&gt; I found this &lt;a href=&quot;http://simpleprogrammer.com/2011/01/08/solving-problems-breaking-it-down/&quot;&gt;post about breaking down interview questions&lt;/a&gt; to be quite helpful.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Drill, drill, drill.&lt;/strong&gt; The previous link mentions &lt;a href=&quot;http://www.topcoder.com/&quot;&gt;Topcoder&lt;/a&gt; as a good source of practice material. I actually prefer the &lt;a href=&quot;http://www.reddit.com/r/dailyprogrammer&quot;&gt;Dailyprogrammer subreddit&lt;/a&gt;. The comments tend to be highly educational, with solutions in a variety of languages.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Warm up just before the interview.&lt;/strong&gt; Lately I’ve been doing a problem or two on Dailyprogrammer just prior to the interview. Typically, I’ll choose an intermediate or easy problem, just to build confidence.&lt;/li&gt;
&lt;/ul&gt;

</description>
				<pubDate>Mon, 22 Jul 2013 00:00:00 -0400</pubDate>
				<link>https://mikeraimondi.com/2013/07/22/technical-interview-redux/</link>
				<guid isPermaLink="true">https://mikeraimondi.com/2013/07/22/technical-interview-redux/</guid>
			</item>
		
			<item>
				<title>Technical Interview Brainfreeze</title>
				<description>&lt;p&gt;This week has been a job interview marathon. Tech interviews are an utterly different beast from the job interviews I’m used to. For one, they are &lt;strong&gt;much&lt;/strong&gt; longer than non-technical interviews. Some companies have had me speak to half a dozen employees, from engineers to HR to management. The main differentiator, of course, is the technical portion of the interview itself.
&lt;span id=&quot;more&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Technical questions in the interview setting can be extremely tricky. Typically I’m already a bit edgy from meeting so many new people, and the additional mental strain of being so highly invested in a positive outcome is just too much. My creative faculties seem to just shut down, and when I’m faced with a challenging question and no creative juices it leads to a panic response. I’m desperately reaching out for resources that &lt;em&gt;should&lt;/em&gt; be there, but in the interview room there’s…nothing. It is disconcerting, to say the least.&lt;/p&gt;

&lt;p&gt;Once the process starts, it becomes self-reinforcing. Every passing second of staring at the empty whiteboard becomes an additional reason to doubt my capabilities. This downward spiral is very, very difficult to break. Here are a few strategies that have either worked for me, or are next on my list to try:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Go with what you know.&lt;/strong&gt; Sometimes it can be a better strategy to answer a different, but related, problem that I’m already familiar with; then struggle unproductively with the problem I &lt;em&gt;want&lt;/em&gt; to answer. If I can clearly walk through a familiar solution to a related problem, and articulate how it is related to the problem at hand, I’m expressing an understanding of the problem while building self-confidence.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Honesty.&lt;/strong&gt; Sometimes I’ll just explain that I’m feeling nervous and ask for help. This won’t earn me any technical points, but it (hopefully) will let me recover from the downward spiral. Once I’m confident again, and the interviewer has a more accurate view of my skills, the earlier episode will be put in the proper context.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Ask questions.&lt;/strong&gt; Questions serve two purposes. They clarify the problem, of course. More importantly for me, they buy time for my panic response to subside. If I can engage my interviewer in clarifying dialogue, it may distract my limbic system from the emergency it perceives. Once the limbic response is reduced, I can turn back to the problem with a clearer mind.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Breathing exercises.&lt;/strong&gt; One of the most effective ways of dialing down a panicky limbic system is with slow, steady breathing. The key is to fully exhale with each breath. Done properly, you should feel a slight tension in the diaphragm at the end of each exhalation. Five repetitions is usually enough to start feeling more relaxed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Give a shout in the comments if you’ve used any other strategies for working through technical interview brainfreeze.&lt;/p&gt;
</description>
				<pubDate>Fri, 19 Jul 2013 00:00:00 -0400</pubDate>
				<link>https://mikeraimondi.com/2013/07/19/technical-interview-brainfreeze/</link>
				<guid isPermaLink="true">https://mikeraimondi.com/2013/07/19/technical-interview-brainfreeze/</guid>
			</item>
		
			<item>
				<title>When (not) to Nest Resources in Rails</title>
				<description>&lt;p&gt;In Rails, nested resources allow us to generate &lt;a href=&quot;http://en.wikipedia.org/wiki/Representational_state_transfer&quot;&gt;RESTful&lt;/a&gt; routes for heirarchical resources. If we were designing a blog, there might be a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;posts&lt;/code&gt; and a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;comments&lt;/code&gt; resource. We might have this in our &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;routes.rb&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;resources&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:posts&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;resources&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:comments&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Rails will then generate paths like this: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;posts/1/comments/1&lt;/code&gt;. This is all great and useful stuff, but what about something like users and dashboards?&lt;span id=&quot;more&quot;&gt;&lt;/span&gt; We might be tempted to nest the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboards&lt;/code&gt; resource under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;users&lt;/code&gt;, because dashboards are so closely related to users. There is an important question we must ask ourselves before we implement this scheme, and that is: “Do I expect this resource to be publicly available?”. In the case of dashboards, do we intend for users to publicly share their dashboards? In most cases, probably not.&lt;/p&gt;

&lt;p&gt;We would prefer to keep our paths as simple as possible. If we do not intend for users to share their dashboards, then there is no good reason to nest. A novice developer might nest under a user resource and use the params of the URL to determine the currently logged in user. However, this presents a security problem, as anyone could pose as any user simply by modifying the URL. Authentication gems like &lt;a href=&quot;https://github.com/plataformatec/devise&quot;&gt;Devise&lt;/a&gt; provide us with helper methods that return the logged in user, which we should be using exclusively if they’re available.&lt;/p&gt;

</description>
				<pubDate>Mon, 15 Jul 2013 00:00:00 -0400</pubDate>
				<link>https://mikeraimondi.com/2013/07/15/when-not-to-nest-resources-in-rails/</link>
				<guid isPermaLink="true">https://mikeraimondi.com/2013/07/15/when-not-to-nest-resources-in-rails/</guid>
			</item>
		
			<item>
				<title>The Inflection Point</title>
				<description>&lt;p&gt;Something strange happened over the past 10 weeks at &lt;a href=&quot;http://www.launchacademy.com/&quot;&gt;Launch Academy&lt;/a&gt;. Invisibly, imperceptibly, I’ve turned from a software hobbyist into a software developer. This fact only came to light a few days ago, and I’d like to share the story of how that happened.
&lt;span id=&quot;more&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;It has been a challenging week. I’ve been working extremely hard to bring my &lt;a href=&quot;http://www.memworks.com/&quot;&gt;project&lt;/a&gt; to a point where it is presentable. As a result, working on the project had become more of a chore than the pleasant exploration it usually is. Arriving home after another long day, I found that a friend had sent me a postcard with a Ruby &lt;a href=&quot;https://en.wikipedia.org/wiki/Cellular_automaton&quot;&gt;cellular automaton&lt;/a&gt; algorithm written on the back. (Yes, I have &lt;em&gt;awesome&lt;/em&gt; friends). Of course, I implemented it right away as a command line application, but I was immediately struck by the ways it could be adapted to function in a web app. Users could save and view lists of cellular automata, sorted by the initial conditions.&lt;/p&gt;

&lt;p&gt;Building and deploying the &lt;a href=&quot;https://github.com/mikeraimondi/cellular_automaton&quot;&gt;app&lt;/a&gt; took under an hour. It is nothing special, but the capability to casually toss out such a thing is, to me, &lt;em&gt;magical&lt;/em&gt;. I certainly couldn’t, or at least wouldn’t, have done it prior to Launch Academy. Even though it might have been in my technical capabilities to do so, the activation level was too high. That is, the amount of initial effort required to implement would have been too great.&lt;/p&gt;

&lt;p&gt;The change from a hobbyist to a developer is more subtle, though. For example, I probably would have used a scaffold if I had attempted the app 10 weeks ago (Rails scaffolds are generally a sign of inexperience). I wouldn’t have known when a private method was appropriate. All these little pieces of knowledge converge into the capability to write not just functional software, but &lt;em&gt;robust&lt;/em&gt; software,&lt;/p&gt;

&lt;p&gt;As someone who loves to build things, I cannot adequately express the value of what I’ve learned over the past 10 weeks. Not just in terms of what I can build, but what I &lt;em&gt;will&lt;/em&gt; build.&lt;/p&gt;

</description>
				<pubDate>Fri, 12 Jul 2013 00:00:00 -0400</pubDate>
				<link>https://mikeraimondi.com/2013/07/12/the-inflection-point/</link>
				<guid isPermaLink="true">https://mikeraimondi.com/2013/07/12/the-inflection-point/</guid>
			</item>
		
			<item>
				<title>Mildly Complex Rails Seeding with YAML</title>
				<description>&lt;p&gt;It’s crunch time here at &lt;a href=&quot;http://www.launchacademy.com/&quot;&gt;Launch Academy&lt;/a&gt;. Our projects have to be up and running with databases that will, you know, actually &lt;em&gt;show off&lt;/em&gt; the functionality that we’ve worked 10 weeks to achieve. This means seeding, and depending on the complexity of our models and associations, seeding can go from a simple one-line script to, well, something like this:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;module&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Seeders&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;module&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Lessons&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;seed&lt;/span&gt;
        &lt;span class=&quot;no&quot;&gt;Lesson&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;destroy_all&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;lessons&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;base_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'db/seed_data'&lt;/span&gt;
        &lt;span class=&quot;no&quot;&gt;Dir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;glob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Rails&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;base_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'lessons'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'*.yml'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;lesson&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;YAML&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;load_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;this_lesson&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Lesson&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;title: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lesson&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'title'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;summary: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lesson&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'summary'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;lessons&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;this_lesson&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;lesson&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'activities'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;each_with_index&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;completable&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'type'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'Assignment'&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;completable&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Assignment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;assignment&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;assignment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'title'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;assignment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;summary&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'summary'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;assignment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;instructions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'instructions'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;assignment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'url'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;assignment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;assignment_type&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'assignment_type'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
              &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;elsif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'type'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'Challenge'&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;completable&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Challenge&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;challenge&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;challenge&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'title'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
              &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'cards'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;card&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;new_card&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
                  &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'title'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                  &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;instructions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'instructions'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                  &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;problem&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'problem'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                  &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;solution_type&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'solution_type'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                  &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;snippet&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'snippet'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'snippet'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;present?&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'solutions'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;solution&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;

                  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'solution_type'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'string'&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;sol&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;solution_strings&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;solution_string&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
                      &lt;span class=&quot;n&quot;&gt;solution_string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;regex&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;solution&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'regex'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                      &lt;span class=&quot;n&quot;&gt;solution_string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;canonical&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;solution&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'canonical'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
                  &lt;span class=&quot;k&quot;&gt;elsif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'solution_type'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'position'&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;sol&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;solution_positions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;solution_position&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
                      &lt;span class=&quot;n&quot;&gt;solution_position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;start_position&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;solution&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'start_position'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                      &lt;span class=&quot;n&quot;&gt;solution_position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;end_position&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;solution&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'end_position'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
                  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

                  &lt;span class=&quot;n&quot;&gt;completable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;cards&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_card&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
              &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

            &lt;span class=&quot;no&quot;&gt;Activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lesson_activity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;lesson_activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;completable&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;completable&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;lesson_activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;lesson&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;this_lesson&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;lesson_activity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;position&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;lessons&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is the seeder for my project: &lt;a href=&quot;http://www.memworks.com/&quot;&gt;Memworks&lt;/a&gt;. A major part of the app is lessons, each of which has assignments and challenges. There’s a lot of content, and my first approach was to just shove it all in big Ruby objects and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;require&lt;/code&gt; the relevant source files. I decided to shift to a &lt;a href=&quot;http://www.yaml.org/&quot;&gt;YAML&lt;/a&gt; approach when the Ruby hashes became so large as to become unwieldy.
&lt;span id=&quot;more&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Since YAML supports arrays, we can leverage this to indicate associations in our models. Memworks lessons are YAML files with a structure like this:&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;some&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;title&quot;&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;summary&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;some&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;summary&quot;&lt;/span&gt;

&lt;span class=&quot;na&quot;&gt;assignments&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;assignment&quot;&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;second&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;assignment&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;My script iterates through these YAML arrays and associates the assignments with their parent lesson. This is extremely handy with multiply nested hierarchies like mine, because YAML files are easily read and easily edited. Also, there’s great support for &lt;a href=&quot;http://michael.f1337.us/2010/03/30/482836205/&quot;&gt;multiline strings&lt;/a&gt;. Multiline strings in YAML are smart about their indent level, so unlike Ruby, you don’t have to de-indent your big blocks of text.&lt;/p&gt;

&lt;p&gt;Happy seeding!&lt;/p&gt;

</description>
				<pubDate>Mon, 08 Jul 2013 00:00:00 -0400</pubDate>
				<link>https://mikeraimondi.com/2013/07/08/mildly-complex-seeding/</link>
				<guid isPermaLink="true">https://mikeraimondi.com/2013/07/08/mildly-complex-seeding/</guid>
			</item>
		
			<item>
				<title>Getting Started with Backbone.js on Rails</title>
				<description>&lt;p&gt;Going from near-zero experience with front-end MVC frameworks to a functional Backbone app has been something of a rough ride. I thought I’d share some lessons I’ve learned along the way. Keep in mind that I’m still learning, so much of this will be wrong. Corrections are welcome.
&lt;span id=&quot;more&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Setup&lt;/strong&gt; It is relatively easy to &lt;a href=&quot;http://backbonejs.org/&quot;&gt;download&lt;/a&gt; and manually install Backbone by copying the relevant files to your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;javascripts&lt;/code&gt; directory. I chose to use the &lt;a href=&quot;https://github.com/meleyal/backbone-on-rails&quot;&gt;backbone-on-rails&lt;/a&gt; gem instead, for reasons I’ll describe in a moment. This is not to be confused with &lt;a href=&quot;https://github.com/codebrew/backbone-rails&quot;&gt;backbone-rails&lt;/a&gt; which I avoided because it vendors an older version of Backbone.&lt;/p&gt;

    &lt;p&gt;Using the gem hooks up Backbone to the &lt;a href=&quot;http://guides.rubyonrails.org/asset_pipeline.html&quot;&gt;asset pipeline&lt;/a&gt;, which should improve page load times in production. It also provides us with a nice generator. After adding &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;backbone-on-rails&lt;/code&gt; to the Gemfile, we can execute the following:&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;bundle &lt;span class=&quot;nb&quot;&gt;install
&lt;/span&gt;rails g backbone:install
rails g backbone:scaffold MODEL
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;Passing in the name of the model, the generator will construct a directory structure and boilerplate files under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;app/assets/javascripts&lt;/code&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;We put an MVC in your MVC&lt;/strong&gt; The generated directories have a familiar structure, coming from Rails. Models is fairly self-explanatory. Views in Backbone are a little different and a fair bit more complex than in Rails. They tend to hold much more logic than a Rails view should. Further, they delegate presentation to a &lt;em&gt;template&lt;/em&gt;. Backbone-on-Rails sets us up with a &lt;a href=&quot;https://code.google.com/p/trimpath/wiki/JavaScriptTemplates&quot;&gt;JST&lt;/a&gt; template for each view.&lt;/p&gt;

    &lt;p&gt;Confusingly, JavaScript templates are much more like a traditional Rails view than Backbone views. You’ll find the generated template in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;app/assets/templates&lt;/code&gt;, since JavaScript templates are not themselves JavaScript files. The final two directories are routers and collections, which I’ll go over next.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Collections and routers&lt;/strong&gt; Backbone collections have no direct analogue in the Rails world. They are, basically, arrays of Backbone models. Since a major function of Backbone is syncing remote objects with the front end, collections are an important tool for keeping our objects organized.&lt;/p&gt;

    &lt;p&gt;The generator has also given us a router. Routers in Backbone are similar to Rails controllers. Unlike a Rails controller, there’s very little magic to make our lives easier. These two lines are critical to understanding how a router works:&lt;/p&gt;

    &lt;div class=&quot;language-coffeescript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nx&quot;&gt;view&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;App&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;Views&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ModelAction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;collection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;someCollection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;someModel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'.container'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;el&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;The first line is instantiating a new view, and passing in a collection and model. Note that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;collection&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;model&lt;/code&gt; are special keywords. They will be made available to the view directly, whereas passing in arbitrary key-value pairs can and will result in hair-pulling.&lt;/p&gt;

    &lt;p&gt;The second line is calling jQuery to update the DOM, replacing the contents of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.container&lt;/code&gt; element with the return value from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;view.render()&lt;/code&gt;. What that will be depends upon how we write the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;render&lt;/code&gt; function in the view. Typically, the render function will invoke the template, which will then be inserted into the DOM.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Phew! This just scratches the surface of Backbone.js. If you’d like to learn more, there are two excellent (and paywalled, unfortunately) RailsCasts: &lt;a href=&quot;http://railscasts.com/episodes/323-backbone-on-rails-part-1&quot;&gt;#323&lt;/a&gt; and &lt;a href=&quot;http://railscasts.com/episodes/325-backbone-on-rails-part-2&quot;&gt;#325&lt;/a&gt; that were incredibly helpful to me. Good luck!&lt;/p&gt;

</description>
				<pubDate>Sat, 06 Jul 2013 00:00:00 -0400</pubDate>
				<link>https://mikeraimondi.com/2013/07/06/getting-started-with-backbone-js-on-rails/</link>
				<guid isPermaLink="true">https://mikeraimondi.com/2013/07/06/getting-started-with-backbone-js-on-rails/</guid>
			</item>
		
			<item>
				<title>Tick-Tock Synthesis</title>
				<description>&lt;p&gt;Synthesis is the phase of learning where we apply what we have learned in new ways. It is the point when we begin to understand how what we have learned connects with what we already know, and how those connections can be used to apply our new learning differently. I consider synthesis to be the most important part of my education at &lt;a href=&quot;http://www.launchacademy.com/&quot;&gt;Launch Academy&lt;/a&gt;, so I’m extremely deliberate in the way I approach synthesizing new knowledge.
&lt;span id=&quot;more&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;My approach can be compared with Intel’s famous &lt;a href=&quot;http://en.wikipedia.org/wiki/Intel_Tick-Tock&quot;&gt;“Tick-Tock” methodology&lt;/a&gt;. Every year, Intel with either “tick” by shrinking the size of the transistors on their processors, or they will “tock” by introducing a new architecture. The tick-tock approach limits the novelty, and hence the complexity, of each iteration.&lt;/p&gt;

&lt;div style=&quot;float:left; padding-right:15px&quot; about=&quot;http://farm9.static.flickr.com/8470/8395040165_0e86cea93b_m.jpg&quot;&gt;
  &lt;a href=&quot;http://www.flickr.com/photos/8575312@N04/8395040165/&quot; target=&quot;_blank&quot;&gt;&lt;img xmlns:dct=&quot;http://purl.org/dc/terms/&quot; href=&quot;http://purl.org/dc/dcmitype/StillImage&quot; rel=&quot;dct:type&quot; src=&quot;http://farm9.static.flickr.com/8470/8395040165_0e86cea93b_m.jpg&quot; alt=&quot;Just a second by pbosakov, on Flickr&quot; title=&quot;Just a second by pbosakov, on Flickr&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-sa/2.0/&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://i.creativecommons.org/l/by-sa/2.0/80x15.png&quot; alt=&quot;Creative Commons Attribution-Share Alike 2.0 Generic License&quot; title=&quot;Creative Commons Attribution-Share Alike 2.0 Generic License&quot; border=&quot;0&quot; align=&quot;left&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;by&amp;nbsp;&lt;a href=&quot;http://www.flickr.com/people/8575312@N04/&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;&lt;/a&gt;&lt;a xmlns:cc=&quot;http://creativecommons.org/ns#&quot; rel=&quot;cc:attributionURL&quot; property=&quot;cc:attributionName&quot; href=&quot;http://www.flickr.com/people/8575312@N04/&quot; target=&quot;_blank&quot;&gt;pbosakov&lt;/a&gt;&lt;a href=&quot;http://www.imagecodr.org/&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;When I’m synthesizing a new, major piece of knowledge, I’ll “tick” by implementing the new knowledge in a safe environment. Safe, in this sense, means that poor implementation is acceptable and breaking stuff is strongly encouraged. In Launch Academy, my “tick” synthesis occurs in my side project: &lt;a href=&quot;http://www.gotimevault.com/&quot;&gt;TimeVault&lt;/a&gt;. The freedom of the “tick” phase allows me to more quickly experiment and make inevitable mistakes.&lt;/p&gt;

&lt;p&gt;The “tock” phase of synthesis involves implementing the new learning in fashion more consistent with industry best practices. In Launch Academy, my “tock” project has been &lt;a href=&quot;https://github.com/mikeraimondi/memworks&quot;&gt;Memworks&lt;/a&gt;. During the “tock”, my objective has been to meet or exceed what would be expected of a junior-level professional. The reasoning for this is twofold:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Becoming familiar with best practices, particularly in a field such as web development, is critical for quality output.&lt;/li&gt;
  &lt;li&gt;I will often use the result of my “tock” synthesis as reference material later on. The source for my “tock” project will serve as a yardstick against which I will measure future efforts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’m constantly looking for new ways to improve synthesis. If you have any tips, please give a shout in the comments!&lt;/p&gt;

</description>
				<pubDate>Mon, 01 Jul 2013 00:00:00 -0400</pubDate>
				<link>https://mikeraimondi.com/2013/07/01/tick-tock-synthesis/</link>
				<guid isPermaLink="true">https://mikeraimondi.com/2013/07/01/tick-tock-synthesis/</guid>
			</item>
		
	</channel>
</rss>
