April 15, 2010
“Gospel doctrine matters because the good news is so full and rich and wonderful that it must be opened like a treasure chest, and all its treasures brought out for the enjoyment of the world. Doctrine is the description of these treasures. Doctrine describes their true value and why they are so valuable. Doctrine guards the diamonds of the gospel from being discarded as mere crystals. Doctrine protects the treasures of the gospel from the pirates who don’t like the diamonds but who make their living trading them for other stones. Doctrine polishes the old gems buried at the bottom of the chest. It puts the jewels of gospel truth in order on the scarlet tapestry of history so each is seen in its most beautiful place. And all the while, doctrine does this with its head bowed in wonder that it should be allowed to touch the things of God.”
- God is the Gospel, p. 22 (free download)
April 8, 2010
I just finished listening to an iTunes U Course by J.I. Packer titled History and Theology of the Puritans (iTunes link). It’s one of the best and most impactful courses I’ve ever taken, as you might imagine, given the topic and the presenter. I can’t believe it’s available for free! I recommend it without reservation.
Here are my top takeaways from it. These aren’t necessarily the most important points, but they’re the ones that had the most impact on me personally. (Incidentally, my full notes on the course are available on my theology wiki.)
- The important thing in ministry is faithfulness, not measurable success. Packer describes Richard Greenham, a Puritan pastor whose model for counseling and personal ministry was very influential. Ministerial candidates came from all over England to learn from him. All of the visitors who came to learn from him were deeply impacted – but almost nobody in the church he pastored was impacted themselves. This hit home for me because I’ve always had a desire to pass on leadership skills I learn to others. I assumed, why would anyone want to learn from me if I’m not having measurable success in my own ministry? So this reinforced my tendency to see myself as a failure if I didn’t have measurable success. But, now, I realize that God can still use me to impact others’ ministries even if the people I’m ministering to aren’t affected. Now, it’s true that people can be impacted without my knowing about it – but this is more deeply encouraging to my fears. Even if the people aren’t impacted at all, God can still use me to help other ministers. And, realizing this, I also realized that, even if God doesn’t use me to help other ministers either, there is still value in doing ministry in a Godly way in and of itself – God enjoys it and is glorified by it.
- “Ripping up the conscience.” In the Puritan view, the conscience is a part of your own reason (not some mystical being or anything) – but the strange thing about it is that it seems to operate independently of you. It stands as judge over you. They believed that it was appointed by God, and that you needed to obey it. The problem is that a wrongly instructed conscience will make wrong judgments. So obeying a wrong conscience is sin, because you disobey God’s Word, but disobeying a wrong conscience is also sin, because God appointed your conscience for you to obey it. The only way out of this catch-22 is to train your conscience by the Word, so that it will make right judgments. So, in other words, sanctification is not just about forcing yourself to not do the sins your conscience says is OK, but also training your conscience so that it will start saying they’re wrong! The way you do this, in Puritan thinking, is by what they call “ripping up the conscience:” by studying and meditating and thinking through applications, increasing your conviction of the sin you approve, to sensitize your conscience to the truth of scripture. This is incredibly helpful to me because, as a Christian hedonist, I don’t want to just obey God’s commands – I want to love them (and to love all the things of God). Ripping up the conscience gives me a practical way to move beyond willpower in obeying, in order to really work on my heart (and ask God to work on it).
- Supralapsarianism did not cause the Puritans’ problematic views on salvation. Packer listed a number of problems with the Puritans’ view of salvation, including a denial of the “whosoever will” promises, no assurance upon believing but only upon seeing fruit, a denial of the fact that God is essentially love, and a sense of God’s election as arbitrary, frightening, and chilling. He attributed these problems to the fact that most Puritans were supralapsarian, and he asserted that infralapsarianism addresses all of them. However, I wasn’t convinced by this. Having come from a non-Calvinist background, I’d come across most of these issues as difficulties with Calvinism as a whole, regardless of your lapsarian view - and the solutions (whether the ones I found myself, or the ones Packer suggested) seem to apply equally well to supralapsarianism and infralapsarianism. So I can be confident that, whatever problems I see with the Puritans’ view of salvation, changing my lapsarian view does not seem necessary or helpful.
- The Puritans were a unified movement that included views we now call Presbyterian, Congregationalist, and Baptist. This is helpful for me to understand my heritage as an English-speaking Christian who is both Reformed and Baptist. The Puritans had remarkable unity on most points of theology, and some of the only few they differed on are church structure and baptism. That’s why, after the Westminster Standards (confession, catechism, and directory) were written to try to encompass as many Puritan views as possible, the Congregationalists happily took the majority of the confession and only changed a few parts to create the Savoy Declaration, and the Baptists did the same to create the 1689 London Baptist Confession of Faith. Although I don’t agree with everything in these documents, I find the 1689 Confession to be probably the confession to which I can find the most agreement. It’s exciting to learn just how much Presbyterians share with that, and the unity the Puritans felt despite these real differences is a challenge to me to do the same.
April 7, 2010
Selenium IDE is an indispensable tool for automated testing. If you’re a web developer or QA, you need to have Selenium tests to cover the basic functionality of your web site, and anything that you have to retest repeatedly.
One of the nice things about Selenium is that it allows you to record your actions in a browser, so you don’t have to type in the test script by hand. Still, though, there is almost always tweaking you need to do to get reliable tests. Here are my top tips:
- deleteAllVisibleCookies. Your tests will fail if they expect the user to be logged out, but they’re really logged in. To make sure they’re logged out, use the deleteAllVisibleCookies command to do exactly that.
- Watch out for click and clickAndWait. The clickAndWait command will click a link or button, then wait for the page to finish loading before executing the next step. The click command will click and then immediately execute the next step. So you always want to use clickAndWait when clicking a link that goes to a new page, or submitting a form. Usually Selenium IDE records these clicks as clickAndWait – but sometimes, for no particular reason I can discern, it records them as a click. You will probably need to change those to clickAndWait.
- waitForText for Ajax. If you’re using Ajax, you can’t clickAndWait, because the page doesn’t load. And you can’t just keep executing immediately, because the next step in the test case will usually run before your Ajax request completes. Running your tests at less than maximum speed can help, but that’s not very efficient. It’s better to add a waitForText command (or another waitFor… command) after everything you do that generates an Ajax request. Test for something that will show you the Ajax request finishes, before continuing. In my application, for example, sometimes I test that values are populated in a select dropdown, and sometimes I test that an “OK” icon has appeared on the screen.
- Test all the cases. Sometimes, Selenium is most useful when you have a lot of different combinations of behaviors. For example, my application interfaces via SSO (single sign-on) to another application. There are multiple places in the application that it interfaces, and there are three kinds of user that have different SSO abilities, leading to 22 different cases. As you can imagine, it’s easy for a fix for one feature to break another feature. So I wrote up the test cases in an Excel spreadsheet, then created a Selenium test for each of the 22 cases. Now I can rerun the test suite at any time to make sure all of the cases still work.
- Test what you can automate, not what you can’t. Not everything is easy to automate in Selenium. Don’t expect it to take the place of all your QA testing. And don’t give up on Selenium just because it can’t take the place of all your QA testing. Use it to cover as many cases as you reasonably can, and run it regularly to certify code updates, merges, and environments. Then continue to do manual QA as well.
April 2, 2010
Google has released some code that runs the Quake II demo in a browser with no plugins, using HTML5 and WebGL. You can run it in a WebKit nightly build, but I found that it takes a few more steps than in their instructions. Here’s what I did:
- Install MacPorts and then run sudo port install vorbis-tools and sudo port install lame
- Install Mercurial version control client
- Check out the code by running hg clone https://quake2-gwt-port.googlecode.com/hg/ quake2-gwt-port
- Change into the project directory (cd quake2-gwt-port)
- ./build-dedicated-server (will build the tools and the client and server code).
- ./install-resources (will download, unpack, and convert the original Quake II demo resources). Due to a glitch in our maven build files, you currently also need cp -r maven-build/server/target/gwtquake/war/gwtquake war. We are fixing this.
- ./run-dedicated-server [port] (will run the local Quake II server).
- Install the latest WebKit nightly build: http://nightly.webkit.org/
- To enable WebGL, type this into a terminal: defaults write com.apple.Safari WebKitWebGLEnabled -bool YES
- Run WebKit and navigate to http://localhost:8080/GwtQuake.html (or whatever port you specified to the server). You should see a console.
- The menus were a bit messed up for me, but you have to hit enter a few times. Then you’ll see a number of files being requested, and then the game will start.
It took a while for the textures to load for me, but then again my MacBook is from ’06 =] If you have any problems, I can’t help you, so check the comments on these pages: