<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>DevSmash</title><link>http://devsmash.com</link><atom:link href="http://devsmash.com/feed/rss" rel="self" type="application/rss+xml"></atom:link><description>Developers talking about stuff that developers like to talk about.</description><language>en-US</language><lastBuildDate>Fri, 01 Aug 2014 16:51:07 GMT</lastBuildDate><item><title>A Virtual Path Gotcha with Nginx on Elastic Beanstalk</title><link>http://devsmash.com/blog/elastic-beanstalk-nginx-virtual-path-gotcha</link><description><![CDATA[
<p>The product that I&#39;m currently working on, <a href="https://stre.am" title="Broadcast live video from your iPhone or Android">Stre.am</a>, runs on top of a pretty polyglot architecture.  The various components utilize node + Express, Scala + Akka, Java + Play, and of course Java and Objective-C for the mobile clients.  Most of my personal development efforts have been on the web application, which is the part that runs on top of node.

</p>
<p>As longtime fanatics of AWS, we&#39;ve opted to run the web app on top of Elastic Beanstalk, and we use the built-in support for Nginx to serve up static files and protect the app servers from excessively large request bodies.

</p>
<p>This has all been working swimmingly, and we&#39;ve enjoyed sitting back and watching our server logs explode with new users that some recent foreign press seems to have generated for us (watch out, Hasselhoff, now <em>we&#39;re</em> big in Germany!).</p>
<p><a href="http://devsmash.com/blog/elastic-beanstalk-nginx-virtual-path-gotcha">Read more &raquo;</a></p>]]></description><pubDate>Fri, 01 Aug 2014 16:51:07 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/elastic-beanstalk-nginx-virtual-path-gotcha</guid></item><item><title>An Open Dissection of &quot;Open Source Dickishness&quot;</title><link>http://devsmash.com/blog/an-open-dissection-of-open-source-dickishness</link><description><![CDATA[
<p>I&#39;d like to set some tone before I begin, primarily because I&#39;m typically pretty bad at maintaining my tone throughout the course of a long response.  I&#39;d like to say that Eran Hammer holds a place on a rather short list of people that I particularly respect in the node community.  He&#39;s been vocal on a number of issues, and I&#39;ve always admired his ability to articulate and reason clearly through the various drama-llama moments that this community seems prone to.

</p>
<p>It was with some surprise, then, that I read <a href="http://hueniverse.com/2014/07/30/open-source-dickishness/">his reaction</a> to the news that TJ Holowaychuk has sold ownership of the <a href="http://expressjs.com/">Express</a> project to <a href="http://strongloop.com/">StrongLoop</a>.

</p>
<p>I&#39;d like to be clear that there are aspects of this transfer of ownership that I&#39;m not terribly fond of either.  However, even when not in total agreement, it&#39;s important to approach situations with fairness.

</p>
<p>Ok, with that as context, I&#39;ve in-lined my thoughts below:</p>
<p><a href="http://devsmash.com/blog/an-open-dissection-of-open-source-dickishness">Read more &raquo;</a></p>]]></description><pubDate>Wed, 30 Jul 2014 20:46:33 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/an-open-dissection-of-open-source-dickishness</guid></item><item><title>What's the Big Deal with Generators?</title><link>http://devsmash.com/blog/whats-the-big-deal-with-generators</link><description><![CDATA[
<p>Last month the V8 team landed an initial implementation of <a href="http://wiki.ecmascript.org/doku.php?id=harmony:generators">ES6 Generators</a>.  Generators, of course, are nothing new - they first appeared in the <a href="http://en.wikipedia.org/wiki/CLU_programming_language">CLU programming language</a> back in 1974.  Today they&#39;re available in several modern programming languages, including Python, C#, and Ruby (see the <a href="http://en.wikipedia.org/wiki/Generator_%28computer_programming%29#Timeline">wiki article</a> for a more complete timeline of language adoption).

</p>
<p>Given that Node.js is built on top of V8, the inclusion of generators has, well, generated quite a bit of buzz in the world of Node.  This is with good reason, too.  In this post I&#39;m going to attempt to explain what exactly generators are and why their addition is such a big deal in JavaScript (and more particularly, Node).</p>
<p><a href="http://devsmash.com/blog/whats-the-big-deal-with-generators">Read more &raquo;</a></p>]]></description><pubDate>Thu, 20 Jun 2013 13:24:45 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/whats-the-big-deal-with-generators</guid></item><item><title>Suspend - Generator Based Control Flow for Node</title><link>http://devsmash.com/blog/suspend-generator-based-control-flow-for-node</link><description><![CDATA[
<p>While opinions regarding the perils of <a href="http://callbackhell.com/">callback hell</a> (or the ominous sounding &quot;<a href="https://news.ycombinator.com/item?id=5185450">pyramid of doom</a>&quot;) vary greatly, it&#39;s hard to deny that  every once in awhile some library support comes in handy.

</p>
<p>After sifting through a dozen-or-so <a href="https://github.com/joyent/node/wiki/Modules#wiki-async-flow">control flow modules</a>, however, it is abundantly clear that callbacks are unavoidable.  You can <a href="https://github.com/kriskowal/q">wrap them in promises</a>, <a href="https://github.com/substack/node-seq">chain them</a>, and even <a href="https://github.com/masylum/funk">get funky with them</a>, but you&#39;re still passing around functions to get the job done.  The reason for this is quite simple - without using functions, JavaScript simply doesn&#39;t allow you to &quot;pause&quot; execution, wait for something else to complete (such as a database query), and then resume where you left off.

</p>
<p><em>Or does it...?</em>

</p>
<p>Today I&#39;m happy to announce a new, experimental module for Node that I&#39;ve been hacking on: <a href="https://github.com/jmar777/suspend">suspend</a>.</p>
<p><a href="http://devsmash.com/blog/suspend-generator-based-control-flow-for-node">Read more &raquo;</a></p>]]></description><pubDate>Tue, 28 May 2013 14:04:26 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/suspend-generator-based-control-flow-for-node</guid></item><item><title>Building a Command Line Utility with Node</title><link>http://devsmash.com/blog/building-a-node-command-line-utility</link><description><![CDATA[
<p>Last week DevSmash went down for what I believe was the first time since I launched it back in September.  The first thing I did was check out the <a href="http://status.jit.su/">Nodejitsu status page</a>, which indicated that all their services were up and running.  Since I was already hanging out in the #nodejitsu channel on Freenode, I mentioned my issue and was informed that <a href="https://www.mongohq.com/home">MongoHQ</a> (which <a href="https://handbook.nodejitsu.com/features#platform-features-databases">Nodejitsu provides to customers for free</a>) had experienced some hardware failure.  Fortunately, the fine folks over at MongoHQ had things fully recovered within about 20 minutes, which represented the sum total of our downtime here.

</p>
<p>So, why the story time?  Well, given that DevSmash does rely on a few external services, I thought it would be nice to have a single place to look the next time something goes down.  I had also been wanting to give TJ Holowaychuk&#39;s <a href="https://github.com/visionmedia/commander.js">Commander</a> a spin, so I took the opportunity to build a &quot;cloud status&quot; command line utility.  In case it&#39;s useful to someone else, here&#39;s a quick overview of how it works:
</p>
<p><a href="http://devsmash.com/blog/building-a-node-command-line-utility">Read more &raquo;</a></p>]]></description><pubDate>Mon, 21 Jan 2013 18:20:51 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/building-a-node-command-line-utility</guid></item><item><title>Ad Hoc Analytics with MongoDB's Aggregation Framework</title><link>http://devsmash.com/blog/mongodb-ad-hoc-analytics-aggregation-framework</link><description><![CDATA[
<p>While working on some recent projects, I had the need to run some basic dashboard analytics against moderate volumes of machine generated data.  Already having some experience with MongoDB (and being quite the fan of it), I decided to do some research on real-time analytics with MongoDB.

</p>
<p>A quick search turns up dozens of articles and presentations on how this can be achieved.  However, after reading through quite a few of them, it became clear that most of the existing how-tos on the subject are based on pre-Aggregation Framework techniques, relying largely on MongoDB&#39;s atomic upsert, $inc, and $set operations.

</p>
<p>These techniques are still largely useful, and are powering several successful applications.  Unfortunately, however, they tend to be lacking when it comes to the <em>ad hoc</em> side of things - specifically, once multiple values from distinct events have been aggregated into a single value, the ability to slice and dice the results becomes limited.  Additionally, these techniques typically require pre-aggregating at multiple levels to support pre-determined aggregation durations, rely on MapReduce, or delegate some re-reducing labor to the application itself.

</p>
<p>Given that we now have the Aggregation Framework available to us (since MongoDB 2.1), I decided to run some tests to see how feasible it is to achieve <em>real-time, interactive, ad hoc, dashboard analytics with MongoDB</em>.

</p>
<p>Note that this article is intended to be platform agnostic, so all tests are implemented as MongoDB shell scripts.</p>
<p><a href="http://devsmash.com/blog/mongodb-ad-hoc-analytics-aggregation-framework">Read more &raquo;</a></p>]]></description><pubDate>Thu, 15 Nov 2012 13:58:31 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/mongodb-ad-hoc-analytics-aggregation-framework</guid></item><item><title>Rolling Your Own RSS Feed with Express and Jade</title><link>http://devsmash.com/blog/rss-feed-express-jade</link><description><![CDATA[
<p>The most excellent <a href="http://davidwalsh.name/">David Walsh</a> has graciously allowed me to author a guest post over on his blog.  The topic of this guest post is: &quot;<a href="http://davidwalsh.name/rss-express">Rolling Your Own RSS Feed with Express, Jade and Mongoose</a>&quot;.

</p>
<blockquote>
<p>RSS feeds are a great way to facilitate a loyal readership.  In fact, as I write this, the RSS feed in David&#39;s sidebar is touting over 11,400 subscribers.  Hitting the front page of Hacker News is always nice, but for most sites that&#39;s not going to translate into a reliable source of traffic.  Getting each and every post in front of thousands of intentional subscribers though (who have their own followers on Twitter, Google+, etc.)?  That&#39;s a traffic generator.

</p>
</blockquote>
<p>Head over to the The David Walsh Blog to <a href="http://davidwalsh.name/rss-express">read the rest</a>!
</p>
<p><a href="http://devsmash.com/blog/rss-feed-express-jade">Read more &raquo;</a></p>]]></description><pubDate>Thu, 25 Oct 2012 20:27:46 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/rss-feed-express-jade</guid></item><item><title>Introducing Kwicks 2.0.0 - Sexy Sliding Panels for jQuery</title><link>http://devsmash.com/blog/kwicks-2-dot-0-dot-0</link><description><![CDATA[
<p><em>TLDR: Kwicks 2.0.0 is out, is awesome, and you can find docs and examples <a href="http://devsmash.com/projects/kwicks">here</a>.</em>

</p>
<p>I&#39;m happy to announce that after 4 long years of neglect, <a href="http://devsmash.com/projects/kwicks">Kwicks 2.0.0</a> is out!  This is a major version release, and has been rewritten from scratch to support a much wider range of user interactions.  The 1.x series of Kwicks had a horrid API, and made several assumptions regarding use cases.  Kwicks 2.0.0 takes a much more flexible and programmable approach, and does a better job of following jQuery convention.
</p>
<p><a href="http://devsmash.com/blog/kwicks-2-dot-0-dot-0">Read more &raquo;</a></p>]]></description><pubDate>Tue, 09 Oct 2012 15:32:07 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/kwicks-2-dot-0-dot-0</guid></item><item><title>Password Authentication with Mongoose (Part 2): Account Locking</title><link>http://devsmash.com/blog/implementing-max-login-attempts-with-mongoose</link><description><![CDATA[
<p>This post is Part 2 of a series on implementing secure username/password authentication for your Mongoose User models.  In Part 1 we implemented <a href="http://devsmash.com/blog/password-authentication-with-mongoose-and-bcrypt">one-way password encryption and verification</a> using <a href="http://en.wikipedia.org/wiki/Bcrypt">bcrypt</a>.  Here in Part 2 we&#39;ll discuss how to prevent brute-force attacks by enforcing a maximum number of failed login attempts.</p>
<p><a href="http://devsmash.com/blog/implementing-max-login-attempts-with-mongoose">Read more &raquo;</a></p>]]></description><pubDate>Thu, 20 Sep 2012 13:23:58 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/implementing-max-login-attempts-with-mongoose</guid></item><item><title>DevSmash Has Comments!</title><link>http://devsmash.com/blog/devsmash-has-comments</link><description><![CDATA[
<p>This is just a quick announcement that DevSmash now allows comments on blog posts (powered by <a href="http://disqus.com">Disqus</a>)!

</p>
<p>I did some internal battling before choosing to go this route (eventually I want to build a custom solution), but I really don&#39;t like the idea of continuing to cover <a href="http://devsmash.com/blog/password-authentication-with-mongoose-and-bcrypt">security related topics</a> without providing a way for objections, concerns, etc. to be raised.</p>
<p><a href="http://devsmash.com/blog/devsmash-has-comments">Read more &raquo;</a></p>]]></description><pubDate>Wed, 19 Sep 2012 03:39:31 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/devsmash-has-comments</guid></item><item><title>Password Authentication with Mongoose (Part 1): bcrypt</title><link>http://devsmash.com/blog/password-authentication-with-mongoose-and-bcrypt</link><description><![CDATA[
<p>This post is Part 1 of a series on implementing username/password authentication for your Mongoose user models.  In this first installment, we will discuss how to implement one-way encryption of user passwords with bcrypt, and how to subsequently use the encrypted password for login verification.</p>
<p><a href="http://devsmash.com/blog/password-authentication-with-mongoose-and-bcrypt">Read more &raquo;</a></p>]]></description><pubDate>Mon, 10 Sep 2012 12:08:26 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/password-authentication-with-mongoose-and-bcrypt</guid></item><item><title>Welcome to DevSmash!</title><link>http://devsmash.com/blog/welcome-to-devsmash</link><description><![CDATA[
<p>Thank you for checking out the inaugural post here on DevSmash!  This is somewhat of a meta-post, as I really don&#39;t have an objective at the moment beyond introducing you to the site and getting the ball rolling.

</p>
<p>Follow the link for more info on what DevSmash is, why it was created, and who it&#39;s for!</p>
<p><a href="http://devsmash.com/blog/welcome-to-devsmash">Read more &raquo;</a></p>]]></description><pubDate>Wed, 05 Sep 2012 00:21:15 GMT</pubDate><guid isPermaLink="false">http://devsmash.com/blog/welcome-to-devsmash</guid></item></channel></rss>