<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>mccv - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-5386b2e7" type="application/json"/><link>http://mccv.disqus.com/</link><description></description><atom:link href="http://mccv.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 03 Jan 2012 05:37:53 -0000</lastBuildDate><item><title>Re: What is timestamp used for in all those Cassandra calls?</title><link>http://www.themcwongs.com/?p=71#comment-399456474</link><description>good job!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">akku Asus Z99Fm</dc:creator><pubDate>Tue, 03 Jan 2012 05:37:53 -0000</pubDate></item><item><title>Re: What is timestamp used for in all those Cassandra calls?</title><link>http://www.themcwongs.com/?p=71#comment-399455761</link><description>Protect</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">VGP-BPS9A/B</dc:creator><pubDate>Tue, 03 Jan 2012 05:35:07 -0000</pubDate></item><item><title>Re: Exception Erasure</title><link>http://www.themcwongs.com/?p=80#comment-399454523</link><description>sfsf</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">akku Asus Z99Fm</dc:creator><pubDate>Tue, 03 Jan 2012 05:29:49 -0000</pubDate></item><item><title>Re: Exception Erasure</title><link>http://www.themcwongs.com/?p=80#comment-346411466</link><description>Dieser Artikel war sehr gut geschrieben, ich danke Ihnen für den Austausch!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dell inspiron 1525 akku</dc:creator><pubDate>Thu, 27 Oct 2011 02:33:54 -0000</pubDate></item><item><title>Re: Getting Started With The Talking Puffin Twitter API</title><link>http://www.themcwongs.com/?p=44#comment-289921372</link><description>Ich überlegte einen anderen Laptop zu ändern, weil es zu schwer war, Hardware schlecht. Aber vor allem, weil die Batterie zu schnell. Dank zu teilen, geben Sie mir eine gute Wahl</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Akku XPS M1330</dc:creator><pubDate>Thu, 18 Aug 2011 04:17:20 -0000</pubDate></item><item><title>Re: Things that are easier in Scala vol. 2</title><link>http://www.themcwongs.com/?p=74#comment-289869901</link><description>Dieser Artikel war sehr gut geschrieben, ich danke Ihnen für den Austausch!:)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Akku XPS M1330</dc:creator><pubDate>Thu, 18 Aug 2011 02:10:36 -0000</pubDate></item><item><title>Re: What is timestamp used for in all those Cassandra calls?</title><link>http://www.themcwongs.com/?p=71#comment-263305103</link><description>this is a good akku dell shop &lt;a href="http://www.dellakku.de/" rel="nofollow"&gt;http://www.dellakku.de/&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">akku dell</dc:creator><pubDate>Mon, 25 Jul 2011 02:53:37 -0000</pubDate></item><item><title>Re: You can&amp;#8217;t clone superstars</title><link>http://www.themcwongs.com/?p=48#comment-221133829</link><description>&lt;a href="http://www.medionakku.de" rel="nofollow"&gt;Medion Akku&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">medion akku</dc:creator><pubDate>Wed, 08 Jun 2011 05:04:39 -0000</pubDate></item><item><title>Re: Getting Started With The Talking Puffin Twitter API</title><link>http://www.themcwongs.com/?p=44#comment-221133092</link><description>making stuff simple and easy to use (traversing firewalls</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">medion akku</dc:creator><pubDate>Wed, 08 Jun 2011 05:03:08 -0000</pubDate></item><item><title>Re: Getting Started With The Talking Puffin Twitter API</title><link>http://www.themcwongs.com/?p=44#comment-83614508</link><description>That's very helpful and interesting!  I really like this article.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">drivers</dc:creator><pubDate>Mon, 04 Oct 2010 01:28:35 -0000</pubDate></item><item><title>Re: Getting Started With The Talking Puffin Twitter API</title><link>http://www.themcwongs.com/?p=44#comment-72302464</link><description>making stuff simple and easy to use (traversing firewalls is pretty important in this case).</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">laptop battery</dc:creator><pubDate>Thu, 26 Aug 2010 02:03:29 -0000</pubDate></item><item><title>Re: Scala exceptions vs. pattern matching</title><link>http://www.themcwongs.com/?p=33#comment-44009763</link><description>There's more to monadic error handling than just forcing the developer to state via verbosity that he is aware of a potential error. Note that scala.Option defines a few higher-order functions, namely foreach, filter, map, and flatMap: &lt;a href="http://www.scala-lang.org/docu/files/api/scala/Option.html" rel="nofollow"&gt;http://www.scala-lang.org/docu...&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;These allow us to pass behavior to an Option instance that will only execute if it has a value (ie an instance of Some). For example, to get a collection of the status updates:
&lt;br&gt;
&lt;br&gt;val matches = new HttpXMLMatches()
&lt;br&gt;val url = "&lt;a href="http://twitter.com/statuses/public_timeline.xml" rel="nofollow"&gt;http://twitter.com/statuses/pu...&lt;/a&gt;"
&lt;br&gt;matches.getXML(url).map { _ \\ "status" \ "text" map { _ text } }
&lt;br&gt;
&lt;br&gt;This results in a Some[Seq[String]] of the text nodes of the status updates. You could also use for comprehensions:
&lt;br&gt;
&lt;br&gt;for(xml &amp;lt;- matches.getXML(url)) yield (xml \\ "status" \ "text" map { _ text })
&lt;br&gt;
&lt;br&gt;Or if you just want to do some side-effecting action, like printing the text:
&lt;br&gt;
&lt;br&gt;for(xml &amp;lt;- matches.getXML(url)) { println(xml \\ "status" \ "text" text) }
&lt;br&gt;
&lt;br&gt;I'm still trying to work out some guidelines as to when monadic handling is preferable to exceptions.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chris_lewis</dc:creator><pubDate>Fri, 09 Apr 2010 11:04:36 -0000</pubDate></item><item><title>Re: Things that are easier in Scala vol. 2</title><link>http://www.themcwongs.com/?p=74#comment-14422877</link><description>Ah yes of course - I remembered that soon after I posted :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">astubbs</dc:creator><pubDate>Fri, 07 Aug 2009 07:32:39 -0000</pubDate></item><item><title>Re: Things that are easier in Scala vol. 2</title><link>http://www.themcwongs.com/?p=74#comment-13993954</link><description>Not sure on the exact question... all of the Java ones are checked exceptions.  Scala doesn't force you to catch them, so I didn't.  Realistically there should by a try block somewhere to handle Thrift and Cassandra errors.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mccv</dc:creator><pubDate>Wed, 05 Aug 2009 15:23:54 -0000</pubDate></item><item><title>Re: Things that are easier in Scala vol 1</title><link>http://www.themcwongs.com/?p=50#comment-13986738</link><description>A couple of things..
&lt;br&gt;
&lt;br&gt;a) If you make it a trait - you can mix it in and just call tryNTimes without the object classifier - that's closer still, right?
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;b) You can still retry and function, by creating a curried function or function pointer and passing that in:
&lt;br&gt;
&lt;br&gt;def myFunc(s:String) { println(s) }
&lt;br&gt;def toRetry = myFunc("Hi!")
&lt;br&gt;tryNTimes(toRetry, 5)
&lt;br&gt;
&lt;br&gt;right? I used this style in some test code I just wrote, where I had a test sequence that applied to several code blocks, some that took params.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">astubbs</dc:creator><pubDate>Wed, 05 Aug 2009 12:54:11 -0000</pubDate></item><item><title>Re: Things that are easier in Scala vol. 2</title><link>http://www.themcwongs.com/?p=74#comment-13986240</link><description>Nice - I like. Were all those exceptions run time exceptions - is that why you aren't catching them?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">astubbs</dc:creator><pubDate>Wed, 05 Aug 2009 12:44:21 -0000</pubDate></item><item><title>Re: Running Scala specs tests in Maven with JUnit 4</title><link>http://www.themcwongs.com/?p=66#comment-13399737</link><description>Excellent, that would be quite a bit nicer.  Having the object/class pair is a bit clunky... Overall the framework is very nice though.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mccv</dc:creator><pubDate>Mon, 27 Jul 2009 11:01:50 -0000</pubDate></item><item><title>Re: Running Scala specs tests in Maven with JUnit 4</title><link>http://www.themcwongs.com/?p=66#comment-13366874</link><description>Hi Mark,
&lt;br&gt;
&lt;br&gt;Thanks for your post.
&lt;br&gt;
&lt;br&gt;2 tips for making your specification even more concise (with specs.1.6.0-SNAPSHOT or 1.5.1 SNAPSHOT):
&lt;br&gt;
&lt;br&gt;This will make your specification class a JUnit test:
&lt;br&gt;class BasicCassandra extends SpecificationWithJUnit { ... }
&lt;br&gt;
&lt;br&gt;It is still runnable in the console with: 
&lt;br&gt;
&lt;br&gt;scala -cp &amp;lt;...&amp;gt; run BasicCassandra
&lt;br&gt;
&lt;br&gt;And you can write (if you like it):
&lt;br&gt;
&lt;br&gt;cass.connect().before
&lt;br&gt;cass.close().after
&lt;br&gt;
&lt;br&gt;Cheers,
&lt;br&gt;
&lt;br&gt;Eric.
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">etorreborre</dc:creator><pubDate>Sun, 26 Jul 2009 20:05:59 -0000</pubDate></item><item><title>Re: Things that are easier in Scala vol 1</title><link>http://www.themcwongs.com/?p=50#comment-9819536</link><description>Wow!  Just in time as I'm contemplating retrying slurping of a user's tweets.  I'll add something like "requeue" as the final result where all N tries failed.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">khrabrov</dc:creator><pubDate>Sat, 23 May 2009 00:26:57 -0000</pubDate></item></channel></rss>
