<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>Jason Harwig - Blogs at Near Infinity</title>


        <link>http://www.nearinfinity.com/blogs/</link>
        <description>Employee Blogs</description>
        <language>en</language>
        <copyright>Copyright 2012</copyright>
        <lastBuildDate>Sat, 02 Apr 2011 10:56:36 -0500</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>HTML5 and CSS3 talk at RubyNation</title>
            <description><![CDATA[<div>Here is a link to my HTML5 and CSS talk that I gave today at RubyNation in Reston, VA.</div><div><br /></div><div>I knew I had to use a webpage to really showcase the new HTML and CSS features, so I built a JavaScript library to animate between section elements. I call it <a href="https://github.com/jharwig/sliderrr.js">sliderrr.js</a>.&nbsp;</div><div><br /></div><div><b>Keyboard commands:</b></div><div>left/right arrow - move previous/next slide</div><div>CMD-ESC - toggle presentation mode (ctrl-esc on windows)</div><div><br /></div><div><b>View Online:</b></div><div><a href="http://bit.ly/rubynation-html5">bit.ly/rubynation-html5</a>&nbsp;*</div><div><br /></div><div><b>Source on GitHub</b></div><div><a href="https://github.com/jharwig/HTML5Presentation">github.com/jharwig/HTML5Presentation</a></div><div><br /></div><div><br /></div><div>* Use Chrome/Safari for animation</div><div><br /></div><div><br /></div>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/html5_and_css3_talk_at_rubynat_1.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/html5_and_css3_talk_at_rubynat_1.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Web Development</category>
            
            
            <pubDate>Sat, 02 Apr 2011 10:56:36 -0500</pubDate>
        </item>
        
        <item>
            <title>&quot;The Daily&quot; Image Carousel using Core Animation</title>
            <description><![CDATA[<p><i><a href="http://thedaily.com">The Daily</a><span class="Apple-style-span" style="font-style: normal;">,&nbsp;a newspaper published exclusively for the iPad,</span></i>&nbsp;has been a hot topic since it's launch last week. The experience, however, is less than spectacular. The app may eventually live up to the hype, but there are too many performance problems for me to even open it anymore.</p>

The most&nbsp;excruciating&nbsp;is the carousel of articles. It looks like a twist on CoverFlow, but the scrolling is an agonizing experience. I'm <a href="http://blog.thedaily.com/post/3149162790/were-listening#comment-141665609">not the only one</a>&nbsp;to wonder why performance is so terrible. I wasn't the <a href="http://twitter.com/lorenb/status/33409769964306432">first</a> to try and improve it either. See for yourself how terrible it is...<div><br /></div>
<iframe src="http://player.vimeo.com/video/19688051?color=ff9933" width="580" height="435" frameborder="0"></iframe><p style="text-align: center;"><a href="http://vimeo.com/19688051"><i>The Daily</i> Carousel Performance</a></p>

<p></p><div><br /></div><div>I spent some free time over the weekend implementing my own iPad image carousel using CoreAnimation: CALayer, CATransformLayer, and CATransform3D  with perspective transformations. <a href="http://forums.cnet.com/7723-10152_102-151057.html">Scrolls like butter</a>.</div><div><br /></div>
<iframe src="http://player.vimeo.com/video/19688360?color=ff9933" width="580" height="435" frameborder="0"></iframe><p style="text-align: center;"><a href="http://vimeo.com/19688360"><i>The Daily</i> Carousel Reimplemented</a></p>
<p></p><div><br /></div><div>The Xcode project can be downloaded here:&nbsp;<a href="http://www.nearinfinity.com/blogs/2011/02/07/DailyCarousel.zip">DailyCarousel.zip</a></div> <i>(Warning: prototype quality code)</i><div><br /></div><p></p>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/coreanimation_image_carousel.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/coreanimation_image_carousel.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">iPhone</category>
            
            
            <pubDate>Tue, 08 Feb 2011 07:00:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Taking Polyglot Programming Further</title>
            <description><![CDATA[<p>I consider polyglot programming to be using the best tool for the problem. Some languages are&nbsp;inherently&nbsp;better at solving certain types of problems. We should embrace these advantages and switch freely between languages.

<p>Today, we are introducing Hydra, the meta-language that runs on the JVM. Hydra supports (and encourages!) any JVM-based language at any time in the file.

<p>Example: Person.hyrdra

<pre class="prettyprint">:groovy
class Person {

  :ruby
  # define properties
  attr_accessor :first_name, :last_name

  :python
  """ 
    Get the full name by concatenating first, last
  """
  def full_name (self):
    print "%s %s" % (self.first_name, self.last_name)

  :java
  /**
   * Set the firstName attribute to name. (Useless javadoc)
   *
   * @param name the new first name value
   */
  public void setFirstName(String name) {
      String prefix = "Setting first name to ";

      :clojure
      (print prefix)
      (defn printChar [c] (print c))

      :javascript
      name.forEach(printChar);<br />
      :java
      this.firstName = name;      
  }

  // Switch to python so ending '}' isn't needed ;)
  :python</pre>

<p>Sent from my iPad]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/taking_polyglot_programming_fu.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/taking_polyglot_programming_fu.html</guid>
            
            
            <pubDate>Thu, 01 Apr 2010 00:00:00 -0500</pubDate>
        </item>
        
        <item>
            <title>JavaScript Particle Engine in Canvas</title>
            <description><![CDATA[<p>The most popular entry I've written at Near Infinity has been the <a href="http://www.nearinfinity.com/blogs/page/jharwig?entry=javascript_particle_engine">JavaScript Particle Engine</a>.  It had limitations because I used transparent images and only made one color -- black. I recreated the fire demo for a talk -- Advanced Web Graphics with Canvas -- that I gave at the <a href="http://therichwebexperience.com/conference/speaker/jason_harwig.html">Rich Web Experience</a>. I'll post the slides, sample code, and some more demos in upcoming entries.</p>
]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/javascript_particle_engine_in_canvas.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/javascript_particle_engine_in_canvas.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">JavaScript</category>
            
            
            <pubDate>Tue, 23 Sep 2008 19:24:23 -0500</pubDate>
        </item>
        
        <item>
            <title>JavaScript Obscured (How to confuse coworkers)</title>
            <description><![CDATA[<p>I was reading a blog entry at <a href="http://webreflection.blogspot.com/2008/06/two-simple-tricks-in-javascript-olds.html">Web Reflection</a> that outlined some obscure solutions to common JavaScript patterns.</p>

<p>I thought that entry was interesting, but I'm not sure I'd use them because of code readability and maintenance. It did get me thinking of some other ways to obscure simple tasks.</p>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/javascript_obscured_how_to_confuse.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/javascript_obscured_how_to_confuse.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">JavaScript</category>
            
            
            <pubDate>Thu, 05 Jun 2008 20:19:44 -0500</pubDate>
        </item>
        
        <item>
            <title>Improving CSS</title>
            <description><![CDATA[Of the trinity of web technologies, CSS is by far the worst at this stage. It's a language that begs for more power.

<p>Wouldn't it be cool if you could do this?</p>

<code class="prettyprint">
@variables {
  NEAR_INFINITY_ORANGE: #C96522;
}

div.header {
  background-color: var(NEAR_INFINITY_ORANGE);
}
</code>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/improving_css.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/improving_css.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">CSS</category>
            
            
            <pubDate>Thu, 10 Apr 2008 16:57:43 -0500</pubDate>
        </item>
        
        <item>
            <title>Server-side JavaScript and Jaxer</title>
            <description><![CDATA[<p>The web community has been buzzing about the new Ajax server, Jaxer, from Aptana. If you haven't heard see <a href="http://ejohn.org/blog/server-side-javascript-with-jaxer/">John's</a>, or <a href="http://ajaxian.com/archives/aptana-releases-jaxer-ajax-server-built-on-mozilla">Dion's Ajaxian</a> posts about it.</p>

<p>Now, overall, I am really excited about the future in this project. The problem I had is all their examples use <i>synchronous</i> XMLHttpRequests. We <a href="http://ajaxblog.com/archives/2005/05/25/synchronous-requests-bad">already</a> <a href="http://www.oreillynet.com/xml/blog/2007/01/do_sync_calls_freeze_browsers.html">know</a> <a href="http://swik.net/Ajax/Ajax-Development-Gotchas">why</a> this is unfriendly to users.</p>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/server_side_javascript_and_jaxer.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/server_side_javascript_and_jaxer.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">JavaScript</category>
            
            
            <pubDate>Wed, 23 Jan 2008 13:36:15 -0500</pubDate>
        </item>
        
        <item>
            <title>Filtering JavaScript From HTML Content in Java (Sanitizing user input)</title>
            <description><![CDATA[<p>I gave a <a href="http://www.nearinfinity.com/blogs/page/jharwig?entry=javascript_security_slides_from_no">JavaScript security</a> talk last month, and one of the topics was HTML filtering.  I gave examples of how MySpace tried to filter executable code, while still allowing HTML tags for formatting.  MySpace, of course, failed to foresee every attack vector, and the <a href="http://namb.la/popular/tech.html">Samy worm</a> was born.</p>

<p>HTML filtering was never recommended because it was so difficult to get right, and with no proven libraries, trying to build a solution would almost certainly contain security holes. Thanks to Arshan Dabirsiaghi we finally have something to use. He has created the <a href="http://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project">OWASP AntiSamy</a> project to easily sanitize HTML input.  AntiSamy is currently implemented as a Java 1.5 compatible library, but there are plans to support other platforms.</p>

Here's a sample usage <br />
<code class="prettyprint">
AntiSamy sanitizer = new AntiSamy();
CleanResults results = sanitizer.scan(request.getParameter("html"));
String html = results.getCleanHTML();
if (!results.getErrorMessages().isEmpty()) {
    log.warn("Input contains errors");
}
</code>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/filtering_scripts_from_html_content.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/filtering_scripts_from_html_content.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Java</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security</category>
            
            
            <pubDate>Sat, 01 Dec 2007 15:56:33 -0500</pubDate>
        </item>
        
        <item>
            <title>JavaScript Security Slides from No Fluff Just Stuff</title>
            <description><![CDATA[<p>I spoke at the Reston, VA <a href="http://www.nofluffjuststuff.com">No Fluff Just Stuff</a> conference again this past weekend.  The talk was on JavaScript security covering topics including:
</p><ul>
<li>Cross-site scripting (XSS)</li>
<li>Cross-site-request forgery (CSRF)</li>
<li>JSON Hi-jacking</li>
<li>JavaScript portscanning</li>
<li>JavaScript and CSS History "Go Fish"</li>
</ul>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/javascript_security_slides_from_no.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/javascript_security_slides_from_no.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">JavaScript</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security</category>
            
            
            <pubDate>Thu, 08 Nov 2007 19:38:27 -0500</pubDate>
        </item>
        
        <item>
            <title>Testing JavaScript Objects with Function.prototype.call</title>
            <description><![CDATA[<p>This is a short tip that I found useful for testing complex JavaScript objects using <a href="http://www.thefrontside.net/crosscheck">crosscheck</a>. For more information on crosscheck see my article on <a href="/blogs/page/jharwig?entry=javascript_unit_testing">JavaScript Unit Testing with Crosscheck</a>. </p>

<p>Testing instance methods can be a pain if the functions use instance variables and the object is heavyweight. In my case the constructor did a lot with the DOM that I didn't want to mock. Instead of invoking the function through an instance of an object, I called it statically. </p>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/testing_custom_javascript_libraries_with.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/testing_custom_javascript_libraries_with.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">JavaScript</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Testing</category>
            
            
            <pubDate>Thu, 11 Oct 2007 18:33:31 -0500</pubDate>
        </item>
        
        <item>
            <title>JavaScript Unit Testing with Crosscheck</title>
            <description><![CDATA[<p>Here we are, a couple years since Ajax was coined, JavaScript has become a language that people actually respect. The code being written now is better than ever before. Object-orientation, name-spacing, object detection, and correct scoping are prevalent now. The libraries available (prototype, jquery, yui, dojo) are very well written. What is the next step to improve code quality? If you want my opinion, it's Testing. Otherwise, <a href="http://www.digg.com">here's</a> the door. :) </p>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/javascript_unit_testing.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/javascript_unit_testing.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">JavaScript</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Testing</category>
            
            
            <pubDate>Mon, 08 Oct 2007 15:08:12 -0500</pubDate>
        </item>
        
        <item>
            <title>Checkpointed Backups in OS X with rsnapshot</title>
            <description><![CDATA[<p>Starting a backup routine is hard. I wanted a backup solution that did the following:
</p><ul>
<li>Runs automatically every night</li>
<li>Backup OS X resource forks correctly</li>
<li>Maintain creation/modification times for backup files</li>
<li>Make checkpointed-incremental backups</li>
</ul>
.. and I didn't want to wait until <a href="http://www.apple.com/macosx/leopard/timemachine.html">Apple's next operating system</a>.  This solution is similar to Time Machine, without the pretty GUI.]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/checkpointed_backups_in_os_x.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/checkpointed_backups_in_os_x.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Mac OS X</category>
            
            
            <pubDate>Tue, 06 Mar 2007 17:30:54 -0500</pubDate>
        </item>
        
        <item>
            <title>Prototype.js Documentation Site Launched</title>
            <description><![CDATA[<p>It seems that <a href="http://encytemedia.com/blog/articles/2007/1/18/prototype-1-5-released-and-documentation-site-live">Encytemedia</a> was successful in their <a href="http://encytemedia.com/blog/articles/2006/10/31/prototype-a-call-for-documentation">"Call for Prototype Documentation"</a> blog posted in the old year.

</p><p>The site lives at <a href="http://prototypejs.org">prototypejs.org</a> and should help new and experienced users alike master the popular JavaScript library.

</p><h3>Features</h3>

<ul>
<li>API of all extended and new objects with examples</li>
<li>Tips/Tutorials section that includes how prototype works</li>
<li>Easy method for users to contribute</li>
</ul>

<p>Good work guys!</p>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/prototype_js_documention_site_launched.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/prototype_js_documention_site_launched.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">JavaScript</category>
            
            
            <pubDate>Thu, 18 Jan 2007 17:37:44 -0500</pubDate>
        </item>
        
        <item>
            <title>Firebug 1.0 Features announced</title>
            <description><![CDATA[<p><img style="float: right;" src="/blogs/resources/jharwig/firebug-timeline.gif" alt=" "/>Looks like Joe Hewitt has been busy. </p>

<p>Firebug now has it's own site at <a href="http://www.getfirebug.com">getfirebug.com</a>. The new site shows the features for Firebug 1.0 which seem like a giant leap in functionality from the current 0.4.1.  My favorites look to be the new profiler and the network activity view (shown right).</p>

<p>The catch?  According to <a href="http://www.joehewitt.com/blog/introducing_fir.php">Hewitt's blog</a>, it might not be free. I know I would pay $15-$25, what about you?</p>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/firebug_1_0_features_announced.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/firebug_1_0_features_announced.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">JavaScript</category>
            
            
            <pubDate>Thu, 16 Nov 2006 11:09:47 -0500</pubDate>
        </item>
        
        <item>
            <title>Javascript Particle Engine</title>
            <description><![CDATA[<h1 style="display:none">Javascript particle Engine</h1>
<div style="padding:15px;background-color:#ffffcc">Updated: <a href="http://www.nearinfinity.com/blogs/jason_harwig/javascript_particle_engine_in_canvas.html">Particle Engine using Canvas</a></div>

<p>I was at the No Fluff Just Stuff Software Symposium in Reston, VA this past weekend and had some time in between sessions to work on something. As most of the people I work with know, I rarely code things that might actually be useful to someone in my spare time.  So, I had no reason to attempt to rationalize the use for a particle engine in Javascript.</p>

<p>I think I've written a particle engine in almost every language I've used for an extended period of time. This includes python, java, objective-c, and c.  What's surprising is that it has taken me this long to write a particle engine in the language I probably spend the most time coding in -- Javascript.</p>

<p>By the way, this is probably the worst particle engine ever created (TM), but it is written in Javascript, so give me a break.  It doesn't support colors yet as I couldn't think of an efficient way to change the color of a png.  I've only tested it in Firefox and Safari because I'm on a Powerbook. It's also pretty slow, in that it can handle only a dozen or so particles.</p>]]></description>
            <link>http://www.nearinfinity.com/blogs/jason_harwig/javascript_particle_engine.html</link>
            <guid>http://www.nearinfinity.com/blogs/jason_harwig/javascript_particle_engine.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">JavaScript</category>
            
            
            <pubDate>Tue, 07 Nov 2006 23:28:54 -0500</pubDate>
        </item>
        
    </channel>
</rss>

