Friday, April 07, 2006

Ephesians 6:17 - sword of the Spirit


As I was finishing the book of Ephesians this morning, I came across a marginal note I made while learning Biblical Greek. The note clarifies a single relative pronoun in Ephesians 6:17. We read Paul's counsel to take ... the sword of the Spirit which is the word of God. The question: what is the sword? Or in other words, what is the referent of which. The traditional Protestant view is that The word of God is the sword of the Spirit (Matthew Henry). Namely, the referent for which is sword. However, in Greek, the grammatical gender of a relative pronoun agrees with its referent. In Ephesians 6:17, the relative pronoun is ὅς (singular neuter). The referent therefore must be neuter. sword is μάχαιρα (singular feminine) and Spirit is πνεύματος (singular neuter). So the referent of which is Spirit. The Spirit is the sword and the Spirit is the word of God. Translating Ephesians 6:17 by dereferencing the relative pronoun gives something like And take the helmet of salvation, and the sword of the Spirit, which Spirit is the word of God:




So what? The point is that the sword Paul counsels us to take is the Spirit not the written word of God. A solid knowledge of the scriptures is commendable, useful and wise, but it does not provide the active, dividing power which the Spirit of the Lord provides. For it is the Holy Ghost which will show unto you all things what ye should do.

Thursday, April 06, 2006

Migrating a Catalyst app from mod_perl to FastCGI


There's a web application that I developed at work which runs under the
Catalyst MVC framework for Perl.
Catalyst is fun to develop in, but this particular application has a lot of
code and made for very large Apache server processes. The result was a lot of
swapping on the server and really slow shutdown times for the Apache
process. I decided to migrate the application to FastCGI. Finding all the
configuration details was a bit of a pain, but the final steps are simple.
I've restated those steps here to save you (and me) some time.



Migrate to CGI




I found it easiest to make sure the Catalyst application was running under CGI
without trouble before beginning the FastCGI portion. It also helped me to
create an empty Catalyst application to make sure none of my code was
responsible for failure.




> catalyst TestApp



In your httpd.conf file, add directives like this
(assuming you have mod_cgi already installed and loaded).




Alias /testapp/ /absolute/path/to/TestApp/script/testapp_cgi.pl/
<Location /testapp/>
SetHandler cgi-script
Options +ExecCGI
</Location>



Now you can visit http://server/testapp/ to see the default Catalyst
screen.



Migrate to FastCGI




Once that's working, move the app over to FastCGI. You'll need to install
mod_fastcgi (available from
FastCGI's webpage) or install
mod_fcgid (a compatible
alternative). Now change your Apache directives to the following:




Alias /testapp/ /absolute/path/to/TestApp/script/testapp_fastcgi.pl/
<Location /testapp/>
SetHandler fastcgi-script
Options +ExecCGI
</Location>



The only changes in the above configuration are to add fast to
testapp_cgi.pl and cgi-script. Once
that works, you can replace the TestApp locations and names with the
ones for your real application.




Some documentation online mentioned using Apache's Action
directive. I wasn't able to make that work, but Alias
seems to do the trick.


Sunday, March 12, 2006

The Question of Abstraction


As I recently read The First Epistle of Paul the Apostle to the Corinthians, I was reminded of an issue with hermeneutics. Namely, to what extent are the words of the prophets and apostles to be abstracted from their original context when deriving doctrine?




This example may demonstrate the point, however the question of abstraction is general and I'm not necessarily concerned with this particular application. We read in 1 Corinthians 5:11




But now I have written unto you not to keep company, if any man that is called a brother be a fornicator, or covetous, or an idolater, or a railer, or a drunkard, or an extortioner; with such an one no not to eat.



It's obvious how the Corinthians to whom this letter was sent were intended to understand the statement. But how is everyone else intended to understand this statement (or any statement from the Scriptures). In answer to the question For whom is Paul's statement proscriptive? there is a seemingly infinite continuum from concrete to abstract:




  • only the Church of God which is at Corinth (see 1:2) which received the original epistle

  • all saints of Paul's time regardless of geography

  • all saints facing problems of fornication, idolatry, etc (see 5:1) regardless of geography or time

  • all saints with or without such problems regardless of geography or time

  • all persons regardless of religion, geography or time




These are but a few conclusions that could be drawn about the applicability of this particular statement. The problem arises in that a strictly concrete application of Paul's statement makes the Scriptures purely an historical document with little use for modern application. However, abstracting Paul's statement to apply to every circumstance certainly loses some of the context the author originally intended and in this case even condemns our Lord himself for associating with publicans and sinners. Whatever one's particular view on the matter, it's clear that practically any doctrine could be reasonably supported by appealing to a convenient location and the concrete-abstract spectrum.




I have a solution to these issues, but that will wait for another entry ... (I'd make Fermat proud).

Saturday, March 11, 2006

Aravis, not the mountain range


Bouquetin à la Tournette
Originally uploaded by Loin des yeux.
Our daughter's name is Aravis. She's named after the character in the C.S. Lewis novel The Horse and His Boy. I searched for other photos on Flickr tagged with her name and came across some beautiful images of the Aravis Range in France. This one is particularly spectacular.

Saturday, February 25, 2006

Review: Blink by Malcolm Gladwell


My wife and I finished Blink: The Power of Thinking Without Thinking by Malcolm Caldwell a couple nights ago. It was really a
fascinating book. The psychology experiments the author mentioned were amazingly clever. I
was particularly intrigued by the studies of the facial muscles and
cataloging all the possible expressions and their meanings. It was humorous to imagine university professors staring at each other and making faces. Nevertheless, the dedication of spending 7 years of one's life studying a single topic in such depth is admirable.




My wife and I disagreed with a couple conclusions the author made in the
book. The most egregious one was in the last chapter. He was talking
about blind auditions for symphonies and orchestras and saying that
the blind auditions had made classical music better. The disagreement
we had with is that he seems to have
forgotten his chapter on Pepsi vs Coke sip tests. In that chapter, he discusses the fact that Pepsi consistently performs better than Coke in blind sip tests. That success rate was what motivated Coca Cola's failure with New Coke in the 1980s. The point of the chapter was to say that nobody drinks soda at home in the form of a sip
test. Therefore, it doesn't really matter which cola performs better in that test. When people drink cola, they are aware of the packaging and all the associations they have with the brand. That awareness affects their experience of the beverage.




We saw that as exactly the problem with the blind auditions:
people don't listen to an orchestra or a symphony behind a blind. They
observe them in the concert hall. A conductor is perfectly
justified in choosing a musician based upon her appearance or the
expectations of his audience. If the audience is going to be distracted
from the music because a female is playing the french horn, that
detracts from the musical experience. Of course, when seleting members of an orchestra for recording purposes, blind auditions are rational.




Overall, the book was fascinating and makes for some good, light reading. I recommend it.

Tuesday, February 21, 2006

Tooltips with Javascript or CSS


For the Wyoming Liberty Index, I created a quick webpage using Catalyst and Perl to help rate the bills of the 2006 legislative session. On one page, I wanted to display the ratings of the bills with comments appearing as tooltips for the ratings. My first attempt was to use the title attribute on the abbr tag, but browsers only display a short summary of the title attribute as a tooltip. I wanted to display the entire comment.



CSS




My first solution was to use pure CSS tooltips. I had to make two changes to get it working in Internet Explorer. First, IE doesn't support the :hover pseudo-class on tags other than a, so I had to change the outermost tag on my tooltips to be a instead of span. Secondly, by hacking on Eric Meyer's pure CSS popups code, I determined that unless you have the following CSS somewhere, Internet Explorer won't display the tooltips.




a:hover {
background : white; /* a color other than default */
}


Javascript




After I got the CSS hacked into shape and working acceptably, I discovered Alessandro Fulciniti's simple Javascript tooltip library. I had investigated a bunch of Javascript tooltip libraries and they were all too complex. Fulciniti's approach is simple and clean. It keeps Javascript, XHTML and CSS separated, the way it should be. With a few minutes hacking, I had it doing exactly what I wanted.




Thank you Alessandro.

Thursday, January 26, 2006

Unable to login to Linksys WAP54G


I recently installed a Linksys WAP54G wireless access point to replace an older Linksys wireless router that was forced into service as an access point. The WAP54G has worked fine as an access point so far (about 1 week), but I was unable to login to the access point's web-based management utility. When I visited 192.168.40.10 (the IP I had assigned to the access point) I was prompted for my username and password. Page 38 of the manual indicates that the administration username is admin and the default password is admin. However, all that got me was 401 Unauthorized It turns out that the admin username is actually , yup no username.




So, to log in, I just left the username field blank and entered the password. Hopefully it's just the documentation that has errors and not the hardware. I noticed another curiosity on page 37 of the manual. Apparently, snmp is the standard e-mail protocol on the Internet. Hmm, that's not what RFC 1157 says. Fortunately, the body of the text correctly indicates the purpose of SNMP. I notified Linksys about both errors.