<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>TacTechs</title><generator>Tumblr (3.0; @tactechs)</generator><link>http://tactechs.tumblr.com/</link><item><title>time sleep 1</title><description>&lt;p&gt;time sleep 1&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/49993168567</link><guid>http://tactechs.tumblr.com/post/49993168567</guid><pubDate>Thu, 09 May 2013 00:53:00 -0400</pubDate><category>unix tools</category><category>unix koan</category></item><item><title>Photo</title><description>&lt;img src="http://24.media.tumblr.com/f3310b5c22a2309bf072e4364bc2d765/tumblr_mme83xMAhH1r90truo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;</description><link>http://tactechs.tumblr.com/post/49794548151</link><guid>http://tactechs.tumblr.com/post/49794548151</guid><pubDate>Mon, 06 May 2013 16:11:57 -0400</pubDate><category>monroe</category><category>octocat</category><category>octodex</category></item><item><title>SADDLE: Scala Data Library</title><description>&lt;a href="http://saddle.github.com/"&gt;SADDLE: Scala Data Library&lt;/a&gt;: &lt;p&gt;&lt;a href="http://www.adamlaiacano.com/post/46948129555/saddle-scala-data-library" class="tumblr_blog" target="_blank"&gt;adamlaiacano&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;I sent out a tweet last night asking if there are any good data libraries for Scala. The next morning, Saddle gets released. I’ve heard it described as “Pandas for Scala,” which is great because nothing beats having &lt;a href="http://saddle.github.com/doc/quickstart.html#frame" target="_blank"&gt;data frames&lt;/a&gt; ported to a new language.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The other tool you can investigate is scala breeze.  It’s mostly for NLP, but also good for other things.&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/46948368507</link><guid>http://tactechs.tumblr.com/post/46948368507</guid><pubDate>Tue, 02 Apr 2013 13:48:35 -0400</pubDate></item><item><title>Photo</title><description>&lt;img src="http://24.media.tumblr.com/817c27d24f5977d81b9a18b9ce38828d/tumblr_mji6btPbeJ1r90truo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;</description><link>http://tactechs.tumblr.com/post/45113007653</link><guid>http://tactechs.tumblr.com/post/45113007653</guid><pubDate>Mon, 11 Mar 2013 11:43:05 -0400</pubDate><category>with great power comes great responsibility</category><category>sudo</category></item><item><title>The MongoDB NoSQL Database Blog: Introducing MongoClient</title><description>&lt;a href="http://blog.mongodb.org/post/36666163412/introducing-mongoclient"&gt;The MongoDB NoSQL Database Blog: Introducing MongoClient&lt;/a&gt;: &lt;p&gt;&lt;a class="tumblr_blog" href="http://blog.mongodb.org/post/36666163412/introducing-mongoclient" target="_blank"&gt;mongodb&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Today we are releasing updated versions of most of the officially supported MongoDB drivers with new error checking and reporting defaults. See below for more information on these changes, and check your &lt;a href="http://www.mongodb.org/display/DOCS/Drivers" target="_blank"&gt;driver docs&lt;/a&gt; for specifics.&lt;br/&gt;&lt;br/&gt;Over the past several years, it’s become evident that MongoDB’s…&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://tactechs.tumblr.com/post/36669486519</link><guid>http://tactechs.tumblr.com/post/36669486519</guid><pubDate>Tue, 27 Nov 2012 11:18:37 -0500</pubDate></item><item><title>jvmblog:

Guerrilla Guide to Pure Functional...</title><description>&lt;iframe src="http://player.vimeo.com/video/20293743" width="400" height="300" frameborder="0"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a class="tumblr_blog" href="http://jvmblog.com/post/35474017210/guerrilla-guide-to-pure-functional-programming" target="_blank"&gt;jvmblog&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Guerrilla Guide to Pure Functional Programming&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Functional programming is expression-oriented programming. A functional program is not a sequence of instructions, but a single, &lt;em&gt;referentially transparent&lt;/em&gt; expression. Computation proceeds by substitution.&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://tactechs.tumblr.com/post/35489800784</link><guid>http://tactechs.tumblr.com/post/35489800784</guid><pubDate>Sun, 11 Nov 2012 11:21:41 -0500</pubDate><category>functional programming</category><category>fp</category><category>referential transparency</category></item><item><title>markcoatney:

Today’s the first test of Chris Haseman and Susan...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_md2sk44wAL1qz98u3o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a class="tumblr_blog" href="http://markcoatney.com/post/35133272717/todays-the-first-test-of-chris-haseman-and-susan" target="_blank"&gt;markcoatney&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Today’s the first test of Chris Haseman and Susan McGregor’s very cool Dispatch ap—follow it &lt;a href="http://dispatch-politics.tumblr.com" target="_blank"&gt;here&lt;/a&gt;, and find out &lt;a href="http://dispatchapp.tumblr.com" target="_blank"&gt;more about the project here&lt;/a&gt;. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;omg &lt;a href="http://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools#Second_edition" title="monica lam" target="_blank"&gt;monica lam&lt;/a&gt; is on their team &lt;/fanboy&gt;&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/35134139020</link><guid>http://tactechs.tumblr.com/post/35134139020</guid><pubDate>Tue, 06 Nov 2012 12:16:58 -0500</pubDate></item><item><title>Photo</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_md0wvfwbDX1r90truo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;</description><link>http://tactechs.tumblr.com/post/35061266991</link><guid>http://tactechs.tumblr.com/post/35061266991</guid><pubDate>Mon, 05 Nov 2012 11:38:03 -0500</pubDate><category>screenshots of despair</category><category>scala</category><category>sbt</category></item><item><title>get your ip address</title><description>&lt;p&gt;hostname | xargs host&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/32200826489</link><guid>http://tactechs.tumblr.com/post/32200826489</guid><pubDate>Mon, 24 Sep 2012 12:05:36 -0400</pubDate></item><item><title>Github UI Update</title><description>&lt;p&gt;I am definitely still in the “Anger” phase of the Github UI Update process. Why can’t I just get over it and get into acceptance?&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/31923902728</link><guid>http://tactechs.tumblr.com/post/31923902728</guid><pubDate>Thu, 20 Sep 2012 11:20:37 -0400</pubDate></item><item><title>pirate 0.1.0</title><description>&lt;p&gt;&lt;a href="http://notes.implicit.ly/post/31895064018/pirate-0-1-0" class="tumblr_blog" target="_blank"&gt;implicitly-notes&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;This is the first release of pirate, and it has some neat features.  It parses UNIX style help text naturally, and has an extremely simple API, just the Pirate apply funtion.
&lt;/p&gt;&lt;p&gt;Here’s an example of how it would parse the arguments for uniq.
&lt;/p&gt;&lt;pre&gt;
val helpText = "[-cdu] [-i] [-f int] [-s int] [input_file [output_file]]"
val arguments = "-c -i -f 3 sorted_file".split(" ")
Pirate(helpText)(arguments)
&lt;/pre&gt;
&lt;div class="about"&gt; &lt;p&gt;&lt;a href="http://github.com/mosesn/pirate" target="_blank"&gt;Pirate&lt;/a&gt; parses CLI arguments effortlessly.&lt;/p&gt; &lt;/div&gt;&lt;/blockquote&gt;

&lt;p&gt;Super proud of this, took me a while to work out some features that scala parsers doesn&amp;#8217;t support by itself.  Also, braved the harsh sonatype submission process to submit this.&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/31895253226</link><guid>http://tactechs.tumblr.com/post/31895253226</guid><pubDate>Wed, 19 Sep 2012 21:18:38 -0400</pubDate></item><item><title>I agree, angry unicorn, I agree.</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_ma6znaEVxD1r90truo1_250.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I agree, angry unicorn, I agree.&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/31338199750</link><guid>http://tactechs.tumblr.com/post/31338199750</guid><pubDate>Tue, 11 Sep 2012 11:42:45 -0400</pubDate><category>github</category></item><item><title>Scala Constructor</title><description>&lt;p&gt;Scala doesn&amp;#8217;t have a constructor for its classes, it just evaluates everything in the class.  They are evaluated in order.  If you evaluate&lt;/p&gt;

&lt;pre&gt;x = 3
val x = 0&lt;/pre&gt;

&lt;p&gt;x will be 0 at the end, because val x = 0 is not treated specially.  All expressions are created equal.&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/31064201064</link><guid>http://tactechs.tumblr.com/post/31064201064</guid><pubDate>Fri, 07 Sep 2012 13:30:37 -0400</pubDate><category>Scala</category><category>code</category><category>me being dumb</category><category>constructors</category></item><item><title>Test Driven Development</title><description>&lt;p&gt;I worked on a &lt;a href="http://github.com/mosesn/pirate" target="_blank"&gt;command line arguments parsing tool&lt;/a&gt; which I decided would be a good chance to try out TDD for.  I knew exactly the interface that I wanted, so I knew that I could write the tests for that first.  But I found that just writing tests for the public interface wasn&amp;#8217;t enough, and that I wanted to write tests for more things.  Then I wrote tests for everything I wanted to write, and it worked, and kept getting incrementally better, until I realized that I had structured it in a way that I fundamentally couldn&amp;#8217;t add on a feature I wanted to add without changing it drastically, so I did a big rewrite.  This project was actually a rewrite of an older project, so it was a rewrite of a rewrite, but I felt I was on a pretty good path.  I threw out all of my tests except for the public interface, and started again.&lt;/p&gt;

&lt;p&gt;Midway through this rewrite, I ran into a really hard problem, and then another, in quick succession.  I found that TDD was not a good process for solving these problems, and that the only good process was to think really hard about the problem and then verify it.  Tests were a good way to verify, but weren&amp;#8217;t at all useful in trying to solve the problem.&lt;/p&gt;

&lt;p&gt;In general, I think that tests are great for a few reasons.  First of all, if you have good public interface tests, you can refactor your code and know that it is still correct if it still passes your public interface tests. Second of all, at a lower level, at your private interface level, if you write a quick script to check that a private interface works, you can shove it into a test and make sure you never break it.  Both of these things are good, and help give you confidence when refactoring.  Furthermore, for very simple problems, test first design lets you know the entire way along that you&amp;#8217;re correct, which means you don&amp;#8217;t have to double back and fix anything, which is much slower. This makes the assumption that coding is sort of like running down a track, where you just have to make sure that you&amp;#8217;re staying within the white lines.&lt;/p&gt;

&lt;p&gt;However, what is test-first good for?  It seems good for teaching you to refactor, but if you refactor anyway, what remains?  It&amp;#8217;s good to specify your interface immediately.  But you can get that with README driven design, and then you&amp;#8217;ve also written up your docs by the time you&amp;#8217;re finished.&lt;/p&gt;

&lt;p&gt;I think that in many ways, test-first is like training wheels for using tests properly.  By forcing someone to conform to a test they&amp;#8217;ve written, they will have to have a test, because they aren&amp;#8217;t permitted to write the real code until after the test has been written.  Beyond that, it seems about as useful as README driven development.&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/30800124938</link><guid>http://tactechs.tumblr.com/post/30800124938</guid><pubDate>Mon, 03 Sep 2012 11:04:34 -0400</pubDate><category>tests</category><category>code</category><category>tdd</category><category>software engineering</category><category>craft</category></item><item><title>Protocol Buffers, Avro, Thrift &amp; MessagePack</title><description>&lt;a href="http://www.igvita.com/2011/08/01/protocol-buffers-avro-thrift-messagepack/"&gt;Protocol Buffers, Avro, Thrift &amp; MessagePack&lt;/a&gt;</description><link>http://tactechs.tumblr.com/post/30248622096</link><guid>http://tactechs.tumblr.com/post/30248622096</guid><pubDate>Sun, 26 Aug 2012 12:39:53 -0400</pubDate></item><item><title>the colon's role in Scala type description</title><description>&lt;p&gt;Something that I ran into recently when reading code is the&amp;#160;: in type arguments.  Specifically, in &lt;a href="http://github.com/twitter/algebird" target="_blank"&gt;algebird&lt;/a&gt;, from twitter, in the Operators.scala file, there was an generic class that was parameterized with a weird type&amp;#8212;it was [T&amp;#160;: Group], where Group is a trait that was described elsewhere in the project.  Later in the code, they called implicitly[Group[T]] to invoke it, which also struck me as odd.  It turns out that this is an optional replacement for implicit arguments, which you might have seen when trying to sort something.  Instead of writing&lt;/p&gt;

&lt;pre&gt;class ClassName[T] (implicit arg: Ordered[T]) = ...&lt;/pre&gt;

&lt;p&gt;you can instead write&lt;/p&gt;

&lt;pre&gt;class ClassName[T : Ordered]&lt;/pre&gt;

&lt;p&gt;Much more succinct, but not very intuitive.&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/30243739602</link><guid>http://tactechs.tumblr.com/post/30243739602</guid><pubDate>Sun, 26 Aug 2012 11:08:42 -0400</pubDate><category>code</category><category>scala</category><category>types</category><category>implicit</category><category>colon</category></item><item><title>git things I learned this week</title><description>&lt;p&gt;&lt;a href="http://mt.tumblr.com/post/30118787483/git-things-i-learned-this-week" class="tumblr_blog" target="_blank"&gt;mt&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;a class="tumblr_blog" href="http://jacobbijani.com/post/30118039135/git-things-i-learned-this-week" target="_blank"&gt;jacob&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;a href="http://webchick.net/node/99" target="_blank"&gt;git bisect&lt;/a&gt;&lt;/pre&gt;
&lt;p&gt;Do a binary search between a known good and bad state to find the first bad commit.&lt;/p&gt;
&lt;pre&gt;&lt;a href="http://stackoverflow.com/a/4750245" target="_blank"&gt;git commit --verbose&lt;/a&gt;&lt;/pre&gt;
&lt;p&gt;Show a diff of the changes to be committed below the commit summary.&lt;/p&gt;
&lt;pre&gt;&lt;a href="http://nuclearsquid.com/writings/git-add/" target="_blank"&gt;git add --patch&lt;/a&gt;&lt;/pre&gt;
&lt;p&gt;Choose which changed lines (a &lt;em&gt;hunk&lt;/em&gt;, heh) in a file you want to commit.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Similarly,&lt;/p&gt;
&lt;pre&gt;git stash --patch&lt;/pre&gt;
&lt;p&gt;is awesome.  (let’s you stash changes hunk-by-hunk)&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;git stash &amp;#8212;keep-index is also useful, although I didn&amp;#8217;t realize at first that although your index is kept in the directory, the stash you create ALSO has the index, not just things which are not yet in your index, which can create confusion if you try to use it as you use git stash &amp;#8212;patch.&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/30120312772</link><guid>http://tactechs.tumblr.com/post/30120312772</guid><pubDate>Fri, 24 Aug 2012 16:27:40 -0400</pubDate><category>git</category><category>code</category><category>unix tools</category></item><item><title>phrasing the question properly</title><description>&lt;p&gt;I was just going to ask a question on stackoverflow, but I think that by phrasing the question properly, I answered it for myself.  I wonder if that&amp;#8217;s why it&amp;#8217;s often so useful to talk to someone about your problem, that when you&amp;#8217;re asking someone for help about it, you figure it out while describing the problem.  It seems like a good way to save time for yourself and others would be if whenever you had a problem, you very carefully formulated the question, and if the careful formulation didn&amp;#8217;t solve it for you, then you asked it.&lt;/p&gt;</description><link>http://tactechs.tumblr.com/post/29880761613</link><guid>http://tactechs.tumblr.com/post/29880761613</guid><pubDate>Tue, 21 Aug 2012 01:05:58 -0400</pubDate><category>code</category><category>meta</category><category>questions</category><category>stackoverflow</category><category>learning</category><category>thinking really hard</category></item><item><title>scala reduce for possibly empty collections</title><description>&lt;p&gt;Part of what makes scala great is that you always know exactly what you&amp;#8217;re getting when you get back when you call a function.  A spade will be a spade, and not a null.  However, with collections, a collection will sometimes be empty when you get it back&amp;#8212;it happens to everybody sometimes.  There are some operations you can do on an empty collection, like a map, which will just do nothing, but there are some others that just don&amp;#8217;t know what to do if they find that the collection is empty.  reduce is the biggest one, and it makes a lot of sense.  If you know that with a list of integers, you want to sum them, what is it supposed to do with an empty list?  At least with a fold, it can default to the initial value (and often you will be able to fix your problem by just using a fold instead of a reduce), but a reduce has bupkis if the collection is empty.&lt;/p&gt;

&lt;p&gt;Here comes reduceOption to save the day!  If the reduce would fail because the collection was empty, it will just return a None instead, and a Some(returnvalue) for nonempty collections.  Then, just call a getOrElse and supply your alternate value.  If there was some operation you wanted to do to the result of the reduce if it returned properly, this supports that too!  Just throw in a map after your reduce, and then getOrElse on that.&lt;/p&gt;

&lt;pre&gt;collection reduceOption (_ | _) map (func(_)) getOrElse 0 &lt;/pre&gt;</description><link>http://tactechs.tumblr.com/post/29739228649</link><guid>http://tactechs.tumblr.com/post/29739228649</guid><pubDate>Sun, 19 Aug 2012 00:49:16 -0400</pubDate><category>scala</category><category>code</category><category>fp</category><category>functional programming</category><category>reduce</category><category>reduceOption</category></item><item><title>patch for all changes back to last commit</title><description>&lt;p&gt;git diff implicitly creates a patch, but the default is to patch from tracked changes to index, so that a naked&lt;/p&gt;

&lt;pre&gt;git diff&lt;/pre&gt;

&lt;p&gt;doesn&amp;#8217;t show the changes you&amp;#8217;ve made but added to the index, for example if you just added a new file.  In order to do that, you can run&lt;/p&gt;

&lt;pre&gt;git diff HEAD&lt;/pre&gt;</description><link>http://tactechs.tumblr.com/post/29624716835</link><guid>http://tactechs.tumblr.com/post/29624716835</guid><pubDate>Fri, 17 Aug 2012 11:41:00 -0400</pubDate><category>git</category><category>git diff</category><category>unix tools</category><category>code</category><category>scripting</category></item></channel></rss>
