<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>s-expressions</title>
	<atom:link href="http://s-expressions.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://s-expressions.com</link>
	<description>Amit Rathore blogs about software development</description>
	<lastBuildDate>Fri, 19 Apr 2013 18:43:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='s-expressions.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>s-expressions</title>
		<link>http://s-expressions.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://s-expressions.com/osd.xml" title="s-expressions" />
	<atom:link rel='hub' href='http://s-expressions.com/?pushpress=hub'/>
		<item>
		<title>Why Datomic?</title>
		<link>http://s-expressions.com/2013/03/29/why-datomic/</link>
		<comments>http://s-expressions.com/2013/03/29/why-datomic/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 23:32:05 +0000</pubDate>
		<dc:creator>Amit Rathore</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[datomic]]></category>
		<category><![CDATA[leanstartup]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">https://sexp.wordpress.com/?p=391</guid>
		<description><![CDATA[Cross-posted from Zololabs. Many of you know we&#8217;re using Datomic for all our storage needs for Zolodeck. It&#8217;s an extremely new database (not even version 1.0 yet), and is not open-source. So why would we want to base our startup on something like it, especially when we have to pay for it? I&#8217;ve been asked this question a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=391&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Cross-posted from <a href="http://blog.zololabs.com/2013/02/19/why-datomic/">Zololabs</a>.</p>
<p>Many of you know we&#8217;re using <a href="http://www.datomic.com">Datomic</a> for all our storage needs for <a href="http://www.zolodeck.com">Zolodeck</a>. It&#8217;s an extremely new database (not even version 1.0 yet), and is not open-source. So why would we want to base our startup on something like it, especially when we have to pay for it? I&#8217;ve been asked this question a number of  times, so I figured I&#8217;d blog about my reasons:</p>
<ul>
<li>I&#8217;m an unabashed fan of <a href="http://clojure.org">Clojure</a> and <a href="http://www.infoq.com/author/Rich-Hickey">Rich Hickey</a></li>
<li>I&#8217;ve always believed that databases (and the insane number of optimization options) could be simpler</li>
<li>We get basically unlimited read scalability (by upping read throughput in Amazon DynamoDB)</li>
<li>Automatic built-in caching (no more code to use memcached (makes DB effectively local))</li>
<li>Datalog-as-query language (declarative logic programming (and no explicit joins))</li>
<li>Datalog is extensible through user-defined functions</li>
<li>Full-text search (via Lucene) is built right in</li>
<li>Query engine on client-side, so no danger from long-running or computation-heavy queries</li>
<li>Immutable data &#8211; audits all versions everything automatically</li>
<li>&#8220;As of&#8221; queries and &#8220;time-window&#8221; queries are possible</li>
<li>Minimal schema (think RDF triples (except Datomic tuples also include the notion of time)</li>
<li>Supports cardinality out of the box (has-many or has-one)</li>
<li>These reference relationships are bi-directional, so you can traverse the relationship graph in either direction</li>
<li>Transactions are first-class (can be queried or &#8220;subscribed to&#8221; (for db-event-driven designs))</li>
<li>Transactions can be annotated (with custom meta-data) </li>
<li>Elastic </li>
<li>Write scaling without sharding (hundreds of thousands of facts (tuples) per second)</li>
<li>Supports &#8220;speculative&#8221; transactions that don&#8217;t actually persist to datastore</li>
<li>Out of the box support for in-memory version (great for unit-testing)</li>
<li>All this, and not even v1.0</li>
<li>It&#8217;s a particularly good fit with Clojure (and with Storm)</li>
</ul>
<p>This is a long list, but perhaps begins to explain why Datomic is such an amazing step forward. Ping me with questions if you have &#8216;em! And as far as the last point goes, I&#8217;ve talked about our technology choices and how they fit in with each other at the Strange Loop conference last year. Here&#8217;s a <a href="http://infoq.com/presentations/Zolodeck">video</a> of that talk.</p>
<br />Filed under: <a href='http://s-expressions.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sexp.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sexp.wordpress.com/391/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=391&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://s-expressions.com/2013/03/29/why-datomic/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69c7419d10661aa2ab01de450a0127b2?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Amit Rathore</media:title>
		</media:content>
	</item>
		<item>
		<title>Pretty-printing in Clojure logs</title>
		<link>http://s-expressions.com/2013/01/15/pretty-printing-logs/</link>
		<comments>http://s-expressions.com/2013/01/15/pretty-printing-logs/#comments</comments>
		<pubDate>Tue, 15 Jan 2013 14:30:12 +0000</pubDate>
		<dc:creator>Amit Rathore</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[debugging]]></category>

		<guid isPermaLink="false">https://sexp.wordpress.com/?p=375</guid>
		<description><![CDATA[Cross-posted from Zolo Labs. Logging is an obvious requirement when it comes to being able to debug non-trivial systems. We&#8217;ve been thinking a lot about logging, thanks to the large-scale, distributed nature of the Zolodeck architecture. Unfortunately, when logging larger Clojure data-structures, I often find some kinds of log statements a bit hard to decipher. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=375&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Cross-posted from <a href="http://blog.zololabs.com">Zolo Labs</a>.</p>
<p>Logging is an obvious requirement when it comes to being able to debug non-trivial systems. We&#8217;ve been thinking a lot about logging, thanks to the large-scale, distributed nature of the <a href="http://www.zolodeck.com">Zolodeck</a> architecture. Unfortunately, when logging larger Clojure data-structures, I often find some kinds of log statements a bit hard to decipher. For instance, consider a map <em>m</em> that looked like this:</p>
<p><script src="https://gist.github.com/4508573.js"></script></p>
<p>When you log things like <em>m</em> (shown here with <em>println</em> for simplicity), you may end up needing to understand this:</p>
<p><script src="https://gist.github.com/4508581.js"></script></p>
<p>Aaugh, look at that second line! Where does the data-structure begin and end? What is nested, and what&#8217;s top-level? And this problem gets progressively worse as the size and nested-ness of such data-structures grow. I wrote this following function to help alleviate some of the pain:</p>
<p><script src="https://gist.github.com/4508612.js"></script></p>
<p>Remember to include <em>clojure.pprint</em>. And here&#8217;s how you use it:</p>
<p><script src="https://gist.github.com/4508675.js"></script></p>
<p>That&#8217;s it, really. Not a big deal, not a particularly clever function. But it&#8217;s much better to see this structured and formatted log statement when you&#8217;re poring over log files in the middle of the night. </p>
<p>Just note that you want to use this sparingly. I first modified things to make <em>ALL</em> log statements automatically wrap everything being logged with <em>pp-str</em>: it immediately halved the performance of everything. <em>pp-str</em> isn&#8217;t cheap (actually, <em>pprint</em> isn&#8217;t cheap). So use with caution, where you really need it!</p>
<p>Now go sign-up for <a href="http://www.zolodeck.com">Zolodeck</a>!</p>
<br />Filed under: <a href='http://s-expressions.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sexp.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sexp.wordpress.com/375/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=375&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://s-expressions.com/2013/01/15/pretty-printing-logs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69c7419d10661aa2ab01de450a0127b2?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Amit Rathore</media:title>
		</media:content>
	</item>
		<item>
		<title>Why Java programmers have an advantage when learning Clojure</title>
		<link>http://s-expressions.com/2012/12/20/why-java-programmers-have-an-advantage-when-learning-clojure/</link>
		<comments>http://s-expressions.com/2012/12/20/why-java-programmers-have-an-advantage-when-learning-clojure/#comments</comments>
		<pubDate>Thu, 20 Dec 2012 14:30:52 +0000</pubDate>
		<dc:creator>Amit Rathore</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">https://sexp.wordpress.com/?p=369</guid>
		<description><![CDATA[Cross-posted from Zolo Labs. There is a spectrum of productivity when it comes to programming languages. I don&#8217;t really care to argue how much more productive dynamic languages are… but for those who buy that premise and want to learn a hyper-productive language, Clojure is a good choice. And for someone who has a Java [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=369&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Cross-posted from <a href="http://blog.zololabs.com/">Zolo Labs</a>.</p>
<p>There is a spectrum of productivity when it comes to programming languages. I don&#8217;t really care to argue how much more productive dynamic languages are… but for those who buy that premise and want to learn a hyper-productive language, Clojure is a good choice. And for someone who has a Java background, the choice Clojure becomes the best one. Here&#8217;s why:</p>
<ul>
<li>Knowing Java &#8211; obviously useful: class-paths, class loaders, constructors, methods, static methods, standard libraries, jar files, etc. etc.</li>
<li>Understanding of the JVM &#8211; heap, garbage collection, perm-gen space, debugging, profiling, performance tuning, etc.</li>
<li>The Java library ecosystem &#8211; what logging framework to use? what web-server? database drivers? And on and on….</li>
<li>The Maven situation &#8211; sometimes you have to know what&#8217;s going on underneath lein</li>
<li>Understanding of how to structure large code-bases &#8211; Clojure codebases also grow</li>
<li>OO Analysis and Design &#8211; similar to figuring out what functions go where</li>
</ul>
<p>I&#8217;m sure there&#8217;s a lot more here, and I&#8217;ll elaborate on a few of these in future blog posts.</p>
<p>I&#8217;ve not used Java itself in a fairly long time (we&#8217;re using Clojure for <a title="Zoldeck" href="http://www.zolodeck.com">Zolodeck</a>). Even so, I&#8217;m getting a bit tired of some folks looking down on Java devs, when I&#8217;ve seen so many Clojure programmers struggle from not understanding the Java landscape.</p>
<p>So, hey Java Devs! Given that there are so many good reasons to learn Clojure &#8211; it&#8217;s a modern LISP with a full macro system, it&#8217;s a functional programming language, it has concurrency semantics, it sits on the JVM and has access to all those libraries, it makes a lot of sense for you to look at it. And if you&#8217;re already looking at something more dynamic than Java itself (say Groovy, or JRuby, or something similar), why not just take that extra step to something truly amazing? Especially when you have such an incredible advantage (your knowledge of the Java ecosystem) on your side already?</p>
<br />Filed under: <a href='http://s-expressions.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sexp.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sexp.wordpress.com/369/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=369&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://s-expressions.com/2012/12/20/why-java-programmers-have-an-advantage-when-learning-clojure/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69c7419d10661aa2ab01de450a0127b2?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Amit Rathore</media:title>
		</media:content>
	</item>
		<item>
		<title>Clojure utility functions &#8211; part II</title>
		<link>http://s-expressions.com/2012/12/03/clojure-utility-functions-part-ii/</link>
		<comments>http://s-expressions.com/2012/12/03/clojure-utility-functions-part-ii/#comments</comments>
		<pubDate>Tue, 04 Dec 2012 05:42:17 +0000</pubDate>
		<dc:creator>Amit Rathore</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[expressibility]]></category>
		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">https://sexp.wordpress.com/?p=364</guid>
		<description><![CDATA[Cross-posted from Zolo Labs   Here&#8217;s another useful function I keep around: Everyone knows what map does, and what concat does. And what mapcat does.  The function definition for pmapcat above, does what mapcat does, except that by using pmap underneath, it does so in parallel. The semantics are a bit different: first off, the first [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=364&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Cross-posted from <a href="http://blog.zololabs.com">Zolo Labs</a></p>
<p> </p>
<p>Here&#8217;s another useful function I keep around:</p>
<p><script src="https://gist.github.com/4147130.js"></script></p>
<p>Everyone knows what <a href="http://clojuredocs.org/clojure_core/clojure.core/map">map</a> does, and what <a href="http://clojuredocs.org/clojure_core/clojure.core/concat">concat</a> does. And what <a href="http://clojuredocs.org/clojure_core/clojure.core/mapcat">mapcat</a> does. </p>
<p>The function definition for pmapcat above, does what mapcat does, except that by using <a href="http://clojuredocs.org/clojure_core/clojure.core/pmap">pmap</a> underneath, it does so in parallel. The semantics are a bit different: first off, the first parameter is called batches (and not, say, <em>coll, </em>for collection). This means that instead of passing in a simple collection of items, you have to pass in a collection of collections, where each is a batch of items. </p>
<p>Correspondingly, the parameter <em>f</em> is the function that will be applied not to each item, but to each batch of items.</p>
<p>Usage of this might look something like this:</p>
<p><script src="https://gist.github.com/4147177.js"></script></p>
<p>One thing to remember is that pmap uses the Clojure <a href="http://clojuredocs.org/clojure_core/clojure.core/send-off">send-off</a> pool to do it&#8217;s thing, so the usual caveats will apply wrt to how <em>f</em> should behave.</p>
<br />Filed under: <a href='http://s-expressions.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sexp.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sexp.wordpress.com/364/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=364&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://s-expressions.com/2012/12/03/clojure-utility-functions-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69c7419d10661aa2ab01de450a0127b2?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Amit Rathore</media:title>
		</media:content>
	</item>
		<item>
		<title>Clojure utility functions &#8211; part I</title>
		<link>http://s-expressions.com/2012/11/22/clojure-utility-functions-part-i/</link>
		<comments>http://s-expressions.com/2012/11/22/clojure-utility-functions-part-i/#comments</comments>
		<pubDate>Thu, 22 Nov 2012 23:58:16 +0000</pubDate>
		<dc:creator>Amit Rathore</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[expressibility]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">https://sexp.wordpress.com/?p=360</guid>
		<description><![CDATA[Cross-posted from Zolo Labs.   I kept using an extra line of code for this, so I decided to create the following function: https://gist.github.com/4123530 Another extra line of code can similarly be removed using this function: https://gist.github.com/4123531 Obviously, the raw forms (i.e. using doseq or map) can be far more powerful when used with more [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=360&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Cross-posted from <a href="http://blog.zololabs.com/">Zolo Labs</a>.</p>
<p> </p>
<p>I kept using an extra line of code for this, so I decided to create the following function:</p>
<p><a href="https://gist.github.com/4123530" rel="nofollow">https://gist.github.com/4123530</a></p>
<p>Another extra line of code can similarly be removed using this function:</p>
<p><a href="https://gist.github.com/4123531" rel="nofollow">https://gist.github.com/4123531</a></p>
<p>Obviously, the raw forms (i.e. using <a href="http://clojuredocs.org/clojure_core/clojure.core/doseq">doseq</a> or <a href="http://clojuredocs.org/clojure_core/clojure.core/map">map</a>) can be far more powerful when used with more arguments. Still, these simple versions cover 99.9% of my use-cases.</p>
<p>I keep both these (and a few more) in a handy <strong>utils.clojure</strong> namespace I created for just such functions.</p>
<br />Filed under: <a href='http://s-expressions.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sexp.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sexp.wordpress.com/360/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=360&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://s-expressions.com/2012/11/22/clojure-utility-functions-part-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69c7419d10661aa2ab01de450a0127b2?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Amit Rathore</media:title>
		</media:content>
	</item>
		<item>
		<title>Make it right, then make it fast</title>
		<link>http://s-expressions.com/2012/11/05/make-it-right-then-make-it-fast-2/</link>
		<comments>http://s-expressions.com/2012/11/05/make-it-right-then-make-it-fast-2/#comments</comments>
		<pubDate>Mon, 05 Nov 2012 16:47:09 +0000</pubDate>
		<dc:creator>Amit Rathore</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[datomic]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">https://sexp.wordpress.com/?p=355</guid>
		<description><![CDATA[Cross-posted to Zolo Labs.  Alan Perlis once said: A Lisp programmer knows the value of everything, but the cost of nothing. I re-discovered this maxim this past week.  As many of you may know, we&#8217;re using Clojure, Datomic, and Storm to build Zolodeck. (I&#8217;ve described my ideal tech stack here). I&#8217;m quite excited about the leverage [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=355&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Cross-posted to <a href="http://blog.zololabs.com/2012/11/05/make-it-right-then-make-it-fast/">Zolo Labs</a>. </p>
<p>Alan Perlis once said: <span style="font-family:Times;font-size:14px;"><em style="font-family:Times;">A Lisp programmer knows the value of everything, but the cost of nothing.</em></span></p>
<p>I re-discovered this maxim this past week. </p>
<p>As many of you may know, we&#8217;re using <a href="http://clojure.org">Clojure</a>, <a href="http://www.datomic.com">Datomic</a>, and <a href="http://storm-project.net">Storm</a> to build <a href="http://www.zolodeck.com">Zolodeck</a>. (I&#8217;ve described my ideal tech stack <a href="http://blog.zololabs.com/2012/07/28/the-tech-stack-of-the-startup/">here</a>). I&#8217;m quite excited about the leverage these technologies can provide. And I&#8217;m a big believer in getting something to work whichever way I can, as fast as I can, and then worrying about performance and so on. I never want to fall under the evil of <a href="http://c2.com/cgi/wiki?PrematureOptimization">premature optimization</a> and all that… In fact, on this project, I keep telling my colleague (and everyone else who listens) how awesome (and fast) Datomic is, and how its built-in cache will make us stop worrying about database calls. </p>
<p>A function I wrote (that does some fairly involved computation involving relationship graphs and so on) was taking 910 seconds to complete. Yes, more than 15 minutes. Of course, I immediately suspected the database calls, thinking my enthusiasm was somehow misplaced or that I didn&#8217;t really understand the costs. As it turned out, Datomic is plenty fast. And my algorithm was naive and basically sucked… I had knowingly  glossed over a lot of functions that weren&#8217;t exactly performant, and when called within an intensive set of tight loops, they added up fast.</p>
<p>After profiling with Yourkit, I was able to bring down the time to about 900 ms. At nearly a second, this is still quite an expensive call, but certainly less so than when it was ~ 1000x slower earlier.</p>
<p>I relearnt that tools are great and can help in many ways, just not in making up for my stupidity <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<br />Filed under: <a href='http://s-expressions.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sexp.wordpress.com/355/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sexp.wordpress.com/355/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=355&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://s-expressions.com/2012/11/05/make-it-right-then-make-it-fast-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69c7419d10661aa2ab01de450a0127b2?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Amit Rathore</media:title>
		</media:content>
	</item>
		<item>
		<title>Rathore&#8217;s 10th Rule of Programming</title>
		<link>http://s-expressions.com/2012/08/05/rathores-10th-rule-of-programming/</link>
		<comments>http://s-expressions.com/2012/08/05/rathores-10th-rule-of-programming/#comments</comments>
		<pubDate>Mon, 06 Aug 2012 07:47:21 +0000</pubDate>
		<dc:creator>Amit Rathore</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">https://sexp.wordpress.com/?p=344</guid>
		<description><![CDATA[Any sufficiently complicated Clojure (or Lisp) program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Haskell. Filed under: Uncategorized<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=344&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Any sufficiently complicated <a href="http://clojure.org">Clojure</a> (or <a href="http://en.wikipedia.org/wiki/Common_Lisp">Lisp</a>) program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of <a href="http://www.haskell.org">Haskell</a>.</p>
<br />Filed under: <a href='http://s-expressions.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sexp.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sexp.wordpress.com/344/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=344&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://s-expressions.com/2012/08/05/rathores-10th-rule-of-programming/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69c7419d10661aa2ab01de450a0127b2?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Amit Rathore</media:title>
		</media:content>
	</item>
		<item>
		<title>The technical priorities of a startup</title>
		<link>http://s-expressions.com/2012/07/30/the-technical-priorities-of-a-startup/</link>
		<comments>http://s-expressions.com/2012/07/30/the-technical-priorities-of-a-startup/#comments</comments>
		<pubDate>Tue, 31 Jul 2012 06:07:51 +0000</pubDate>
		<dc:creator>Amit Rathore</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[entrepreneurship]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">https://sexp.wordpress.com/?p=333</guid>
		<description><![CDATA[There should be none. I mean, sure, there should be some, but just enough to get over the hump of creating testable hypotheses. The hypotheses, should in turn, be iterations on your product &#8211; and they should be in the hands of your users. There are just so many other things that cause a startup [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=333&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>There should be none. I mean, sure, there should be <em>some</em>, but just enough to get over the hump of creating testable hypotheses. The hypotheses, should in turn, be iterations on your product &#8211; and they should be in the hands of your users.</p>
<p>There are just so many other things that cause a startup to fail, that optimizing the technology stack is just the wrong place to spend any resources. This doesn&#8217;t mean you shouldn&#8217;t use promising technologies if they can solve clearly anticipated problems. It does mean that you don&#8217;t want to waste resources in <a href="http://www.forbes.com/sites/nathanfurr/2011/09/02/1-cause-of-startup-death-premature-scaling/">premature scaling</a>. This, of course, applies to all aspects of your startup &#8211; tech, sales, support, etc. </p>
<p>As far as tech is concerned, pick <a href="http://s-expressions.com/2012/07/28/the-tech-stack-of-the-startup/">the best tools for the job</a>, and then move forward quickly. Don&#8217;t worry about being perfect (in fact, <a href="http://www.dreamsongs.com/RiseOfWorseIsBetter.html">don&#8217;t</a> be). Get <a href="http://venturehacks.com/articles/traction">traction</a> first &#8211; no one cares how amazing your backend is.</p>
<br />Filed under: <a href='http://s-expressions.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sexp.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sexp.wordpress.com/333/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=333&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://s-expressions.com/2012/07/30/the-technical-priorities-of-a-startup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69c7419d10661aa2ab01de450a0127b2?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Amit Rathore</media:title>
		</media:content>
	</item>
		<item>
		<title>The tech stack of the startup</title>
		<link>http://s-expressions.com/2012/07/28/the-tech-stack-of-the-startup/</link>
		<comments>http://s-expressions.com/2012/07/28/the-tech-stack-of-the-startup/#comments</comments>
		<pubDate>Sat, 28 Jul 2012 09:36:36 +0000</pubDate>
		<dc:creator>Amit Rathore</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[entrepreneurship]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">https://sexp.wordpress.com/?p=330</guid>
		<description><![CDATA[This post is about startups and technology. Of course, nothing will help you if you don&#8217;t have a market, or traction, or a business model, or an actual product, or good people. Those are conversations for another day, but now, here&#8217;s what I&#8217;d use if I&#8217;m starting a startup today: Programming languages: Clojure JavaScript (jQuery, backbone.js, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=330&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This post is about startups and technology. Of course, nothing will help you if you don&#8217;t have a market, or traction, or a business model, or an actual product, or good people. Those are conversations for another day, but now, here&#8217;s what I&#8217;d use if I&#8217;m starting a startup today:</p>
<p><strong>Programming languages:</strong></p>
<ul>
<li><a href="http://clojure.org">Clojure</a></li>
<li>JavaScript (<a href="http://jquery.com">jQuery</a>, <a href="http://backbonejs.org">backbone.js</a>, or <a href="https://github.com/clojure/clojurescript/">ClojureScript</a>)</li>
</ul>
<p><strong>Data stores:</strong></p>
<ul>
<li><a href="http://www.datomic.com">Datomic</a></li>
<li><a href="http://redis.io">Redis</a></li>
</ul>
<p><strong>Data processing:</strong></p>
<ul>
<li><a href="http://storm-project.net">Storm</a></li>
</ul>
<p><strong>Machine learning:</strong></p>
<ul>
<li><a href="http://www.r-project.org">R</a></li>
<li><a href="http://www.python.org">Python</a></li>
<li><a href="http://clojure.org">Clojure</a></li>
</ul>
<p><strong>Messaging</strong>:</p>
<ul>
<li><a href="http://www.rabbitmq.com">RabbitMQ</a></li>
</ul>
<p><strong>Version control:</strong></p>
<ul>
<li><a href="https://github.com">Git</a></li>
</ul>
<p><strong>Builds:</strong></p>
<ul>
<li><a href="http://jenkins-ci.org">Jenkins</a></li>
</ul>
<p><strong>Cloud:</strong></p>
<ul>
<li><a href="http://aws.amazon.com">AWS</a> (or <a href="http://www.heroku.com">Heroku</a>)</li>
<li><a href="http://www.opscode.com/chef/">Chef</a></li>
</ul>
<p><strong>Functional testing:</strong></p>
<ul>
<li><a href="http://seleniumhq.org">Selenium</a> (and <a href="http://saucelabs.com">Sauce Labs</a>)</li>
</ul>
<p><strong>Project management:</strong></p>
<ul>
<li><a href="https://www.pivotaltracker.com">Pivotal Tracker</a></li>
</ul>
<p>Am I missing stuff?</p>
<br />Filed under: <a href='http://s-expressions.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sexp.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sexp.wordpress.com/330/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=330&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://s-expressions.com/2012/07/28/the-tech-stack-of-the-startup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69c7419d10661aa2ab01de450a0127b2?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Amit Rathore</media:title>
		</media:content>
	</item>
		<item>
		<title>demonic v0.1 &#8211; utilities for Datomic</title>
		<link>http://s-expressions.com/2012/04/18/demonic-v0-1-utilities-for-datomic/</link>
		<comments>http://s-expressions.com/2012/04/18/demonic-v0-1-utilities-for-datomic/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 06:36:19 +0000</pubDate>
		<dc:creator>Amit Rathore</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[datomic]]></category>
		<category><![CDATA[zolodeck]]></category>

		<guid isPermaLink="false">https://sexp.wordpress.com/?p=327</guid>
		<description><![CDATA[Announcing a new blog: blog.zolodeck.com. Just wrote the first post on my work with Datomic. I&#8217;ve put some of it into a project called demonic, and hopefully, you&#8217;ll find it of some use! Filed under: Uncategorized<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=327&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Announcing a new blog: <a href="http://blog.zolodeck.com/">blog.zolodeck.com</a>. Just wrote the first <a href="http://blog.zolodeck.com/2012/04/17/demonic-v01-utilities-for-datomic/">post</a> on my work with Datomic. I&#8217;ve put some of it into a project called <a href="https://github.com/amitrathore/demonic">demonic</a>, and hopefully, you&#8217;ll find it of some use!</p>
<br />Filed under: <a href='http://s-expressions.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sexp.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sexp.wordpress.com/327/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=s-expressions.com&#038;blog=4254185&#038;post=327&#038;subd=sexp&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://s-expressions.com/2012/04/18/demonic-v0-1-utilities-for-datomic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69c7419d10661aa2ab01de450a0127b2?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Amit Rathore</media:title>
		</media:content>
	</item>
	</channel>
</rss>
