422 Unprocessable Entity2017-09-26T23:33:09+00:00http://sfsekaran.github.ioSathya Sekaransfsekaran@gmail.comGive Them What They Need2017-09-25T00:00:00+00:00http://sfsekaran.github.io/product-management/2017/09/25/give-them-what-they-need
<p>“GTWTN.” I use this concept on a regular basis, without really conciously thinking about it.</p>
<p>I learned it from my mentor during my stay at HitFix. He didn’t call it what I do now, but it is essentially the same concept. His primary constructive criticism for me was always that I would jump to implementation without first thinking about why that implementation was needed in the first place. In other words, he wanted me to be more like a product manager.</p>
<p>A list of things that go through my mind upon receiving any request:</p>
<ul>
<li>Ask yourself what the motivation behind the ask is</li>
<li>Ask them as many questions about why they need it as you can</li>
<li>Figure out the best solution to their underlying need</li>
<li>Do the minimum possible to fulfill their request (most of the time)</li>
<li>Sidestep one complex feature request by suggesting a simpler one that satisfies the same need</li>
<li>Any repetitive task you’re given can be turned into a cron job or pushed back onto the person asking</li>
</ul>
<p>All of this helps with scope creep and architecture bloat. By thinking about the quickest/easiest/fastest way to implement something that still meets the person’s needs (but not necessarily their literal ask) you’re not being lazy. You’re being efficient.</p>
<p>Go forth!</p>
Learning About Machine Learning2016-05-11T00:00:00+00:00http://sfsekaran.github.io/education/2016/05/11/learning-about-machine-learning
<h2 id="new-beginnings">New Beginnings</h2>
<p>On the recommendation of a friend, I’ve signed up for an 11-week Machine Learning class on Coursera.</p>
<p>So far, I don’t regret it. It’s fascinating in a way that I remember feeling back in college. I’d love to get a chance to apply this stuff to real world problems.</p>
<h2 id="holy-machinating-machines-batman">Holy Machinating Machines, Batman!</h2>
<p>No, machines aren’t ready to take over the world. But with our help, they can learn how to make smart predictions, categorizations, and groupings.
For example, Google’s news grouping algorithms are based on machine learning. A lot of things you see on a daily basis online are powered by machine learning. It’s important.</p>
<p>Needless to say, I’m excited to learn this stuff. I’ll come back here once I’ve completed the course just to bring things full circle, and to summarize the usefulness of the practical examples to which I’ve been exposed.</p>
Tools Versus Utility2016-05-03T00:00:00+00:00http://sfsekaran.github.io/software/2016/05/03/tools-versus-utility
<p>There’s a pattern in the way people grow. At first it’s just “I’ll try whatever seems fun,” or “this seems popular, I’ll try it.”
Next, the mentality “I know this tool well, and this is the right tool.” And again, there’s “This tool is better than other tools.”
At this point, you have a choice: you either stay in the “this is the best tool and nothing can replace it” category, or you change your thinking to realize that <strong>the tool doesn’t matter</strong>.</p>
<p>Why am I talking about tools? Because programming languages, frameworks, server architectures–and your phone–are all just tools.</p>
<p>I firmly believe the aphorism “it’s not what you know, it’s how you use what you know.” For example, I no longer care what programming language I use, as long as I use it to some effect.</p>
<p>This could sound like an argument to not bother learning new things. “Don’t learn anything different, because we know this toolset very well. Why bother switching over to something else?”
I propose that, instead, we shouldn’t restrict our lives because of what we currently know.</p>
<p>I suggest we should try new tools, figure out what they’re good for, and use our judgement to assign the right tool to the job.</p>
<p>Plus, without learning new things, we’d feel stuck. And no one likes feeling stuck, right?</p>
The Best Coffee Shops in Los Angeles2013-07-02T00:00:00+00:00http://sfsekaran.github.io/coffee/2013/07/02/the-best-coffee-shops-in-los-angeles
<p>Let me preface this with a simple fact: I’m addicted to coffee, not
caffeine. But definitely addicted.</p>
<p>If you ever find yourself in LA, and you’re jonesing for something
lightyears ahead of Starbucks/Peet’s/Coffee Bean/etc., then you’ve found the
right list. Without further ado, here are my favorite coffee shops, from least
to most favorite.</p>
<ul>
<li><strong>Funnel Mill</strong>
<ul>
<li>high-brow atmosphere</li>
<li>they have a pricy designer siphon coffee menu</li>
<li>lots of interesting coffee choices</li>
<li>“no cellphone zone”</li>
<li>I’d go back mainly to try the interesting siphon coffee choices</li>
</ul>
</li>
<li><strong>Bru</strong>
<ul>
<li>relaxed industrial atmosphere</li>
<li>has a loft area</li>
</ul>
</li>
<li><strong>ELABrew Santa Monica</strong>
<ul>
<li>small shop, good for on-the-go or lunch break</li>
<li>good house blend drip coffee</li>
<li>pourovers</li>
<li>best I’ve tried within the Santa Monica music business district</li>
</ul>
</li>
<li><strong>Intelligentsia Silverlake</strong>
<ul>
<li>hipster vibe, but that’s fun for people watching</li>
<li>hard to find parking</li>
<li>very extensive whole bean coffee selection</li>
<li>obviously, they only brew Intelligentsia-roasted coffee</li>
</ul>
</li>
<li><strong>Cafe Americano</strong>
<ul>
<li>small shop, very laid-back atmosphere, great for long conversations</li>
<li>downstairs and upstairs lounges</li>
<li>friendly baristas with excellent coffee knowledge</li>
<li>they roast and sell their own coffee, and it’s really fresh and good!</li>
</ul>
</li>
<li><strong>Paper or Plastik Cafe</strong>
<ul>
<li>has a loft area, great for people watching</li>
<li>no computers during weekends</li>
<li>they roast and sell their own coffe</li>
<li>also sell other roasters’ beans</li>
</ul>
</li>
<li><strong>Sqirl</strong>
<ul>
<li>Silverlake staple</li>
<li>excellent coffee</li>
<li>known for their food/jam as well</li>
<li>it’s a small shop but it’s fun!</li>
</ul>
</li>
<li><strong>Intelligentsia Venice</strong>
<ul>
<li><em>very</em> nice atmosphere, must be experienced</li>
<li>interesting people watching</li>
<li>parking can be tough</li>
<li>very extensive whole bean coffee selection</li>
<li>obviously, they only brew Intelligentsia-roasted coffee</li>
</ul>
</li>
<li><strong>Alfred</strong>
<ul>
<li>no pourovers</li>
<li>serve stumptown espresso/drip only</li>
<li>pleasant, laid-back and relaxing atmosphere</li>
<li>plenty of seating</li>
<li>good for long conversations on the patio</li>
</ul>
</li>
<li><strong>Coffee Commissary</strong>
<ul>
<li>my favorite!</li>
<li>cool contemporary/industrial atmosphere</li>
<li>excellent pourovers</li>
<li>excellent people watching (it’s almost always busy)</li>
<li>excellent whole bean coffee selection</li>
<li>knowledgeable and friendly bariastas</li>
<li>very dog friendly (outdoor seating, lots of dog owners)</li>
</ul>
</li>
</ul>
<p>Places I’ve never been:</p>
<ul>
<li>C+ Coffee (punk + coffee in glendale)</li>
<li>Handsome Coffee (roasters + shop)</li>
<li>Coffee Conservatory</li>
<li>many more!</li>
</ul>
<p>Well, that does it for today folks. My next coffee-related post will be
on the subject of my favorite roasters. Stay tuned. Until next time, have
an awesome coffee shop experience!</p>
<p>Sathya</p>
RMagick Can't Find the ImageMagick Library2012-12-31T00:00:00+00:00http://sfsekaran.github.io/rubygems/2012/12/31/rmagick-cant-find-the-imagemagick-library
<p>The gist of it is <code class="highlighter-rouge">RMagick</code> is way out of date and isn’t even compatible
with the latest <code class="highlighter-rouge">ImageMagick</code> anymore. So do yourself a favor and switch
to <code class="highlighter-rouge">mini_magick</code>. It purports to be faster and as far as I know, is
less brittle regarding future compatibility.</p>
Spree Affiliate Links2012-09-12T00:00:00+00:00http://sfsekaran.github.io/spree/2012/09/12/spree-affiliate-links
<p>I’ve just created a new (really basic) engine for Spree.
Check it out here: <a href="http://sfsekaran.github.com/spree_affiliate_links/">Spree Affiliate
Links</a>. It simply
stores names, links, and images to display wherever you decide (using
Deface).</p>
<p>Yes, it’s stupid simple, but at least it’s reusable across Spree
installations. :)</p>
<p>Please send me pull requests if you use it and you improve upon it.</p>
Object Generation, Randomized Values, and Uniqueness Validations2012-06-08T00:00:00+00:00http://sfsekaran.github.io/testing/2012/06/08/object-generation-randomized-values-and-uniqueness-validations
<p>Intermittantly failing specs are infuriating.</p>
<p>So, a word of warning: If you’re using <code class="highlighter-rouge">FFaker</code> or something to generate values
in your object generation library (in our case, that would be
<code class="highlighter-rouge">Fabrication</code>), be careful with uniqueness validations.</p>
<p>Yes, it’s obvious how to fix now. But it’s not so obvious when you add a
uniqueness validation, forget to change the object generator, run the tests,
find that they happen to pass (that time), and then later you’re
wrestling with intermittantly failing specs. And because it’s no longer fresh
in your mind, you have no idea why.</p>
<p>Here’s the obvious fix, implemented in <code class="highlighter-rouge">Fabrication</code> (with <code class="highlighter-rouge">FFaker</code>, still):</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="no">Fabricator</span> <span class="ss">:account</span> <span class="k">do</span>
<span class="c1"># this column has a uniqueness validation</span>
<span class="nb">name</span> <span class="p">{</span> <span class="n">sequence</span><span class="p">(</span><span class="ss">:account_name</span><span class="p">)</span> <span class="p">{</span> <span class="o">|</span><span class="n">i</span><span class="o">|</span> <span class="s2">"</span><span class="si">#{</span><span class="no">Faker</span><span class="o">::</span><span class="no">Company</span><span class="p">.</span><span class="nf">name</span><span class="si">}</span><span class="s2"> {i}"</span> <span class="p">}</span> <span class="p">}</span>
<span class="k">end</span></code></pre></figure>
<p>That’s a bit paranoid, but consider that originally we had</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="nb">name</span> <span class="no">Faker</span><span class="o">::</span><span class="no">Lorem</span><span class="p">.</span><span class="nf">word</span></code></pre></figure>
<p>instead, which was causing lots of random collisions.</p>
<p>Well, I hope that helps someone.</p>
Javascript vs CoffeeScript2012-06-06T00:00:00+00:00http://sfsekaran.github.io/programming%20languages/2012/06/06/javascript-vs-coffeescript
<p>Recently, we had a big debate about the usefulness of CoffeeScript vs
keeping on with Javascript only. We also had a fit over Backbone, but
I’ll leave that discussion for another day.</p>
<p>It came down to one major thing: people were stressed out about using
Coffeescript any further because our deadline was fast-approaching and
people didn’t want to learn more things along the way.</p>
<p>I think anyone could sympathize with the fact that learning new
technologies can be an impediment to development. But it made me
wonder–is CoffeeScript hard enough to learn that it’s an impediment to
a furious development schedule? Or is it just that new technologies
should <em>never</em> be introduced during such a time?</p>
<p>Well, here are a couple things about CofeeScript that might make a
veteran Javascripter scratch their head at first:</p>
<h3 id="functions">Functions</h3>
<p>They’re really nice once you get to know them. I appreciate the terse
syntax, but it can be very confusing to look at for a long-time
Javascript dev.</p>
<figure class="highlight"><pre><code class="language-coffeescript" data-lang="coffeescript"><span class="p">(</span><span class="nx">arg1</span><span class="p">,</span> <span class="nx">arg2</span><span class="p">)</span> <span class="o">-></span>
<span class="nx">alert</span> <span class="s">'inside a function'</span>
<span class="c1"># or</span>
<span class="p">(</span><span class="nx">arg1</span><span class="p">,</span> <span class="nx">arg2</span><span class="p">)</span> <span class="o">-></span> <span class="nx">alert</span> <span class="s">'inside another function'</span>
<span class="k">class</span> <span class="nx">MyClass</span>
<span class="na">myFunc</span><span class="o">:</span> <span class="p">(</span><span class="nx">arg1</span><span class="p">,</span> <span class="nx">arg2</span><span class="p">)</span> <span class="o">=></span>
<span class="nx">alert</span> <span class="s">'always bound to the "this" of any given instance of MyClass, because of the fat arrow ("=>")'</span></code></pre></figure>
<h3 id="classes">Classes</h3>
<p>Not all Javascript devs will love the way CoffeeScript uses prototypical
inheritance in its generated classes. Thankfully, CoffeeScript compiles
to Javascript, so you can roll your own non-prototype-oriented classes
as well.</p>
<figure class="highlight"><pre><code class="language-coffeescript" data-lang="coffeescript"><span class="nx">MyClass</span> <span class="o">=</span> <span class="p">(</span><span class="nx">constructorArg1</span><span class="p">,</span> <span class="nx">constructorArg2</span><span class="p">)</span> <span class="o">-></span>
<span class="c1"># do stuff</span>
<span class="nx">instanceMethod</span> <span class="o">=</span> <span class="o">-></span>
<span class="nx">alert</span> <span class="s">'a different type of js class'</span>
<span class="p">{</span>
<span class="na">exposedInstanceMethod</span><span class="o">:</span> <span class="nx">instanceMethod</span>
<span class="p">}</span></code></pre></figure>
<h3 id="array-and-object-comprehensions">Array and Object Comprehensions</h3>
<p>This is one thing that I love about CoffeeScript, actually. Then again,
it’s something that is quite a bit different than Javascript.</p>
<figure class="highlight"><pre><code class="language-coffeescript" data-lang="coffeescript"><span class="nx">list</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">]</span>
<span class="c1"># The following are equivalent:</span>
<span class="k">for</span> <span class="nx">item</span> <span class="k">in</span> <span class="nx">list</span>
<span class="nx">doSomething</span><span class="p">(</span><span class="nx">item</span><span class="p">)</span>
<span class="nx">doSomething</span><span class="p">(</span><span class="nx">item</span><span class="p">)</span> <span class="k">for</span> <span class="nx">item</span> <span class="k">in</span> <span class="nx">list</span>
<span class="c1"># Also, you can treat array comprehenions as arrays themselves</span>
<span class="nx">x</span> <span class="o">=</span> <span class="p">(</span><span class="nx">item</span> <span class="o">+</span> <span class="mi">1</span> <span class="k">for</span> <span class="nx">item</span> <span class="k">in</span> <span class="nx">list</span><span class="p">)</span>
<span class="nx">x</span> <span class="o">==</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]</span> <span class="c1"># => true</span></code></pre></figure>
<h3 id="hmm">Hmm</h3>
<p>Well, not much more to say, really. That’s not an exhaustive list of
oddities, so staunch Javascript devs probably won’t be happy switching
in a hurry. Is there a compromise?</p>
Luka: The duplicitous, silver-tongued proxy.2012-05-05T00:00:00+00:00http://sfsekaran.github.io/software/2012/05/05/luka-the-duplicitous-silver-tongued-proxy
<p>I randomly decided to create a gem. I’m usually pretty bad at executing
on my independent ideas for gems, but this on was so simple I didn’t
have an excuse.</p>
<p><strong>Luka</strong> simply adds a fluent interface on top of any object. It’s still
a hatchling, so it doesn’t care about return values yet. I’m open to
expanding its functionality, so if you have an idea, leave a comment.</p>
<p><a href="http://sfsekaran.github.com/luka">http://sfsekaran.github.com/luka</a></p>
<p>You can use it like this:</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="k">class</span> <span class="nc">Words</span>
<span class="k">def</span> <span class="nf">initialize</span>
<span class="vi">@sentence</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">I</span>
<span class="vi">@sentence</span> <span class="o"><<</span> <span class="s1">'I'</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">like</span>
<span class="vi">@sentence</span> <span class="o"><<</span> <span class="s1">'like'</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">pie</span>
<span class="vi">@sentence</span> <span class="o"><<</span> <span class="s1">'pie'</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">sentence</span>
<span class="vi">@sentence</span><span class="p">.</span><span class="nf">join</span><span class="p">(</span><span class="s1">' '</span><span class="p">)</span> <span class="o">+</span> <span class="s1">'.'</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="kp">include</span> <span class="no">Luka</span>
<span class="n">say</span> <span class="o">=</span> <span class="n">luka</span><span class="p">(</span><span class="no">Words</span><span class="p">.</span><span class="nf">new</span><span class="p">)</span>
<span class="n">say</span><span class="o">.</span><span class="no">I</span><span class="p">.</span><span class="nf">like</span><span class="p">.</span><span class="nf">pie</span>
<span class="n">say</span><span class="p">.</span><span class="nf">sentence</span> <span class="c1"># => "I like pie."</span></code></pre></figure>
<p>Enjoy!</p>
Hey, Look! Oh. Another Tech Blog. SRSLY?2012-04-14T00:00:00+00:00http://sfsekaran.github.io/ramblings/2012/04/14/hey-look-oh-another-tech-blog-srsly
<p>I’ve been meaning to start this blog for a while. I think I started a
blogger one a Long Time Ago(tm), but like all of my pet projects back then,
I abandoned it pretty quickly.</p>
<p>Lately I’ve been on a finishing kick. So, here I am.</p>
<p>I’ve been slowly becoming re-obsessed with Common Lisp, newly interested
in Node.js, and knee-deep in Backbone.js, Rails, and Coffeescript.</p>
<p>Here’s a snippet of Common Lisp to test out Pygments.</p>
<figure class="highlight"><pre><code class="language-cl" data-lang="cl"><span class="p">(</span><span class="nb">append</span> <span class="o">'</span><span class="p">(</span><span class="nv">hello</span><span class="p">)</span> <span class="o">'</span><span class="p">(</span><span class="nv">world</span><span class="p">))</span></code></pre></figure>
<p>Wonderful.</p>
<p>See you next time, folks.</p>
<p><img src="http://farm8.staticflickr.com/7004/6514473085_3c996d9594.jpg" alt="422 Unprocessable Entity" title="422 Unprocessable Entity" /></p>
<p><a href="http://www.flickr.com/photos/girliemac/6514473085/in/set-72157628409467125">From GirlieMac’s HTTP Status Cats</a></p>