<?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>Adam Monsen &#187; programming</title> <atom:link href="http://adammonsen.com/post/tag/programming/feed" rel="self" type="application/rss+xml" /><link>http://adammonsen.com</link> <description></description> <lastBuildDate>Sun, 05 Feb 2012 17:26:58 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Link Checker Wishlist</title><link>http://adammonsen.com/post/766?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=link-checker-wishlist</link> <comments>http://adammonsen.com/post/766#comments</comments> <pubDate>Wed, 05 Oct 2011 14:00:06 +0000</pubDate> <dc:creator>adam</dc:creator> <category><![CDATA[Default]]></category> <category><![CDATA[Fun]]></category> <category><![CDATA[nerdy]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[software]]></category><guid isPermaLink="false">http://adammonsen.com/?p=766</guid> <description><![CDATA[Link checkers spider through your website and make sure that links work. I want an awesome link checker. Ideally, it would espouse as many of these attributes as possible: easy to learn easy to configure/customize example config: don&#8217;t hit URLs on other servers sensible default behaviors example: respects robots.txt and &#8216;nofollow&#8217; link attributes scriptable / [...]]]></description> <content:encoded><![CDATA[<p>Link checkers spider through your website and make sure that links work. I want an awesome link checker. Ideally, it would espouse as many of these attributes as possible:</p><ul><li>easy to learn</li><li>easy to configure/customize</li><ul><li>example config: don&#8217;t hit URLs on other servers</li></ul><li>sensible default behaviors</li><ul><li>example: respects robots.txt and &#8216;nofollow&#8217; link attributes</li></ul><li>scriptable / embeddable</li><ul><li>useful from command line</li><li>useful from within CI servers like Jenkins</li></ul><li>recurses (parses HTML, follows links)</li><ul><li>and smartly avoids checking the same pages twice</li></ul><li>fast</li><li>thrifty with memory</li><li>pluggable</li><ul><li>example plugin: run jslint on all JavaScript</li><li>example plugin: validate HTML 5</li><li>example plugin: validate CSS</li><li>example plugin: compute accessibility score</li><li>example plugin: JUnit XML output</li><li>example plugin: OpenDocument spreadsheet output</li><li>example plugin: Excel output</li><li>example plugin: CSV output</li><li>example plugin: JavaScript engine</li><li>example plugin: follow hashbang URLs</li></ul><li>beautiful source code</li><li>FLOSS</li></ul> ]]></content:encoded> <wfw:commentRss>http://adammonsen.com/post/766/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>offline HTML 5 validation</title><link>http://adammonsen.com/post/741?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=offline-html-5-validation</link> <comments>http://adammonsen.com/post/741#comments</comments> <pubDate>Mon, 19 Sep 2011 18:05:18 +0000</pubDate> <dc:creator>adam</dc:creator> <category><![CDATA[Default]]></category> <category><![CDATA[engineering]]></category> <category><![CDATA[Fun]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[software]]></category> <category><![CDATA[vim]]></category> <category><![CDATA[Work]]></category><guid isPermaLink="false">http://adammonsen.com/?p=741</guid> <description><![CDATA[I&#8217;m liking Henri Sivonen’s Validator.nu service. I&#8217;ve got it running locally, and it works well. I can use it as a web service and validate HTML from within Vim, using quickfix to rapidly resolve errors. My Jenkins CI server uses the same validator via phpunit tests. Warning: it took me a very long time to get it [...]]]></description> <content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/HTML5"><img class="alignleft" title="HTML 5 logo" src="/wp-content/uploads/2011/09/HTML5_Logo.svg" alt="HTML 5 logo" width="200" height="200" /></a></p><p>I&#8217;m liking Henri Sivonen’s <a href="http://validator.nu/">Validator.nu</a> service. I&#8217;ve got it <a href="http://about.validator.nu/#src">running locally</a>, and it works well. I can use it as a web service and <a href="http://blog.whatwg.org/vim-checker">validate HTML from within Vim</a>, using <a href="http://vimdoc.sourceforge.net/htmldoc/quickfix.html#quickfix">quickfix</a> to rapidly resolve errors. My <a href="http://jenkins-ci.org">Jenkins</a> CI server uses the same validator via phpunit tests.</p><p>Warning: it took me a <em>very</em> long time to get it running locally. Technically easy (just run a build script), but it downloads tons of libraries and files before it can do its job.</p> ]]></content:encoded> <wfw:commentRss>http://adammonsen.com/post/741/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Debugging web tests on remote servers</title><link>http://adammonsen.com/post/717?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=debugging-web-tests-on-remote-servers</link> <comments>http://adammonsen.com/post/717#comments</comments> <pubDate>Tue, 26 Jul 2011 15:01:42 +0000</pubDate> <dc:creator>adam</dc:creator> <category><![CDATA[Default]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[Work]]></category><guid isPermaLink="false">http://adammonsen.com/?p=717</guid> <description><![CDATA[I run &#8220;web tests&#8221; on a remote server. I use Selenium to act like a person interacting with a website, viewing and entering data. Selenium is pretty awesome, it can drive a real web browser like Firefox. Even better is to have these web tests run automatically every time I commit code. I use Jenkins [...]]]></description> <content:encoded><![CDATA[<p>I run &#8220;web tests&#8221; on a remote server. I use <a href="http://seleniumhq.org">Selenium</a> to act like a person interacting with a website, viewing and entering data. Selenium is pretty awesome, it can drive a real web browser like Firefox.</p><p>Even better is to have these web tests run automatically every time I commit code. I use <a href="http://jenkins-ci.org">Jenkins</a> for this. Jenkins even fires up a headless desktop so Selenium can run Firefox.</p><p>When a web test breaks (especially in some way I can&#8217;t reproduce on my local desktop), sometimes it helps to actually see what Jenkins sees as it runs the test. Here&#8217;s a quick guide for doing so on an Ubuntu GNU/Linux server.</p><ol><li>Connect to the remote server using SSH. Install VNC server: <br/><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> vnc4-server</pre></div></div></li><li>On the remote server, become the user tests run as. For example: <br/><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">su</span> - ci</pre></div></div></li><li>Set a password for the VNC server using the <code>vncpasswd</code> command.</li><li>Start headless X server by running <code>vncserver</code>. Note the given display. If <code>example.com:1</code> is included in the output of <code>vncserver</code>, the display is <code>:1</code>.</li><li><p>Figure out which port the VNC server is using. I usually do something like</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">netstat</span> <span style="color: #660033;">-nape</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">'^tcp.*LISTEN.*vnc.*'</span></pre></div></div><p> Here&#8217;s some example output:</p><div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">tcp        0      0 0.0.0.0:6001            0.0.0.0:*               LISTEN      107        3099855     13233/Xvnc4     
tcp6       0      0 :::5901                 :::*                    LISTEN      107        3099858     13233/Xvnc4</pre></div></div><p>By trial and error, I figured out that 5901 was the port I should use.</p></li><li><p>Port-forward VNC to your local machine.</p><ol><li>Disconnect from the server.</li><li>Reconnect, including <code>-L10000:localhost:5901</code> on your SSH command line.</li><li>Leave this connection open.</li></ol></li><li><p>On your local machine, connect a VNC <em>client</em> to localhost:10000. An X terminal should be displayed.</p></li></li><li><p>In the X terminal, run your web tests.</p></li><li> When finished debugging, kill the X server using the display noted earlier.<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">vncserver <span style="color: #660033;">-kill</span> :<span style="color: #000000;">1</span></pre></div></div></li></ol> ]]></content:encoded> <wfw:commentRss>http://adammonsen.com/post/717/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>simple AJAX/JSP example: sum of two numbers</title><link>http://adammonsen.com/post/442?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ajaxjsp-example</link> <comments>http://adammonsen.com/post/442#comments</comments> <pubDate>Sat, 23 May 2009 03:31:37 +0000</pubDate> <dc:creator>adam</dc:creator> <category><![CDATA[Default]]></category> <category><![CDATA[ajax]]></category> <category><![CDATA[floss]]></category> <category><![CDATA[Fun]]></category> <category><![CDATA[jsp]]></category> <category><![CDATA[programming]]></category><guid isPermaLink="false">http://adammonsen.com/?p=442</guid> <description><![CDATA[It&#8217;s been a while since I&#8217;ve done any front-end Web programming, so when Eva proposed a friendly challenge to quickly create a simple AJAX calculator, I gladly accepted. It took her about 20 minutes on an ASP.NET stack, and took me&#8230; *cough* &#8230;a couple of hours using JSP. The challenge was fun because I played [...]]]></description> <content:encoded><![CDATA[<p>It&#8217;s been a while since I&#8217;ve done any front-end Web programming, so when Eva proposed a friendly challenge to quickly create a simple AJAX calculator, I gladly accepted. It took her about 20 minutes on an ASP.NET stack, and took me&#8230; *cough* &#8230;a couple of hours using JSP.</p><p>The challenge was fun because I played with and gained respect for JQuery and the Eclipse WTP. I think it took me longer than Eva because I first looked for tiny AJAX examples in Ruby on Rails and Django. After a couple of aborted attempts, I decided to use JSP after finding <a href="http://devzone.skillfusion.com/ajaxArticle1.php">this nice example</a>.</p><p>I&#8217;m sharing <a href='http://adammonsen.com/wp-content/uploads/2009/05/ajaxcalc.war'>my result</a> since I wasn&#8217;t able to find one quite as succinct. You can throw the war file in a Tomcat &#8220;webapps&#8221; directory or import it into Eclipse (ideally the Java EE version with WTP) to hack it. The WTP even has a nifty HTML WYSIWYG design view.</p> ]]></content:encoded> <wfw:commentRss>http://adammonsen.com/post/442/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Migrating from Github</title><link>http://adammonsen.com/post/423?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=migrating-from-github</link> <comments>http://adammonsen.com/post/423#comments</comments> <pubDate>Sat, 28 Feb 2009 18:32:51 +0000</pubDate> <dc:creator>adam</dc:creator> <category><![CDATA[Default]]></category> <category><![CDATA[git]]></category> <category><![CDATA[github]]></category> <category><![CDATA[hosted services]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[system administration]]></category><guid isPermaLink="false">http://adammonsen.com/?p=423</guid> <description><![CDATA[Github is an excellent service. Love it. No complaints. However, it may come to pass someday that I need to migrate my code (and history/branches/tags/etc.) elsewhere. If/when that time comes, gitosis sounds like a decent way to host a git repository. Nice! Installing a git server using gitosis scie.nti.st » Hosting Git repositories, The Easy [...]]]></description> <content:encoded><![CDATA[<p>Github is an excellent service. Love it. No complaints.</p><p>However, it may come to pass someday that I need to migrate my code (and history/branches/tags/etc.) elsewhere.</p><p>If/when that time comes, gitosis sounds like a decent way to host a git repository. Nice!</p><ul><li><a href="http://mechanicalrobotfish.com/posts/119-installing-git-server-using-gitosis">Installing a git server using gitosis</a></li><li><a href="http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way">scie.nti.st » Hosting Git repositories, The Easy (and Secure) Way</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://adammonsen.com/post/423/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Mayday Programming Brain Teaser</title><link>http://adammonsen.com/post/337?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tiny-brain-teaser</link> <comments>http://adammonsen.com/post/337#comments</comments> <pubDate>Thu, 01 May 2008 14:18:56 +0000</pubDate> <dc:creator>adam</dc:creator> <category><![CDATA[Default]]></category> <category><![CDATA[c]]></category> <category><![CDATA[java]]></category> <category><![CDATA[programming]]></category><guid isPermaLink="false">http://adammonsen.com/post/337</guid> <description><![CDATA[Thanks to Sam for the idea. int k = 0; k = k++; After both lines execute, what is k equal to? Apparently, the answer depends on a number of things. In Java, k is 0. In C, it may be 0 or 1 depending on your compiler! Bonus points if you can explain why.]]></description> <content:encoded><![CDATA[<p>Thanks to Sam for the idea.</p><blockquote><pre>int k = 0;
k = k++;</pre></blockquote><p>After both lines execute, what is <code>k</code> equal to?</p><p><span id="more-337"></span></p><p>Apparently, the answer depends on a number of things. In Java, <code>k</code> is 0. In C, it may be 0 or 1 depending on your compiler!</p><p>Bonus points if you can explain why.</p> ]]></content:encoded> <wfw:commentRss>http://adammonsen.com/post/337/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Multitaskcraptastic</title><link>http://adammonsen.com/post/327?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dang-distractions</link> <comments>http://adammonsen.com/post/327#comments</comments> <pubDate>Thu, 31 Jan 2008 12:44:20 +0000</pubDate> <dc:creator>adam</dc:creator> <category><![CDATA[Default]]></category> <category><![CDATA[c]]></category> <category><![CDATA[Odd]]></category> <category><![CDATA[programming]]></category><guid isPermaLink="false">http://adammonsen.com/post/327</guid> <description><![CDATA[There are just too many shiny objects out there. Here&#8217;s how I ended up looking at some of the strangest C code I&#8217;ve ever seen. Started on the gslug mailing list, reading about a new keyboard layout. I continue to be drawn in to rumors that the QWERTY layout is a conspiracy to slow down [...]]]></description> <content:encoded><![CDATA[<p>There are just too many shiny objects out there. Here&#8217;s how I ended up looking at some of the strangest C code I&#8217;ve ever seen.</p><ol><li>Started <a href="http://lists.ifokr.org/pipermail/gslug-general/2008-January/000382.html">on the gslug mailing list</a>, reading about a new keyboard layout. I continue to be drawn in to rumors that the QWERTY layout is a conspiracy to slow down typers, so hearing about a new keyboard layout called Colemak piqued my curiosity.</li><li>Progressed quickly from <a href="http://colemak.com/">colemak.com</a> to the <a href="http://en.wikipedia.org/wiki/Colemak">Wikipedia entry on Colemak</a>. Cool, Colemak is supposed to be easier to switch to than Dvorak.</li><li>The Colemak entry on Wikipedia mentions <a href="http://en.wikipedia.org/wiki/Digraph_%28computing%29">digraphs</a>. I&#8217;ve heard of digraphs because I use them in Vim, but <a href="http://david.tribble.com/text/cdiffs.htm#C90-digraph">you can use them in C</a>, too? Strange.</li><li>The digraph entry on Wikipedia also mentions <a href="http://en.wikipedia.org/wiki/C_trigraph">trigraphs</a>. Trigraphs!</li></ol><p>Sheesh. Interesting, but talk about distracting. I sure hope it isn&#8217;t true that <a href="http://science.slashdot.org/article.pl?sid=08/01/27/2221228">multitasking kills your brain</a>.</p> ]]></content:encoded> <wfw:commentRss>http://adammonsen.com/post/327/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>What&#8217;s wrong with the GNU autotools?</title><link>http://adammonsen.com/post/319?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=whats-wrong-with-the-gnu-autotools</link> <comments>http://adammonsen.com/post/319#comments</comments> <pubDate>Sat, 26 Jan 2008 21:39:27 +0000</pubDate> <dc:creator>adam</dc:creator> <category><![CDATA[Default]]></category> <category><![CDATA[autotools]]></category> <category><![CDATA[build systems]]></category> <category><![CDATA[gnu]]></category> <category><![CDATA[programming]]></category><guid isPermaLink="false">http://adammonsen.com/post/319</guid> <description><![CDATA[The GNU build system (aka Autotools) is/are too fricking hard to use. But I&#8217;m split&#8230; when the conventions of autotools are embraced, the product is quite portable. Though not very maintainable. Is it impossible to be infinitely adaptable and still be user friendly? Ian Lance Taylor captures what&#8217;s wrong with autotools quite nicely. Ian says [...]]]></description> <content:encoded><![CDATA[<p>The <a href="http://en.wikipedia.org/wiki/GNU_build_system">GNU build system</a> (aka Autotools) is/are too fricking hard to use. But I&#8217;m split&#8230; when the conventions of autotools are embraced, the product is quite portable. Though not very maintainable. Is it impossible to be infinitely adaptable and still be user friendly?</p><p>Ian Lance Taylor captures <a href="http://www.airs.com/blog/archives/95">what&#8217;s wrong with autotools</a> quite nicely. Ian says Cmake isn&#8217;t a suitable replacement, but perhaps it could evolve into one.</p><p><a href="http://scons.org/wiki/SconsVsOtherBuildTools">Here&#8217;s a nice comparison of several alternatives</a>.</p> ]]></content:encoded> <wfw:commentRss>http://adammonsen.com/post/319/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Elegant Lead Sheets are Back!</title><link>http://adammonsen.com/post/312?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=elegant-lead-sheets-are-back</link> <comments>http://adammonsen.com/post/312#comments</comments> <pubDate>Fri, 14 Dec 2007 13:17:32 +0000</pubDate> <dc:creator>adam</dc:creator> <category><![CDATA[Default]]></category> <category><![CDATA[chordie]]></category> <category><![CDATA[floss]]></category> <category><![CDATA[Fun]]></category> <category><![CDATA[Music]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[software]]></category><guid isPermaLink="false">http://adammonsen.com/post/312</guid> <description><![CDATA[As the holidays are fast approaching, many musicians will be called forth to back a multitude of sing-alongs. Be prepared! Musicians that care memorize or use sheet music, and nerdy musicians love Chordie! Chordie turns text files with embedded chord names into beautiful, stafless PostScript lead sheets. Chordie is a fork of Chord, and is [...]]]></description> <content:encoded><![CDATA[<p>As the holidays are fast approaching, many musicians will be called forth to back a multitude of sing-alongs. Be prepared! Musicians that care memorize or use sheet music, and nerdy musicians love <a href="http://sf.net/projects/chordie">Chordie</a>!</p><p>Chordie turns text files with embedded chord names into beautiful, stafless PostScript <a href="http://en.wikipedia.org/wiki/Lead_sheet">lead sheets</a>.</p><p>Chordie is a fork of <a href="http://en.wikipedia.org/wiki/Chord_%28software%29">Chord</a>, and is written in under 5,000 lines of K&amp;R C. Chordie currenly only runs on *NIX-like operating systems, but there may be ports to other operating systems someday.</p><p><strong>UPDATE: </strong><a href="http://chordii.sf.net">Chordii is the new name for this project.</a></p> ]]></content:encoded> <wfw:commentRss>http://adammonsen.com/post/312/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: adammonsen.com @ 2012-02-11 14:27:43 -->
