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

<channel>
	<title>Jason Priem &#187; javascript</title>
	<atom:link href="http://jasonpriem.org/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://jasonpriem.org</link>
	<description></description>
	<lastBuildDate>Wed, 07 Dec 2011 20:43:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Obfuscate no more: why your email address should go au naturale</title>
		<link>http://jasonpriem.org/2009/05/stop-obfuscating-email/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=stop-obfuscating-email</link>
		<comments>http://jasonpriem.org/2009/05/stop-obfuscating-email/#comments</comments>
		<pubDate>Tue, 12 May 2009 21:11:12 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[semantic web]]></category>

		<guid isPermaLink="false">http://jasonpriem.com/?p=228</guid>
		<description><![CDATA[I was recently redesigning my homepage, and I wanted to include my email address.  I knew that only n00b looz3rz display their addy in plain site for spambots to harvest, so I applied a little light obfuscation,  like they do on php.net and million other sites: &#8220;myname at jasonpriem dot com.&#8221; &#8220;Take that, spammer scum!&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jasonpriem.com/wp-content/uploads/2009/05/obfuscation-decoder.png"><img class="alignleft size-full wp-image-245" title="screenshot of the obfuscation decoder demo" src="http://jasonpriem.com/wp-content/uploads/2009/05/obfuscation-decoder.png" alt="screenshot of the obfuscation decoder demo" width="300" height="275" /></a>I was recently redesigning my <a href="http://jasonpriem.com">homepage</a>, and I wanted to include my email address.  I knew that only n00b looz3rz display their addy in plain site for spambots to harvest, so I applied a little light obfuscation,  like they do on <a href="http://www.php.net">php.net</a> and million other sites: &#8220;myname at jasonpriem dot com.&#8221;</p>
<p>&#8220;Take that, spammer scum!&#8221; I thought as I finished, basking in my newfound invulnerability to the v1@gr@-hawking vermin.  After all, if lots of people use <a href="http://en.wikipedia.org/wiki/Address_munging">address munging</a>, it must work, right?</p>
<p>Right?</p>
<p>Darn it, now I&#8217;ve got to start reading about it.  So I did.  And after a few hours of reading blogs and writing code, I am now an Expert With Advice (hey, this is the internet).  And the advice is this:</p>
<p><strong>Stop trying to obfuscate your email address.  Stop now.</strong></p>
<p>I&#8217;ve got two reasons (and for a few more, <a href="http://floatingsun.net/articles/on-email-obfuscation/">some</a> <a href="http://www.divineaphasia.com/words/email-obfuscation-is-silly.html">other</a> <a href="http://typewriting.org/2006/06/19/Email_Obfuscation_Helps_Spammers/#comment-4549">folks</a> have blogged about this, too).  First, the more theoretical one:</p>
<h3>Spam is a problem for you&#8211;obfuscation makes it a problem for your users.</h3>
<p>After all, they&#8217;re the ones who are going to have to do all the de-munging.  Are they always going to notice that they have to remove &#8220;.invalid&#8221; from the end?  Do they all know that the English &#8220;at&#8221; means &#8220;@&#8221;?   Do they have time to edit text in their address lines?   Address munging is fundamentally inelegant, because it intentionally works against clarity.</p>
<p>People have been making this argument for a very <a href="http://www.interhack.net/pubs/munging-harmful/">long</a> <a href="http://www.faqs.org/faqs/net-abuse-faq/munging-address/">time</a>. It&#8217;s particularly relevant nowadays, though, because of the growing promise of the <a href="http://semanticweb.org/wiki/Main_Page">semantic web</a>.  We <em>want</em> data to be machine readable, because then we can do cool stuff with it.  <a href="http://en.wikipedia.org/wiki/FOAF_(software)">FOAF </a>and the <a href="http://microformats.org/wiki/hcard">hCard</a> microformat are pretty pointless if they don&#8217;t have real email addresses to work with.  &#8220;Hide the data from the machines&#8221; is a good strategy for fighting <a href="http://en.wikipedia.org/wiki/Skynet_(fictional)">Skynet</a>, but not for the future of the web.  Ok, reason two:</p>
<h3>Address munging just doesn&#8217;t work.</h3>
<p>It can&#8217;t.  It&#8217;s <a href="http://en.wikipedia.org/wiki/Mystery_Men#Cultural_references">putting glasses on Superman</a>.  Although <a href="http://tools.ietf.org/html/rfc2822">in theory</a> a valid email can be pretty hard to identify, <a href="http://www.regular-expressions.info/email.html">in practice</a>, emails addresses use a very limited vocabulary&#8211;and computers are good at identifying limited vocabularies.  Don&#8217;t forget, everyone has been using the same old [at] and &#8220;dot&#8221; tricks for <em>decades</em>&#8211;this is <a href="http://en.wikipedia.org/wiki/Security_through_obscurity">security through obscurity</a> at its very worst.</p>
<p>But <a href="http://en.wikipedia.org/wiki/Reading_Rainbow#Show_details">don&#8217;t take my word for it</a>.  I took a couple hours and worked up a demo <a href="http://jasonpriem.com/obfuscation-decoder/">email obfuscation decoder</a> that breaks the vast majority of text-based obfuscations; it&#8217;s also got an input field for you to test out your own munges (some other people have built <a href="http://dave78.com/misc/harv_test.html">similar</a> <a href="http://www.openjs.com/scripts/regexp/email_decrypter.php">demos</a>, too).  It&#8217;s not perfect, but it correctly decodes most obfuscations&#8211;and remember that this is a novice programmer, working for an afternoon.  It&#8217;s that easy. Supporters of obfuscation argue that spammers will go after the low-hanging fruit; folks, text-based obfuscation <em>is</em> the low-hanging fruit.</p>
<p>Now, the Alert Reader has by this time noticed that I&#8217;ve limited my critique to text-based munging.  &#8220;What about more sophisticated methods,&#8221; the Alert Reader now asks?  &#8220;What about using an image, or CSS, or Javascript to hide addresses?&#8221;  Good questions, Alert Reader; you are very alert.  Alright, let&#8217;s take a quick look at these, too:</p>
<h3>Images</h3>
<p>There&#8217;s not really much I can say about this one, save this: making content completely opaque to visually-impaired users simply shouldn&#8217;t be an option. And of course, spammers still can OCR your images.</p>
<h3>CSS</h3>
<p>Obviously, something like  <code>foo@bar&lt;span style=”display:none”&gt;NULL&lt;/span&gt;.com</code> is silly; the spambot can filter out &#8220;display:none&#8221; spans pretty easily, or even just discard everything in a span.  <code>&lt;span class=’a’&gt;foo&lt;/span&gt;&lt;span class=’b’&gt;bar&lt;/span&gt;@“&lt;span class=’c’&gt;foo&lt;/span&gt;&lt;span class=’d’&gt;bar&lt;/span&gt;.com</code><span> </span> at least requires the bot to open your stylesheet to see which spans are hidden.  But remember, your server will happily dish out your easily-parsed css to anyone who asks for it; this is not a good place to hide secrets.</p>
<h3>Javascript</h3>
<p>There are <a href="http://www.google.com/search?q=javascript+obfuscate+%22email%20address%22">too many</a> js methods to cover in any detail here.  Some are better than <a href="http://blog.macromates.com/2007/obfuscating-emails-revisited/">others</a>; a few try to <a href="http://pipwerks.com/journal/2009/02/01/obfuscating-email-addresses-revisited/">degrade gracefully</a> for users without Javascript support.  All of them, though, share the same weakness as CSS: everyone can read your Javascript.  And you certainly don&#8217;t need a browser to run it; there are<a href="http://hublog.hubmed.org/archives/001847.html"> lots of JS interpreters</a> that are more than happy to run on a spammer&#8217;s server.</p>
<p>Sure, you can get pretty clever with this technique (I particularly like the idea of decoding not on the onload event, but on a click event), but you can&#8217;t change the fact that ultimately  the bad guys can do everything with your code that a browser does&#8211;and eventually, they will.</p>
<p>Now, I&#8217;ll admit that images, CSS, and Javascript approaches are more effective than text-based ones.  All of them (when done properly) require the spammer to pay for more bandwidth and/or processor cycles.  But they all also inconvenience some or all of your users, and none of them are compatible with the sementic web.  They all give you false sense of security, and they&#8217;re ugly, hackish solutions. True, some obfuscations have <a href="http://techblog.tilllate.com/2008/07/20/ten-methods-to-obfuscate-e-mail-addresses-compared/">performed well</a> <a href="http://www.cdt.org/speech/spam/030319spamreport.shtml">empirically</a>&#8211;but keep in mind that these (pretty informal) experiments are years old.  As more people have adopted these measures, be sure that more spammers are spending the time to counter them, as well.</p>
<p>Now, I can&#8217;t go so far as to condemn anyone who obfuscates an address; I get that spam is a pain, and filters aren&#8217;t perfect.  Sometimes an ugly, hackish solution is the only way.  But I&#8217;m suggesting that you think twice before you give in to the spammers and obfuscate, especially given the relative ineffectiveness of many commonly-used methods.  The Web reaches its full promise when information is made easier to find, not harder.</p>
]]></content:encoded>
			<wfw:commentRss>http://jasonpriem.org/2009/05/stop-obfuscating-email/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Zotero Report Customizer 2.0</title>
		<link>http://jasonpriem.org/2008/08/zotero-report-customizer-20/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=zotero-report-customizer-20</link>
		<comments>http://jasonpriem.org/2008/08/zotero-report-customizer-20/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 22:19:05 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://jasonpriem.com/2008/08/zotero-report-customizer-20/</guid>
		<description><![CDATA[As I&#8217;ve discussed in a previous post, I&#8217;m an enthusiastic user of the free reference manager Zotero; I&#8217;m impressed with how such young, open-source product has managed to quickly outshine established, non-free alternatives like EndNote. One difficulty I (and others) have had with Zotero, though, is in generating reports for a group of articles. Particularly, [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve discussed in a previous post, I&#8217;m an enthusiastic user of the free reference manager <a href="http://jasonpriem.com/2008/05/zotero-the-least-known-triumph-of-open-source/">Zotero</a>; I&#8217;m impressed with how such young, open-source product has managed to quickly outshine established, non-free alternatives like EndNote.</p>
<p>One difficulty I (and <a href="http://forums.zotero.org/discussion/2549/">others</a>) have had with Zotero, though, is in generating reports for a group of articles.  Particularly, there&#8217;s no way to customize the categories you display in the report.  This can be a real problem if you&#8217;re trying to share your sources with a co-author; at best, there&#8217;s a lot of unneeded metadata cluttering up the document (at worst, your email says you&#8217;ve been working on this for weeks, while your articles&#8217; Date Added data tells a different tale&#8230;).</p>
<p>Now, I&#8217;m told this will be corrected in a later version of Zotero.  However, I turned to <a href="http://www.php.net/">PHP</a> and a bit o&#8217; <a href="http://en.wikipedia.org/wiki/Regular_expression">regular expression</a> magic to do it now.  It turned out to be a good learning project, and I&#8217;ve been pleased to see that a few hundred other people (if <a href="http://www.google.com/analytics/">Google Analytics</a> is to be believed) have gotten some use out of it, too.  The tool&#8217;s listed in the <a href="http://www.zotero.org/documentation/reports">Zotero documentation</a>, and&#8211;by far the most important of all&#8211;I got a free Zotero t-shirt out of the deal, which is now my favoritist garment ever.  </p>
<p>I&#8217;ve also gotten quite a few feature requests from folks, including a request to help localize the script for German (you can find that German-language version <a href="http://www.blended-education.net/Zotero/bericht_anpassen_107.php">here</a>).  Since my PHP skills have broadened in the last several months (I&#8217;m all the way to &#8220;novice&#8221; now!), I figured it was time to do an update.  So, here is <a href="http://jasonpriem.com/projects/report_cleaner.php">Zotero Report Customizer 2.0</a>.   New features include javascript form validation, a bunch of new categories, and the option to specify your own categories to delete if I don&#8217;t list &#8216;em.  The script is also a ton easier to modify if you want to customize it to a different language, and can be set up to work in multiple languages at once. (I added a little German support for an example).</p>
<p>Have fun, and if you think of anything else you&#8217;d like in this, just let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://jasonpriem.org/2008/08/zotero-report-customizer-20/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

