Official Beta release: 0.04

I’m officially releasing the first beta version of the new Sermon Posts plugin.

When I say “beta”, let me just remind you that beta traditionally means things like: You had better backup your database before you install this, and, You are very likely to get errors, and so on.

At the time of posting, the domain name had not yet resolved, so if you get errors trying to access the files that is probably why.

If you are a coding person, you can check out the source code via SVN. Otherwise, you can download the current version, or any older version starting at 0.4 (the official beta release) using the following links:

Normally plugins that are not hosted on WordPresswon’t tell you when an update is required, but I found a great library via Janis Elsts that will give me that functionality. I’ll be using that until the official release, when I’ll be hosting the plugin on WordPress and removing that library.

Of course if you find errors, send them my way, either here on the blog or via email: sermonposts@tobiaslabs.com

Let me say it again: If you are unsure or uncomfortable with backing up and restoring your database, you should wait until the official release.

There is still a lot of planned functionality missing, but you can actually start developing a theme from it, if you are familiar with custom queries in WordPress. I’ll be adding some functions to make theme development easier, but until that time you can mostly just play around with it.

Call for data and beta testers

I don’t know how many people are keeping an eye on this project, especially since I’m being slow about it, but I have a two part notice:

  1. Call for Beta Testers: If you want to be involved in testing a beta version of the Sermon Posts plugin, leave a comment here. Be aware that the beta version should not be used on a live site without very careful testing! I am scheduled to get the first beta version done this week, although it will have a few end modules missing.
  2. Call for Data: Currently I have only one churches data to test with. If you are willing to give me your data to test with (not access to your live site, just the data) let me know and I’ll email you the details of what parts I need to be able to test.

I realize that asking for data is potentially a big deal, my church has many hundreds of sermons, and others may have even more, so some sort of FTP access would be ideal.

Thanks for watching, I’ll be back by the end of the week with another update.

[Update: Retracting my call for data, the import process is stable enough that I can bypass that process.]

The Hunt for Perfect Cider

A while back myself and my roommate were given two gallons of very delicious apple cider from a family at my church. This stuff is top notch cider, in my opinion, but I had a problem: I can’t really drink much of it—a few ounces at a time is about my limit. It’s not because I’m diabetic, I just can’t handle the sweetness of it, it’s too much for me.

While I could dilute it with water, and so also extend it’s life, I decided to try something I’ve always wanted to do: Ferment it! The fermentation process consumes much of the raw sugar in the cider, leaving it lighter and easier for me to drink. Also, if made correctly, different flavors are brought out, and the apple taste can be enhanced.

One of the key things to know about fermenting cider is that the sugars are “free”, that is, it costs nothing for the bacteria to get at them. What this means is that, unless some countermeasures are taken, all the sugar in the cider will be consumed, leaving the cider “dry”. I confess my tasting experience of cider is rather limited, so I’m not exactly sure what this “dry” cider would taste like, but a similar process occurs with dry champagne, and since I don’t really like that style I am going to attempt a slightly sweet final product.

The process I am planning on using is detailed below, for educational and reference purposes, and I’ll add pictures as the process continues.

The Process

This is a description of the fermentation process used to produce hard cider.

Many excellent resources are available online, but one of the better ones is HomeBrewTalk.com.

Apples

We begin with the noble apple, a fruit with a long history and an exquisite and well known flavor. Different breeds of apples will, of course, produce a different flavor, and people will argue forever as to what flavors are the best.

In my case, I was given the fresh cider as a finished (not pasteurized) product, so I had little control over what was put in it. However, I did talk to the man who put the cider together, and his process was: They are basically given a huge pile of second-class apples, but they go through them all individually, discard the bad ones, and cut off all bruises and bad sections.

This cider is a known ratio of different breeds of apples, although I forget the types now. I’ll update if I figure it out.

Yeast

While the yeast consume sugar, they leave a waste product of ethanol (the alcohol) and create a unique flavor. Bread yeast does similar, and has a unique flavor, but produces less ethanol. The discussion of which yeast to use is also never ending, but a Lager yeast is generally considered a good choice. Champagne yeasts are also used, but generally will produce a dryer cider.

You can actually use bread yeast, and I have had success with it in the past, but it’s apparently highly likely to make your cider taste bad, so you probably shouldn’t risk wasting your time. Anyway, good yeast only costs 1-2$ (US) for a pack that will produce 5 gallons, so you may as well do it right.

Currently I am using some general Lager yeast from a local home-brew store, but my next batch I may purchase something more specific.

Fermentation

There are many many different processes you can use, but the basic idea is that you make the environment of the cider favorable for yeast growth. If you are using bought yeast, you should really pasteurize the cider to kill off any other bacteria. Doing this will make sure that your results stay consistent each time you brew, and you can adjust factors knowing that stray yeasts aren’t giving you different results each time. Sterilization of all utensils and containers used during the process is critical for the same reasons, especially because stray bacteria are very likely to ruin a batch of cider.

Yeast bacteria consume the sugars and produce ethanol alcohol, so the final alcohol is almost entirely dependent on how much sugar is available during the fermentation. Measuring sugar content directly is actually a rather difficult process, but thankfully science and chemistry come to the rescue, giving us a method of measuring sugar content indirectly: The Hydrometer.

Hydrometers work off of the basic principal that liquid with more sugar is more dense, so it can support more weight. You measure the density of the liquid, and use that information to infer the sugar content. This isn’t an entirely accurate measurement, but if you are aware of the factors that can cause measurement error, it is a pretty reasonable idea. Also: It’s a pretty cheap tool, you can buy a reasonable one for under 10$. This link has a table of information with converting measurements of specific gravity (basically the density of the liquid) to a measurement of sugar content.

Knowing the sugar content of the cider gives a knowledge of the predicted alcohol content in the finished product, which can be adjusted by changing the sugar content. It is very common to add sugar to the cider before brewing, so the final alcohol content can be increased. Sugar content can be measured throughout the fermentation process, so that the cider can be modified during the process to achieve a desired final alcohol and sugar level.

Stopping the Fermentation

As mentioned earlier, the sugar in cider is freely available, so if the yeast are not stopped mid-fermentation the cider will be very dry. To stop the fermentation process it is necessary to stop the yeast from eating the sugars. There are several ways to do this, but I will only mention three.

Cold Shock

One common and simple method of stopping the yeast is by chilling the cider to a low enough temperature that the yeast become inactive.The main advantage of using this method is that it is simple. You just take your bottles of cider and put them in your fridge.

The difficulty here is that the yeast are not killed but instead become dormant. Because of this, you’ll need to store the cider somewhere colder than a root cellar, and if you transport it to a friends house you’ll need to keep it on ice. The yeast will become active and possibly begin affecting the flavor of the cider within an hour or less, depending on their conditions of course. Usually it is okay to let the cider warm up a bit, but the main point is that you probably can’t just store this in your basement/cellar, you’ll need to keep it in the fridge.

Pasteurization: Method One

Another way to stop the yeast process is by pouring it into a pot and heating it on the stove until it hits 160F (pasteurization temperature), then immediately bottle it up in the final bottles. This has the benefit of completely killing off the bacteria, so you can leave them in your cellar or on a shelf (out of the sunlight!) and not worry about the yeast continuing to change the flavor and alcohol/sugar content.

Of course the main difficulty here is that it’s a pain and a lot of time. There is also a danger of contamination, since you’ll be exposing the cider to multiple open surfaces. Additionally, this method will make your final cider product rather flat, with no bubbly action, and that makes me sad. There are ways around this dilemma, but they are difficult, and there is an easier way:

Pasteurization: In Bottle

The way which I will be using is a sort of “canning” method, which heats the cider while it is inside a capped bottle. The cider is monitored carefully and when the alcohol, sugar, and carbonation level are correct, the bottles are placed in a pot of heated water for a long enough time to get the cider into the pasteurization temperature.

Benefits of this approach are many: Besides the bottles that get opened for testing purposes, the bottle stays completely sealed so there are no problems with contaminants. Since the bottle is sealed, an exact carbonation level can be produced and maintained (pasteurization will not remove it), so a nice bubbly cider can be made.

Since the bottles are slightly pressurized to begin with (carbonation) and then heated to pasteurization temperatures, they are under some reasonably high pressures, so the caps must be made very secure and the bottles should be moved only gently.

Another thing to know is that you’ll be opening a bottle every so often, so you can detect the carbonation level and decide when to stop the fermentation. A greater familiarity with the process and timing of the process will help you here, but once you open the bottle you can still recap it, just make sure you open a different bottle each time, and be sanitary so you don’t contaminate that opened bottle.

Resting Time: Maturity

When I first read about making mead, another of my favorite drinks, I found out that the flavor of the mead is affected greatly by how much time you let it mature after the fermentation process is complete. Cider is no different, from that general perspective at least. A good mead may be drinkable in a month, but if you give it a year it will be like the nectar of the gods. I hope cider doesn’t take that long, but you’ll certainly want to give it a month or so before you bother drinking it.

I am bottling up this next batch in single serve bottles, the standard 11.5 oz size, so I’ll be able to sample the cider without losing too many if it’s not ready. Smaller bottles require more time and effort to prepare, but the smaller size is good for initial experimentation.

Final Notes

If you made it this far I am impressed. This is mostly meant as a beginning reference for myself, explaining the basic concept of apple cider fermentation.

The basic idea of making cider is so simple anyone can do it: Buy a gallon of apple juice, add some yeast, let it sit for a few months, enjoy!

Getting into cider making is something I’ve been wanting to do for a while, and I plan on approaching it in a scientific manner, so that I can reproduce excellent quality cider every time.

“And wine that maketh glad the heart of man, and oil to make his face to shine, and bread which strengtheneth man’s heart.” (Psalm 104:15)

Other References:

Another Update

School is dragging me down, but I managed to get some critical updates done. I thought I’d show you the entry log, just because:

BIG CHANGES.

I modified the core sermonposts.php file so that everything was inside a class, to protect against namespace issues. Also moved the includes into a different folder, I’ll be moving the images and everything else in there, and eventually adding the mp3 manipulation libraries.

Then, I was working on the import functions, and found out it was taking forever to do the stuff, and Josh told me about a better way to do lots of inserts, so I modified two of the 5 existing loops and cut it down from 20 seconds to 1 second. Nice!

From the log entry you can take note of a couple things: 1) I am making (almost done!) an import function, so you can go from the old plugin to the new with a simple key press. 2) There are going to be some handy tools for mp3 files. I won’t spoil the fun, but they will be super handy.

I’m trying to get this done soon, but school really cuts into my time in a serious way.

Code Scribbler

The other day I was at school between classes, sitting at a computer waiting for several GB of files to transfer to my thumbdrive over a 1.0 connection (read: I had a half hour to spare) and I started thinking of some code for my biggest recent project, the Sermon Posts plugin.

I was on a  locked down Mac computer, and I couldn’t even get on the stupid text editor. Why they would lock out a basic text editor is beyond me, but I digress.

What I ended up doing was going into my email and writing the code there, but without syntax highlighting and auto-indentation I was not nearly as productive as I could have been. So when I got home I just went ahead and made this: Code Scribbler. Now I can write code (mixed PHP at least) from anywhere that has a browser.

Sure, there are things like Pastie that I could use, but nothing I know of quite fits the bill:

  • Private: I don’t store anything you type.
  • Simple: No ads, no extra links, very clean interface.
  • On the fly syntax highlighting (Pastie and others apply syntax highlighting when you save)

Also, I wanted to see how hard it would be to make something like this. As it turns out, the answer is: Not very.

I’m even releasing the code on my SVN: http://svn.tobiaslabs.com/codescribbler/

You can follow that link and download the numerous (two, and one is optional) files, or use something awesome like TortoiseSVN to keep updated.

Eventually I’ll add a button that lets you email yourself the code, that way you don’t even have to mess with a file, but that’s all I have planned for it. Short and sweet, unlike this post.

Things are coming along nicely

Since school started I won’t be able to devote a whole lot of time to this, but it is on my schedule of things to do, and I hope to get a workable Pre-Alpha version done within the next few weeks.

The Pre-Alpha version will probably have none of the planned functions for template design, and some of the admin side styling would be incomplete, but it will be a fully functional plugin that can actually manage sermons.

Just for records and for anyone interested, I decided to post the SVN commit entry that I made tonight:

Finalized the Bible passage reference input form, I decided to go with what it was since it would be something the user would be most familiar with and the assumptions needed to interpret the inputs are not difficult and not critical. I had to modify the Javascript that was adding another field.

The sermon passage reference now will successfully be added to a new table I made, as a range of verses (see function initialization for details). It correctly adds and deletes references, but since the sermon post doesn’t display the references, it will delete them if you don’t re-enter them every time you update. I just need to make the sermon post page display the references, and then the admin side post reference data functionality will be complete.

Thanks to jameslafferty, I was able to modify the upload form so the upload process and file management is handled entirely by WordPress default functions. The HTML displayed inside the IFrame may enqueue a few more scripts/styles than are needed, so I need to check that out. The “Manage Files” page has not been started. Ideally I could modify the normal “Media > Library” page so it wouldn’t display files associated with sermon posts, that way it would keep it clutter free.

Another (set of) function(s) still needs to be built to modify the way the WordPress search function works, that way a user can enter a passage reference and it will search for sermons associated with those verses.

Also, a “screenshot” won’t mean much for this project, but you can see what will be the final working “Add New” screen below. (Click to embiggen.) Enjoy!

Progress report

I have most of the code done now, it would really be functional for others to bug test, except I hit a hang-up on processing sermon Bible passage references.

The method I’m using to store relations between verses and sermons is pretty easy, but I don’t want to get into detail here because my time is limited and I have another important thing to discuss: What is the best way for a sermon post author to input passages?

In the old “Sermon Browser” plugin, they had a dropdown for the books, and text input areas for chapter and verse. I wrote out an algorithm that will figure out what the user might mean for various fields left empty, but I kept hitting against a serious problem:

What does “Genesis 1:13″-”Genesis” mean, anyway?

You can input that text in the old sermon browser, and it will “work”. But something inside me (and also my roommate, a more seasoned programmer) says that this is not the Right Thing, to guess at what a user means.

Another way I could do it, and I am laying out the code in my head for this, is to make the chapter and verse also dropdown lists, which change depending on what book/chapter you select. Using this method I could also alter the “Through” fields so the user cannot request negative ranges of verses. It’s not a bad idea really.

I have another couple methods in my mind that might work, but until I sort this out, I think I’ll have to park on this project, so any input will be warmly received.

A little teaser

I’ve been playing around with this in my spare time, and I thought I’d give anyone following my progress a little bit of a teaser:

Still several things to do just on this page, and then some large chunks to write that deal with file management, but some serious progress nonetheless.

Thankfully, a lot of the work I’m doing for a client now will transfer directly over (almost copy+paste, really!) so some of this will go really fast.

There’s some very helpful features I’ll be adding, but my brain is starting to frazzle from a long night coding, so I can’t remember what they are to tell you. Fear not, however, they are in the comments of the code. Somewhere…

Winter break is flying by

This winter break, between semesters, I have only two large projects: The Sermon Posts plugin and another plugin for WordPress that acts as a product manager.

While the Sermon Posts plugin will be distributed openly via the WordPress website, I am not yet sure if I will release the product manager publicly, but I may attempt to pitch it to a few companies who would greatly benefit from it. A little extra income would not be a bad thing.

If you are reading this following the Sermon Posts plugin development, just note that I have until Januray 10th and school starts back up with a vengeance. This coming semester I’ll be taking up to 21 credit hours, so we’ll see how that goes…

Anyway, I host the source code for my WordPress projects on my own SVN server, so I’ll be releasing the source code that way, as well as through the WordPress Extend/Plugin interface. My roommate reminds me that some sort of bug tracking method is a helpful idea, so I’ll look into one of those. This blog here will probably serve as the initial starting point for distribution, until I get all the details ironed out, so stay tuned.

If anyone uses another language, I can try and put together localization support, but that might come later.

Still working on this

I know this appears to have fallen by the way side, and with my full-time student position it actually has. Never to fear, the plugin is still in development, although I don’t have anything I would feel comfortable releasing yet.

Thanksgiving break is coming up soon, but I’ll probably be busy catching up on every other daily life chore that I have let fall to the wayside during school. Either way, I have set aside much of my Christmas break to this project, as well as another big WordPress project, so it should be done before the next semester starts (the second week of January, I believe).

In lieu of releasing actual code, I will lay out some of the details that I have been working on adding, getting to work, or upgrading to the new WordPress 3 functionality. Here they are in some sort of “most important” to “least important” scale, although it’s not entirely precise:

  • Updating everything to WordPress 3 standards. This alone will fix just about any problem you may have with the current plugin.
  • Moving everything over to WordPress managed database: Sermons as post types, verses and other information as searchable metadata and/or tags. This right here is probably the most significant feature, since doing so will make it much easier to theme the sermons with your WordPress theme, along with making backups easier, etc.
  • Managing everything through MP3 tag manipulation, server side: Ever since I ran into a few snags, I realized how incredible it would be if you could write the MP3 tags to the files from the server. This will save the “download, fix spelling error, re-upload” problem. I have a few methods in mind, we’ll see which one wins out.
  • Listing media files distinctly: The way the Sermon Browser currently lists files is in the order you place them during initial upload. This will let you say something like “MP3 then PDF” or vice versa. Most churches just post audio, but my church uses PDF transcripts or sermon notes, that’s why I noticed the problem.
  • The sermon audio/file list will have links directly to the file. I found this to be a handy hack, so I’m putting this functionality in it, using a great tool WordPress has.
  • The “Add Sermon” page will function similarly, but with a few added features.
  • Similar plugin options (currently under “Options”) will be available, unless I hear suggestions for more.
  • I am looking into a sermon backup system, but since this plugin will use WordPress 3 functionality, and since several good backup options already exist, it will probably be unnecessary.
  • The podcast system will be updated a bit to include a few more options. WordPress handles podcasting internally reasonably well, if you do things right, so that’s obviously what I will do.
  • I will try my hardest to make a method available to switch over to the new system, but it is unlikely to be a simple Single-Click operation. My roommate is a wizard at mySQL though, so maybe…

There is more, but I can’t remember it at the moment. If you have your own suggestions, please send them my way.

I am about two months exactly from releasing a functional candidate, so if you would like to be on a list of firstly-notified, especially if you would like to help me test it, leave me your name and email (never published, never shared) in the comments.