kjvbible.tk: perl + CGI

KJV Bible
KJV Bible

I have been a Christian since I was 12.  I began reading the Bible for myself at 13.  I became more serious in my study at 20, and have been diligently studying ever since.  I enjoy it tremendously.  I really try to meditate on what I am studying; try to imagine what it must have been like for the people involved;  try to understand why a certain passage is in the Bible and it’s true meaning; is there something in between the lines I can deduct?   Along those lines, I like to hear what other people think about it.  Those with whose theology I agree with, and those I do not.  Those who reject it all together, and why they think that way.

I also read several Bible commentaries as I study.  There are so many of them out there.  Most of which, I have no interest in.  There is also so much software and Bible study websites out there that it can be bewildering.  I decided that I wanted to make my own Bible study website that suits me, and only contains the resources that I am interested in.

When I decided undertake this project several years ago, I had a successful free-lance website business called Nerd for Hire.  I was building and hosting custom designed PHP web applications, primarily serving real estate industry and used car lots in the greater Memphis, TN area.  I was  focused on PHP/MySQL, the then new jQuery, AJAX, CSS, etc., and hosting it all on a reseller account I had with Host Gator.  It was a nice side gig until Craigslist started charging $5 for dealers to post cars on their site.  Craigslist was essential for directing traffic to the dealer’s website where the whole inventory could be advertised.  I briefly moved over to backpage.com, but it just wasn’t the same.  Increasingly, my customers wanted incredible, custom-made web applications (my specialty), but didn’t want to pay much for them.  It became to much effort for too little financial reward, and I ended up folding.

 

This was around 2010.  Perl was unfashionable at this time, and perl/CGI was certainly not the tool of choice for web applications anymore as fast as PHP had gotten.  Never one to go along with fads,  I had been reading an entry-level perl book that was 8 years old at the time (got it for $0.01 + $3.99 shipping on Amazon),  and I was VERY interested in learning perl because it seemed like it could do everything: text processing, databases, windows applications, server side scripting,  etc.

perl books

I figure the best way to learn a new language is to do a big project in it.  I proceeded to write a CGI application in perl to read the King James Version Bible.  Am I KJV only? No.  Is it my favorite? Pretty much.  I forget where I found a SQL file of the KJV bible, but I did, and imported it into my home LAMP server via phpmyadmin.  I then wrote an object oriented CGI application to read the Bible on my home network.   I purposefully ignored any css styling, and just wanted a simple, stripped down design.  I began using it daily during my study, being really pleased with myself for having got that far.

I was using Power Bible CD at the time, and had really taken a liking to the Adam Clarke Bible Commentary.  I wanted to add it to my little project so I didn’t have to go between applications during my study.  I created a database schema and manually copied and pasted every single chapter of the Adam Clarke Commentary from studylight.org.  It was tedious, and painful, but it worked.  Once I had it in database form,  I added scripting so that the commentary was displayed side by side with the chapter in the Bible I was reading.  Soon after, I added the Joseph Benson Commentary in the same inefficient fashion.

After some time, I discovered the Internet Sacred Text Archive, www.sacred-texts.com, which contained numerous Bible commentaries and other interesting resources.  I got a little more sophisticated, and wrote scripts (wget + perl) to automatically download the commentaries chapter by chapter and save them as text files on my computer.  I then wrote scripts that  merged them all together into a csv file, and imported them into a MySQL database.  I did the same with a few Bible dictionaries, encyclopedias, etc. from the Internet Archive.  I was getting pretty good with perl’s regular expressions and amazed at how easy it was to do really powerful things in perl with such little effort.

Sacred-Texts.com
Sacred-Texts.com

So, I got my CGI application together the way I wanted it, and was still just using it on my internal LAMP server.  I had recently started renting a VPS from digitalocean.com for a for-sale-by-owner real estate project.  I decided to put my humble project on the internet, since I already had the hosting resources.  I decided to go with a free domain: www.kjvbible.tk.  I am still hosing it on a VPS from digitalocean.  Other sites I am hosting there are using PHP 7.  PHP is smoking fast, and comes with OPcache standard.  On the other hand, perl CGI is an anachronism, SUPER DUPER slow, and taxing on the CPU.  I really don’t care though.  It’s out there for the world to see.  Ad-free and just a simple, easy-to-use place to study the Bible.

Hebrew New Testament
Hebrew New Testament at www.kjvbible.tk

Leave a Reply

Your email address will not be published. Required fields are marked *