<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-5369352</id><updated>2010-03-20T17:51:24.469-07:00</updated><title type='text'>JD Tangney &amp; Associates</title><subtitle type='html'>Tips, tricks and discoveries we've made developing software - especially web-based apps - for kids and education.</subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default?start-index=26&amp;max-results=25'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jdtangney.com/blog/atom.xml'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>307</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5369352.post-6849509914254534689</id><published>2010-03-20T17:51:00.001-07:00</published><updated>2010-03-20T17:51:24.482-07:00</updated><title type='text'>This blog has moved</title><content type='html'>
       This blog is now located at http://blog.jdtangney.com/.
       You will be automatically redirected in 30 seconds, or you may click &lt;a href='http://blog.jdtangney.com/'&gt;here&lt;/a&gt;.

       For feed subscribers, please update your feed subscriptions to
       http://blog.jdtangney.com/feeds/posts/default.
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-6849509914254534689?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/6849509914254534689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=6849509914254534689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6849509914254534689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6849509914254534689'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2010/03/this-blog-has-moved.html' title='This blog has moved'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-6371954694431584753</id><published>2010-02-26T16:48:00.001-08:00</published><updated>2010-02-26T16:48:43.189-08:00</updated><title type='text'>Programming with Scratch</title><content type='html'>I just finished teaching the first of four classes on programming with Scratch. The students are 5 Middle Schooler-aged girls. The purpose is to give them an introduction to programming with a eye to eventually programming LEGO Mindstorms robots in Java.
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-6371954694431584753?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/6371954694431584753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=6371954694431584753' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6371954694431584753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6371954694431584753'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2010/02/programming-with-scratch.html' title='Programming with Scratch'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-2221586547823379351</id><published>2010-02-18T21:58:00.000-08:00</published><updated>2010-02-18T21:58:28.999-08:00</updated><title type='text'>Nice Javascript tooltip package</title><content type='html'>Walter Zorn has done a great job of this little package. The feature set is exactly what we needed, and it is dead easy to use. In the documentation on his web site, every config parameter is illustrated with a live, working example. Herr Zorn is clearly detail-oriented! &lt;a href="http://www.walterzorn.com/tooltip/tooltip_e.htm"&gt;wz_tooltip&lt;/a&gt; is LGPL.&lt;br /&gt;
&lt;br /&gt;
I clicked on the "donate" button and sent a few bucks. Thanks, Walter!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-2221586547823379351?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.walterzorn.com/tooltip/tooltip_e.htm' title='Nice Javascript tooltip package'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/2221586547823379351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=2221586547823379351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/2221586547823379351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/2221586547823379351'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2010/02/nice-javascript-tooltip-package.html' title='Nice Javascript tooltip package'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-5298993243802720548</id><published>2010-02-11T21:10:00.001-08:00</published><updated>2010-02-11T21:10:54.442-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tdd'/><category scheme='http://www.blogger.com/atom/ns#' term='roku'/><category scheme='http://www.blogger.com/atom/ns#' term='brightscript'/><title type='text'>Test harness for Roku's BrightScript</title><content type='html'>&lt;p&gt;Roku has finally released their SDK for making "channels". Unfortunately, the Roku box runs a proprietary, BASIC-like, non-OO language called BrightScript. Happily, Mark Roddy has written a &lt;a href="http://code.google.com/p/brstest/"&gt;test harness&lt;/a&gt; so you can TDD in BrightScript.&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-5298993243802720548?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/5298993243802720548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=5298993243802720548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5298993243802720548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5298993243802720548'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2010/02/test-harness-for-roku-brightscript.html' title='Test harness for Roku&amp;#39;s BrightScript'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-7406203155412276535</id><published>2010-01-22T02:34:00.001-08:00</published><updated>2010-01-22T02:34:34.118-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Tomcat PermGen – a fix?</title><content type='html'>&lt;p&gt;While decent folk were asleep, I was profiling Tomcat. (&lt;a href="http://www.yourkit.com/"&gt;YourKit&lt;/a&gt; rocks, funky UI notwithstanding.)&lt;/p&gt;
&lt;p&gt;I found that our PermGen woes of old were indeed caused by classes not unloading. I was inspired by &lt;a href="http://wiki.apache.org/tomcat/OutOfMemory"&gt;this how-to&lt;/a&gt; and yes, we do leak an instance of &lt;code&gt;WebappClassLoader&lt;/code&gt; which has a reference to every class the app ever uses. Why?, I hear you ask.&lt;/p&gt;
&lt;p&gt;There's a &lt;code&gt;java.util.TimerThread&lt;/code&gt; named "MySQL Statement Cancellation Timer" that does not terminate when the app is unloaded and so it hangs on to the class loader, which in turn hangs on to every class under the sun. For a rigorous explanation, read the &lt;a href="http://bugs.mysql.com/bug.php?id=36565"&gt;MySQL bug report&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;According to that bug report, the MySQL developers capitulated and as of not that long ago, this is the status:&lt;/p&gt;
&lt;blockquote&gt;
  [18 Dec 2009 23:24] Mark Matthews

  &lt;p&gt;Fixed for 5.1.11. Unfortunately no great fix exists that lets us keep the cancellation timer shared amongst connection instances, so instead it's lazily created if need be per-instance, and torn down when the connection is closed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So in theory, we can get rid of this problem by upgrading our MySQL Connector (JDBC driver) from 5.1.10 to 5.1.11.&lt;/p&gt;
&lt;p&gt;If I have time over the weekend, I'll be testing the new JDBC driver with GH and monitoring it closely with YourKit to see if the new driver solves the problem.&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-7406203155412276535?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/7406203155412276535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=7406203155412276535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/7406203155412276535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/7406203155412276535'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2010/01/tomcat-permgen-fix.html' title='Tomcat PermGen – a fix?'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-6460499488546225431</id><published>2010-01-21T23:56:00.001-08:00</published><updated>2010-03-20T17:45:04.486-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macos'/><category scheme='http://www.blogger.com/atom/ns#' term='rhel'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Remote monitoring of Tomcat</title><content type='html'>&lt;p&gt;Got memory leaks? Dogged by OutOfMemoryErrors?&lt;/p&gt;&lt;p&gt;JDK 1.5 and later come with jconsole.&lt;/p&gt;&lt;p&gt;First you have to tell Tomcat how to publish it's inner workings for jconsole. This process differs by platform and also depends on how you installed Tomcat.&lt;/p&gt;&lt;p&gt;The typical MacOS X install consists of downloading the zip and expanding it somewhere. The "somewhere" is your CATALINA_HOME. If that's how you installed Tomcat, go to $CATALINA_HOME/bin and create a file called setenv.sh. Into it put this line:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;export CATALINA_OPTS="-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=8086 -Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false"&lt;/code&gt;
&lt;/pre&gt;&lt;p&gt;On RHEL, Tomcat is typically installed via rpm – I use yum. In that case, you need to add the CATALINA_OPTS to /etc/sysconfig/tomcat6 Leave out the "export" since this file is not a shell script.&lt;/p&gt;&lt;p&gt;Now reboot Tomcat and you're good to go.&lt;/p&gt;&lt;p&gt;Connecting is trivial. Start jconsole. On MacOS X, simply type jconsole at the command line and it opens. For other other platforms, let me know and I will add it.&lt;/p&gt;&lt;p&gt;When jconsole comes up, it will have discovered any local tomcats so simply connect. For a remote tomcat, connect using port 8086 as specified above, and leave user name and password empty.&lt;/p&gt;&lt;p&gt;That's it!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-6460499488546225431?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/6460499488546225431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=6460499488546225431' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6460499488546225431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6460499488546225431'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2010/01/remote-monitoring-of-tomcat.html' title='Remote monitoring of Tomcat'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-6988297802326726507</id><published>2010-01-02T12:34:00.000-08:00</published><updated>2010-01-02T13:37:25.457-08:00</updated><title type='text'>Ah, geek humor</title><content type='html'>I enjoyed this a lot:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;a href="http://jdtangney.com/blog/uploaded_images/dlg-707818.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://jdtangney.com/blog/uploaded_images/dlg-707816.gif" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-6988297802326726507?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/6988297802326726507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=6988297802326726507' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6988297802326726507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6988297802326726507'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2010/01/ah-geek-humor.html' title='Ah, geek humor'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-9007670802544888678</id><published>2010-01-02T11:44:00.001-08:00</published><updated>2010-01-02T12:08:33.478-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macos'/><title type='text'>Automating your MacPorts upgrades</title><content type='html'>&lt;p&gt;&lt;a href="http://porticus.alittledrop.com/"&gt;Porticus&lt;/a&gt; is a very nice tool for maintaining your MacPorts. I find it easier than the command line &lt;code&gt;port&lt;/code&gt; utility. But mostly, I use it for routinely updating (uh, sorry — “upgrading”) my ports. What if that could be automated?&lt;/p&gt;
&lt;p&gt;Here's how.&lt;/p&gt;
&lt;h2&gt;Create /etc/daily.local with this content&lt;/h2&gt;
&lt;pre style="overflow-x: auto; width: 600px"&gt;
&lt;code&gt;#!/bin/sh
#
# /etc/daily.local
#
# I got this from http://hacks.oreilly.com/pub/h/336

# General parameters
PATH=/bin:/usr/bin:/sbin:/usr/sbin
. /etc/hostconfig

# Update MacPorts, if present
if [ -f /opt/local/bin/port ]; then
    /opt/local/bin/port selfupdate &gt;&gt; macports.log 2&gt;&amp;1 &amp;&amp; /opt/local/bin/port upgrade installed &gt;&gt; macports.log 2&gt;&amp;1
fi

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This adds the MacPorts update to your daily maintenance regimen. Typically, the Mac's &lt;code&gt;periodic&lt;/code&gt; scripts are run at around 3:00 AM and they take care of all kids of things like updating your &lt;code&gt;locate&lt;/code&gt; database. The &lt;code&gt;/etc/daily.local&lt;/code&gt; file is executed if present.&lt;/p&gt;
&lt;p&gt;Naturally, if you would rather do your MacPorts update weekly or monthly, then use &lt;code&gt;/etc/weekly.local&lt;/code&gt; or &lt;code&gt;/etc/monthly.local&lt;/code&gt; instead.&lt;/p&gt;
&lt;h2&gt;Create /etc/newsyslog.d/macports.conf with this content&lt;/h2&gt;
&lt;pre style="overflow-x: auto; width: 600px"&gt;
&lt;code&gt;# logfilename          [owner:group]    mode count size when  flags [/pid_file] [sig_num]
/var/log/macports.log                   640  7     *    @T00  J
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This additional config file for &lt;code&gt;newsyslog&lt;/code&gt; says to rotate the macports.log file created by our daily.local. For more info, use &lt;code&gt;man newsyslog&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;And so on…&lt;/h2&gt;
&lt;p&gt;Obviously, you can use this trick for other things you'd like to run periodically. For example, you can update Fink be putting this into your daily.local:&lt;/p&gt;
&lt;pre style="overflow-x: auto; width: 600px"&gt;
&lt;code&gt;
# Update Fink, if present
if [ -f /sw/bin/fink ]; then
    /sw/bin/fink selfupdate &gt;&gt; fink.log 2&gt;&amp;1 &amp;&amp; /sw/bin/fink update-all &amp;&amp; /sw/bin/fink cleanup &gt;&gt; fink.log 2&gt;&amp;1
fi

&lt;/code&gt;
&lt;/pre&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-9007670802544888678?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/9007670802544888678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=9007670802544888678' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/9007670802544888678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/9007670802544888678'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2010/01/automating-your-macports-upgrades.html' title='Automating your MacPorts upgrades'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-5182768321871159185</id><published>2009-12-12T16:58:00.001-08:00</published><updated>2009-12-12T17:04:16.044-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Reverse lookup will bite you</title><content type='html'>Atrocious performance in a cluster or other cross-host forwarding/proxying scenario? Maybe your app (or the container) is doing a reverse lookup, timing out on a failed DNS call, and generally tying up the whole app.&lt;br /&gt;
&lt;br /&gt;
We had this situation with Tomcat and Nginx on two separate machines, communicating on a private network. Going directly to Tomcat via the public NIC gave great performance. But going through Nginx yielded horrible performance (20s or so for a page transition in our app.) &lt;br /&gt;
&lt;br /&gt;
Going through an ssh tunnel to the private NIC was equally terrible. I tried tunneling through 3 separate machines on the same private network, and they all exhibited the same slowdown.&lt;br /&gt;
&lt;br /&gt;
The solution is deliciously simple. Just add an entry for the proxy host to the Tomcat host's /etc/hosts file. (Actually, in our case it's a Win 2008 Server, so it's /windows/system32/drivers/etc/hosts). That way, Tomcat (or the app it's running) can do its reverse lookup by hitting the hosts file, and not by waiting for DNS to try and fail.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-5182768321871159185?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/5182768321871159185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=5182768321871159185' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5182768321871159185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5182768321871159185'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/12/reverse-lookup-will-bite-you.html' title='Reverse lookup will bite you'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-9037145351766254133</id><published>2009-12-09T09:09:00.001-08:00</published><updated>2010-01-02T12:44:00.686-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='macos'/><category scheme='http://www.blogger.com/atom/ns#' term='selenium'/><title type='text'>Selenium won't launch Firefox under Snow Leopard</title><content type='html'>&lt;p&gt;The latest FireFox (3.5.*) includes a version of sqlite that drives Selenium nuts. The basic problem is that Selenium is allowing FireFox's (whacko) version of sqlite to take precedence over the OS-supplied one.&lt;/p&gt;
&lt;p&gt;The error message you'll see in the Selenium server log files looks like this:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;span style="color: #000000; font-family: Arial, sans-serif; font-size: 12px;"&gt;dyld: Library not loaded: /usr/lib/libsqlite3.dylib&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/Security.framework/&lt;br /&gt;
  Versions/A/Security&lt;br /&gt;
  Reason: Incompatible library version: Security requires version&lt;br /&gt;
  9.0.0 or later, but libsqlite3.dylib provides version 1.0.0&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The fix is to disavow Selenium of that silly notion, which entails setting the DYLD_LIBRARY_PATH correctly. This is all explicated in the Selenium &lt;a href="http://jira.openqa.org/browse/SRC-743" title="SRC-743"&gt;bug report.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The problem has already been fixed in the Selenium trunk, so the solution is to build your own Selenium. It's quite trivial, so here goes:&lt;/p&gt;
&lt;p&gt;First, grab &lt;a href="http://jira.openqa.org/secure/attachment/12062/snow-leopard.patch"&gt;the patch&lt;/a&gt;, then execute these commands:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;pre&gt;
svn co http://svn.openqa.org/svn/selenium-rc/trunk .
patch -p0 &amp;lt; snow-leopard.patch
mvn install
cd $WHEREEVER_YOU_KEEP_SELENIUM
cp selenium-server.jar selenium-server.jar.bak
cp selenium-server/target/selenium-server-1.0.2-SNAPSHOT-standalone.jar selenium-server.jar
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;That takes care of the prob.&lt;/p&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-9037145351766254133?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/9037145351766254133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=9037145351766254133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/9037145351766254133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/9037145351766254133'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/12/selenium-won-launch-firefox-under-snow.html' title='Selenium won&amp;#39;t launch Firefox under Snow Leopard'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-6487510337969429041</id><published>2009-10-25T00:04:00.001-07:00</published><updated>2009-10-25T00:04:17.964-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='it'/><title type='text'>@#&amp;*#! you; I quit.</title><content type='html'>&lt;p&gt;After 8 years doing IT support for a local private elementary school, I have finally given up. I feel like whining and complaining about just how I screwed up and making a lot of excuses about why my mission was a failure, but I'd rather distill the underlying causes into something that I can learn from.&lt;/p&gt;
&lt;p&gt;So what went wrong? In a word, pain. Well, actually, &lt;em&gt;insufficient&lt;/em&gt; pain.&lt;/p&gt;
&lt;p&gt;From the outset, I wanted to introduce the staff to better ways of doing things. I wanted them to use modern techniques and tools to make their lives easier. But the problem was they didn't have a good sense of how bad things were. They had no idea how clean and efficient the outside world is in comparison to the ways they were used to. They didn't know they had a problem, much less understand how my fancy techniques and tools would be &lt;i&gt;better&lt;/i&gt; by some metric. Sure, they were in some sort of vague discomfort, but they were not in sufficient pain to drive them to call the IT "doctor".&lt;/p&gt;
&lt;p&gt;As time went by, I became part of the landscape. I made sure they had a completely wired facility and got some sweet bargains on equipment. I had some success with implementing solutions to problems they didn't know they had by simply going ahead with projects.&lt;/p&gt;
&lt;p&gt;But while the staff went about their business, I constantly leapt to address problems big and small, shielding them from the very fact that things were broken or in need of improvement. I was efficient and effective, taking care of things before the staff were even aware that anything needed taking care of. Like an misguided parent, I protected them from every day to day scrape and bump, so they never knew the realities that lay beyond my safety net. I did not allow them to experience pain.&lt;/p&gt;
&lt;p&gt;So what will I do differently next time? There's the rub: I don't yet have an answer to that.&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-6487510337969429041?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/6487510337969429041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=6487510337969429041' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6487510337969429041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6487510337969429041'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/10/you-i-quit.html' title='@#&amp;amp;*#! you; I quit.'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-4069705825017298683</id><published>2009-06-29T11:52:00.000-07:00</published><updated>2009-06-30T00:51:41.041-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Unreliable Tomcat</title><content type='html'>Tomcat has had a memory leak for at least a decade that I am aware of. If you deploy by copying a war file to the webapps directory, sooner or later Tomcat runs out of memory. It's hard to kill tomcat when it's wedged in this way, since the standard way of shutting down is to send a request (via the shutdown script). If Tomcat is too ill to listen to requests, you can't shut it down. Usually the solution is to find its pid and kill it from the command line.

How to automate this? That is, I want to reboot tomcat automatically, even when it's wedged. It sure would be nice if there was a pid file...

Well, there can be a pid file. Set CATALINA_PID to the path to a pid file you want tomcat to use, and the catalina.sh script (called by startup.sh) will do the right thing. Then, in order to get shutdown.sh to make use of the pid file, simply stipulate -force.
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-4069705825017298683?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/4069705825017298683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=4069705825017298683' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/4069705825017298683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/4069705825017298683'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/06/unreliable-tomcat.html' title='Unreliable Tomcat'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-6440972150390396188</id><published>2009-06-17T23:44:00.001-07:00</published><updated>2009-06-17T23:44:51.414-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='regex'/><title type='text'>Eclipse Regular Expressions plugins</title><content type='html'>&lt;p&gt;Whenever I need to use regular expressions in Java, I end up wasting time messing with them to get them to work. And because you have to write your regex as a String in Java, you have to escape all the backslashes. Pretty soon, it becomes really hard to read. What I would really like is a plugin that lets me test my regex dynamically.&lt;/p&gt;
&lt;p&gt;Others have thought of this. So I installed a variety of them and tried them out.&lt;/p&gt;
&lt;p&gt;First up, &lt;a href="http://www.brosinski.com/regex/"&gt;Eclipse Regular Expression Tester&lt;/a&gt;. Its update site is http://brosinski.com/regex/update After installing, it shows itself in the preferences as RegEx Tester. It provides a new view called RegEx Tester. After a little testing, it seems that it does its job. The view makes very inefficient use of screen real estate. The results of the "test" occupy too much vertical space.&lt;/p&gt;
&lt;p&gt;I also did not like the way you have to configure regex parameters globally. When I'm doing regex stuff, it's different every time. I need to be able to tweak in a more immediate way.&lt;/p&gt;
&lt;p&gt;Next is &lt;a href="http://www.bastian-bergerhoff.com/eclipse/features/web/QuickREx/toc.html#installation"&gt;QuickREx&lt;/a&gt;. The update site is http://www.bastian-bergerhoff.com/eclipse/features&lt;/p&gt;
&lt;p&gt;This one does a variety of flavors of regex (JDK, ORO, blah, blah, with Perl and awk varieties) fwiw. You can also keep the regex's and "test text" in a library.&lt;/p&gt;
&lt;p&gt;This thing is even worse with screen real estate, but at least the options are available in the view so you don't have to go to the prefs to change them. There's also a dialog for constructing a regex by selecting components from dropdowns. This seems a little odd to me, since if you know the meanings of all the terms in the dropdowns, you almost certainly know a shitload about regex and you don't need this tool. Whatever.&lt;/p&gt;
&lt;p&gt;Anyway, it's the winner so far, even though the "copy regex to Java String" button doesn't work.&lt;/p&gt;
&lt;p&gt;On to &lt;a href="http://myregexp.com/eclipsePlugin.html"&gt;Regex Util&lt;/a&gt;. Update site is http://regex-util.sourceforge.net/update/ This is all about Java-style regex's, so maybe less UI clutter? Anyway, this one has no prefs. The UI is nicely laid out: minimal. Options and flags are dropdowns, not a gazillion checkboxes. Unlike the others, this one does not show groups, but it &lt;i&gt;does&lt;/i&gt; highlight the match as you select parts of the regex. This seems like a cool debugging tool. Besides, once can always go into "replace" mode and enter the requisite $1, $2 and so on.&lt;/p&gt;
&lt;p&gt;And copying to a Java-style String works &lt;i&gt;and&lt;/i&gt; the opposite function is available.&lt;/p&gt;
&lt;p&gt;Yay! This one is the winner.&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-6440972150390396188?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/6440972150390396188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=6440972150390396188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6440972150390396188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/6440972150390396188'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/06/eclipse-regular-expressions-plugins.html' title='Eclipse Regular Expressions plugins'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-254139713336337613</id><published>2009-06-13T22:15:00.001-07:00</published><updated>2009-06-13T22:15:12.367-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macos'/><category scheme='http://www.blogger.com/atom/ns#' term='voip'/><title type='text'>Mumble or Skype?</title><content type='html'>&lt;p&gt;We use Skype a lot at &lt;a href="http://industriallogic.com"&gt;Industrial Logic&lt;/a&gt;. But we also use VNC, and if the person running the VNC server has a low upstream bandwidth, the voice quality is unusable. We thought we might give Mumble/Murmur a try.&lt;/p&gt;
&lt;p&gt;As it happens, I have done a bunch of research on VoIP technologies and speech codecs, so when I saw that Mumble uses &lt;a href="http://www.speex.org/"&gt;Speex&lt;/a&gt;, I knew that it is on the right footing.&lt;/p&gt;
&lt;p&gt;Two thing need to happen in order to get to the point where we can do some tests. The first is to set up the server. The Windows download of mumble includes murmur, and there are RPMs and static builds of murmur for Linux-based systems. As it happens, MacPorts has a murmur install, so on MacOS it's a simple matter of&lt;/p&gt;
&lt;blockquote&gt;
  &lt;pre&gt;
port install murmur
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Configuring the server — something I have yet to try — appears to be &lt;a href="http://mumble.sourceforge.net/Installing_Mumble#Post-installation_tips"&gt;documented&lt;/a&gt;, but the proof is in the pudding.&lt;/p&gt;
&lt;p&gt;Just for giggles, I fired up mumble in an attempt to connect to a public server. It seems that much of the goodness of mumble comes from it being configured correctly. In particular, it needs to be trained so that the background noise-filtering works correctly.&lt;/p&gt;
&lt;p&gt;I have not reached on conclusion on whether mumble can replace skype for my bandwidth-challenged brethren. If I get 'round to installing murmur, we can give it a try.&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-254139713336337613?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/254139713336337613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=254139713336337613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/254139713336337613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/254139713336337613'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/06/mumble-or-skype.html' title='Mumble or Skype?'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-5960650774590799881</id><published>2009-06-13T21:55:00.001-07:00</published><updated>2009-06-14T19:15:30.735-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='macos'/><title type='text'>Notes on making a simple auth app using Wicket</title><content type='html'>&lt;p&gt;Follow the instructions &lt;a href="http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security"&gt;here&lt;/a&gt; and add the junk to your pom. You'll need to add a &lt;code&gt;repositories&lt;/code&gt; element in which to put you &lt;code&gt;repository&lt;/code&gt;. I put mine near the end, after the &lt;code&gt;build&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Run &lt;code&gt;mvn install&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I prefer JUnit 4 to 3.8, so I removed the generated "variable" ref from my class path and added Eclipse's built-in library for JUnit 4.&lt;/p&gt;
&lt;p&gt;To keep things consistent, I modified the pom to refer to JUnit 4.. Maybe I should have let the Eclipse build reference the Maven repo rather than Eclipse for its JUnit. Hmm.&lt;/p&gt;
&lt;p&gt;Added "variable" ref for both swarm and wasp (sheesh - why two? This is so confusing) and changed my application to extend &lt;code&gt;SwarmWebApplication&lt;/code&gt; as described in the &lt;a href="http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm"&gt;swarm getting started doc&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Of course, Eclipse helped me out with the stubs of the overrides of the abstract methods, so on to filling them in.&lt;/p&gt;
&lt;p&gt;So, starting with a bare-bones app, start adding security. Hmm. Not working.&lt;/p&gt;
&lt;p&gt;OK, so start with the kitchen-sink security demo app and begin deleting unneeded code. Hard, because I don't have a project and have to rely on reconstructing one from the war.&lt;/p&gt;
&lt;p&gt;Aaargh! Give up on swarm. The guy's dead anyway, so who's maintaining it?&lt;/p&gt;
&lt;p&gt;So auth-roles is the next.&lt;/p&gt;Generate a project using mvn. Modify the pom to include auth-roles:&lt;br /&gt;
&lt;pre&gt;
&amp;lt;dependency&amp;gt;
&amp;lt;groupId&amp;gt;org.apache.wicket&amp;lt;/groupId&amp;gt;
&amp;lt;artifactId&amp;gt;wicket-auth-roles&amp;lt;/artifactId&amp;gt;
&amp;lt;version&amp;gt;1.4-rc4&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Then use &lt;code&gt;mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true&lt;/code&gt; to make the eclipse project. Import into eclipse.&lt;/p&gt;
&lt;p&gt;Copy gibblies from the "wicket-auth-roles-example" available on &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=119783&amp;amp;package_id=138752"&gt;Sourceforge&lt;/a&gt;. (It's in maven too if you know how to get it. I don't.) It has a weird structure, not like the autogenerated one with the embedded Jelly, so that's why we have to copy/paste.&lt;/p&gt;
&lt;p&gt;A couple little syntax errors: Stuff that's presumably changed in more recent releases. An overridden constructor needs to be deleted, since the thing it overrides no longer exists. Stuff like that.&lt;/p&gt;
&lt;p&gt;And the source needs to be reformatted. What's with all this C#-like source formatting anyway? Sheesh, this is Java, guys.&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-5960650774590799881?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/5960650774590799881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=5960650774590799881' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5960650774590799881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5960650774590799881'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/06/notes-on-making-simple-auth-app-using.html' title='Notes on making a simple auth app using Wicket'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-5543906304204223674</id><published>2009-06-13T21:54:00.001-07:00</published><updated>2009-06-13T21:54:35.875-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macos'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP Again</title><content type='html'>&lt;p&gt;Since &lt;a href="/blog/2008_10_01_archive.html"&gt;my last post&lt;/a&gt; about PHP dev, Eclipse PDT seems to have matured a bit. So I am having a go at installing it.&lt;/p&gt;
&lt;p&gt;First, I uninstalled PHPEclipse and the xdebug plugins, and installed PDT. The instructions, mysteriously, are quite complex. Find them &lt;a href="http://wiki.eclipse.org/PDT/Installation"&gt;here&lt;/a&gt;.

&lt;/p&gt;
&lt;p&gt;I had a very frustrating time getting dependencies to resolve properly, until I found a hint somewhere that suggested that my Eclipse install was "messed up." So I downloaded a fresh Eclipse for J2EE and finally got PDT 2.0 installed.&lt;/p&gt;

&lt;p&gt;This came at the cost of all the gaziilion other plugins I had installed, like the Google App Engine support, Ruby and Python support and so on. Feh. I'll live. &lt;/p&gt;

&lt;p&gt;I disliked all the UI clutter introduced by the xdebug plugin so, contrary to Paul Scott's advice, I am giving zend debugger a whirl. 

&lt;p&gt;It seems that PDT comes with the "client" end of the Zend debugger, so all we need is the server. &lt;a href="http://www.thierryb.net/pdtwiki/index.php?title=Using_PDT_:_Installation_:_Installing_the_Zend_Debugger#Installing_Zend_Debugger_server"&gt;These instructions&lt;/a&gt; purport to guide one through that.&lt;/p&gt;

&lt;p&gt;Make a phpinfo.php file containing only &lt;code&gt;&lt;?php phpinfo(); ?&gt;&lt;/code&gt; and execute it to see what php thinks about itself and its world. &lt;/p&gt;

&lt;p&gt;Follow the instructions in the readme that comes with &lt;a href="http://downloads.zend.com/pdt/server-debugger/"&gt;the download&lt;/a&gt;. First, I copied ZendDebugger.so into /usr/local/lib. Then I made /etc/php.ini by copying the default found in the same directory. This is what I added:
&lt;blockquote&gt;
&lt;pre&gt;&lt;code&gt;[Zend]
zend_extension=/usr/local/lib/ZendDebugger.so
zend_debugger.allow_hosts=127.0.0.1, 192.168.1.0/16
zend_debugger.expose_remotely=always&lt;/code&gt;
&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;
&lt;p&gt;I was also told to copy dummy.php into your Apache docroot, but I don't know why. I put mine in &lt;code&gt;/Library/WebServer/Documents/&lt;/code&gt;

&lt;p&gt;To confirm that it's installed, we use our phpinfo.php and search for "debugger". There will be a reference next to the copyright as well as an entire section of zend debugger-related info.&lt;/p&gt;

&lt;p&gt;We need the client end of the debugger which is not provided by Eclipse for licensing reasons. Get it &lt;a href="http://downloads.zend.com/pdt/debugger/org.zend.php.debug_feature-I20081217.zip"&gt;here&lt;/a&gt;. (The referring page is &lt;a href="http://www.zend.com/community/pdt"&gt;here&lt;/a&gt;.) Hmmm. It seems you can get it from an &lt;a href="http://downloads.zend.com/pdt"&gt;Eclipse update site&lt;/a&gt; as well.

&lt;p&gt;Leopard comes without pear so we have to install it:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;pre&gt;
cd /usr/local
curl http://pear.php.net/go-pear &amp;gt; go-pear.php
sudo php -q go-pear.php
&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;Note that the go-pear script is very fragile and pretty badly written. It is easily confused. Make sure you are in the directory you want it to install into (&lt;code&gt;/usr/local&lt;/code&gt; in our case), or it will get things horribly wrong. When it's done, it will have fixed your php include_path too. Use &lt;code&gt;pear config-show&lt;/code&gt; to see how it's been set up. &lt;/p&gt;

&lt;p&gt;Now, to install PHPUnit, all we need do is
&lt;blockquote&gt;
  &lt;pre&gt;
sudo pear channel-discover pear.phpunit.de
sudo pear install phpunit/PHPUnit
&lt;/pre&gt;
&lt;/blockquote&gt;

It turns out that PDT does not support running PHPUnit directly, so I created an "external" run configuration in Eclipse to make it happen.

[how? Maybe I'll fill in the details some time. Not now. It's my blog and I will write what I like.]

I can finally test-drive some code!

Next, deploy it. Zend Framework likes to assume it's at the root of your docroot, so people typically create a virtual host to make that happen.

I found that Zend Framework apps really want to see Zend on the include_path so we add it in php.ini. But first we put a copy of the framework in a central spot. I chose /usr/local. So the whole download lives in /usr/local/ZendFramework-1.8.1. We'll want a symlink to isolate us from version lockin, so inside /usr/local, I did a 

&lt;blockquote&gt;
  &lt;pre&gt;
ln -s ZendFramework-1.8.1 ZendFramework
&lt;/pre&gt;
&lt;/blockquote&gt;

Now my include_path looks like this:
&lt;blockquote&gt;
  &lt;pre&gt;
include_path=".:/usr/local/PEAR:/usr/local/ZendFramework/library"
&lt;/pre&gt;
&lt;/blockquote&gt;

Then, in things like the quickstart app, I just went into the library directory and did 

&lt;blockquote&gt;
  &lt;pre&gt;
ln -s /usr/local/ZendFramework/library/Zend
&lt;/pre&gt;
&lt;/blockquote&gt;

Finally, in the quickstart, I did the requisite 
&lt;blockquote&gt;
  &lt;pre&gt;
php scripts/load.sqlite.php --withdata
&lt;/pre&gt;
&lt;/blockquote&gt;

as dictated in the quickstart readme, and the db was created.

Still following the instructions in the quickstart readme, I created the virtual host. I put it into /etc/apache2/extra/httpd-vhosts.conf and uncommented the include in httpd.conf. I added the line in /etc/host but here's the thing: Add ::1 as well as 127.0.0.1 since, being a futurtistic Mac, it uses IPv6.

Apache had trouble with permissions when my docroot was in my home directory, so my virtual host's docroot ended up being /Library/WebServer/ZendFrameworkQuickstart-20090430

If you have permissions issues (you will), look in the apache log and chmod everything in sight.

Finally, the app worked!

Next, I tried making an app from scratch using the zh.sh script that comes with the framework. It's a bit like the RoR script(s) and is used to generate a new app, a new controller, a new view, etc. I made a do-nothing app and voila! it worked!

&lt;blockquote&gt;
  &lt;pre&gt;
zf.sh create controller auth 
zf.sh create action login auth
zf.sh create action logout auth --view-included=0
&lt;/pre&gt;
&lt;/blockquote&gt;

Still, the virtual host stuff has to be set up or nothing else will work. That's very troubling, as I can't imagine many ISPs being open to that level of messing with their Apache instance. More on that particular nightmare another time.
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-5543906304204223674?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/5543906304204223674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=5543906304204223674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5543906304204223674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5543906304204223674'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/06/php-again.html' title='PHP Again'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-2227763955094085550</id><published>2009-06-13T21:47:00.001-07:00</published><updated>2009-06-13T21:47:45.826-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ldap'/><title type='text'>Notes on setting up an LDAP server</title><content type='html'>&lt;p&gt;Install OpenLDAP if you don't already have it.&lt;br /&gt;
Use WebMin to configure it. The defaults are pretty good.&lt;br /&gt;
Do this so you don't get complaints on startup:&lt;br /&gt;
cp /etc/openldap/DB_CONFIG.example /var/lib/ldap/DB_CONFIG&lt;br /&gt;
restart TWICE. The first time there will be another warning. After that, no more warnings.&lt;/p&gt;
&lt;p&gt;Install phpLDAPadmin. Copy the example config as described in the setup instructions.&lt;br /&gt;
To verify that it works, try this:&lt;br /&gt;
ldapsearch -x -b 'dc=montessorifamily,dc=com' '(objectclass=*)'&lt;/p&gt;
&lt;p&gt;To verify the auth, do this:&lt;br /&gt;
ldapsearch -x -b 'dc=montessorifamily,dc=com' '(objectclass=*)' -D 'cn=Manager,dc=montessorifamily,dc=com' -W&lt;/p&gt;
&lt;p&gt;The "-x" says "use simple auth instead of SASL"&lt;/p&gt;Create the basic structure by putting this into a file:
&lt;pre&gt;
&lt;code&gt;dn:     dc=montessorifamily, dc=com
objectClass:    top
objectClass:    dcObject
objectClass:    organization
dc:     montessorifamily
o:      Montessori Family School
dn:     ou=addressbook, dc=montessorifamily, dc=com
objectClass:    top
objectClass:    organizationalUnit
ou:     addressbook&lt;/code&gt;
&lt;/pre&gt;

Do not use a cleartext password in slapd.conf or WebMin won't know how to auth. Use WebMin to set the password and it'll use the '{crypt]' syntax and all will be well.

phpLDAPAdmin doesn't seem happy with simple auth. Change it, or change LDAP?

'person', 'inetOrgPerson', 'organizationalPerson' are part of core.schema And the plural of schema is schemata (or "schemas" in a pinch.)

See &lt;a href="http://www.onlamp.com/pub/a/onlamp/2003/03/27/ldap_ab.html?page=1"&gt;OnLamp article&lt;/a&gt;

This &lt;a href="http://www.linux-mag.com/id/948"&gt;Linux Magazine article&lt;/a&gt; requires one to register at their site. There is more about security, schemata, and replication, so I ignored it.
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-2227763955094085550?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/2227763955094085550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=2227763955094085550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/2227763955094085550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/2227763955094085550'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/06/notes-on-setting-up-ldap-server.html' title='Notes on setting up an LDAP server'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-4950903159753348538</id><published>2009-06-13T21:46:00.001-07:00</published><updated>2009-06-14T19:16:48.919-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>TurboGears? Hmmm. Try Django.</title><content type='html'>&lt;p&gt;I'm going for 2.0.&lt;/p&gt;
&lt;p&gt;Following the instructions here:&lt;/p&gt;
&lt;p&gt;sudo easy_install -i http://www.turbogears.org/2.0/downloads/current/index tg.devtools&lt;/p&gt;
&lt;p&gt;Naturally, I got complaints, so I had to do this:&lt;br /&gt;
easy_install -U setuptools&lt;/p&gt;
&lt;p&gt;Nope. It seems that no force on earth can update the default MacOS install of setuptools, so I just deleted it. The newer one had been put into /usr/local/bin by previous attempts to update setuptools (which is what the error message told me to do.)&lt;/p&gt;
&lt;p&gt;We're still gonna need db drivers, so&lt;br /&gt;
sudo easy_install MySQL_python&lt;/p&gt;
&lt;p&gt;The driver for sqlite is allegedly already part of Python.&lt;/p&gt;
&lt;p&gt;So back to the install of TurboGears. The 2.0 docs are full of talk of "virtual environments" which makes me queasy. The reason I'm doing Python is simplicity, and that shit is not simple.&lt;/p&gt;
&lt;p&gt;Like RoR (and PHP's ZF as I discovered) there is a CLI tool that sets things up. It's called paster.&lt;/p&gt;
&lt;p&gt;So we follow the directions here: http://turbogears.org/2.0/docs/main/QuickStart.html — very well written, btw.&lt;/p&gt;
&lt;p&gt;paster quickstart&lt;br /&gt;
blah blah blah&lt;/p&gt;
&lt;p&gt;This is hell! It's worse than the PHP stuff! I wanted to go Python for simplicity, but this is a Heavy Weight Framework. Sheesh. Oh, it looks like a nice enough framework, but I am not looking for a PhD in frameworks. I just wanna get my app out the door! And, most important, I need something that is ISP-friendly. I simply cannot imagine doing all these arcane gymnastics in a user directory without root access.&lt;/p&gt;
&lt;p&gt;Along the way I did&lt;br /&gt;
sudo port install python_select&lt;/p&gt;
&lt;p&gt;and I love it!&lt;/p&gt;
&lt;p&gt;So a quick&lt;br /&gt;
sudo python_select python26&lt;br /&gt;
and off to install django:&lt;br /&gt;
sudo port install py26-django&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-4950903159753348538?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/4950903159753348538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=4950903159753348538' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/4950903159753348538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/4950903159753348538'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/06/turbogears-hmmm-try-django.html' title='TurboGears? Hmmm. Try Django.'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-7880407819645211066</id><published>2009-05-13T21:59:00.001-07:00</published><updated>2009-05-13T21:59:22.821-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><title type='text'>Bootstrapping Java on Fedora</title><content type='html'>&lt;p&gt;Every time I have to bootstrap a new box with Java, it's a learning experience. I sure wish it was easy. The hardest part this time 'round was finding Java. Sun sure goes to a lot of trouble to hide it.&lt;br /&gt;
Found this:&lt;br /&gt;&lt;/p&gt;
&lt;blockquote cite="http://blog.taragana.com/index.php/archive/how-to-install-jdk-6-java-se-6-tomcat-in-fedora-core-6-fedora-7-in-5-minutes/"&gt;
  &lt;br /&gt;
  [&lt;a href="http://blog.taragana.com/index.php/archive/how-to-install-jdk-6-java-se-6-tomcat-in-fedora-core-6-fedora-7-in-5-minutes/"&gt;&lt;cite&gt;How To Install JDK 6 / Java SE 6 (+ Tomcat) in Fedora Core 6 / Fedora 7 in 5 Minutes&lt;/cite&gt;&lt;/a&gt;]&lt;br /&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is a &lt;a href="http://download.java.net/jdk6/binaries/"&gt;secret directory&lt;/a&gt; where you can download JDKs and just install. The end.&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-7880407819645211066?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/7880407819645211066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=7880407819645211066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/7880407819645211066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/7880407819645211066'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/05/bootstrapping-java-on-fedora.html' title='Bootstrapping Java on Fedora'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-5545606942359107981</id><published>2009-05-03T22:11:00.001-07:00</published><updated>2009-05-03T22:11:19.401-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='wicket'/><title type='text'>Wicket</title><content type='html'>&lt;p&gt;So I started by using the &lt;a href="http://wicket.apache.org/quickstart.html"&gt;QuickStart&lt;/a&gt; tool to generate the correct Maven incantation. (I'm already hating Maven) and following the instructions there in my Eclipse workspace. This generated a whole tree of stuff: my new project. The artifactId I specified ended up naming the root of the tree.&lt;/p&gt;
&lt;p&gt;Next – still following the instructions – I went into the project and did this: &lt;code&gt;mvn eclipse:eclipse -DdownloadSources=true&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;After that, into Eclipse and tell it to create a new Java project. I gave it the name I'd already chosen (the ArtifactId) and Eclipse noticed that there was a project there to import. Cool.&lt;/p&gt;
&lt;p&gt;Unfortunately, it uses an eclipse "variable" called M2_REPO in the classpath, so this need to be resolved. I opened my Eclipse preferences and navigated to Java &amp;gt; Build Path &amp;gt; Classpath variables and set M2_REPO to point to $HOME/.m2/repository&lt;/p&gt;
&lt;p&gt;But Eclipse still wasn't aware that it needs to copy the .html files to the output ("target") directory. That's because the generated .project explicitly includes only .java files in the source path. To remedy, open the project properties and go to the Source tab in Java Build Path. Add an inclusion pattern for "**/*.html" to the one already there for the .java files.&lt;/p&gt;
&lt;p&gt;Great! A working wiket app. That wasn't too bad.&lt;/p&gt;
&lt;p&gt;So what about Wicket Bench, the Eclipse plugin? Out of date. It points to its own internal Wicket distro, which is old. Nice idea otherwise, and TDD-friendly.&lt;/p&gt;
&lt;p&gt;Next, I tried one of the apps included in the Wicket download. There's a pom.xml there, so maybe I can get to run as a standalone app? Too many missing pieces.&lt;/p&gt;
&lt;p&gt;At this point I am miffed. What a mess! Every other thing I touch is out of date, but as a n00b, I have no way of knowing which is the new and which is the old.&lt;/p&gt;
&lt;p&gt;So, my latest strategy is this: Use the archetype stuff from the QuickStart tool, and then &lt;em&gt;copy&lt;/em&gt; needed pieces in from other parts of the distro – in my case, the auth &amp;amp; auth sample code. We'll see how that goes.&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-5545606942359107981?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/5545606942359107981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=5545606942359107981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5545606942359107981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5545606942359107981'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/05/wicket.html' title='Wicket'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-31845738983800350</id><published>2009-05-02T19:15:00.001-07:00</published><updated>2009-05-02T19:15:08.902-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Perl for no good reason</title><content type='html'>I wanted to install webmin on a whim. It's all perl, so I thought I'd fire up cpan and update my perl. That was a massive undertaking, as most of my perl install was what came with the OS. Naturally, there were numerous problems. Most of them were traced to a myserious "only available with the XS version" error message, for which &lt;a href="http://blog.zacharyarmstrong.com/2008/05/24/fixing-the-perl-module-only-available-with-the-xs-version-error/"&gt;this post&lt;/a&gt; was the cure.

It too several tries to get CPAN itself updated along with a gazilion modules, but it's all good.
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-31845738983800350?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/31845738983800350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=31845738983800350' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/31845738983800350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/31845738983800350'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/05/perl-for-no-good-reason.html' title='Perl for no good reason'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-5295043167478032780</id><published>2009-04-09T08:09:00.000-07:00</published><updated>2009-04-09T08:49:06.739-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><title type='text'>Blogger.com is always painful</title><content type='html'>&lt;p&gt;Blogger.com managed to get itself blocked by my ISP — again. The problem is that even though the authorization credentials are wrong, blogger.com keeps trying and trying and trying and trying and trying and trying and trying and trying and trying and trying and trying and trying and trying and trying and trying and trying and trying and trying and trying and trying and eventually gets itself blocked.&lt;/p&gt;
&lt;p&gt;That's a pain. I have to open a ticket and, with cap in hand, ask my ISP to please unblock the marauding googler.&lt;/p&gt;
&lt;p&gt;My blog is back up, and I have successfully (?) moved my web service to a new server. Mail is being done incrementally, but we expect no interruption in service. (Hear that Mr. Murphy?)&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-5295043167478032780?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/5295043167478032780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=5295043167478032780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5295043167478032780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/5295043167478032780'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/04/test.html' title='Blogger.com is always painful'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-885591243491630156</id><published>2009-04-09T01:42:00.001-07:00</published><updated>2009-04-09T01:56:44.297-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><title type='text'>"gem update" and native gibblies</title><content type='html'>&lt;p&gt;I tried running &lt;code&gt;gem update&lt;/code&gt; on my new Joyent "shared accelerator" (translation: &lt;em&gt;hosting service&lt;/em&gt;)&lt;/p&gt;This is what happened:
&lt;pre&gt;
&lt;code&gt;[marin:~] jdtangney$ gem update
Updating installed gems
Updating eventmachine
WARNING:  Installing to ~/.gem since /usr/local/lib/ruby/gems/1.8 and
/usr/local/bin aren't both writable.
Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The &lt;em&gt;nice&lt;/em&gt; part is that it automatically noticed that it needed to do a local install. But that cryptic error message — wtf?&lt;/p&gt;Looking down a little further in the spew, I saw
&lt;pre style="overflow-x: scroll; width: 600px"&gt;
&lt;code&gt;shared -o rubyeventmachine.so epoll.o emwin.o ssl.o ed.o sigs.o cplusplus.o em.o pipe.o rubymain.o files.o binder.o kb.o cmain.o page.o -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -Wl,-R/usr/local/lib -L/usr/local/lib  -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby18 -lsocket -lnsl  -lssl -lcrypto -lsocket -lnsl -ldl   -lpthread -ldl -lcrypt -lm -lm -lpthread -lrt -ldb4  -lc
sh: shared: not found&lt;/code&gt;
&lt;/pre&gt;So some googling later... I just executed this before running &lt;code&gt;gem update&lt;/code&gt;:
&lt;pre&gt;
&lt;code&gt;export CXX=g++&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;It now gets a lot further... Next run ran out of memory?! The one after that segfaulted! (No, really!) The third run ran to a successful completion. Sheesh.&lt;/p&gt;
&lt;p&gt;RubyGems seems to be in the same state of fragility that fink was in several years ago. There are just too many exceptions and funky, weird configurations one has to do to get it to work.&lt;/p&gt;
&lt;p&gt;I had hoped that by being a late adopter, I would miss out on all this chaos. I guess not.&lt;/p&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-885591243491630156?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/885591243491630156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=885591243491630156' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/885591243491630156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/885591243491630156'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/04/update-and-native-gibblies.html' title='&amp;quot;gem update&amp;quot; and native gibblies'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-931414434304372006</id><published>2009-04-05T14:03:00.001-07:00</published><updated>2009-04-05T14:03:04.774-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='macos'/><title type='text'>Installing MySQL gem on Leopard</title><content type='html'>&lt;p&gt;Ordinarily, installing a gem on Mac OS X is as simple as&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;sudo gem install foo&lt;/code&gt;.
&lt;/pre&gt;
&lt;p&gt;However, a little extra magic is required to install the mysql gem:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I found &lt;a href="http://www.macruby.org/trac/wiki/Troubleshooting"&gt;this reference&lt;/a&gt; to back me up.&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-931414434304372006?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/931414434304372006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=931414434304372006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/931414434304372006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/931414434304372006'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/04/installing-mysql-gem-on-leopard.html' title='Installing MySQL gem on Leopard'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369352.post-8547468126441599487</id><published>2009-04-01T21:01:00.001-07:00</published><updated>2009-04-09T02:01:27.985-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='filemaker'/><title type='text'>Front end to FMP</title><content type='html'>&lt;p&gt;I need to build a Q&amp;amp;D front end for a FileMaker database. While the Server version of FileMaker ships with some PHP glue, I decided to go with a more familiar environment. Python! It's a nice language. I have some familiarity with it, and (most important of all) it works on the ISP's server.&lt;/p&gt;
&lt;p&gt;I did a quick survey of some lightweight Python frameworks, and settled on &lt;a href="http://turbogears.org/"&gt;TurboGears&lt;/a&gt; (with &lt;a href="http://www.cherrypy.org/"&gt;CherryPy&lt;/a&gt;) for the app itself. For the interface to FileMaker, I found &lt;a href="http://code.google.com/p/pyfilemaker/"&gt;PyFileMaker&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Ready to go! So, to begin with, I did a little spiking to kick the tires of PyFileMaker. Right out the gate, the results were disappointing. The code choked on my password! (Some regex seemed to believe that my password shouldn't contain special characters.) Not a problem: I created a special account for PyFileMaker (not a bad idea anyway for production) and got one teensy step further. I hit our FMP Server and asked for a list of databases. Kapow! Now PyFileMaker complained that one of the db names "contain unsupported characters." Pity it doesn't deign to tell me which one...&lt;/p&gt;
&lt;p&gt;Well!&lt;/p&gt;
&lt;p&gt;Foreseeing a life of misery and pain, I looked for a Ruby solution. A quick trip to the ISP... Whew! Ruby works there too. Anyway, it's high time I learned Ruby, so next stop, &lt;a href="http://sixfriedrice.com/wp/products/rfm/"&gt;Rfm&lt;/a&gt; The visit to the six.fried.rice site was a breath of fresh air. I know from previous googling journeys that they seem to know what they're talking about. Best of all, they have a RoR sample app that talks to a FMP db, so I can start with that.&lt;/p&gt;
&lt;p&gt;Into the world of Ruby!&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5369352-8547468126441599487?l=jdtangney.com%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/8547468126441599487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5369352&amp;postID=8547468126441599487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/8547468126441599487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369352/posts/default/8547468126441599487'/><link rel='alternate' type='text/html' href='http://jdtangney.com/blog/2009/04/front-end-to-fmp.html' title='Front end to FMP'/><author><name>jdtangney</name><uri>http://www.blogger.com/profile/00888797728494413579</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15277872557741014052'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>