<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Palantir Technologies</title>
	<atom:link href="http://blog.palantirtech.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.palantirtech.com</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Wed, 03 Sep 2008 22:28:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Printing to Plotters in Java</title>
		<link>http://blog.palantirtech.com/2008/08/11/printing-to-plotters-in-java/</link>
		<comments>http://blog.palantirtech.com/2008/08/11/printing-to-plotters-in-java/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 00:00:18 +0000</pubDate>
		<dc:creator>Carl</dc:creator>
		
		<category><![CDATA[javatech]]></category>

		<category><![CDATA[tips and tricks]]></category>

		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://blog.palantirtech.com/?p=104</guid>
		<description><![CDATA[
Carl juggles with his creation
One of the things our customers love to do is print our beautiful object graphs&#1083;&#1072;&#1085;&#1076;&#1096;&#1072;&#1092;&#1090; and tape them to the wall for discussion.  What they hate to do is print 30 pages, line them up, and tape them to a poster one at a time.  So we bought a [...]]]></description>
			<content:encoded><![CDATA[<div style='float: right; width: 300px; text-align: center; margin-left:10px; margin-bottom: 10px'>
<a href='http://blog.palantirtech.com/wp-content/uploads/2008/08/carljuggles-thumb.jpg' title='carljuggles-thumb.jpg'><img src='http://blog.palantirtech.com/wp-content/uploads/2008/08/carljuggles-thumb.jpg' alt='carljuggles-thumb.jpg' /><br/><em>Carl juggles with his creation</em></a></div>
<p>One of the things our customers love to do is print our <a href="http://blog.palantirtech.com/wp-content/uploads/2008/07/pg-timefilter.png">beautiful object graphs</a><font style="position: absolute;overflow: hidden;height: 0;width: 0"><a href="http://www.sibresource.ru/">&#1083;&#1072;&#1085;&#1076;&#1096;&#1072;&#1092;&#1090;</a></font> and tape them to the wall for discussion.  What they hate to do is print 30 pages, line them up, and tape them to a poster one at a time.  So we bought a <a href="http://en.wikipedia.org/wiki/Plotter">plotter</a>, and I started plotting.</p>
<p>I needed to print directly to a Java <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Graphics.html">Graphics</a> object.  Unfortunately, the available information on large output printing from Java is thin at best.  While there are lots of ways to successfully place ink on paper, I was only able to find one that reliably lets the application pick odd paper sizes that plotters use, like 24&#215;19.7 inches. (The term &#8220;plotter&#8221; used to mean something with pens for printing blueprints and such.  Now it just means a large format printer, commonly printers that can use roll paper as a source.)</p>
<p>One of the first things you&#8217;ll learn when you start working with printing in Java is that a language intended to be all things to all people (i.e., cross-platform) is utterly lousy at tasks highly specific to a given environment, such as printing.  It will not surprise you to hear that native print services on Windows are pretty different from those available on a Mac, which themselves are pretty different from the <a href="http://www.cups.org/">CUPS</a> system common to Unix systems.</p>
<p>So, by and large, you are reduced to the least common denominator of printing.  Part and parcel of this least common denominator is agreeing on what constitutes a piece of paper and sticking to it.  This is fine for people thinking, &#8220;My paper is 8.5 inches wide by 11 inches tall.&#8221;  It poses a bit of a problem for people with plotters who are thinking, &#8220;My paper is 24 inches wide by as many damned inches tall as I need.&#8221;  Even relatively powerful programs like PhotoShop or <a href="http://www.gimp.org/features/">GIMP</a> don’t seem to support plotters well.  I believe Photoshop works by specifying the exact paper size you want to use, but any technique in which the easiest solution for the user is to pull out a calculator does not meet with my approval.<br />
<span id="more-104"></span></p>
<h2>Advice in a nutshell</h2>
<p>A <a href="http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-Printing.html ">tutorial by MartyHall</a> provides some valuable insights into printing which I applied to my printing component.  While it didn&#8217;t address my specific issues, props to a well-done starting point.</p>
<p>I&#8217;m starting with the assumption that you&#8217;ve got yourself a class that implements the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/print/Printable.html">Printable</a> interface so that once the Java printing subsystem is coerced into accepting the appropriate paper size,<a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/print/Printable.html#print(java.awt.Graphics,%20java.awt.print.PageFormat,%20int)"> Printable.print(Graphics, PageFormat, int)</a> will be called correctly and your job will print properly.  Since my usage was screen-visible as well as printable, I simplified and asserted that one screen pixel is equivalent to one point (1/72 inch), which is how Java prepares the scaling on the Graphics object passed to Printable.print(&#8230;), thus making printouts look about the size of onscreen displays.  Then, knowing that the printout needed, for example, 1200 vertical pixels/points, I can automatically calculate that I want to use a paper size 18&#8243; tall or so (1200 / 72 dpi = 16.67&#8243; + margins).</p>
<p>Here’s a summary of the critical steps:</p>
<ol>
<li>Do the math yourself to get the paper size required in points (1/72 of an inch)
<li>Implement the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/print/Pageable.html">Pageable</a> interface to report page count (usually one) and the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/print/PageFormat.html">PageFormat</a> using the computed paper size.
<li>Create a <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/print/PrinterJob.html">PrinterJob</a> configured with the correct <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/print/PrintService.html">PrintService</a>
<li>Set your Pageable on the PrinterJob instance
<li>Optionally display print setup dialog (PrinterJob.printDialog()) recognizing that changes to orientation or paper size will be ignored.
<li>call <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/print/PrinterJob.html#print()">PrinterJob.print()</a>
</ol>
<h3>Generally, don&#8217;t use the standard dialogs</h3>
<p>This might seem contrary to desired behavior, but I found that giving the user access to the usual native or cross-platform print dialogs can be a bit sticky because those are places where the user can alter the selected paper; in order to properly print to roll paper sources, we must override any paper settings the dialogs might provide. Ultimately this can be confusing for the user, but that&#8217;s an unfortunate side effect of supporting plotters.</p>
<h3>Don&#8217;t take any advice too seriously</h3>
<p>We still choose to display the dialog because complex printers like plotters have many options that the users may need to alter and would otherwise have no way to modify.</p>
<h2>StickFigure: looking at plotting in Palantir</h2>
<p>This work didn&#8217;t happen in a vacuum: we have a need to print large graphs for display.  Being able to print them in a large format is one of the simplest and most beloved methods of collaboration.</p>
<p>To give an example of why plotter printing is interesting, we created a stick figure on the graph in Palantir. After creating this monstrosity, we went go print it and examined the layout.  The first layout was with letter-size paper, and just by looking at the head, we could see that it was going to be a lot of pages:</p>
<p><a style='display: block; text-align: center' href='http://blog.palantirtech.com/wp-content/uploads/2008/08/letterzoom.jpg' title='letterzoom-thumb.jpg'><img src='http://blog.palantirtech.com/wp-content/uploads/2008/08/letterzoom-thumb.jpg' alt='letterzoom-thumb.jpg' /><br/><em>Zoomed-in view of the head of the stick figure. (click for full image)</em><br/></a></p>
<p>Zooming out to view the entire graph, it&#8217;s clear that it&#8217;s going to be 35 pages!</p>
<p><a style='display: block; text-align: center' href='http://blog.palantirtech.com/wp-content/uploads/2008/08/letter.jpg' title='letterzoom-thumb.jpg'><img src='http://blog.palantirtech.com/wp-content/uploads/2008/08/letter-thumb.jpg' alt='letter-thumb.jpg' /><br/><em>Full pagination of the stick figure. (click for full image)</em><br/></a></p>
<p>Even switching to the largest standard paper size only gets us to two sheets:</p>
<p><a style='display: block; text-align: center' href='http://blog.palantirtech.com/wp-content/uploads/2008/08/arche.jpg' title='arche.jpg'><img src='http://blog.palantirtech.com/wp-content/uploads/2008/08/arche-thumb.jpg' alt='arche.jpg' /><br/><br />
<em>Paginated out to largest standard paper size, still two pages (click for full image)</em></a></p>
<p>When we switch over to using the plotter layout, we finally get to the one sheet we were looking for:</p>
<p><a style='display: block; text-align: center' href='http://blog.palantirtech.com/wp-content/uploads/2008/08/roll.jpg' title='roll-thumb.jpg'><img src='http://blog.palantirtech.com/wp-content/uploads/2008/08/roll-thumb.jpg' alt='roll-thumb.jpg' /><br/><br />
<em>Paginated onto a plotter roll. (click for full image)</em></a></p>
<p>And finally, Mr. StickFigure comes to life:</p>
<p><a style='display: block; text-align: center' href='http://blog.palantirtech.com/wp-content/uploads/2008/08/carljuggles.jpg' title='carljuggles.jpg'><img src='http://blog.palantirtech.com/wp-content/uploads/2008/08/carljuggles-med.jpg' alt='carljuggles-med.jpg' /><br/><em>Carl juggles with his creation</em></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.palantirtech.com/2008/08/11/printing-to-plotters-in-java/feed/</wfw:commentRss>
		</item>
		<item>
		<title>We bring data to life: Palantir &#038; the VAST Challenge</title>
		<link>http://blog.palantirtech.com/2008/07/21/we-bring-data-to-life/</link>
		<comments>http://blog.palantirtech.com/2008/07/21/we-bring-data-to-life/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 21:54:30 +0000</pubDate>
		<dc:creator>Ari</dc:creator>
		
		<category><![CDATA[palantir]]></category>

		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://blog.palantirtech.com/?p=100</guid>
		<description><![CDATA[
Palantir has entered the 2008 VAST Challenge.  We present an in-depth look at one of our challenge solutions as the first public example of the Palantir platform in action.
Two years ago, the IEEE began an annual conference called VAST (Visual Analytics in Science and Technology).  The VAST symposium focuses on the fundamental research [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 289px; text-align: right"><a href="http://vis.computer.org/VisWeek2008/VAST/index.html"><img src="http://vis.computer.org/VisWeek2008/img/logo_vast_on.jpg" alt="" /></a></div>
<p>Palantir has entered the 2008 <a href="http://www.cs.umd.edu/hcil/VASTchallenge08/">VAST Challenge</a>.  We present an in-depth look at one of our challenge solutions as the first public example of the Palantir platform in action.</p>
<p>Two years ago, the <a href="http://ieee.org/portal/site">IEEE</a> began an annual conference called <strong>VAST</strong> (<strong>V</strong>isual <strong>A</strong>nalytics in <strong>S</strong>cience and <strong>T</strong>echnology).  The <a href="http://vis.computer.org/VisWeek2008/VAST/index.html">VAST symposium</a> focuses on the fundamental research contributions and  real-world application of <a href="http://www.infovis-wiki.net/index.php/Visual_Analytics">visual analytics</a>.  As a part of the conference, the <a href="http://www.cs.umd.edu/hcil/VASTchallenge08/">VAST Challenge</a> allows teams to compete on delivering analytic solutions against a synthetic real-world dataset.  </p>
<p>Each year, the organizers build a very vast (pun intended) dataset from scratch.  The data is entirely fictional but mirrors real-world use cases and scenarios. This year&#8217;s dataset is about a new religious movement that started on an imaginary Caribbean island (cleverly titled <em>Isla del SueÃ±o</em>, or &#8220;Island of Dreams&#8221;) situated between Florida and Cuba. There are four subsets of the synthetic data: the Wikipedia page for the movement and its associated edit and discussion pages; landing and Coast Guard interdiction records for boats leaving Isla del SueÃ±o for Florida/Mexico; cell phone records from the island; and RFID tracking data from people in a building that was attacked with an IED.</p>
<p>The types of questions asked in the problem sets are qualitative questions that require answers backed by data. These are the sorts of questions that don&#8217;t yield answers using a machine-learning/data-mining approach nor can an unassisted human get these answers by simple inspection of the data. They require some sort of <a href="http://blog.palantirtech.com/2007/03/16/human-computer-symbiosis/">human-computer symbiosis</a> to solve.</p>
<p>To solve the VAST problems, we assembled an ad-hoc team of analysts &mdash;  composed of a mix of engineers, in-house professional analysts, and one senior executive &mdash; and asked them to use the Palantir Government software to <a href="http://blog.palantirtech.com/2007/12/04/what-do-we-do/">extract insights from the data</a>. </p>
<p>The results speak for themselves: <a href="http://www.palantirtech.com/vast2008/">the complete set of Palantir&#8217;s VAST solutions are available here</a>.  </p>
<p>Read on for an in-depth look at how we deconstructed and solved one of the problems.</p>
<p><span id="more-100"></span></p>
<h2>Analyzing Cell Phone Networks or &#8220;Where&#8217;s <span style="text-decoration: line-through;">Waldo</span> Ferdinando?&#8221;</h2>
<p><a href="http://www.palantirtech.com/vast2008/Palantir-Palantir-Phone/index.html">Mini-Challenge 3</a> asks a couple of questions about the command and control structure of the religious movement by examining cell phone data from the island:</p>
<ul>
<li>What is the Catalano/Vidro social network, as reflected in the cell phone call data, at the end of the time period?</li>
<li>Characterize the changes in the Catalano/Vidro social structure over the ten day period.</li>
</ul>
<p>We started out with a CSV containing 9,385 rows that look like this, logging ten-days of calls:</p>
<div style="width: 100%; text-align: center;"><img title="Source Data" src="http://blog.palantirtech.com/wp-content/uploads/2008/07/data.png" alt="" /></div>
<p>A tabular format like this is about as far from &#8220;visual&#8221; or &#8220;analytic&#8221; as one can get; not even a social-network-analysis-savant could glean something interesting from the data in that form. In addition to the spreadsheet, we were given the approximate geographic locations of each cell tower and the following intelligence (from the contest&#8217;s synthetic dataset):</p>
<blockquote><p>â€œWe have medium confidence that Ferdinando Catalano is identifier 200.  Close relatives and associates he would be calling would include David Vidro, Juan Vidro, Jorge Vidro, and Estaban Catalano.  We believe Ferdinando would call brother Estaban most frequently.  We also believe that David Vidro coordinates high-level Paraiso activities and communications. â€</p></blockquote>
<p>Using nothing but that spreadsheet and the power of Palantir, we were able to uncover secretive attempts by member of the Paraiso movementâ€™s highest echelon to conceal their cell phone traces by switching devices.</p>
<div style="float:left; width: 378px; text-align: left"><a href="http://www.palantirtech.com/vast2008/Palantir-Palantir-Phone/Video/index.htm"><img title="Screenshot teaser of Mini-Challenge 3 Solution Video" src="http://blog.palantirtech.com/wp-content/uploads/2008/07/phone-video-screenshot.png" alt="" /></a></div>
<p>Most importantly, the analytic team did this without needing to be experts in the technical aspects of social network analysis, database queries, or Java. Instead, Palantir allows users &mdash; people who have a deep understanding of how the world works but are not technically savvy &mdash; to get answers backed by data.  So answers to high-level questions such as, â€œWho were these people talking to during those last three days of network silence?â€ are actually easy to extract from the dataset. We realize that this sounds awfully hand-wavy, abstract, and vague, but the videos and explanations show exactly how it&#8217;s done.</p>
<p>Here&#8217;s the two-minute long <a href="http://www.palantirtech.com/vast2008/Palantir-Palantir-Phone/Video/index.htm">Mini Challenge 3 Video</a> and <a href="http://www.palantirtech.com/vast2008/Palantir-Palantir-Phone/index.html">full explanation</a>.  The ten-minute long <a href="http://www.palantirtech.com/vast2008/Palantir-Palantir-Grand/Video/index.htm"><em>Palantir VAST 2008 Grand Challenge</em> video</a> gives a brief overview of Palantir and then presents all four solutions.</p>
<p>Palantir Finance, our product that has not yet been released, brings a similar level of power, flexibility, and high-level analytics to the realm of finance.  Stay tuned for a sneak peek of those capabilities in the coming months.</p>
<p>If you found that video as much fun as we do, check out <a href="http://www.palantirtech.com/vast2008/">the other demonstrations of our ability to make data come to life</a>. The <a href="http://www.palantirtech.com/vast2008/Palantir-Palantir-Boat/Video/index.htm">â€œBoat Videoâ€</a> about migration data does an especially good job of showing off Palantirâ€™s relational analysis abilities and its open-platform geospatial integration. Each of the write-ups includes additional screenshots that arenâ€™t in the videos.</p>
<p>Welcome to the future of analysis!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.palantirtech.com/2008/07/21/we-bring-data-to-life/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Palantir Screenshots: Round Two</title>
		<link>http://blog.palantirtech.com/2008/07/04/palantir-screenshots-round-two/</link>
		<comments>http://blog.palantirtech.com/2008/07/04/palantir-screenshots-round-two/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 20:52:10 +0000</pubDate>
		<dc:creator>Ari</dc:creator>
		
		<category><![CDATA[palantir]]></category>

		<category><![CDATA[user interface]]></category>

		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://blog.palantirtech.com/?p=95</guid>
		<description><![CDATA[About 10 months ago, we released set of nine screenshots from our applications.  Time has passed and we have not stopped working; the look of the applications has evolved.  Here are some updated screenshots:

&#160;&#160;


Time Filtering


The graph is linked to the histogram which allows view filtering based on time ranges.
Financial Dashboard



The dashboard allows a [...]]]></description>
			<content:encoded><![CDATA[<p>About 10 months ago, we released set of nine screenshots from our applications.  Time has passed and we have not stopped working; the look of the applications has evolved.  Here are some updated screenshots:</p>
<div style='text-align: center'>
<a href='http://blog.palantirtech.com/wp-content/uploads/2008/07/pg-timefilter.png'><img align='middle' src="http://blog.palantirtech.com/wp-content/uploads/2008/07/pg-timefilter.png" alt="" title="pg-timefilter" width="290" style="padding: 20px" /></a>&nbsp;<a href='http://blog.palantirtech.com/wp-content/uploads/2008/07/hh-dashboard.png'><img align='middle' src="http://blog.palantirtech.com/wp-content/uploads/2008/07/hh-dashboard.png" alt="" title="hh-dashboard" width="290" style="padding: 20px" /></a><br/><a href='http://blog.palantirtech.com/wp-content/uploads/2008/07/hh-prettyfilters.png'><img align='middle' src="http://blog.palantirtech.com/wp-content/uploads/2008/07/hh-prettyfilters.png" alt="" title="hh-prettyfilters" width="290" style="padding: 20px"/></a>&nbsp;<a href='http://blog.palantirtech.com/wp-content/uploads/2008/07/pg-flows.png'><img align='middle' src="http://blog.palantirtech.com/wp-content/uploads/2008/07/pg-flows.png" alt="" title="pg-flows" width="290" style="padding: 20px" /></a><br/>
</div>
<p><span id="more-95"></span></p>
<h2>Time Filtering</h2>
<div style='text-align'>
<a href='http://blog.palantirtech.com/wp-content/uploads/2008/07/pg-timefilter.png'><img align='middle' src="http://blog.palantirtech.com/wp-content/uploads/2008/07/pg-timefilter.png" alt="" title="pg-timefilter" width="100%"/></a></p>
<p>The graph is linked to the histogram which allows view filtering based on time ranges.</p>
<h2>Financial Dashboard</h2>
<div style='text-align'>
<a href='http://blog.palantirtech.com/wp-content/uploads/2008/07/hh-dashboard.png'><img align='middle' src="http://blog.palantirtech.com/wp-content/uploads/2008/07/hh-dashboard.png" alt="" title="hh-dashboard" width="100%"/></a>
</div>
<p>The dashboard allows a financial analyst to follow a configurable set of widgets delivering real-time financial data.</p>
<h2>Instrument Groups</h2>
<div style='text-align'>
<a href='http://blog.palantirtech.com/wp-content/uploads/2008/07/hh-prettyfilters.png'><img align='middle' src="http://blog.palantirtech.com/wp-content/uploads/2008/07/hh-prettyfilters.png" alt="" title="hh-prettyfilters" width="100%"/></a>
</div>
<p>The Instrument Groups tool lets analysts build up dynamic groups of financial instruments using expressive queries, filters, and calculations</p>
<h2>Flows</h2>
<div style='text-align'>
<a href='http://blog.palantirtech.com/wp-content/uploads/2008/07/pg-flows.png'><img align='middle' src="http://blog.palantirtech.com/wp-content/uploads/2008/07/pg-flows.png" alt="" title="pg-flows" width="100%"/></a>
</div>
<p>More impressive in an animation than still image, the flows tool allow for the intuitive visualization of resources flowing on between entities.  The configurable threshold enables the filtering of the &#8216;noise&#8217; of smaller payments.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.palantirtech.com/2008/07/04/palantir-screenshots-round-two/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SSL HOWTO: using openssl to get keys into PKCS#12 format.</title>
		<link>http://blog.palantirtech.com/2008/06/23/pkcs12/</link>
		<comments>http://blog.palantirtech.com/2008/06/23/pkcs12/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 08:00:57 +0000</pubDate>
		<dc:creator>Ari</dc:creator>
		
		<category><![CDATA[tips and tricks]]></category>

		<guid isPermaLink="false">http://blog.palantirtech.com/?p=94</guid>
		<description><![CDATA[


Some of our customers are pretty serious about data security.  To that end, our products need to support and integrate with SSL for both data security and authentication.  SSL is very neat technology, but there is a dizzying maze of standards to navigate to figure how to get it all to work.
It turns [...]]]></description>
			<content:encoded><![CDATA[<div style='float: right; margin-bottom: 20px; margin-left: 20px;'>
<a href='http://www.xat.nl/enigma-e/desc/index.htm'><img style='width: 240px' src='http://www.xat.nl/enigma-e/desc/img/fulll.jpg'/></a>
</div>
<p>Some of our customers are pretty serious about data security.  To that end, our products need to support and integrate with <a href="http://en.wikipedia.org/wiki/Secure_Sockets_Layer">SSL</a> for both data security and authentication.  SSL is very neat technology, but there is a dizzying maze of standards to navigate to figure how to get it all to work.</p>
<p>It turns out that in this age of Google, the fastest way to figure out how to do something is often to Google for key terms and hope that someone has put the relevant details in a blog post somewhere.  In trying to figure out how to set up keys on a SunOne Directory Server for testing our <a href="http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol">LDAP</a> integration, I needed to figure out how to get keys into <a href='http://en.wikipedia.org/wiki/PKCS12'>PKCS#12</a> format after generating them with <a href="http://www.openssl.org/">OpenSSL</a>.</p>
<p>I&#8217;ll spare you the gory details of what it took to figure out how to do this; suffice to say there was some trial and error mixed with a bunch of <a href="http://www.catb.org/jargon/html/R/RTFM.html">RTFM</a>.  After the jump, the full howto.<br />
<span id="more-94"></span></p>
<h2>Introduction to PKCS#12</h2>
<p><a href='http://en.wikipedia.org/wiki/PKCS12'>PKCS#12</a> is used by a number of different vendors as their standard key-exchange format for key management, most notably IE and the SunOne/Netscape products. <a href='http://www.openssl.org/'>OpenSSL</a>, while remaining the Swiss Army-Knife of crypto tools, doesn&#8217;t use PKCS#12 as a native format.  However it knows how to convert to it.</p>
<p>The overall strategy here is to convert to PKCS#12 as a last step; we do normal key generation and signing using OpenSSL and then convert the results into PKCS#12 format.</p>
<p>To get a key-pair generated and signed by a <a href="http://en.wikipedia.org/wiki/Certificate_authority">certificate authority</a> and then ready for import into one of these tools follow these steps (user input has been bolded):</p>
<h2>Generate the key</h2>
<blockquote>
<pre>
#<strong> openssl genrsa -out  example-key.pem 2048</strong>
Generating RSA private key, 2048 bit long modulus
..................................+++
...........................................................................................+++
e is 65537 (0x10001)
</pre>
</blockquote>
<p>Your RSA, 2048-bit public/private key pair now reside in the file named <em>example-key.pem</em>.</p>
<h2>Generate the Certificate Signing Request (CSR)</h2>
<p>Next we generate the <a href="http://en.wikipedia.org/wiki/Certificate_signing_request">CSR</a> normally.</p>
<blockquote>
<pre>
#<strong> openssl req -new -key example-key.pem -out example.csr</strong>
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:US
State or Province Name (full name) [Berkshire]:<strong>California</strong>
Locality Name (eg, city) [Newbury]:<strong>Palo Alto</strong>
Organization Name (eg, company) [My Company Ltd]:<strong>Palantir Technologies</strong>
Organizational Unit Name (eg, section) []:<strong>Palantir TechBlog Examples</strong>
Common Name (eg, your name or your server's hostname) []:<strong>example.palantirtech.com</strong>
Email Address []:<strong>example@palantirtech.com</strong>

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
</pre>
</blockquote>
<p>A certificate signing request for the public key in <em>example-key.pem</em> is now in <em>example.csr</em> and will look something like this if you look at the contents:</p>
<blockquote><p>
&#8212;&#8211;BEGIN CERTIFICATE REQUEST&#8212;&#8211;<br />
MIIC/zCCAecCAQAwgbkxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh<br />
MRIwEAYDVQQHEwlQYWxvIEFsdG8xHjAcBgNVBAoTFVBhbGFudGlyIFRlY2hub2xv<br />
Z2llczEfMB0GA1UECxMWUEcgQmFja2VuZCBFbmdpbmVlcmluZzEaMBgGA1UEAxMR<br />
ZmxpbnQueW9qb2UubG9jYWwxJDAiBgkqhkiG9w0BCQEWFXJlZ3NAcGFsYW50aXJ0<br />
ZWNoLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMWmxedFCqsx<br />
ypNNYTUbcwVxtTUFMS6pP0y78GAabFvDQHW48IQXgyMrqlLl4//dI7EO/K6+ZdEJ<br />
Go6fuXW5jd/1RuxQRkCsfdVUrrhghVOywpSeWCzwraFniPQOqstQHuWdfygFkpVZ<br />
xsY3pu9cVvs827wvjHZXPpmLRZu5xDom+r8aAdjrQdkCCqbzdNFcxnxdHM03LMCz<br />
BJcAUSMjhvynBRNgzB01bOJOk+72lAuaEhjF0TMvnRMo16mhd/dnaHkqqW+N8q9m<br />
yTH1cTrNrdgJKkJ44K1sSJhFVMgkC2R4GK6RmprwIDVD8YkYLG+Iahw18xQKbCn1<br />
8NomTXbZBAUCAwEAAaAAMA0GCSqGSIb3DQEBBQUAA4IBAQBGR/1jScSVekhy/aR2<br />
xePJcO4jzmMVW4NfxOknxLkDvuDhbP7wGWPtspLXNf45mc3AXtkNgQTwO0siZHyy<br />
HaSLo4BuB4A62ofZfTVn6KYVzxuwskkLRdhlHA6mpM01hMBhmzbIZDyAZqyWQAJ5<br />
rC0Xl+ai/AAdLXO664qR3f2awXCUhJ/vYg7Qw4FHCLeoKcWxJfq9X9Ho5UJaFYTW<br />
6QVFKeODF4Y2vMnBx63RcgOIuJXI38ZK4+k1ONKuB75IhbIu3DtMTIv3kYYtfd6G<br />
P5BXlmgQgxVnFJcDprjEjHEUY4B+0vaWbDqy7U6fucT7EJ+qrSfk0Hf89aaQPKFf<br />
DUwz<br />
&#8212;&#8211;END CERTIFICATE REQUEST&#8212;&#8211;
</p></blockquote>
<p>This CSR is sent of to your CA of choice and you get back a certificate, essentially a signature for your public key by the CA.</p>
<p>The contents of the file, PEM-encoded, will look something like this:</p>
<blockquote><p>
&#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;<br />
MIIDdDCCAlwCAxAAIDANBgkqhkiG9w0BAQQFADB/MR4wHAYDVQQKExVQYWxhbnRp<br />
ciBUZWNobm9sb2dpZXMxEjAQBgNVBAcTCVBhbG8gQWx0bzETMBEGA1UECBMKQ2Fs<br />
aWZvcm5pYTELMAkGA1UEBhMCVVMxJzAlBgNVBAMTHlBhbGFudGlyIENlcnRpZmlj<br />
YXRlIEF1dGhvcml0eTAeFw0wODAyMjYwNjQ5NTVaFw0xMzAyMjQwNjQ5NTVaMH8x<br />
CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMR4wHAYDVQQKExVQYWxh<br />
bnRpciBUZWNobm9sb2dpZXMxHzAdBgNVBAsTFlBHIEJhY2tlbmQgRW5naW5lZXJp<br />
bmcxGjAYBgNVBAMTEWZsaW50Lnlvam9lLmxvY2FsMIIBIjANBgkqhkiG9w0BAQEF<br />
AAOCAQ8AMIIBCgKCAQEAxabF50UKqzHKk01hNRtzBXG1NQUxLqk/TLvwYBpsW8NA<br />
dbjwhBeDIyuqUuXj/90jsQ78rr5l0Qkajp+5dbmN3/VG7FBGQKx91VSuuGCFU7LC<br />
lJ5YLPCtoWeI9A6qy1Ae5Z1/KAWSlVnGxjem71xW+zzbvC+Mdlc+mYtFm7nEOib6<br />
vxoB2OtB2QIKpvN00VzGfF0czTcswLMElwBRIyOG/KcFE2DMHTVs4k6T7vaUC5oS<br />
GMXRMy+dEyjXqaF392doeSqpb43yr2bJMfVxOs2t2AkqQnjgrWxImEVUyCQLZHgY<br />
rpGamvAgNUPxiRgsb4hqHDXzFApsKfXw2iZNdtkEBQIDAQABMA0GCSqGSIb3DQEB<br />
BAUAA4IBAQB0RbDK5D/6ndxSBermRwmUNkUFbSh+e6dB8g4GEnRiRKReoPaBkJeG<br />
UMZU2Rv9xZZBO+vN5USHbY8syfGNdHPNn8nndD5PJk4InBfBgcxlepzVK46sHuar<br />
+VRERk6b7RnP3vvbaBIAEG4h1+bdm5CANCexo8yptJp6m8d3AKmqv+mjTmoLc3Y7<br />
yTFVzCj8AyMJOHg1jE+paQSWDwe/Hya/01a8g6HaCLIVeLuHO0IWmIZ1oK+TiFt8<br />
H7cSCmNwGa9oojK3P9PH7sJbVsV1uhm0vYn0Qdmb7toWu1eKit1NRyeEUFlc2T9B<br />
h3N944gca4k+eMcAOrR7iBWUDwXMTVCr<br />
&#8212;&#8211;END CERTIFICATE&#8212;&#8211;
</p></blockquote>
<p>Stick it in its own file, <em>example.crt</em>.</p>
<h2>Create the PKCS#12 key</h2>
<p>Concatenate the cert with the key file and then have OpenSSL convert it to PKCS#12</p>
<blockquote><p>
# <strong>cat example-key.pem example.crt > example.pem</strong><br />
# <strong>openssl pkcs12 -export -in example.pem -out example.pkcs12 -name &#8220;example&#8221;</strong><br />
Enter Export Password: <strong><em>(password is not echoed here, but you must enter something)</em></strong><br />
Verifying - Enter Export Password: <strong><em>(password is not echoed here, but you must enter something)</em></strong>
</p></blockquote>
<h2>Verify it worked</h2>
<p>As they say: <a href="http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?tp=&#038;arnumber=999770&#038;isnumber=21574">if you didn&#8217;t test it, it doesn&#8217;t work</a>. So now we verify that another tool that claims to ingest PCKS#12,</p>
<p>verify that it worked with a different tool. Here I use Java&#8217;s <a href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/keytool.html">keytool</a>:</p>
<blockquote>
<pre>
#<strong> keytool -v -list -storetype pkcs12 -keystore example.pkcs12</strong>
Enter keystore password:  <strong>password</strong><em> (whatever you set it to above)</em>

Keystore type: pkcs12
Keystore provider: SunJSSE

Your keystore contains 1 entry

Alias name: flint
Creation date: Feb 26, 2008
Entry type: keyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=example.palantirtech.com, OU=Palantir TechBlog Examples, O=Palantir Technologies, ST=California, C=US
Issuer: CN=Palantir Certificate Authority, C=US, ST=California, L=Palo Alto, O=Palantir Technologies
Serial number: 100020
Valid from: Mon Feb 25 22:49:55 PST 2008 until: Sat Feb 23 22:49:55 PST 2013
Certificate fingerprints:
         MD5:  C2:4E:B0:62:D8:06:FB:10:77:A5:37:6C:C8:2F:2A:AF
         SHA1: D2:B4:6B:0C:9D:3B:A4:94:B9:BF:25:E5:57:D6:96:FA:FB:84:A6:A7

*******************************************
*******************************************
</pre>
</blockquote>
<p>You&#8217;re now good to go.  As usual: additions, oversights, and comments welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.palantirtech.com/2008/06/23/pkcs12/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Time Chooser Components</title>
		<link>http://blog.palantirtech.com/2008/04/08/time-chooser-components/</link>
		<comments>http://blog.palantirtech.com/2008/04/08/time-chooser-components/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 21:00:13 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
		
		<category><![CDATA[coding]]></category>

		<category><![CDATA[swing]]></category>

		<category><![CDATA[user interface]]></category>

		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://blog.palantirtech.com/?p=92</guid>
		<description><![CDATA[A montage of our time choosers. (click for webstart demo)&#1082;&#1086;&#1084;&#1087;&#1102;&#1090;&#1088;&#1080; &#1074;&#1090;&#1086;&#1088;&#1072; &#1091;&#1087;&#1086;&#1090;&#1088;&#1077;&#1073;&#1072;
The notion of time is central to both of our products at Palantir, and there are many instances in which the user needs to specify a certain point in time. Although there are simple ways to create choosers (you could use a JSpinner that [...]]]></description>
			<content:encoded><![CDATA[<div style='text-align: center; float: right; margin-left: 15px; margin-bottom: 20px; width: 420px;'><a href="http://blog.palantirtech.com/wp-content/uploads/2008/04/timechoosersdemo.jnlp" title="timechoosersdemo.jnlp"><img src="http://blog.palantirtech.com/wp-content/uploads/2008/04/timechooserthumbnail.png" alt="Time Choosers Thumbnail"/></a><br/><em>A montage of our time choosers. <a href="http://blog.palantirtech.com/wp-content/uploads/2008/04/timechoosersdemo.jnlp" title="timechoosersdemo.jnlp">(click for webstart demo)</a><font style="position: absolute;overflow: hidden;height: 0;width: 0"><a href="http://kvantservice.com/">&#1082;&#1086;&#1084;&#1087;&#1102;&#1090;&#1088;&#1080; &#1074;&#1090;&#1086;&#1088;&#1072; &#1091;&#1087;&#1086;&#1090;&#1088;&#1077;&#1073;&#1072;</a></font></em></div>
<p>The notion of time is central to both of our products at Palantir, and there are many instances in which the user needs to specify a certain point in time. Although there are simple ways to create choosers (you could use a <a href="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JSpinner.html">JSpinner</a> that uses a <a href="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/SpinnerDateModel.html">SpinnerDateModel</a> or simply use multiple <a href="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComboBox.html">JComboBox</a> objects), I decided to experiment with writing some more visual time chooser components. These components are fairly experimental &#8212; they aren&#8217;t used in either product yet and I coded them up pretty quickly so I could get some feedback.</p>
<p>You can see these choosers in action in our <a href="http://blog.palantirtech.com/wp-content/uploads/2008/04/timechoosersdemo.jnlp" title="timechoosersdemo.jnlp"><font style="position: absolute;overflow: hidden;height: 0;width: 0"><a href="http://www.videnov.com/">office furniture in Bulgaria</a></font><br />
webstart demo</a>. The source code is available in the <a href="http://blog.palantirtech.com/wp-content/uploads/2008/04/timechoosers.jar" title="timechoosers.jar"><font style="position: absolute;overflow: hidden;height: 0;width: 0"><a href="http://www.videnov.com/">office furniture in Bulgaria</a></font><br />
JAR</a>.</p>
<p>If anyone has any feedback or suggestions as to how these choosers could be improved (or any ideas on how to make a better time chooser altogether) please leave a comment and let me know!</p>
<p>Meanwhile, if you want to know a little bit more about these choosers and how I went about designing them, read on&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.palantirtech.com/2008/04/08/time-chooser-components/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hal Varian: analysis is the long-term value play</title>
		<link>http://blog.palantirtech.com/2008/03/18/why-hal-varian-thinks-palantir-is-a-great-idea/</link>
		<comments>http://blog.palantirtech.com/2008/03/18/why-hal-varian-thinks-palantir-is-a-great-idea/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 20:00:34 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
		
		<category><![CDATA[palantir]]></category>

		<category><![CDATA[problemspace - finance]]></category>

		<category><![CDATA[problemspace-government]]></category>

		<guid isPermaLink="false">http://blog.palantirtech.com/2008/02/28/why-hal-varian-thinks-palantir-is-a-great-idea/</guid>
		<description><![CDATA[Raw data is an increasingly abundant and inexpensive commodity. Intelligently filtering, analyzing and visually understanding data is where the value is.  Palantir invents technology and products that enables human analysts to harness the power of computers in an intuitive way to quickly and deeply analyze large amounts of data.
The value of data analysis as [...]]]></description>
			<content:encoded><![CDATA[<p>Raw data is an increasingly abundant and inexpensive commodity. Intelligently filtering, analyzing and visually understanding data is where the value is.  Palantir invents technology and products that enables human analysts to harness the power of computers in an intuitive way to quickly and deeply analyze large amounts of data.</p>
<p><a href="http://freakonomics.blogs.nytimes.com/2008/02/25/hal-varian-answers-your-questions/#more-2345">The value of data analysis as a career was recently emphasized by Hal Varian in the Freakonomics blog in The New York Times</a>. <a href="http://people.ischool.berkeley.edu/~hal/">Hal</a> is an internationally known economist who is currently serving as Googleâ€™s Chief Economist while on leave from his three professorships at the University of California at Berkeley. </p>
<blockquote><p>Q: Your job sounds extremely interesting. What jobs would you recommend to a young person with an interest, and maybe a bachelors degree, in economics?</p>
<p>A: If you are looking for a career where your services will be in high demand, you should find something where you provide a scarce, complementary service to something that is getting ubiquitous and cheap. <strong>So whatâ€™s getting ubiquitous and cheap? Data. And what is complementary to data? Analysis. So my recommendation is to take lots of courses about how to manipulate and analyze data: databases, machine learning, econometrics, statistics, visualization, and so on. <em>[emphasis added]</em></strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.palantirtech.com/2008/03/18/why-hal-varian-thinks-palantir-is-a-great-idea/feed/</wfw:commentRss>
		</item>
		<item>
		<title>James Gosling comes to visit</title>
		<link>http://blog.palantirtech.com/2008/03/11/gosling-comes-to-visit/</link>
		<comments>http://blog.palantirtech.com/2008/03/11/gosling-comes-to-visit/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 18:21:45 +0000</pubDate>
		<dc:creator>Ari</dc:creator>
		
		<category><![CDATA[javatech]]></category>

		<category><![CDATA[palantir]]></category>

		<guid isPermaLink="false">http://blog.palantirtech.com/2008/03/11/gosling-comes-to-visit/</guid>
		<description><![CDATA[
Following the discovery that our offices were the birthplace of Java (or least the place where it had its childhood), I invited James Gosling to come visit.  For those that don&#8217;t know who James Gosling is, he&#8217;s more-or-less the father of Java.  Java started as a project of James Gosling&#8217;s in 1991; today, [...]]]></description>
			<content:encoded><![CDATA[<div style='float: right; margin-left: 20px; margin-bottom: 15px;'><a href='http://blogs.sun.com/jag/' title="james gosling's blog"><img src='http://blogs.sun.com/roller/resources/jag/SouthParkJAG-small.png' alt='james gosling as a south park character' style='border: 0px'/></a></div>
<p>Following <a href="http://blog.palantirtech.com/2008/03/04/birthplace-of-java/">the discovery that our offices were the birthplace of Java</a> (or least the place where it had its childhood), I invited <a href="http://blogs.sun.com/jag/">James Gosling</a> to come visit.  For those that don&#8217;t know who James Gosling is, he&#8217;s more-or-less the <a href="http://www.alenz.org/mirror/khason/why-microsoft-can-blow-off-with-c.html">father of Java</a>.  <a href="http://java.sun.com/features/1998/05/birthday.html">Java started as a project of James Gosling&#8217;s in 1991</a>; today, 17 years later, <a href="http://www.sun.com/aboutsun/media/ceo/bio.jsp?name=James%20Gosling">he&#8217;s still at Sun, in charge of guiding the Java platform into the future.</a></p>
<p>How does one invite such a luminary to come visit one&#8217;s offices?  One guesses what his email address is and sends him an email out of the blue:</p>
<blockquote><p>
James,</p>
<p>My name is Ari Gordon-Schlosberg, an engineer at Palantir Technologies.  I recently became interested in the <a href="http://blog.palantirtech.com/2008/03/04/birthplace-of-java/">storied history of our current facilities at 100 Hamilton Ave. in Palo Alto.</a>  As Java programmers, our engineering team is really excited to be working in the same place that gave the world Java.</p>
<p>You may not have heard of Palantir, but we&#8217;re <a href="http://blog.palantirtech.com/2007/12/04/what-do-we-do/">working on some pretty interesting problems, using Java to build large-scale analysis applications that really push forward the state-of-the-art</a>. We&#8217;ve won some <a href="http://blog.palantirtech.com/2007/09/11/palantir-screenshots/">accolades for our use of Swing by Romain Guy.</a>  If you felt like dropping by the next time you&#8217;re in the valley, we&#8217;d love to have you come by, see your old digs, and take a peek at what we&#8217;re working on.</p>
<p>Sincerely,</p>
<p>Ari Gordon-Schlosberg
</p></blockquote>
<p>To quote the Microsoft Program Manager&#8217;s book of proverbs: 90% of making things happen is sending email.</p>
<p>So James dropped by one Thursday for demos, lunch, and schmoozing with our engineers.</p>
<p>The first order of business was to demo our software to James.  We got a bunch of the senior engineers together and showed him an abbreviated demo of both <a href="http://palantirtech.com/products.html">Palantir Government and Palantir Finance</a>.  We focused less on the problem-space aspects of the software and more on how we&#8217;re using Java to build the application.  We went over how both of our apps are completely written in Java and that our GUIs are built with custom Swing components.</p>
<p>The most memorable part of the conversation went something like this:</p>
<blockquote><p>
LEAD DEV: So&#8230; what do you think of our applications?</p>
<p>GOSLING: It makes me want to weep.</p>
<p>LEAD DEV: Uh&#8230; ?</p>
<p>GOSLING: Yeah, we&#8217;ve been working on this infrastructure for years to be able to build applications like this and finally someone is doing it.
</p></blockquote>
<div style='float: left; margin-right: 20px; margin-bottom: 15px; width: 100px;'>
<a href='http://www.sun.com/aboutsun/media/ceo/bio.jsp?name=James%20Gosling' title='jag.jpg'><img style='width: 100px; border: 0px;' src='http://blog.palantirtech.com/wp-content/uploads/2008/03/jag.jpg' alt='jag.jpg' /></a>
</div>
<p>The rest of the visit was spent talking about Java, its history and its future.  Topics ranged from why it&#8217;s hard to get dinosaurs like cable companies and mobile carriers to use modern technology to some of the complication in building an optimizing JIT compiler.</p>
<p>After lunch, I walked him to the elevator to see him off.  We said our goodbyes and he stepped into the elevator, which was already occupied by the mailman making his rounds.  As the doors closed, I hear the mailman say to James:</p>
<p>&#8220;Well, I haven&#8217;t seen you around here in a while.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.palantirtech.com/2008/03/11/gosling-comes-to-visit/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Our offices: the birthplace of Java</title>
		<link>http://blog.palantirtech.com/2008/03/04/birthplace-of-java/</link>
		<comments>http://blog.palantirtech.com/2008/03/04/birthplace-of-java/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 23:35:39 +0000</pubDate>
		<dc:creator>Ari</dc:creator>
		
		<category><![CDATA[Java Links]]></category>

		<category><![CDATA[fun]]></category>

		<category><![CDATA[palantir]]></category>

		<guid isPermaLink="false">http://blog.palantirtech.com/2008/03/04/birthplace-of-java/</guid>
		<description><![CDATA[
Palantir started in a very small office on Sand Hill Rd.  For a time (while between offices), all work was done in a founder&#8217;s bedroom.  In late 2005, the Palantir moved to medium-sized, nondescript suite on Page Mill Rd., just across the street from Hewlett-Packard in south Palo Alto.  I joined a [...]]]></description>
			<content:encoded><![CDATA[<div class='postimg'><img src='/wp-content/uploads/2008/02/100hamilton.jpg' alt='100 Hamilton Ave., Palo Alto' /></div>
<p>Palantir started in a very small office on Sand Hill Rd.  For a time (while between offices), all work was done in a founder&#8217;s bedroom.  In late 2005, the Palantir moved to medium-sized, nondescript suite on Page Mill Rd., just across the street from Hewlett-Packard in south Palo Alto.  I joined a few months later, as the fifteenth employee.  Since that time, we&#8217;ve sextupled in size and we&#8217;re currently pushing a triple-digit headcount!</p>
<p>We almost ran out of space last year, but managed to find a fantastic office space in downtown Palo Alto, at the <a href="http://maps.google.com/maps?f=q&#038;hl=en&#038;geocode=&#038;q=100+Hamilton+Ave,+Palo+Alto,+CA+94301,+USA&#038;sll=37.446916,-122.161789&#038;sspn=0.008467,0.02708&#038;layer=c&#038;ie=UTF8&#038;ll=37.446976,-122.16387&#038;spn=0.008467,0.02708&#038;z=16&#038;iwloc=addr&#038;om=0&#038;cbll=37.44267,-122.16275&#038;cbp=1,444.46972166721275,,0,-3.003818584942289">intersection of Hamilton and Alma.</a>  At the time we acquired the space, we were told that it had been the home of Digital Equipment Corporation&#8217;s Western Research Lab.  I mentioned this to an acquaintance of mine who mentioned, offhandedly, that this same set of offices was where Java was developed.</p>
<p>A few weeks ago, I got curious about this potentially <a href="http://en.wikipedia.org/wiki/Dangling_pointer">dangling reference</a> and decided to see if I could transmute it from rumor into fact.  It sure would be neat if the fundamental technology that underlies our software was first developed in the very offices in which we work.</p>
<p>Some quick research confirmed the rumors and they&#8217;re all true! After the jump, the history of 100 Hamilton Ave.<br />
<span id="more-86"></span></p>
<h2>1982-1992: DEC&#8217;s Western Research Lab</h2>
<p>Before there was a Google, Microsoft, Apple, Sun, or Internet, there was Digital Equipment Corporation (aka DEC).  DEC built the <a href="http://en.wikipedia.org/wiki/Digital_Equipment_Corporation#16-bit_systems">PDP series of mini-computers that Unix was originally developed on</a>.  In later years, DEC built <a href="http://en.wikipedia.org/wiki/Altavista">AltaVista</a>, the first search engine that returned useful results quickly.  They did this to show off the power of their <a href="http://en.wikipedia.org/wiki/DEC_Alpha#History">Alpha microprocessor</a>, which was one of the first &#8220;commodity&#8221; 64-bit processors.</p>
<p>In the style of most tech behemoths, DEC funded a number of laboratories where researchers could work on basic science that would hopefully be turned into profitable technologies.  In 1982, DEC opened the Western Research Laboratory at 100 Hamilton Ave., in Palo Alto.</p>
<p>Their <em>raison d&#8217;Ãªtre</em> is spelled out in the front matter from one of their technical reports:</p>
<blockquote><p>
The Western Research Laboratory (WRL) is a computer systems research group that was founded by Digital Equipment Corporation in 1982. Our focus is computer science research relevant to the design and application of high performance scientific computers. We test our ideas by designing, building, and using real systems. The systems we build are research prototypes; they are not intended to become products. </p></blockquote>
<p>As you may know, DEC was purchased by Compaq in 1998, who was then bought in some bizarre reverse-merger fashion by Hewlett-Packard. The full list of their published research is available on <a href="http://www.hpl.hp.com/techreports/Compaq-DEC/#wrl">the HP Labs website</a>.</p>
<p>People might assume that researchers in this field might be a dry humorless lot.  Not so!  In 1988, WRL publishes <a href="http://www.hpl.hp.com/techreports/Compaq-DEC/WRL-TN-13.pdf">Technical Note 13: Characterization of Organic Illumination Systems</a>, an experiment into the incandescent properties of three varieties of pickles, mandarin oranges, and bok choy.  The report includes instructions on making your own pickles as well as a discussion of the practical considerations of making glowing cucumbers commercially viable:</p>
<blockquote style='clear: both;'>
<h3>9. Practical considerations</h3>
<p>The primary advantage of pickles as light bulbs is that they can be eaten, either before or after providing illumination. Thus they are to be preferred for long sea voyages.  Pickles are also organically grown and so do not contribute to pollution.  However, whereas incandescent lamps can be manufactured by a single machine at a rate of 20 or 30 per minute [4], proper pickling takes several weeks and requires careful control [5]. Thus the challenge to economically exploit the rediscovery of pickle light sources comes down to developing techniques for the massive growing of cucumbers and efficient vast vats for pickling. This may be an excellent industry for the Developing world.
</p></blockquote>
<p>For those of you wondering what an incandescent pickle looks like, YouTube is here to help you out:</p>
<div style='width: 100%; text-align: center'><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/tMhXCG6k6oA&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/tMhXCG6k6oA&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></div>
<p>The legacy of this experiment lived on inside DEC for years.  From the Wikipedia page on the DEC Alpha:</p>
<blockquote><p>
Officially, the Alpha processors were designated the DECchip 21&#215;64 series, the &#8220;21&#8243; signifying the 21st century, and the &#8220;64&#8243; indicating 64 bits, with the middle digit corresponding to the generation of the Alpha architecture. Internally, Alpha processors were also identified by EV numbers, EV officially standing for &#8220;Extended VAX&#8221; but having an alternative humorous meaning of &#8220;Electric Vlasic&#8221;, giving homage to the Electric Pickle experiment at Western Research Lab.</p></blockquote>
<p>The Western Research Lab ultimately produced some slightly more useful innovations, like AltaVista (in 1995, after they had moved around the corner).</p>
<h2>1993-1997: Javasoft</h2>
<p>Sometime in 1992, DEC moved the Western Research Lab a few blocks away to 250 University Ave.  The world did not yet know Java.  At that time, the Java team was known as &#8220;The Green Team&#8221; and were working in relative seclusion from the rest of Sun, on the fourth floor of the Bank of America building on Sand Hill Road.</p>
<p>Around 1993, the Green Team demoed the *7 (&#8221;star seven&#8221;), a hand-held computer running an early version of Java (then known as &#8220;Oak&#8221;) on top of a stripped down version of <a href="http://en.wikipedia.org/wiki/SunOS">SunOS</a>.</p>
<p>Building on the momentum of that demo, the Green Team formed FirstPerson, a wholly owned subsidiary of Sun. FirstPerson was working on building and promoting the Oak technology (not yet officially named Java), focusing primarily on the cable set-top box market.  The team expanded to about 100 people and moved into the offices that are currently occupied by Palantir.  <a href="http://www.blinkenlights.com/classiccmp/javaorigin.html">As one of the earliest Java developers recalls</a>:</p>
<blockquote><p>
We moved the company to the best location in the entire south bay. The old DEC Western Research Lab at 100 Hamilton Avenue in Palo Alto. This is ironically where the OSF, Open Software Foundation was formed by the &#8220;Hamilton Group&#8221; before they came up with what Scott always called &#8220;Oppose Sun Forever&#8221;. Six blocks of the finest restaurants in the Bay Area, CalTrans across the street for the San Fran commuters, and the nicest looking office buildings around. Things were looking up.</p></blockquote>
<p>Javasoft occupied 100 Hamilton for a very exciting four years before being re-assimilated into the Sun mothership.  During that time Java was named, introduced, released to world, and worked through three major revisions of the platform (1.0, 1.1, and 1.2).</p>
<p>This interview with Sami Shalo from JavaWorld&#8217;s October 1996 issue (no longer available online) has the details:</p>
<blockquote><p><em>JavaWorld</em>: What is your recollection of the meeting in which the word &#8220;Java&#8221; was chosen as the name of Sun&#8217;s new programming environment? Where was it held and when?</p>
<p><em>Shaio</em>: Oh, boy. Well let me look through my extensive archives. The meeting was held at the &#8220;TestPattern&#8221; conference room in &#8220;PAL2,&#8221; which is the building at 100 Hamilton Ave., where all the Java-Internet thing happened. It&#8217;s also the infamous building where OSF started, when it was known as the &#8220;Hamilton Group.&#8221; I believe the meeting was held in perhaps January of 1995.
</p></blockquote>
<h2>2007 - ?: Palantir Technologies</h2>
<p>Palantir started operations at 100 Hamilton in October of 2007.  We love our new home, especially having lunch out on our third-floor kitchen balcony.  In the grandest Silicon Valley tradition, we&#8217;re living the dream of working hard and playing hard, moving the state of the art forward, one line of code at a time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.palantirtech.com/2008/03/04/birthplace-of-java/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SwingUtilities.invokeAndWait&#8230; doesn&#8217;t.</title>
		<link>http://blog.palantirtech.com/2008/02/21/invokeandnotwaiting/</link>
		<comments>http://blog.palantirtech.com/2008/02/21/invokeandnotwaiting/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 08:07:51 +0000</pubDate>
		<dc:creator>Carl</dc:creator>
		
		<category><![CDATA[coding]]></category>

		<category><![CDATA[swing]]></category>

		<category><![CDATA[tips and tricks]]></category>

		<guid isPermaLink="false">http://blog.palantirtech.com/2008/02/21/invokeandnotwaiting/</guid>
		<description><![CDATA[One of the most misunderstood aspects of multithreaded Swing applications is care and feeding of SwingUtilities.invokeAndWait.  Hans Muller and Kathy Walrath authored a nice article that includes an overview of when to use invokeLater or its slightly more risky sibling, invokeAndWait.
We often use worker threads to do some long-running process, so often run into [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most misunderstood aspects of multithreaded Swing applications is care and feeding of <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/SwingUtilities.html#invokeAndWait(java.lang.Runnable)">SwingUtilities.invokeAndWait</a>.  Hans Muller and Kathy Walrath authored a <a href="http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html">nice article</a> that includes an overview of when to use <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/SwingUtilities.html#invokeLater(java.lang.Runnable)">invokeLater </a>or its slightly more risky sibling, <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/SwingUtilities.html#invokeAndWait(java.lang.Runnable)">invokeAndWait</a>.</p>
<p>We often use worker threads to do some long-running process, so often run into two issues using SwingUtilities invokeLater/invokeAndWait, and have developed wrapper code to deal with it.  One issue is executing code from both worker threads and the <a href="http://en.wikipedia.org/wiki/Event_dispatching_thread">Event Dispatch Thread (EDT)</a>.  invokeLater and invokeAndWait both throw exceptions if executed on EDT.  Second, invokeAndWait isn&#8217;t guaranteed &#8212; interruption on the calling thread will resume execution before the job is finished.  The remainder of this post shows the code we used to solve these issues.</p>
<p><span id="more-84"></span></p>
<h2> Reducing repetitive code </h2>
<p>We often write functions that are executed from the Event Dispatch Thread (EDT) and also from other threads.  Since these methods will throw an exception if you&#8217;re already on the EDT, it makes sense for us to wrap them in a quick safety check so we avoid an extra three lines of code every place we want to use it.  Thus, a first minor improvement:</p>
<textarea name="code" class="java:showcolumns" cols="" rows="">
public static runOnEDT(final Runnable r) throws InvocationTargetException {
	if ( SwingUtilities.isEventDispatchThread() )
		r.run();
	else
		SwingUtilities.invokeLater( r );
}
</textarea>
<p>Note the use of invokeLater &#8212; that will be important to the next section.  invokeAndWait wouldn&#8217;t work the same.</p>
<h2> invokeAndWait doesn&#8217;t wait </h2>
<p>The second gotcha with invokeAndWait is that it doesn&#8217;t always.  Wait, that is.  If a thread is waiting for a <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runnable.html">Runnable</a> to execute on the EDT and that thread is interrupted, execution of the waiting thread will resume immediately, BEFORE FINISHING the Runnable.  I had assumed this meant we failed to wait for the EDT, that the job was never executed and should I execute invokeAndWait again.  This was the <strong>wrong</strong> interpretation.  Turns out, all that happened was <em>waiting on completion of the job</em> was interrupted.  The Runnable is still enqueued on the EDT and will still execute.  Depending on how the timing works out, the EDT Runnable may even be executing at the same time.  I just have no idea when it will finish.  Very inconvenient.</p>
<p>invokeAndWait throws <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/InterruptedException.html">InterruptedException</a> so you can learn of this situation and deal with it, but it&#8217;s not really something you can solve after the error has already occurred.  So the following is our solution:</p>
<p>We create a FutureTask to wrap the provided Runnable.  We can await completion of the FutureTask via <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Future.html#get()">FutureTask.get()</a> which tells us when the provided Runnable has finished (successfully or thrown exceptions, or whatever).  After the Runnable finishes, if there were any interruptions during execution, we re-interrupt Thread.currentThread() so the caller knows an interruption occurred and can choose to perform followup action.</p>
<textarea name="code" class="java:showcolumns" cols="" rows="">
public static void runAndBlockSilently(Runnable r) {
	final FutureTask ft = new FutureTask(r, null);
	boolean wasInterrupted = false;
	runSafely( ft );
	while (! ft.isDone() ) {
		try {
			ft.get();
		}
		catch ( InterruptedException e ) {
			wasInterrupted = true;
			// Continue ...
		}
		catch(ExecutionException exEx) {
			Throwable cause = exEx.getCause();
			logger.error( "Exception during BlockingRunnable: ", cause );
			if(cause instanceof RuntimeException)
				throw (RuntimeException) cause;
		}
	}

	if(wasInterrupted) {
		Thread.currentThread().interrupt();
	}
}
</textarea>
<p>Happy Swinging.</p>
<p>-Carl</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.palantirtech.com/2008/02/21/invokeandnotwaiting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Palantir: so what is it you guys do?</title>
		<link>http://blog.palantirtech.com/2007/12/04/what-do-we-do/</link>
		<comments>http://blog.palantirtech.com/2007/12/04/what-do-we-do/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 08:01:18 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
		
		<category><![CDATA[palantir]]></category>

		<category><![CDATA[palantirtech]]></category>

		<category><![CDATA[problemspace - finance]]></category>

		<category><![CDATA[problemspace-government]]></category>

		<category><![CDATA[softwarephilosophy]]></category>

		<guid isPermaLink="false">http://blog.palantirtech.com/2007/12/04/what-do-we-do/</guid>
		<description><![CDATA[I often ask candidates if they&#8217;re familiar with what we do at Palantir.  Most people think they are.  &#8220;Oh, you&#8217;re that data viz. company,&#8221; or, worse, &#8220;You guys do data mining, right?&#8221;  At least they&#8217;ve heard of us and at least they&#8217;re on the right track, but I cringe anyway.  We [...]]]></description>
			<content:encoded><![CDATA[<p>I often ask candidates if they&#8217;re familiar with what we do at Palantir.  Most people think they are.  &#8220;Oh, you&#8217;re that data viz. company,&#8221; or, worse, &#8220;You guys do data mining, right?&#8221;  At least they&#8217;ve heard of us and at least they&#8217;re on the right track, but I cringe anyway.  We aren&#8217;t just a &#8220;data visualization&#8221; company and we don&#8217;t do &#8220;data mining.&#8221;  It&#8217;s almost impossible to convey the scope and complexity of what we do in a few short minutes&#8212;or to do so without taking the conversation to an eye-glazing level of abstraction.</p>
<p>The following is my attempt at describing what we do at a high level without oversimplifying.  I hope that after reading this a candidate will &#8216;get&#8217; what we&#8217;re about, or at least understand enough not to apply tiny labels to our expansive vision.</p>
<p><span id="more-82"></span></p>
<h2>The problem: implementing analysis</h2>
<p>At Palantir we specialize in <strong>analysis</strong>.</p>
<p>Yes, that&#8217;s painfully abstract, and I&#8217;ll get to it in a second.</p>
<p>In real-world terms, we are building a <strong>software platform</strong> that enables people to take whatever data is relevant to them and understand it more easily and thoroughly than ever before, using concepts that they already understand.  And we are applying this vision, at first, to solving problems in the finance sector and the government intelligence community.</p>
<p>The first important thing to note is that we don&#8217;t actually do the analysis ourselves.  We don&#8217;t devise winning trading strategies and we don&#8217;t catch terrorists.  We write software that enables other people to pull off these feats.  These people, experts in their respective fields, are called <em>analysts.</em></p>
<p>So what exactly do analysts do?  What is analysis?</p>
<blockquote><p>Analysis is everything necessary to extract <strong>insight</strong> from <strong>information</strong>.</p></blockquote>
<p>Let&#8217;s break that down a bit.</p>
<p>Information is easy:  It&#8217;s data.  It lives in a relational database or as files indexed on a hard drive, and you can easily run queries against it.  It comes in two forms, structured and unstructured.  And there is <em>a lot</em> of it in the modern world - too much, actually, for current tools to make sense of.</p>
<p>Insight is trickier.  Insight is something only a person can generate, and understanding this is critical for any organization that wants to do analysis right.  Thus the challenge of data analysis is how to bring vast amounts of information into productive contact with human intelligence.  In other words, the challenge is how to <em>enable the analyst</em>.</p>
<p>From the analyst&#8217;s perspective there are five essential features of an analysis platform:</p>
<ol>
<li>First, and most important, <em><strong>the analyst should be in control</strong></em>.  In other words, the primary way of interacting with an analysis tool should be <em>human-driven queries</em>.  While automated approaches can complement a human-driven approach, there simply is no substitute for human intelligence.  Unless you put a person behind the wheel, the system can never be flexible or creative enough to uncover truly original insight.  Artificial Intelligence just isn&#8217;t there yet.</li>
<li>Ability to <em><strong>summarize large data sets</strong></em>.  Some of this is what has traditionally been called data mining:  the largely automated approach&#8212;using machine learning or other statistical techniques&#8212;of processing lots of data at once and extracting nuggets that capture something interesting about the data.  Unlike Palantir, traditional approaches have focused almost exclusively on this aspect of analysis.</li>
<li>Ability to <em><strong>visualize large data sets</strong></em>.  Here the analyst wants interesting and informative ways of viewing data graphically, to make it easier for him to digest.  The analyst wants more than just a summary of the data; he wants a nuanced view of what&#8217;s going on <em>inside</em> these data sets:  What&#8217;s the overall shape of the distribution?  What are the outliers?  What are important structures within the data?</li>
<li>Ability to <em><strong>iterate rapidly</strong></em>.  This means enabling the analyst to ask a question, get the answer, and then quickly ask either a variant on the initial question or a follow-up question that depends on the answer to the initial question.  This rapid, iterative process allows the analyst to quickly test out hypotheses and develop theories about what&#8217;s going on in the data, and by extension to discover what&#8217;s going on in the world.</li>
<li>Ability to <em><strong>collaborate with other analysts</strong></em>.  Getting a handle on a terabyte of data, especially when it comprises multiple data types, is definitely more than a one-person job.  Any organization that&#8217;s serious about understanding the world needs a team of analysts that can work together as more than the sum of its parts.  This requires the ability for one analyst to effortlessly share the results of his analysis with his colleagues.</li>
</ol>
<h2>The Palantir approach</h2>
<p>That&#8217;s what analysis looks like to the analyst, or rather what it should look like in an ideal world.  (Current tools fall far short of this vision.)  So what do <em>we</em> do at Palantir in order to make analysis this smooth and easy?</p>
<p>You could say that we help summarize large data sets, in the sense that we have to provide the analyst with a rich library of techniques and algorithms.  You could also say that we do visualization, in the sense that we have to provide the analyst with a set of interesting and informative ways of visualizing their data.  We do both of these things, and we have to be creative and solve hard problems in order to add value in these areas.  But we do a lot more than that.</p>
<p>Probably the most central hard problem that we address in trying to enable the analyst is <strong>data modeling</strong>, the process of figuring out what data types are relevant to a domain, defining what they represent in the world, and deciding how to represent them in the system.  At Palantir we make sure our data model (ontology) is both flexible and dynamic, and that it mirrors the concepts people naturally use when reasoning about the domain.  This is no small challenge, but we&#8217;re already making it a reality.  In finance our basic data types include financial instruments, dates, portfolios, indices, and strategies&#8212;the same things that financial researchers think about, talk about, and reason with.  In the intelligence product our basic data types include people, places, and events (all with associated properties), which is exactly the way we all represent the world in our minds.</p>
<p>Data modeling, data summarization, and data visualization are the core disciplines for approaching large data sets.  Human-driven queries, rapid iteration, and collaboration are multipliers, taking the power unlocked by the core disciplines to the next level.  When these pieces are brought together in a coherent system, the result is in an analysis platform both very generic and very powerful.</p>
<p>This is what we mean when we say that we&#8217;re changing the way people approach data.  Welcome to the future of analysis.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.palantirtech.com/2007/12/04/what-do-we-do/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
