<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEQMSHo7fyp7ImA9WhRWGEQ.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327</id><updated>2012-01-06T16:33:09.407-08:00</updated><category term="BASIC" /><category term="Python" /><category term="Twitter" /><category term="JPA" /><category term="Alice" /><category term="computer history" /><category term="College for Kids" /><category term="shdh" /><category term="assessment" /><category term="io2009" /><category term="actors" /><category term="Kojo" /><category term="Hibernate" /><category term="scratch sensor" /><category term="annotations" /><category term="FriendFeed" /><category term="TA" /><category term="TCP/IP" /><category term="HTTP" /><category term="Swing" /><category term="Scala" /><category term="git" /><category term="Java Posse" /><category term="javaone" /><category term="spam" /><category term="Squeak" /><category term="email" /><category term="javaone2008" /><category term="firewall" /><category term="140tc" /><category term="Android" /><category term="probability" /><category term="Digg" /><category term="teaching" /><category term="StumbleUpon" /><category term="QuickQuiz" /><category term="math" /><category term="jQuery" /><category term="Lift" /><category term="Java EE" /><category term="JGroups" /><category term="robotics" /><category term="tutorial" /><category term="jpr09" /><category term="graphics" /><category term="UML" /><category term="XML" /><category term="music" /><category term="Scratch" /><category term="Hyperic HQ" /><category term="IO2008" /><category term="sendmail" /><category term="DBSchools" /><category term="Java" /><category term="API" /><category term="Seesmic" /><category term="Google" /><category term="Google App Engine" /><category term="JavaFX" /><category term="Pygame" /><category term="Twitter API" /><category term="Netbeans" /><category term="TalkingPuffin" /><category term="redirection" /><category term="AI class" /><category term="VMware" /><category term="Java Posse Roundup" /><category term="JMX" /><category term="Ruby" /><category term="JavaOne2009" /><category term="SuperHappyDevHouse" /><category term="SpamAssassin" /><category term="JavaScript" /><title>Dave Briccetti’s Blog</title><subtitle type="html">I write mostly about my experiences programming and teaching programming to kids. I program with Scala, Java and Python, and I teach with Scratch, Python and Kojo (Scala).</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://briccetti.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>112</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/DaveBriccetti" /><feedburner:info uri="davebriccetti" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0UNSXo9fyp7ImA9WhRSGUg.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-4071559122959166273</id><published>2011-11-22T00:34:00.000-08:00</published><updated>2011-11-22T00:41:38.467-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-22T00:41:38.467-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="AI class" /><title>AI Class Hidden Markov Chain Scala Solution</title><content type="html">I just took my Stanford Artificial Intelligence class midterm and got 98%. I missed one part of one problem. The problems we do are somewhat complicated and there are many opportunities to make mistakes. I was astounded that I got over 80%, doing all the problems by hand, with a calculator and a spreadsheet.&lt;br /&gt;
&lt;br /&gt;
It took me many hours to review the material and take the test. I realized while taking the test that I should have encoded the procedures for solving the various types of problems (probability, Bayes Networks, Markov Decision Processes and the like) into computer programs. Then I could have simply run those programs given the data values in the test and produced very likely correct results. I will do this from now on. Let me start with a solution for solving a Hidden Markov Chain problem.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-G_URXwr3jLs/TstdCYzP-2I/AAAAAAAAAmU/2wR4GIQCBas/s1600/hidden+markov+chain.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-G_URXwr3jLs/TstdCYzP-2I/AAAAAAAAAmU/2wR4GIQCBas/s1600/hidden+markov+chain.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Given probabilities that a rainy day will follow a sunny day and vice versa, and the starting state, this program produces the correct probabilities that it will rain on the next three days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-4071559122959166273?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/BEmOJV3Dm4c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/4071559122959166273/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=4071559122959166273" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/4071559122959166273?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/4071559122959166273?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/BEmOJV3Dm4c/ai-class-hidden-markov-chain-scala.html" title="AI Class Hidden Markov Chain Scala Solution" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-G_URXwr3jLs/TstdCYzP-2I/AAAAAAAAAmU/2wR4GIQCBas/s72-c/hidden+markov+chain.png" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/11/ai-class-hidden-markov-chain-scala.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEERX85fSp7ImA9WhdbEk8.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-6862253790187673315</id><published>2011-10-09T21:56:00.000-07:00</published><updated>2011-10-09T21:56:44.125-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-09T21:56:44.125-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Lift" /><category scheme="http://www.blogger.com/atom/ns#" term="Kojo" /><category scheme="http://www.blogger.com/atom/ns#" term="teaching" /><title>Thanks for the Help Today, Indrajit (Silicon Valley Code Camp, Working on Lift)</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-TPHzVDsgNCU/TpJ4g3AqX7I/AAAAAAAAAhI/7D_30JMI-mE/s1600/Indrajit+and+Bric.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="191" src="http://2.bp.blogspot.com/-TPHzVDsgNCU/TpJ4g3AqX7I/AAAAAAAAAhI/7D_30JMI-mE/s320/Indrajit+and+Bric.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
I spent the day today at Silicon Valley Code Camp with Lift developer &lt;b&gt;Indrajit Raychaudhuri&lt;/b&gt;. First he helped me teach Kojo to a small group of kids. Then we did a talk together on Scala, Lift and TalkingPuffin Web. Then came the best part: We spent the next several hours as you see us here in the picture, with him teaching me how to be a Lift committer. As I took careful notes, he walked me through all the pulling, building, branching, pushing, ticket creating, diffing, and Review Board creating needed to make a change to Lift.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-6862253790187673315?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/rNgIECjtFHc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/6862253790187673315/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=6862253790187673315" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/6862253790187673315?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/6862253790187673315?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/rNgIECjtFHc/thanks-for-help-today-indrajit-silicon.html" title="Thanks for the Help Today, Indrajit (Silicon Valley Code Camp, Working on Lift)" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-TPHzVDsgNCU/TpJ4g3AqX7I/AAAAAAAAAhI/7D_30JMI-mE/s72-c/Indrajit+and+Bric.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/10/thanks-for-help-today-indrajit-silicon.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YHRXYyeSp7ImA9WhdbEU0.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-658372859205247916</id><published>2011-10-08T13:18:00.000-07:00</published><updated>2011-10-08T13:18:54.891-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-08T13:18:54.891-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Kojo" /><title>Interesting Scala/Kojo/Lift People Join Me at Silicon Valley Code Camp</title><content type="html">What fun it is to be in the Scala community, and to know many nice and interesting people!&lt;br /&gt;
&lt;br /&gt;
At the last minute, while preparing for my Kojo talk for kids at Silicon Valley Code Camp, I emailed Kojo creator &lt;b&gt;Lalit Pant&lt;/b&gt; to see if he wanted to say hello from India to my classroom of 4th to 12th graders by videoconference, and he wrote back with an enthusiastic “Yes!”&lt;br /&gt;
&lt;br /&gt;
Once again, &lt;b&gt;Ramnivas Laddad&lt;/b&gt; and his talented programming son &lt;b&gt;Shadaj&lt;/b&gt; will help me teach the kids. &lt;br /&gt;
&lt;br /&gt;
While planning my “Talking Puffin Web: A Scala/Lift Webapp” talk, I thought, why not ask super Lift committer &lt;b&gt;Indrajit Raychaudhuri&lt;/b&gt;, who is in the Bay Area for JavaOne, to share the stage with me and introduce Scala and Lift. He was very pleased to accept!&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.siliconvalley-codecamp.com/Sessions.aspx?ForceSortBySessionTime=true&amp;amp;AttendeeId=1078"&gt;Both classes&lt;/a&gt; are Sunday, October 9th, 2011.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-658372859205247916?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/iuDDc-pNLqg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/658372859205247916/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=658372859205247916" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/658372859205247916?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/658372859205247916?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/iuDDc-pNLqg/interesting-scalakojolift-people-join.html" title="Interesting Scala/Kojo/Lift People Join Me at Silicon Valley Code Camp" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/10/interesting-scalakojolift-people-join.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkECQHs8eSp7ImA9WhdUEEU.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-8399941897174106394</id><published>2011-09-26T17:47:00.000-07:00</published><updated>2011-09-26T17:51:01.571-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-26T17:51:01.571-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="math" /><title>Practicing Math (Regression Line) with Scala</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.youtube.com/watch?v=nXFL8IZZJcg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="229" src="http://4.bp.blogspot.com/-ufXmmn_jHCo/ToEbMFsDStI/AAAAAAAAAfM/z0RMcaD9zuA/s320/Regression+Line+Calculation+in+Scala+-+YouTube.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
As you may know, I am taking Stanford’s online &lt;a href="http://www.ai-class.com/"&gt;Artificial Intelligence Course&lt;/a&gt; taught by Sebastian Thrun and Peter Norvig. To prepare myself I am learning more math. The &lt;a href="http://www.khanacademy.org/"&gt;Khan Academy&lt;/a&gt; videos have been a huge help. I learned how to find the straight line that best fits a set of given points, and then played around with the calculation in Scala. I made a &lt;a href="http://www.youtube.com/watch?v=nXFL8IZZJcg"&gt;video showing what I did&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-8399941897174106394?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/YUgd_b4t2ZQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/8399941897174106394/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=8399941897174106394" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/8399941897174106394?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/8399941897174106394?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/YUgd_b4t2ZQ/as-you-may-know-i-am-taking-stanfords.html" title="Practicing Math (Regression Line) with Scala" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-ufXmmn_jHCo/ToEbMFsDStI/AAAAAAAAAfM/z0RMcaD9zuA/s72-c/Regression+Line+Calculation+in+Scala+-+YouTube.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/09/as-you-may-know-i-am-taking-stanfords.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8MR3k7fCp7ImA9WhdVEkw.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-6559348559661547813</id><published>2011-09-16T17:19:00.000-07:00</published><updated>2011-09-16T17:21:26.704-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-16T17:21:26.704-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><title>Visualizing List.scala’s Reverse Method</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-sCrSggY8l9g/TnPmiipEuqI/AAAAAAAAAco/-LFdyfRFXac/s1600/reverse-list.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-sCrSggY8l9g/TnPmiipEuqI/AAAAAAAAAco/-LFdyfRFXac/s1600/reverse-list.png" /&gt;&lt;/a&gt;&lt;/div&gt;
I encountered a list.reverse in one of my Scala projects, and was curious as to how that method in the Scala library worked. So I opened the source code (seen at the top left of the picture) and worked through it in the REPL (Scala interactive environment), diagramming it as I went along. I thought it might be interesting to others.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-6559348559661547813?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/vVLcQZpaM3I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/6559348559661547813/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=6559348559661547813" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/6559348559661547813?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/6559348559661547813?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/vVLcQZpaM3I/visualizing-listscalas-reverse-method.html" title="Visualizing List.scala’s Reverse Method" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-sCrSggY8l9g/TnPmiipEuqI/AAAAAAAAAco/-LFdyfRFXac/s72-c/reverse-list.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/09/visualizing-listscalas-reverse-method.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcCRHkyfSp7ImA9WhdTGU4.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-2851888030789335390</id><published>2011-07-17T12:14:00.000-07:00</published><updated>2011-07-17T12:14:25.795-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-17T12:14:25.795-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Kojo" /><category scheme="http://www.blogger.com/atom/ns#" term="teaching" /><category scheme="http://www.blogger.com/atom/ns#" term="College for Kids" /><title>Kojo Creator Lalit Pant Visited My Classes</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.youtube.com/playlist?list=PLC784DDEA72506602" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="165" src="http://3.bp.blogspot.com/-dmaetHRsQzI/TiMzw_raJ1I/AAAAAAAAAXI/JxUQAE-iefw/s320/YouTube+-+Broadcast+Yourself..png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;I started teaching with &lt;a href="http://kogics.net/sf:kojo"&gt;Kojo&lt;/a&gt; this summer, and it has gone very well. Kojo’s creator Lalit Pant was visiting the Bay Area, and he spent an afternoon with my grade 4–10 programming classes at DVC College for Kids. We published a two-part video of one of his presentations, which you can find in my &lt;a href="http://www.youtube.com/playlist?list=PLC784DDEA72506602"&gt;Kojo playlist&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-2851888030789335390?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/ACHL1cAiYT8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/2851888030789335390/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=2851888030789335390" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/2851888030789335390?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/2851888030789335390?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/ACHL1cAiYT8/kojo-creator-lalit-pant-visited-my.html" title="Kojo Creator Lalit Pant Visited My Classes" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-dmaetHRsQzI/TiMzw_raJ1I/AAAAAAAAAXI/JxUQAE-iefw/s72-c/YouTube+-+Broadcast+Yourself..png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/07/kojo-creator-lalit-pant-visited-my.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QMRHg8eSp7ImA9WhdTFEU.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-2079719166238278009</id><published>2011-07-12T08:43:00.000-07:00</published><updated>2011-07-12T08:43:05.671-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-12T08:43:05.671-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><title>Using Implicit Conversions to Simplify Using Java APIs</title><content type="html">At last night’s Bay Area Scala Enthusiasts meeting, Dick Wall shared many excellent tips for effective Scala programming. One that especially interested me was using implicit conversions to simplify the use of Java API calls that require an object that implements an interface such as Runnable, with its single run method. In the Java way, one might write code like this:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; new Timer().schedule(new TimerTask {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; def run() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; println("Hello")&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; }, 100L)&lt;br /&gt;
&lt;br /&gt;
Wouldn’t it be nicer to supply the code for the TimerTask to run without wrapping it in a run method?&lt;br /&gt;
&lt;br /&gt;
I wrote &lt;a href="https://gist.github.com/1078092"&gt;an example&lt;/a&gt; based on what I learned from Dick, and then Kris Nuttycombe suggested a refinement in response to &lt;a href="http://twitter.com/#%21/dcbriccetti/statuses/90791799840444416"&gt;a post of mine&lt;/a&gt; on Twitter.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-2079719166238278009?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/5wJQbAj5b8M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/2079719166238278009/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=2079719166238278009" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/2079719166238278009?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/2079719166238278009?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/5wJQbAj5b8M/using-implicit-conversions-to-simplify.html" title="Using Implicit Conversions to Simplify Using Java APIs" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/07/using-implicit-conversions-to-simplify.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcGRH8zcSp7ImA9WhZWFkk.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-1310553805929143468</id><published>2011-05-17T00:50:00.000-07:00</published><updated>2011-05-17T08:43:45.189-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-17T08:43:45.189-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Kojo" /><category scheme="http://www.blogger.com/atom/ns#" term="Scratch" /><category scheme="http://www.blogger.com/atom/ns#" term="teaching" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><category scheme="http://www.blogger.com/atom/ns#" term="College for Kids" /><title>Kojo (Scala), Python and Scratch for summer teaching</title><content type="html">This summer at Diablo Valley College &lt;a href="http://www.dvc.edu/business/parents/college4kids/index.htm"&gt;College for Kids &lt;/a&gt;I will be teaching:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://kogics.net/sf:kojo"&gt;Kojo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://python.org/"&gt;Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://scratch.mit.edu/"&gt;Scratch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;I am dropping Alice, at least for the time being. Its progress is glacially slow, and I wonder if version 3 will ever release (it’s been several years).&lt;br /&gt;
&lt;br /&gt;
Being in the Scala community I have been aware of Kojo, but hadn’t made plans to teach it until my teaching assistant Ethan Kuefner said he really wanted to use it.&lt;br /&gt;
&lt;br /&gt;
For the Python course I think we’ll drop Pygame, xturtle and the like, and concentrate on Python 3 basics, and steer those students interested in graphics to Kojo.&lt;br /&gt;
&lt;br /&gt;
Scratch will continue as usual, along with GIMP, Google Sketch Up and Inkscape for graphics, and Audacity for sound generation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-1310553805929143468?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/7upwhhsog_Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/1310553805929143468/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=1310553805929143468" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/1310553805929143468?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/1310553805929143468?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/7upwhhsog_Y/koja-scala-python-and-scratch-for.html" title="Kojo (Scala), Python and Scratch for summer teaching" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/05/koja-scala-python-and-scratch-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYDRHc_fyp7ImA9WhZTFU0.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-7739084585187068081</id><published>2011-03-18T19:02:00.000-07:00</published><updated>2011-03-18T19:02:55.947-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-18T19:02:55.947-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TalkingPuffin" /><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><title>TalkingPuffin Demo and Code Walkthrough of Link Indirection</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.youtube.com/watch?v=QQ1MPXuiZzo" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="225" src="https://lh4.googleusercontent.com/-_U003CGns0Y/TYQNnnddTQI/AAAAAAAAAWU/9rPFdIe2Lps/s400/tpuf+unindirection.png" width="400" /&gt;&lt;span id="goog_1940752683"&gt;&lt;/span&gt;&lt;/a&gt;&lt;span id="goog_1940752684"&gt;&lt;/span&gt;&lt;/div&gt;&lt;a href="http://talkingpuffin.org/"&gt;TalkingPuffin&lt;/a&gt; can automatically move past intermediate pages like DZone’s, taking you to the ultimate target of a link you find in a tweet. Here is a video demonstration of the feature, and a walkthrough of the Scala code that implements it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-7739084585187068081?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/qAX1mbRb9mk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/7739084585187068081/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=7739084585187068081" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/7739084585187068081?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/7739084585187068081?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/qAX1mbRb9mk/talkingpuffin-demo-and-code-walkthrough.html" title="TalkingPuffin Demo and Code Walkthrough of Link Indirection" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh4.googleusercontent.com/-_U003CGns0Y/TYQNnnddTQI/AAAAAAAAAWU/9rPFdIe2Lps/s72-c/tpuf+unindirection.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/03/talkingpuffin-demo-and-code-walkthrough.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMASXYyeSp7ImA9WhZTFE4.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-4951753268906035000</id><published>2011-03-18T00:47:00.000-07:00</published><updated>2011-03-18T00:47:28.891-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-18T00:47:28.891-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TalkingPuffin" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><title>TalkingPuffin Web Hashtags Analysis</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-dFsGPV5MOWY/TYMNgE4XlhI/AAAAAAAAAWQ/kynMPXC2u2c/s1600/TalkingPuffin+Hashtag+Frequencies.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="176" src="https://lh3.googleusercontent.com/-dFsGPV5MOWY/TYMNgE4XlhI/AAAAAAAAAWQ/kynMPXC2u2c/s400/TalkingPuffin+Hashtag+Frequencies.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://talkingpuffin.org/"&gt;TalkingPuffin Web&lt;/a&gt; now shows hashtags and the number of times each occurs in the set of tweets analyzed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-4951753268906035000?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/ivKjB1OTlUE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/4951753268906035000/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=4951753268906035000" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/4951753268906035000?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/4951753268906035000?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/ivKjB1OTlUE/talkingpuffin-web-hashtags-analysis.html" title="TalkingPuffin Web Hashtags Analysis" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh3.googleusercontent.com/-dFsGPV5MOWY/TYMNgE4XlhI/AAAAAAAAAWQ/kynMPXC2u2c/s72-c/TalkingPuffin+Hashtag+Frequencies.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/03/talkingpuffin-web-hashtags-analysis.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYESXY8fCp7ImA9WhZTEUU.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-1960294321795672192</id><published>2011-03-15T02:58:00.000-07:00</published><updated>2011-03-15T02:58:28.874-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-15T02:58:28.874-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TalkingPuffin" /><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><title>Screencast from TalkingPuffin Talk at BASE</title><content type="html">We had a great session at Bay Area Scala Enthusiasts Monday. I presented TalkingPuffin Web, and got some great feedback and code improvements from the audience. I published an &lt;a href="http://www.youtube.com/view_play_list?p=65817342043EE809"&gt;edited recording&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-1960294321795672192?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/eBOmu_p5Ejs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/1960294321795672192/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=1960294321795672192" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/1960294321795672192?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/1960294321795672192?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/eBOmu_p5Ejs/screencast-from-talkingpuffin-talk-at.html" title="Screencast from TalkingPuffin Talk at BASE" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/03/screencast-from-talkingpuffin-talk-at.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cNRXwzeCp7ImA9WhZTEEo.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-9000746179883911250</id><published>2011-03-13T20:58:00.000-07:00</published><updated>2011-03-13T20:58:14.280-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-13T20:58:14.280-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TalkingPuffin" /><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Lift" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><title>Showing TalkingPuffin Web at Bay Area Scala Enthusiasts</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-XnrLotGbRjk/TX2Rdo3N3gI/AAAAAAAAAWM/dgmXl_zYSME/s1600/TalkingPuffin+Web-1.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="280" src="https://lh5.googleusercontent.com/-XnrLotGbRjk/TX2Rdo3N3gI/AAAAAAAAAWM/dgmXl_zYSME/s400/TalkingPuffin+Web-1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;On Monday, March 14th, I will show the Scala and Lift code behind &lt;a href="http://talkingpuffin.org/"&gt;TalkingPuffin Web&lt;/a&gt; (pictured), at &lt;a href="http://groups.google.com/group/scala-base/browse_frm/thread/3ddcc3d1420d4bf3"&gt;Bay Area Scala Enthusiasts&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-9000746179883911250?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/_LzFYQeG8Dw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/9000746179883911250/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=9000746179883911250" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/9000746179883911250?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/9000746179883911250?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/_LzFYQeG8Dw/showing-talkingpuffin-web-at-bay-area.html" title="Showing TalkingPuffin Web at Bay Area Scala Enthusiasts" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh5.googleusercontent.com/-XnrLotGbRjk/TX2Rdo3N3gI/AAAAAAAAAWM/dgmXl_zYSME/s72-c/TalkingPuffin+Web-1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/03/showing-talkingpuffin-web-at-bay-area.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYARncyfCp7ImA9Wx9aFEs.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-4696051695181702599</id><published>2011-03-06T19:22:00.000-08:00</published><updated>2011-03-06T19:22:27.994-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-06T19:22:27.994-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TalkingPuffin" /><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="Swing" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><title>TalkingPuffin Version 1.0 Released</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-eHMjSxVt8c8/TXROh2yJPLI/AAAAAAAAAVg/PvdVdotIPLs/s1600/TalkingPuffin.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="https://lh5.googleusercontent.com/-eHMjSxVt8c8/TXROh2yJPLI/AAAAAAAAAVg/PvdVdotIPLs/s1600/TalkingPuffin.png" /&gt;&lt;/a&gt;&lt;/div&gt;Congratulations and thanks to everyone who has helped with the project. We have a 1.0 release of &lt;a href="http://talkingpuffin.org/"&gt;TalkingPuffin&lt;/a&gt;!&lt;br /&gt;
&lt;br /&gt;
TalkingPuffin is an open source Twitter client written in the Scala programming language, and running on Java. The desktop application is built with Swing, and the Web application runs on &lt;a href="http://liftweb.net/"&gt;Lift&lt;/a&gt;. Two of its strengths are filtering and user analysis.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-4696051695181702599?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/sKaJRw4Y7WU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/4696051695181702599/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=4696051695181702599" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/4696051695181702599?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/4696051695181702599?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/sKaJRw4Y7WU/talkingpuffin-version-10-released.html" title="TalkingPuffin Version 1.0 Released" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh5.googleusercontent.com/-eHMjSxVt8c8/TXROh2yJPLI/AAAAAAAAAVg/PvdVdotIPLs/s72-c/TalkingPuffin.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/03/talkingpuffin-version-10-released.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MMQn87cSp7ImA9Wx9aEEg.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-5218568051921708989</id><published>2011-03-02T01:51:00.000-08:00</published><updated>2011-03-02T01:51:23.109-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-02T01:51:23.109-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TalkingPuffin" /><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter API" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title>New TalkingPuffin Web Feature: Tweets Timeline</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-XHAM4WUsGew/TW4P9Dwi-YI/AAAAAAAAAVc/Mrl1h6SvJrA/s1600/havent+been+on+here+in+forever-1.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="230" src="https://lh5.googleusercontent.com/-XHAM4WUsGew/TW4P9Dwi-YI/AAAAAAAAAVc/Mrl1h6SvJrA/s400/havent+been+on+here+in+forever-1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;The new &lt;a href="http://talkingpuffin.org/"&gt;TalkingPuffin&lt;/a&gt; Web app is coming along nicely. The latest feature shows a user’s tweets on a timeline, and lets you move the mouse over them and read them. My motivation for creating the feature was to make it easier to decide whether I want to follow someone I discover. If their tweet density is not too high, and the content is good, I may follow.&lt;br /&gt;
&lt;br /&gt;
The timeline is JavaScript based, using the Flot jQuery plugin. The Web app is created with Scala and Lift, and uses Lift’s Flot widget.&lt;br /&gt;
&lt;br /&gt;
TalkingPuffin is now 6,827 lines of Scala code, in &lt;a href="https://github.com/dcbriccetti/talking-puffin"&gt;134 source files&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-5218568051921708989?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/H5nqigjhX98" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/5218568051921708989/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=5218568051921708989" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/5218568051921708989?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/5218568051921708989?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/H5nqigjhX98/new-talkingpuffin-web-feature-tweets.html" title="New TalkingPuffin Web Feature: Tweets Timeline" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh5.googleusercontent.com/-XHAM4WUsGew/TW4P9Dwi-YI/AAAAAAAAAVc/Mrl1h6SvJrA/s72-c/havent+been+on+here+in+forever-1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/03/new-talkingpuffin-web-feature-tweets.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQASHg9eCp7ImA9Wx9bE0k.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-6799254925400055035</id><published>2011-02-21T18:39:00.000-08:00</published><updated>2011-02-21T18:39:09.660-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-21T18:39:09.660-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TalkingPuffin" /><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><title>TalkingPuffin Version 1.0 Release Candidate 1</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://talkingpuffin.org/" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="366" src="http://4.bp.blogspot.com/--pCVB1dLHu8/TWMgaei2FlI/AAAAAAAAAVY/KN2Eiwbe__0/s400/tabbed+pane+ui-2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;Two years ago I created a “Simple Twitter Client” (that was actually the name of it for awhile). I wanted a project for learning Scala, and I wanted to have a Twitter client that I could enhance any way I wanted. Along the way many people helped, and some even contributed code. Some of their Twitter names appear on Github with the &lt;a href="https://github.com/dcbriccetti/talking-puffin"&gt;source code&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
At long last, I think this project is ready for release, so I now announce &lt;a href="http://talkingpuffin.org/"&gt;TalkingPuffin&lt;/a&gt; Version 1.0 Release Candidate 1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-6799254925400055035?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/X67sWZYI140" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/6799254925400055035/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=6799254925400055035" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/6799254925400055035?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/6799254925400055035?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/X67sWZYI140/talkingpuffin-version-10-release.html" title="TalkingPuffin Version 1.0 Release Candidate 1" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/--pCVB1dLHu8/TWMgaei2FlI/AAAAAAAAAVY/KN2Eiwbe__0/s72-c/tabbed+pane+ui-2.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/02/talkingpuffin-version-10-release.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUENRn0_eyp7ImA9Wx9bEk8.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-4737262806915803875</id><published>2011-02-20T10:48:00.000-08:00</published><updated>2011-02-20T10:48:17.343-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-20T10:48:17.343-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TalkingPuffin" /><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter API" /><title>TalkingPuffin Code Changes Overview for Twitter4J Conversion</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.youtube.com/watch?v=BsRkPBtBpok" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="130" src="http://1.bp.blogspot.com/-PEVpI9YPdQ4/TWFhIItt9AI/AAAAAAAAAUw/26nbOcwZ3a0/s200/tpuf-twitter4j.png" width="200" /&gt;&lt;span id="goog_1755747806"&gt;&lt;/span&gt;&lt;/a&gt;&lt;span id="goog_1755747807"&gt;&lt;/span&gt;&lt;/div&gt;&lt;a href="http://talkingpuffin.org/"&gt;TalkingPuffin&lt;/a&gt; now uses &lt;a href="http://twitter4j.org/"&gt;Twitter4J&lt;/a&gt; to access the Twitter API. &lt;a href="http://www.youtube.com/watch?v=BsRkPBtBpok"&gt;This video&lt;/a&gt; shows some of the coding changes I made in order to use it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-4737262806915803875?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/_WR6uP8PUbM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/4737262806915803875/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=4737262806915803875" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/4737262806915803875?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/4737262806915803875?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/_WR6uP8PUbM/talkingpuffin-code-changes-overview-for.html" title="TalkingPuffin Code Changes Overview for Twitter4J Conversion" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-PEVpI9YPdQ4/TWFhIItt9AI/AAAAAAAAAUw/26nbOcwZ3a0/s72-c/tpuf-twitter4j.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/02/talkingpuffin-code-changes-overview-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04ARXc4cCp7ImA9Wx9UGEQ.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-607701154980224212</id><published>2011-02-16T14:39:00.000-08:00</published><updated>2011-02-16T14:39:04.938-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-16T14:39:04.938-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TalkingPuffin" /><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><title>TalkingPuffin Coming Back After OAuth Conversion</title><content type="html">TalkingPuffin, the open source Twitter client written in Scala, is making its way back into service following a delayed conversion to OAuth (the new way that Twitter does client authentication).&lt;br /&gt;
&lt;br /&gt;
Today we made Version 0.80d Development Version (not quite a release candidate) &lt;a href="http://talkingpuffin.org/"&gt;available online&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I am very excited to be using TalkingPuffin again, as those of you who follow &lt;a href="http://twitter.com/dcbriccetti"&gt;@dcbriccetti&lt;/a&gt; may have already read. Despite its unrefined—some would say ugly—appearance, it is an extremely powerful tool for filtering and reading tweets in a variety of ways.&lt;br /&gt;
&lt;br /&gt;
As always, I invite other interested Scala developers to contribute to the project, and again thank those now helping and those who have helped in the past.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-607701154980224212?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/tD4Eo5Ts4CI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/607701154980224212/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=607701154980224212" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/607701154980224212?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/607701154980224212?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/tD4Eo5Ts4CI/talkingpuffin-coming-back-after-oauth.html" title="TalkingPuffin Coming Back After OAuth Conversion" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/02/talkingpuffin-coming-back-after-oauth.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQCQHc-eip7ImA9Wx9WGU4.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-278829620800082496</id><published>2011-01-24T21:46:00.000-08:00</published><updated>2011-01-24T21:46:01.952-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-24T21:46:01.952-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="VMware" /><title>Using the VI Java API from Scala</title><content type="html">My primary client these days is VMware. Recently my team has been using the VI Java API to fetch information about running virtual machines in &lt;a href="http://www.vmware.com/products/vsphere/"&gt;vSphere&lt;/a&gt;. Steve Jin, the author of VI Java, asked me to write a “Hello VM” (sort of a “Hello World” for a virtualized environment) program in Scala.&lt;br /&gt;
&lt;br /&gt;
I sent him some code and he wrote &lt;a href="http://www.doublecloud.org/2011/01/how-you-can-use-vi-java-api-in-scala-a-quick-sample/"&gt;a blog post&lt;/a&gt; about it. You can find the code in his post. Here it is, formatted nicely. Some smart folks on the #scala channel on IRC reviewed it for me and made some great suggestions. One challenge was wrapping the searchManagedEntities call (line 31)—which can return either null, or an array of zero or more ManagedEntity elements—into something more Scala-like, a List of VirtualMachines.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_wI6-hsgeyOk/TT5hSGZgE_I/AAAAAAAAAUk/QWCH_0b8m9Q/s1600/HelloVM.scala.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="387" src="http://4.bp.blogspot.com/_wI6-hsgeyOk/TT5hSGZgE_I/AAAAAAAAAUk/QWCH_0b8m9Q/s400/HelloVM.scala.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-278829620800082496?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/9nYRHLW5Wlg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/278829620800082496/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=278829620800082496" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/278829620800082496?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/278829620800082496?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/9nYRHLW5Wlg/using-vi-java-api-from-scala.html" title="Using the VI Java API from Scala" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_wI6-hsgeyOk/TT5hSGZgE_I/AAAAAAAAAUk/QWCH_0b8m9Q/s72-c/HelloVM.scala.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/01/using-vi-java-api-from-scala.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIGQ3Y8fip7ImA9Wx9WGEQ.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-9042087714769570228</id><published>2011-01-23T22:32:00.000-08:00</published><updated>2011-01-24T09:35:22.876-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-24T09:35:22.876-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="probability" /><title>Dice Throw Simulation in Java and Scala</title><content type="html">It’s fun from time to time to see what Java programs look like when converted to Scala. This program simulates throwing two six-sided dice 200 times, and creates a crude histogram of the results, like this:&lt;br /&gt;
&lt;br /&gt;
2: XXXX&lt;br /&gt;
3: XXXXXXXXXX&lt;br /&gt;
4: XXXXXXXXXXXXXXXXXXXXXX&lt;br /&gt;
5: XXXXXXXXXXXXXXXXXXXXX&lt;br /&gt;
6: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&lt;br /&gt;
7: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&lt;br /&gt;
8: XXXXXXXXXXXXXXXXXXXXXXXXXX&lt;br /&gt;
9: XXXXXXXXXXXXXXXXXXXXX&lt;br /&gt;
10: XXXXXXXXXXXXXX&lt;br /&gt;
11: XXXXXXXXXXXX&lt;br /&gt;
12: XXXX&lt;br /&gt;
&lt;br /&gt;
The Java version is 31 lines, and the Scala version, 18. Some things I notice that make the Scala version shorter:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Methods with only one line can skip the braces, and in fact, can take up just one line (lines 6, and 16–17).&lt;/li&gt;
&lt;li&gt;The histogram bars can be created with the multiplication method (*) (line 17).&lt;/li&gt;
&lt;/ul&gt;[Update: see the comments for much shorter versions of both the Java and the Scala versions.] &lt;br /&gt;
&lt;ul&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_wI6-hsgeyOk/TT0aIrxbsxI/AAAAAAAAAUc/MSdOMVtBUUQ/s1600/throws.java.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/_wI6-hsgeyOk/TT0aIrxbsxI/AAAAAAAAAUc/MSdOMVtBUUQ/s400/throws.java.png" width="322" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_wI6-hsgeyOk/TT0aIz9rFEI/AAAAAAAAAUg/N7arnqvHOGY/s1600/throws.scala.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="206" src="http://4.bp.blogspot.com/_wI6-hsgeyOk/TT0aIz9rFEI/AAAAAAAAAUg/N7arnqvHOGY/s400/throws.scala.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-9042087714769570228?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/vsbyzgKykxY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/9042087714769570228/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=9042087714769570228" title="20 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/9042087714769570228?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/9042087714769570228?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/vsbyzgKykxY/dice-throw-simulation-in-java-and-scala.html" title="Dice Throw Simulation in Java and Scala" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_wI6-hsgeyOk/TT0aIrxbsxI/AAAAAAAAAUc/MSdOMVtBUUQ/s72-c/throws.java.png" height="72" width="72" /><thr:total>20</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/01/dice-throw-simulation-in-java-and-scala.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IBSX8zcCp7ImA9Wx9XEEQ.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-7649709819726383332</id><published>2011-01-03T12:09:00.000-08:00</published><updated>2011-01-03T14:59:18.188-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-03T14:59:18.188-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hyperic HQ" /><category scheme="http://www.blogger.com/atom/ns#" term="SpamAssassin" /><category scheme="http://www.blogger.com/atom/ns#" term="sendmail" /><category scheme="http://www.blogger.com/atom/ns#" term="email" /><category scheme="http://www.blogger.com/atom/ns#" term="spam" /><title>Monitoring Spam Control using Hyperic HQ</title><content type="html">I’ve stepped up my efforts recently against spam to my davebsoft.com domain. SpamAssassin does a good job of moving suspected spam to folders to review, but I have been finding hundreds of emails a day in these folders. So I am doing more blocking of spammers’ domains using Sendmail’s access.db.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Using Hyperic HQ&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Hyperic HQ is a system monitoring tool. (The company that develops it is owned by VMware, a client.) I wrote a very simple plugin for it to monitor spam activity on davebsoft.com. Here is one of the displays.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_wI6-hsgeyOk/TSImdiRg7gI/AAAAAAAAAUQ/yfU_X_ZHnRA/s1600/HQ+View+Service+Monitor+Current+Health+-+Spam+Statistics.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="419" src="http://3.bp.blogspot.com/_wI6-hsgeyOk/TSImdiRg7gI/AAAAAAAAAUQ/yfU_X_ZHnRA/s640/HQ+View+Service+Monitor+Current+Health+-+Spam+Statistics.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style="clear: both;"&gt;RBL per minute is the number of emails blocked per minute using realtime blackhole lists. From my sendmail.mc:&lt;/div&gt;&lt;span style="font-family: courier new;"&gt;FEATURE('dnsbl', 'zen.spamhaus.org')dnl&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;FEATURE('dnsbl', 'bl.spamcop.net')dnl&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Denied per minute shows what I block in access.db. I have many lines like this:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;hoghsluteo.com REJECT&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;guysenandi.com REJECT&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;elampupbid.com REJECT&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Not shown in the display are probably-spam and maybe-spam, which are counts of messages SpamAssassin has found to be very likely and somewhat likely to be spam.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;The Hyperic HQ Plugin&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The plugin that enables this report consists of two files. This XML descriptor:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_wI6-hsgeyOk/TSIkIlHI07I/AAAAAAAAAUI/j9KdRy7CiNQ/s1600/xml.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" src="http://2.bp.blogspot.com/_wI6-hsgeyOk/TSIkIlHI07I/AAAAAAAAAUI/j9KdRy7CiNQ/s640/xml.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style="clear: both;"&gt;and this script:&lt;/div&gt;&lt;br /&gt;
&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_wI6-hsgeyOk/TSImCeDpu-I/AAAAAAAAAUM/bT29HKDlUoU/s1600/script.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="93" src="http://3.bp.blogspot.com/_wI6-hsgeyOk/TSImCeDpu-I/AAAAAAAAAUM/bT29HKDlUoU/s400/script.jpg" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;spam-stats.sh&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;Finding Domains to Block&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Once I collect some spam, I find the most offending domains and block them. I run this:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;grep '^From: ' ~/imap/*-spam|cut -d'@' -f2|cut -d'&amp;gt;' -f1|sort|uniq -c|sort -r|head -15&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
which produces this:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;6 shvigerebm.com&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;5 tramake.com&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;5 rainsha.com&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;5 klerebm.com&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;⋮&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Six spams came from the nonsense domain shvigerebm.com, five came from the next several, and so on. I add these names to my Sendmail access file to block them.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Spam Situation Improved&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Hyperic HQ, with my simple plugin, helps me monitor the spam activity on davebsoft.com, and actively blocking the most offending domains has greatly reduced the number of possible-spam messages to review every day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-7649709819726383332?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/Jy1CtL7B2J4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/7649709819726383332/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=7649709819726383332" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/7649709819726383332?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/7649709819726383332?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/Jy1CtL7B2J4/monitoring-spam-control-using-hyperic.html" title="Monitoring Spam Control using Hyperic HQ" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_wI6-hsgeyOk/TSImdiRg7gI/AAAAAAAAAUQ/yfU_X_ZHnRA/s72-c/HQ+View+Service+Monitor+Current+Health+-+Spam+Statistics.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2011/01/monitoring-spam-control-using-hyperic.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08GRH0-cCp7ImA9WxFWGEk.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-6957888034582306949</id><published>2010-06-06T10:34:00.001-07:00</published><updated>2010-06-06T10:37:05.358-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-06T10:37:05.358-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Lift" /><category scheme="http://www.blogger.com/atom/ns#" term="Scratch" /><category scheme="http://www.blogger.com/atom/ns#" term="Pygame" /><category scheme="http://www.blogger.com/atom/ns#" term="teaching" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>Presenting at Silicon Valley Code Camp in October</title><content type="html">I have proposed &lt;a href="http://siliconvalley-codecamp.com/Sessions.aspx?id=396"&gt;three sessions&lt;/a&gt; for Silicon Valley Code Camp 2010. Two are about programming for kids, and one is about Scala and Lift.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-6957888034582306949?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/tjJ7MweYyKc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/6957888034582306949/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=6957888034582306949" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/6957888034582306949?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/6957888034582306949?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/tjJ7MweYyKc/presenting-at-silicon-valley-code-camp.html" title="Presenting at Silicon Valley Code Camp in October" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2010/06/presenting-at-silicon-valley-code-camp.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcCRX8-fSp7ImA9WxBTGU0.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-739536876056801731</id><published>2009-12-14T22:48:00.000-08:00</published><updated>2009-12-15T10:01:04.155-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-15T10:01:04.155-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Lift" /><title>Talk Slides for BirdShow: A Lift App for Showing Flickr Photos</title><content type="html">&lt;a style="" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://briccettiphoto.com/"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 400px; height: 273px;" src="http://4.bp.blogspot.com/_wI6-hsgeyOk/SycyWTPliTI/AAAAAAAAARs/zLJHwhXv_YM/s400/Eleanor+Briccetti+Photography.png" alt="" id="BLOGGER_PHOTO_ID_5415352435640469810" border="0" /&gt;&lt;/a&gt;Good lightning talks at Bay Area Scala Enthusiasts, and a good presentation on Groovy from our friend Andres Almiray.&lt;br /&gt;&lt;br /&gt;I have published &lt;a href="http://www.slideshare.net/dcbriccetti/birdshow-a-lift-app-for-showing-flickr-photos-2720594"&gt;my talk slides&lt;/a&gt;. [Corrected link]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-739536876056801731?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/KdS7Udd8vVg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/739536876056801731/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=739536876056801731" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/739536876056801731?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/739536876056801731?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/KdS7Udd8vVg/talk-slides-for-birdshow-lift-app-for.html" title="Talk Slides for BirdShow: A Lift App for Showing Flickr Photos" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_wI6-hsgeyOk/SycyWTPliTI/AAAAAAAAARs/zLJHwhXv_YM/s72-c/Eleanor+Briccetti+Photography.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2009/12/talk-slides-for-birdshow-lift-app-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cFQXk6cCp7ImA9WxBTF0g.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-2531813226125014290</id><published>2009-12-13T16:32:00.000-08:00</published><updated>2009-12-13T16:36:50.718-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-13T16:36:50.718-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Lift" /><title>BirdShow Scala Lift Application Lightning Talk at BASE</title><content type="html">&lt;span class="fixed_width"  style="font-family:Courier,Monospaced;"&gt;For a lightning talk at Bay Area Scala Enthusiasts at Twitter HQ&lt;br /&gt;Monday, I will show BirdShow, a Lift application that shows photos&lt;br /&gt;from Flickr. Perhaps you’ll try it out and offer suggestions here:&lt;br /&gt;&lt;br /&gt;http://groups.google.com/group/liftweb/browse_frm/thread/3c1493bd25f37b96&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="fixed_width"  style="font-family:Courier,Monospaced;"&gt;&lt;a style="" target="_blank" rel="nofollow" href="http://www.google.com/url?sa=D&amp;amp;q=http://briccettiphoto.com&amp;amp;usg=AFQjCNGtWy-oYunICg5G35taQlxWDWZV4Q"&gt;http://briccettiphoto.com&lt;/a&gt;&lt;br /&gt;&lt;a style="" target="_blank" rel="nofollow" href="http://www.google.com/url?sa=D&amp;amp;q=http://github.com/dcbriccetti/bird-show&amp;amp;usg=AFQjCNHzX1iJC2kX0xZOIGK6s_sKsVqsug"&gt;http://github.com/dcbriccetti/bird-show&lt;/a&gt; &lt;/span&gt;&lt;span class="fixed_width"  style="font-family:Courier,Monospaced;"&gt;&lt;a style="" target="_blank" rel="nofollow" href="http://www.google.com/url?sa=D&amp;amp;q=http://github.com/dcbriccetti/bird-show&amp;amp;usg=AFQjCNHzX1iJC2kX0xZOIGK6s_sKsVqsug"&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-2531813226125014290?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/T4vpFQ069XY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/2531813226125014290/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=2531813226125014290" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/2531813226125014290?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/2531813226125014290?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/T4vpFQ069XY/birdshow-scala-lift-application.html" title="BirdShow Scala Lift Application Lightning Talk at BASE" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2009/12/birdshow-scala-lift-application.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UFRX4-eCp7ImA9WxNaF04.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-2440370504551449685</id><published>2009-12-01T20:54:00.000-08:00</published><updated>2009-12-01T21:20:14.050-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-01T21:20:14.050-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TalkingPuffin" /><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Swing" /><title>Scala Higher-Order Functions Example with Swing</title><content type="html">Here is a trait I created that I was mixing in with &lt;span style="font-family: courier new;"&gt;java.awt.Components&lt;/span&gt; to see if they were “active.” These &lt;span style="font-family: courier new;"&gt;Component&lt;/span&gt;s reside inside &lt;span style="font-family: courier new;"&gt;JInternalFrame&lt;/span&gt;s or &lt;span style="font-family: courier new;"&gt;JFrame&lt;/span&gt;s, and I really want to know if the frame ancestor is active. It’s a bit ugly, but I use &lt;span style="font-family: courier new;"&gt;SwingUtilities.getAncestorOfClass&lt;/span&gt; to find the ancestor of type &lt;span style="font-family: courier new;"&gt;JInternalFrame&lt;/span&gt; or &lt;span style="font-family: courier new;"&gt;JFrame&lt;/span&gt;, and then call the appropriate method, &lt;span style="font-family: courier new;"&gt;isSelected&lt;/span&gt; or &lt;span style="font-family: courier new;"&gt;isActive&lt;/span&gt;, to determine if the frame is active.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wI6-hsgeyOk/SxX0CKt3HJI/AAAAAAAAARI/o711mgYjlTw/s1600-h/act1.png"&gt;&lt;img style="cursor: pointer; width: 400px; height: 126px;" src="http://3.bp.blogspot.com/_wI6-hsgeyOk/SxX0CKt3HJI/AAAAAAAAARI/o711mgYjlTw/s400/act1.png" alt="" id="BLOGGER_PHOTO_ID_5410498845429144722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now I not only want to see if a &lt;span style="font-family: courier new;"&gt;Component&lt;/span&gt; is active, but I want to set it active. So I want to add a new method, &lt;span style="font-family: courier new;"&gt;activate&lt;/span&gt;, to the trait. I will use the same approach with &lt;span style="font-family: courier new;"&gt;SwingUtilities.getAncestorOfClass&lt;/span&gt;, but I don’t want to duplicate the code. Here is the result.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_wI6-hsgeyOk/SxX03xmfcXI/AAAAAAAAARQ/ug02WSPWZFE/s1600-h/act2.png"&gt;&lt;img style="cursor: pointer; width: 400px; height: 316px;" src="http://2.bp.blogspot.com/_wI6-hsgeyOk/SxX03xmfcXI/AAAAAAAAARQ/ug02WSPWZFE/s400/act2.png" alt="" id="BLOGGER_PHOTO_ID_5410499766400282994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I created a private method, &lt;span style="font-family: courier new;"&gt;doWithAncestor&lt;/span&gt;, which expects two functions as arguments. If the ancestor is a &lt;span style="font-family: courier new;"&gt;JInternalFrame&lt;/span&gt;, then &lt;span style="font-family: courier new;"&gt;doWithAncestor&lt;/span&gt; calls the &lt;span style="font-family: courier new;"&gt;doForInternalFrame&lt;/span&gt; function. Otherwise it calls the &lt;span style="font-family: courier new;"&gt;doForJFrame&lt;/span&gt; function. &lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;br /&gt;doWithAncestor&lt;/span&gt; is parameterized in &lt;span style="font-family: courier new;"&gt;T&lt;/span&gt;. When called from &lt;span style="font-family: courier new;"&gt;isActive&lt;/span&gt;, which returns &lt;span style="font-family: courier new;"&gt;Boolean&lt;/span&gt;, &lt;span style="font-family: courier new;"&gt;T&lt;/span&gt; is &lt;span style="font-family: courier new;"&gt;Boolean&lt;/span&gt;. When called from &lt;span style="font-family: courier new;"&gt;activate&lt;/span&gt;, which returns &lt;span style="font-family: courier new;"&gt;Unit&lt;/span&gt;, &lt;span style="font-family: courier new;"&gt;T&lt;/span&gt; is &lt;span style="font-family: courier new;"&gt;Unit&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-2440370504551449685?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/sPoBQRuZhMA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/2440370504551449685/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=2440370504551449685" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/2440370504551449685?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/2440370504551449685?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/sPoBQRuZhMA/scala-higher-order-functions-example.html" title="Scala Higher-Order Functions Example with Swing" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_wI6-hsgeyOk/SxX0CKt3HJI/AAAAAAAAARI/o711mgYjlTw/s72-c/act1.png" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2009/12/scala-higher-order-functions-example.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcNRHc4eSp7ImA9WxNUFks.&quot;"><id>tag:blogger.com,1999:blog-2740216681747553327.post-1094738850721249097</id><published>2009-11-07T23:52:00.000-08:00</published><updated>2009-11-07T23:58:15.931-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-07T23:58:15.931-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TalkingPuffin" /><category scheme="http://www.blogger.com/atom/ns#" term="Scala" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter API" /><title>Filtering Twitter Noise Slides from SHDH 35</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.slideshare.net/dcbriccetti/filtering-twitter-noise-2447245"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 400px; height: 365px;" src="http://2.bp.blogspot.com/_wI6-hsgeyOk/SvZ5MIaBqII/AAAAAAAAAQw/oM3TB-QWuSI/s400/Filtering+Twitter+Noise.png" alt="" id="BLOGGER_PHOTO_ID_5401638052399523970" border="0" /&gt;&lt;/a&gt;Here are the slides from my Filtering Twitter Noise lightning talk at SuperHappyDevHouse.&lt;br /&gt;&lt;br /&gt;Thanks, Palantir, for hosting us. I’ll repay them slightly by passing on that they are looking for good software engineers. I might be interested myself if they were doing Scala (they have looked into it a bit, and I think over time they might be persuaded).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740216681747553327-1094738850721249097?l=briccetti.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DaveBriccetti/~4/5-rY8TAr3Vw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://briccetti.blogspot.com/feeds/1094738850721249097/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2740216681747553327&amp;postID=1094738850721249097" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/1094738850721249097?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2740216681747553327/posts/default/1094738850721249097?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DaveBriccetti/~3/5-rY8TAr3Vw/filtering-twitter-noise-slides-from.html" title="Filtering Twitter Noise Slides from SHDH 35" /><author><name>Dave Briccetti</name><uri>https://profiles.google.com/118351514074348592571</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-Ou_OCF8kygI/AAAAAAAAAAI/AAAAAAAAAZs/H-Rb69E8_gQ/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_wI6-hsgeyOk/SvZ5MIaBqII/AAAAAAAAAQw/oM3TB-QWuSI/s72-c/Filtering+Twitter+Noise.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://briccetti.blogspot.com/2009/11/filtering-twitter-noise-slides-from.html</feedburner:origLink></entry></feed>

