PocketBible for Windows Progress Update #5

If screen shots and videos of this Windows app appear to have been captured on a Mac, that’s because they were. We are able to do development and testing on macOS even though we’ll eventually deploy on PC.

I’ve heard from a couple of you asking for an update. That usually means I haven’t taken the time to look up from my work and look at a calendar for a while.

Since the last update, PocketBible can perform searches and show results. If you use any of the non-Windows versions of PocketBible, you know that it performs about a dozen different searches in parallel to accomplish one search. So you’ll see results that match exactly; results that have all the words you’re looking for, but in a different order; words that sound the same; words that have the same root word; etc. I mentioned before that it is a challenge to launch these searches in parallel in the new Windows version, but we’ve figured out a way to do that and we think it’s going to work reasonably well. Right now, we’re testing these one at a time to make it easier.

The video below demonstrates searching as compared to the current Mac version (on the left). The videos are synchronized so that the searches start at the same time on each platform so you can compare the times. As you can see, the time it takes to return exact matches is pretty close to the same in both apps. This is pretty impressive given that the Mac version is a native, compiled app and the Windows version is something less than native and something more than interpreted. If that makes no sense to you, suffice to say that we’re seeing good results when it comes to search speed.

Note that in one of the searches, the Mac version returns some results right away because they’re easy to calculate, but takes about the same amount of time to display “exact matches” as the Windows version does.

Early look at searches in PocketBible for Windows

Last time I mentioned that while we were displaying lists of bookmarks and highlights, those lists were not yet fully optimized. Trying to display a list of 30,000 verses would bring the program to its knees (not to mention what it would do to a user or to Allen in Tech Support). We spent quite a bit of time since the last progress update downloading the source code for the third-party component we’re using and modifying it to do what we need it to do in order to display lists of things (search results, notes, highlights, and bookmarks, primarily). In the demo above you’ll see that we’re able to quickly display a list of over 20,000 search results. That was the goal.

We subsequently have had to do similar customizations with context menus (the little pop-up menu you get when you right-click). Our development tools have a very basic one built-in, but it doesn’t allow for sub-menus. The third-party one we found has sub-menus but they don’t have the same functionality as the main context menu. And it doesn’t handle the correct placement of sub-menus on the screen — they will happily display themselves off the right edge of your screen. So again, we’ve had to download the source code for this component, learn completely how it works, then modify it for our usage.

One of the interesting things to me as a programmer is having the opportunity to go through this body of code that I’ve lived with for 23 years now and translate it line-by-line into another programming language. In the course of doing that, you learn a lot of things. For example, there are at least 4 different reasons you need to extract Bible text from the compressed LBK file: displaying it on the screen (of course), copying a passage to the clipboard, extracting text during an Autostudy, and displaying a little excerpt in search results.

While working on search results I discovered these 4 scenarios make use of 3 entirely separate paths through the code to do a very similar thing: (1) One path is used for displaying text on the screen. (2) The second is used for either copying a passage or doing an Autostudy. (3) The third is used to display excerpts in search results. It turns out that the last two methods (2 and 3) were completely duplicating the code that gets text to be displayed on the screen (1), then filtering out what wasn’t needed before using it.

As a result, part of what I’ve been working on is eliminating this duplication of code. Now there’s just one way to get text out of the LBK file. Anyone who wants to use it for something other than displaying it on the screen will filter out the tags and features they don’t need. It sounds complicated but it’s much simpler and significantly reduced the amount of code that needed to be translated and tested.

We’re still aiming for being done by the end of the year. One thing working in our favor is it looks like PocketBible for iOS is going to require very little, if any, updating for iOS 15. That normally consumes all my time in August and September.


Last time I told you about our new office space. After moving in, we realized we hadn’t thought about the fact that the city was about to start a major street construction project that has our main street and several side-streets completely torn up. The construction area is 3 blocks long and our office sits right in the center.

At the same time, the strip mall across the street is being demolished to make way for a combined retail/residential building complex. The view out our office windows has been fascinating as dozens of excavators, dump trucks. bobcats, drills, cement mixers, and more work right below us.

We still have access to the building from the back, but the activity right outside the window is a little distracting. And this will be going on for the next 2 years. So that should be fun. 🙂

Replacing the decades-old sanitary sewer on the main street through town, right in front of our office.
In the foreground, storm sewer work begins on our main street. In the background, footings are being poured for a 3-story commercial/residential building.
An old steam line wrapped with asbestos was unexpectedly found under the street in front of our office and had to be dealt with. Specially trained workers in hazmat suits and respirators filled dozens of large bags with asbestos insulation while surrounding dirt and clay tile was carefully removed.