Questions to Ask Missionaries and Evangelists

I was hurriedly walking to a meeting across my campus about a week ago when a young man stopped me and asked, “Do you mind if I ask you a question?” Without waiting for me to respond, he asked, “What church do you go to?” When I told him I don’t go to church, he then asked why. I really didn’t have time to engage with him and told him I was late for a meeting, which was true. He didn’t relent. I then told him I wasn’t religious and excused myself. He tried asking me another question, ignoring that I was late for a meeting. I then insisted that I had to go and finally just walked away.

That interaction stuck with me for a couple of reasons. First, it only occurred to me after the fact that he was probably not a student at my university. Since it’s a private university, he should not have been there evangelizing. Second, it dawned on me that what he was doing was disrespectful and that I was far nicer to him than I should have been. To that end, I’ve been reflecting on the interaction and how I should respond in the future. Perhaps I’m becoming that “old grumpy guy,” but I’m actually getting tired of being nice to people who are so disrespectful of other people’s beliefs that they try to convert them to their own.*

To that end, I started to consider questions that I might ask someone who is proselytizing the next time they accost me or knock on my door. I thought sharing these might help others who think similarly about this issue. And, if you have suggestions, please drop them in the comments and, if I like them, I’ll add them to my list.

  • Why don’t you respect other people?
  • Why don’t you respect me?
  • Why don’t you respect my beliefs?
  • Why do you think everyone needs to believe what you do?
  • Why do you think everyone needs to be just like you?
  • How insecure do you have to be in order to want everyone to be just like you?
  • Why are you opposed to diverse worldviews?
  • Why do you think you’re better than me?

Here’s my suggestion: Memorize one of these so you have it on hand and ready to use.

* Full disclosure: I was a missionary in Costa Rica from 1996 to 1998 when I was still a member of the LDS Church. While I learned a lot as a result of that experience, I deeply regret now having spent so much time trying to persuade other people to believe what I then believed. Evangelism is really disrespectful of others.

 96 total views,  4 views today

Backing Up Files to Prevent Data Loss

It took years to figure this out and it’s not free, but I don’t ever lose files anymore. Not losing files is worth the $240 I pay for these services per year.

Do note that I use Linux as my operating system, which is part of the reason why I chose the software that I use to back up my files, but the services I use run on Windows and Mac as well. Also, I do have some technical know-how, but, honestly, the approach I’m going to recommend is really not that complicated and could be done by pretty much anyone if you spend a little time setting it up.

Active Files vs. Archive Files

One of the most important distinctions I have made over the years when it comes to my files is realizing that some of my files include current or active projects while other files are no longer active and can be archived. Active files are those that relate to current projects I have (I’m a college professor and do a lot of research). Any current research project, any files for classes I teach, and any files I need for service or personal affairs are considered “active.” Active means I am likely to need access to those files sometime in the next 6 months to a year. But, more importantly, I want active files to be accessible instantly on any one of my devices (I have two desktop computers, a laptop, a tablet, and a phone).

Any files that do not meet the criteria for “active” can be archived. Archived files are still relatively accessible with the system I will detail below, but not as readily as are active files. I can access them on my home network or via a website (as I’ll detail below), but they are not stored on all of my devices such that I can immediately access them. It takes a few minutes to access archived files. Examples of archived files are those for projects I have completed, old financial information, old class files, or old service files. Effectively, they are files that I do not foresee needing within the next 6 months to a year, but I could potentially need them at some point in the future, so I am not deleting them. Also included in my archive are photos, home movies, music, and other videos.

Active File Backup

To back up my active files, I use Dropbox. That’s not an affiliate link. I’m not getting any money for recommending Dropbox because I’m not necessarily recommending Dropbox. You could use a different backup program. The reasons I went with Dropbox are: (1) It runs on Linux. (2) It provides me with sufficient storage for my active files. And (3) it synchronizes my files across all my devices while also keeping a copy in the cloud.

Here’s the key to using Dropbox, though: ALL of your active files have to be stored in your Dropbox folder!!! All of them!!!

If you don’t store a file in your Dropbox folder and then your computer crashes and the hard drive is ruined, that file is gone, permanently. But if you store it in Dropbox, the fine folks at Dropbox will upload that to their cloud service and synchronize it to your other computers. Effectively, Dropbox provides real-time backup for your most critical files. I use just the Personal Plus plan, which is roughly $10/month and gives me 2 terabytes of backup. That is sufficient storage for my active files throughout the year. Since my files are my job, $120 per year to make sure I don’t lose any of them is well worth it to me.

Here’s a screenshot showing my Dropbox folder:

As I complete projects or, when the year ends, I archive my photos and other data from the previous year, moving those files out of my Dropbox folder and into my archive.

NOTE: For some people, a Dropbox plan may be sufficient space for both active and archive files. If you don’t have a lot of photos, don’t store any videos, and don’t create a lot of files, 2 terabytes is a lot of space and Dropbox may be all you need. If so, great. You can stop here. Get a Dropbox account and put everything in it and make sure it is running on your computer. Then, if something goes wrong, you’ve always got a backup of your files.

Archive File Backup

If you’re still reading this, I’m assuming it’s because you have a lot of files (or photos or videos) and you are looking for a reliable way to back those up. I use a two-pronged backup approach for my archived files, though the second part is really sufficient for most people.

First, I built a NAS device (NAS = Network Attached Storage). While it is very helpful, it’s actually not necessary depending on your device and how much storage you have. On my NAS, I have a raid with roughly 8 terabytes of storage. The raid is set up so I could lose up to 2 of the 4 hard drives without losing any data. In other words, my archived files are backed up across multiple disks, locally, such that I would not lose any data if one of my hard drives crashed. That is a key if you are doing local backups. But, the second part of the archive means that is also not entirely necessary.

Second, I use CrashPlan for backing up my archive. I originally started using CrashPlan when they had a plan for individual users. They have since switched that to a small business plan that is $10/month. The reasons I chose CrashPlan are pretty simple: (1) It runs on Linux. (2) It runs in real-time without me having to monitor it. (3) It doesn’t limit me to a specific amount that I can back up. (4) It has an option online that allows me access to my archived files, even though it is fairly slow.

Here’s a screenshot showing my NAS mounted on my desktop computer at home:

Why did I suggest above that you don’t need a NAS device to use CrashPlan? If you’ve got lots of files taking up lots of space on your computer, I’m guessing that you either have installed another hard drive in your computer or you have an attached storage device, like a backup hard drive. I can easily envision a scenario in which someone has a Windows computer with a 1 terabyte solid-state drive for their OS and primary programs, games, etc. but also a 10 terabyte disk drive also installed in their computer where they store their photos, videos, music, and other old files that take up a lot of space. On just that one computer, it’s possible to run both Dropbox and CrashPlan (though, you’d need quite a bit of RAM to do so). Dropbox would be used to backup active files and CrashPlan could be set to backup just files on the large disk drive. As a result, a NAS isn’t necessary. I went with a NAS because I want it to always be on, serving up videos and music to my other devices in my home and across the internet. But it is possible to use this approach without a NAS.


In summary, if you have mission-critical files that you need to back up in real-time, I strongly recommend a backup service like Dropbox. Consider those your “active” files and make sure they are always saved in Dropbox. If you want to keep older files that you don’t need on an active basis, create an archive (either a separate folder or a separate drive or even a separate computer) and use CrashPlan or a similar service to back up those files. With such an approach, the odds of you losing important files, including old photos, drops pretty precipitously.

 380 total views,  3 views today

Replacing Paragraph Breaks with Double Paragraph Breaks in LibreOffice Writer

Here’s the problem I was facing. I had a document with a lot of text that I had to analyze. The text had been copied from a spreadsheet and pasted without formatting to get rid of the cells. As a result, there was a single “return” or “paragraph break” between each passage of text. That made it difficult to know when one passage of text ended and the other began, even if I turned on non-printing characters (called “formatting marks” in LibreOffice). This screenshot illustrates the challenge:

In the screenshot above, I don’t have non-printing characters or formatting marks turned on so I can’t see that there are actually two paragraphs here with a paragraph break or return in the middle of that paragraph. When I toggle formatting marks in LibreOffice, I can now see the paragraph break (or carriage return) in the middle of the paragraph, but the paragraph still seems to bleed right through.

What I wanted to do was find all the paragraph breaks (or returns or carriage returns) and double them, so there were clear breaks between each paragraph. This is possible using the Find and Replace window in LibreOffice (Edit -> Find and Replace or CTRL + H).

However, my initial efforts to solve this problem didn’t work because there was some confusion over regular expressions. The LibreOffice documentation includes a list of regular expressions here. In case you’re not aware, regular expressions are basically combinations of characters that can be used to find different items in a file. For instance, “^” will find the beginning of a paragraph.

Where my confusion came in is that “$” will find the end of a paragraph, which is what I wanted. So, that was a good start. But entering “$$” into the replace field in the Find and Replace dialogue in LibreOffice replaced the paragraph break with two dollar signs, not two paragraph breaks. It turns out, the dollar sign symbol “$” only works to find paragraph breaks. To insert paragraph breaks, you need a different regular expression: “\n”. To add two of them, I used “\n\n”.

Here is what I used in my Find and Replace dialogue to replace all my single paragraph breaks with double paragraph breaks:

Clicking “Replace All” made this change on all 12 pages of the document. Here’s that same paragraph, but with two paragraph breaks.

 476 total views,  4 views today

LibreOffice Calc – Conditional Formatting

I haven’t used this feature of spreadsheet software as much as I probably should, but I have a spreadsheet I have been working with a lot lately and conditional formatting has been key to helping me orient myself in the spreadsheet. However, in the process, I realized that I am really a noob when it comes to conditional formatting. To help get myself up to speed, I created the following tutorial so I can reference it again in the future. (NOTE: I’m using LibreOffice for this tutorial.)

Before I begin, what is conditional formatting? The basic idea is that you can change the look of a cell in a spreadsheet (or many cells) based on the contents of those cells (or other cells) without having to manually change the formatting of the cells. Instead, you “program” into the spreadsheet how you want cells to look assuming they meet specific criteria. Then, when you enter information into your spreadsheet, the cell formatting automatically updates to reflect the information in the cell.

Tutorial A – “Formula Is” Conditional Formatting

Let’s start with a very basic illustration. Let’s say I want to use a spreadsheet as a to-do list. Here’s how my spreadsheet looks, to begin with:

What I want to do is pretty simple. If I add an “x” to the Complete column for an item, I want that item to be crossed out. Effectively, I am going to change the font of the tasks to “strikethrough,” which crosses out the text. This way, I can quickly and easily discern which items are completed on my to-do list and which still need to be completed.

How do I set up the conditional formatting?

First, select the first cell (A2) that says “grocery shopping.” Then go up to “Format” on the menu and select “Conditional” -> “Condition.”

You’ll then get this window

An explanation of the window is in order. At the bottom, the range of cells to which the conditional formatting will apply is included. Obviously, this can be set to a range of cells or just a single cell. Right now, I have it applying to just a single cell, A2.

Where it says “Condition 1” is where you will build your condition statement. If you click on the drop-down arrow where it says “Cell value,” you’ll see a couple of additional options:

Those options are “Formula is” and “Date is.” This tutorial will cover two of the three options. For this one, we’re going to go with “Formula is.” The reason why we are going with “Formula is” is because we are going to use the information in a different cell, B2, to change the formatting in the current cell, A2. As the next tutorial will illustrate, you can also use the information in the same cell (e.g., A2) to change the formatting of that cell. So, select “Formula is.” You’ll notice that the window changes and you now just have a single box next to “Formula is” where you can enter your formula:

For our very simple to-do list, our formula will be pretty simple. We’re going to tell Calc to check to see if there is a lower-case “x” in B2. Here’s the formula: B2=”x”. (NOTE: If you want text or a character as part of your formula, it has to be inside quotes.) Here’s how it looks in the window:

Below that, we need to indicate how we want the formatting to change. If you click next to “Apply Style” where it says “Accent,” you’ll see a list of built-in formatting options:

Since we want to have the text crossed out and that isn’t one of the built-in options, we’re going to select “New Style”. We’ll then get this window:

We actually only need to change two things. First, name the style. Since we are going with “Strikethrough,” let’s call this “Strikethrough.”

Next, Strikethrough is a Font Effect, so we click on the Font Effects tab and look halfway down the screen to where it says “Strikethrough.” By default, it says “(Without).” Click on that drop-down and select “Single” (or “Double” if that’s your fancy).

When you’re done, click “OK” and you’ll be taken back to the original Conditional Formatting window.

That’s actually all we need to do for now. Click OK on that window, and let’s test our Conditional Formatting. To test it, type a lower case “x” in B2 and hit “Enter” to see if your formatting works.

Okay, one more thing and the first part of this tutorial is done. We applied that conditional formatting to just one cell, A2. But we want it to apply to all the cells in that list. How do we copy the formatting and apply it to the others instead of having to repeat the process above? Select A2 and right-click. You’ll get a context menu. Look for “Clone Formatting” and select it.

When you do, you’ll notice that the paintbrush icon on your toolbar is selected:

To apply the formatting you just cloned, select the cells you want to apply it to. Your cursor will change to a paint bucket. Click it over the selected cells and the conditional formatting will be applied to those cells. Now, test it. Add an “x” next to one of the other items to see if your conditional formatting is working:

Congratulations! You’ve successfully set up your first conditional formatting in LibreOffice Calc.

(NOTE: You can also apply the conditional formatting by indicating the cells to which the formatting should be applied in the Conditional Formatting window at the bottom. We indicated just A2 above, but you could include a range like A2:A6.)

Tutorial B – Conditional Formatting a Range with Colors

For this next tutorial, we’re going to get a little fancier. Nothing too crazy, but we are going to make the formatting conditional on the values in the cell and then apply background color to the cells. Our sample data are test scores.

First, let’s select the top test score in B2 and go to the “Format” menu, then select “Conditional Formatting” -> “Condition.”

We’ll get the same window as we got in Tutorial A. But things are going to be different from here on. We’re going to set up a color code that reflects test score ranges so we can quickly see which students are doing well and which may need extra help. To do this, in that window, leave “Cell value” as is and select the next dropdown. We’re looking for “is greater than or equal to”:

We want that option because the first condition we are going to enter is our top range of scores – 90 and up. Now, in the box next to that, enter 90. (NOTE: No need for quotes as this is a number, not text.)

Now, the style. We are going to apply a colored background based on these ranges. So, in the dropdown next to “Apply Style” select “New Style”:

Like we did above, we’re going to name our style, something like “grades_best”.

Next, click on the “background” tab then select “Color” and you’ll see this:

You can now pick the color you want to use as the background for that cell. I like green to mean that a student is doing well. So, I’m going with that:

When you’ve picked your color, select “OK.” That will return you to the conditions window. We have our first condition, but we wanted to assign colors based on ranges. That means we need additional conditions. In that window, click on “Add.”

When you click on it, you’ll get “Condition 2.” We’re going to follow what we just did for Condition 1, but we’re going to change a couple of things. First, in the dropdown next to “Cell value,” we don’t want “is greater than or equal to” anymore as our next range will have upper and lower values. So, we want “is between.”

Now, think carefully about how this will work. Our first Condition was equal to or greater than 90. We want this one to range from 70 to 89. Thus, will need to set the two values as 69 and 90 so it includes all the values we want but excludes 69 and 90. Once you have that, follow the same steps above to set the background color you want. I went with blue for doing okay and named that style “grades_good”:

We’re going to set up two more conditions. One is going to be from 60 to 69 and is going to be orange. The last is from 0 to 59 and is red! Like this:

When you have all your conditions in, click “OK.” The background color for B2 should now change to match the conditions you created. You can test it by changing the values in B2 to make sure everything works.

Now, as we did above, we can copy that conditional formatting and paste it to the other cells we want to have that formatting. Right-click B2 and select formatting then select the cells where you want to apply it and click with the paint bucket. All of those cells should now have the same conditions as B2.

There you go. That is how to use multiple conditions to format cells with a range of values.

Some Useful Notes

If you want to change the conditional formatting for a cell, be careful. If you right-click a cell with conditional formatting and select “Conditional Formatting” you’ll get this rather uninformative warning window:

In this version of LibreOffice, whether you select “Yes” or “No” doesn’t seem to matter, it wipes out the current formatting. So, don’t do that. Instead, select the cell you want to modify, then click on the “Format” menu at the top of the window and select “Conditional Formatting,” but don’t select “Condition”! Instead, click “Manage” and that will pull up the existing conditions. You can then modify the existing conditions from that window.

 790 total views,  9 views today

How To Fix PDF Forms Not Showing Contents in Okular (Linux)

I have had this problem happen twice now, and I don’t know exactly what is causing it, but I found a solution. Here’s the situation…

I received a PDF that has forms. Typically, that isn’t a problem as Okular is able to open most PDFs with forms and show both the forms and what has been entered into the forms. However, with this particular PDF, when I click on the “Show Forms” button at the top of Okular, I can see the information entered into the form like this:

(NOTE: I tried opening the PDF in Xournal and had the same problem.)

But when I click on “Hide Forms” (which is still showing on this PDF as “Show Forms” for some reason), all of the information entered into the form goes away, like this:

If I try to save the PDF as a different PDF in Okular or print it, nothing shows up. I found one website that had a suggestion for why this might be happening – the PDF may have been filled out in a web browser instead of using Adobe Acrobat Reader (or Okular) and, as a result, the PDF that was saved has some problem. I’m not sure what browser would be doing this, but that gave me an idea. If the problem is that it was filled out in a browser, perhaps I can open it in a browser then print it to PDF. So, that’s what I tried and it worked.

I opened the PDF in Brave (one of the browsers I have installed on Linux) and the PDF showed all the forms with all the information filled in:

I then printed the PDF (which flattens it and removes the forms) using the print button to a PDF:

The resulting PDF, while flattened, now showed all the information in the forms and allowed me to sign the document electronically.

I’m not sure how I solved this last time, but I figured I’d post this solution up here for the next time this happens so I can quickly take care of the problem and don’t have to try to figure out why form information isn’t showing up in my PDF on Linux using Okular.

 924 total views,  5 views today

Cooking Tips

I’m not a professional chef. I claim no real expertise as a cook or chef other than the fact that I cook for my little family a lot and I like to eat good food. As a result, I spend a surprising amount of time cooking. There are lots of other places where people can get cooking tips from experts and professionals. This post is just me sharing a few things I have learned over the years that I wish I had known before I started cooking. The tips are shared in no particular order.

Don’t Waste Chicken Bones (applies to other meats as well – pork, beef, fish)

We don’t eat a lot of meat in our house, but occasionally (a few times a month) we’ll have chicken and on holidays we often have a turkey. Sometimes, I buy whole chickens either pre-cooked or smoke five or six chickens at a time then freeze the chicken to use for recipes. But what to do with the chicken bones and scraps? The obvious answer is to cook them and turn that into chicken stock. But that can also take hours and hours if you cook them on the stove (many stock recipes require boiling for 4 to 6 hours).

Enter: InstantPot. Whenever I have chicken bones and scraps, I throw them into one of my InstantPots with any veggies that are on the cusp of going bad (e.g., celery that is leftover from a recipe, a spare onion, some carrots, a few cloves of garlic, etc.). I then fill the InstantPot up with water to just below the max fill line for pressure cooking, close the lid, and set the pressure cooker to manually pressure cook everything for 2 hours. That’s half the time you would normally have to boil the chicken bones and scraps and it works just as well. (NOTE: How long you pressure cook everything is flexible – if you only have 1 1/2 hours, that works; if you want to go longer, you can as well.)

When it’s done, you can let it cool on its own or release the pressure. I then use a strainer/colander to extract all the big stuff and spoon the chicken stock into mason jars. If it’s just a couple of small jars, you can store those in the fridge and use the chicken stock in the next week or so in any recipe that calls for chicken or vegetable stock. If it’s more than a few jars, these can be canned in a pressurized canner: 20 minutes at 15 pounds of pressure. Those are good for at least a year.

Chicken stock from a store costs anywhere from $0.09 to $0.34 per ounce (about $3.00 per carton). Since you’ve already bought the chicken, why not save yourself the money (and get better chicken stock in the process) by making your own? Yes, it takes a little time, but it’s mostly just letting your InstantPot do the cooking. I’m guessing my total time investment when I do this is 15 minutes for a small batch up to 30 to 45 minutes for a big batch of chicken stock (which might yield 4 to 6 quart jars of chicken stock).

Zest Your Citrus

I have a number of recipes that call for zest from citrus – lemon, lime, or even grapefruit. Zest is a great ingredient to have around for sweet breads, cheesecakes, and even soups. And the bonus bit of information is that you can freeze zest and then use that frozen zest in those same recipes.

My recommendation, then, is to zest all of your citrus before you use it or eat it. Need the juice of a lemon or lime? Zest them first, then cut them up and squeeze the juice out. Going to have a grapefruit for breakfast? Zest it first, then enjoy.

I use small, cheap plastic bags (stored inside a freezer grade plastic bag) for my zest but you could also use a mason jar or tupperware to keep your zest in. And having a handy zester on hand that you can pull out whenever needed is ideal.

Grapefruit Spoons Are Awesome!

My wife and I really like grapefruit in the morning. We slice them in half, cut around the outside, then spoon out the endocarp (the part most people eat). For years, we used a regular spoon for this. Then I was introduced to serrated spoons. Wow! Game changer! They are so much easier to use for eating grapefruit.

Do yourself a favor and pick up a few grapefruit spoons if you like grapefruit in the morning. They are far more efficient when it comes to eating grapefruit than are regular spoons.

 534 total views,  2 views today

Mexican Restaurants in Central Tampa

My New Year’s resolution for 2021 was to try a new Mexican restaurant (primarily food trucks and small places close to us in Wellswood) each month for all of 2021. To make the comparisons across restaurants I tried to be fairly consistent and order Mexican street tacos (at least one chicken and one steak) at every restaurant so we could compare across them (I did that at all of them except Renzo’s).

We just wrapped up the resolution with our last restaurant in December. It was a good experiment. We found three restaurants that are all very close to us that we will definitely be returning to (top three). By no means did we try even a small fraction of the Mexican restaurants in Tampa. It may well be the case that there are other, great Mexican restaurants that we need to try (if so, comment below; and if you’re a restaurant and want to comp me a meal, I’d go for that, too).

Here’s the list from best to worst (if you click on the links, you’ll see my review for that restaurant).

  1. Los Comparres – 5 stars (first place we tried; only place we’ve been back to so far – chicken tostadas are amazing!)
  2. Taqueria Mi Mexico – 4 stars (but best chicken street tacos we found)
  3. Crazy Burrito – 5 stars
  4. Chiles Mexican Restaurant – 5 stars
  5. Rocky’s Tacos Tampa – 5 stars
  6. Xtreme Tacos – 4 stars
  7. Miguelitos Taqueria & Tequilas – 4 stars
  8. Rene’s Mexican Kitchen – 4 stars
  9. Grandma’s Tacos – 4 stars
  10. Renzo’s – 4 stars (actually, Argentinean, so it really doesn’t belong on this list)
  11. Lolis Mexican Cravings – 4 stars
  12. Tacos Las Californias – 3 stars

 614 total views,  2 views today

Plex Playlists with Amazon Echo

My music library is stored on my NAS. On my primary desktop at home, I mount the music folder and use Clementine to listen to my music. Everywhere else, I use Plex to play my music. Playing my music through Plex via my browser at work, via my Roku in the family room, and via the Plex Amp app on my phone, all works great. What doesn’t always work great is playing plex with an Amazon Echo device.

The first issue is that sometimes after I open Plex and tell it to play something, it just ignores me and does nothing, which is really annoying. I don’t have a solution for that problem. I may try to figure that out at some point.

The second issue is the one that I finally figured out. I have a number of really generic smart playlists that I have auto-generated in Plex. Most of these are generated based on the genre of music – Folk, Classic Rock, Alternative, Classical, etc. I’m all about keeping things simple, so I originally named most of those smart playlists in Plex as just the genre. In other words, my Folk playlist was literally just named “Folk.”

Enter the problem. I would say to my Amazon Echo, “Open Plex.” Plex would open fine. Then I would say something like, “Play playlist Folk .” My Echo would then say, “I’m sorry, I didn’t catch what you wanted to play. Try asking again.” For months (maybe even years), I just assumed that the Plex Skill was subpar and couldn’t do what I wanted it to do. I even double-checked with Plex’s list of Alexa Voice Commands to make sure I was saying things exactly right. But one day, for some reason, I had an epiphany: What if my Amazon Echo is getting confused with the genre and the playlist?

It turns out, that may have been the problem all along. I don’t know that for certain, but I ran a little experiment and that may have been the case. I created the exact same smart playlist in Plex that contained all my music in the genre Folk but named it “Favorite Folk” instead of just “Folk.”

This video shows the results:

So, word of advice: If you want the Plex Skill to play your playlists, name them something unique that does not overlap with the genre. Otherwise, the Plex Skill and your Amazon Echo will get confused and not play them.

 2,196 total views,  2 views today

LibreOffice – address label merge (from spreadsheet)

I’ve been using LibreOffice for over a decade and have only had to do an address label merge twice in that time – both of which have been in the last month. The first time, I actually did a form letter and a label merge; the second time I just had to do an address label merge. In the process, I realized that I totally forgot how to do it after the first time. Whenever that happens, I know that means I need to create a tutorial on here so I can remind myself how to do it if I ever need to do it again. So, here is my tutorial on how to merge labels in LibreOffice. (NOTE: I’m using LibreOffice

The idea behind a label merge, just like a form letter merge, is that you have a bunch of address information in a spreadsheet or database and, rather than having to enter all of that separately into a document to print labels, you’ll just have the software create the labels from the data you already have. LibreOffice is fully capable of doing this, but it’s not what I would call “easy” or straightforward. And, in fact, the first step will seem unrelated to merging labels, but it is necessary.

Part 1: Register Your Database with the Address Book Data Source Wizard

Before creating any labels, the first thing you need to do is create your database. I’m assuming you have a spreadsheet with addresses, like this one:

Make sure that you have column names at the top as those can become the field names in the database. It’s always a good idea to separate out your fields like I have done: first name, last name, street, city, state, zip. Of course, if you’re outside the US, your columns will be different. Adjust accordingly.

Okay, now we get to the weird part that is going to seem unrelated to merging these addresses into labels. A quick explanation may help. Basically, you need to turn this list of addresses into a database that LibreOffice has registered so it can then pull those fields when it generates the labels. This isn’t hard to do. LibreOffice will walk you right through it with a wizard. But it seems counterintuitive that you have to do this before you can start the mail merge. Just think of this as getting everything set up.

To create your database, click on File -> Wizards -> Address Data Source:

When you click on that, you’ll get this window:

This is Step 1 of 5 for the wizard. It’s basically saying, “Hey, let’s use existing data instead of having to enter new data.” Groovy. That will save us time. Unless you have your address data stored in Firefox or Thunderbird, select “Other external data source.” Then click on “Next” and you’ll get this next screen:

This is Step 2 of 5 for the wizard. On this screen, click on “Settings” and you’ll get a completely separate window:

(Did I mention that this is a bit confusing and complicated. It’s actually really smart, when you think about what the programmers did here, but it isn’t straightforward at all that you have to do all of this first. We’re only about halfway done.)

You have a lot of options you can choose from on this screen. I’m using a Spreadsheet, so I’ll leave that selected. But you can see from this screenshot that you choose from a variety of database sources:

Once you’ve selected the source for your data (again, I’m using a spreadsheet), select “Next” and you’ll get this screen:

Here, you need to choose your data source. Click on “Browse” and go find the spreadsheet you are going to use, like this:

Click on “Open” once you’ve selected it. That will take you back to the previous screen. If you want, you can click on “Test Connection.” Assuming everything worked, you should get this nice but relatively uninformative window:

Click on “Finish” and you’ll go back to the wizard:

This is Step 4 of 5 (note, Step 3 was skipped because I only had one field in my spreadsheet). On this screen, you can click on “Field Assignment,” which will let you match the fields in your imported data to the fields that are common for addresses. (NOTE: This is not required. You can skip this step if you want. It just changes the names of the fields later.) Here’s what the screen should look like:

Just to be clear, the Data source field is what LibreOffice is currently calling the newly imported data (in the image above, it just says “Addresses”). You’ll get a chance to change this later. The Table field (mine is called “Sheet1”) is the table in your spreadsheet where the address information was stored. You can then click on the various fields below where it says “Field Assignment” and align your information with the information options given, like this:

Once you’re done, hit OK and you’ll head back to the wizard.

This is Step 5 of 5. Phew. We’re almost done with this first part. You have a couple of options here. The first is a checkbox that says “Embed this address book definition into the current document.” You can unclick that if you want. Alternatively, you can leave it checked and make it part of the spreadsheet you are working on, which is fine. It really kind of depends on what your future plans are with this data. If this is data that you think you will use repeatedly for mail merges and you’ll probably be updating the data in the future, it might be a good idea to leave that checked. The second option is the one you definitely want to leave checked because we’re going to need it accessible for the label merge we’re going to do next. That option is also a checkbox that says “Make this address book available to all modules in LibreOffice.” Finally, you can name this address book. Call it something you’ll remember. I’m going with “folk artist addresses.” This changes the name that LibreOffice had temporarily assigned it (see the screenshot just above this). Once you’ve made your selections and named your Address Data, click “Finish”:

And once you hit “Finish,” nothing, right? Well, isn’t that weird.

Something did happen, it’s just “behind the scenes.” You have created a database that is now registered with LibreOffice. It’s just not showing it to you. If you want to see it, here’s how. Click on View -> Data Sources:

You’ll then see this:

You can see that I’ve got four Data Sources registered with LibreOffice. One of those is, of course, the one I just created: folk artist addresses. You can actually work with those data sources here if you’d like. Or, if you want to delete one (say, you made one by mistake or for a tutorial and you’ll never need it again), you can right-click on any of the databases and you’ll see this menu:

If you select “Edit Database File,” the LibreOffice database software will start up. If you select “Registered databases,” you’ll see a list of your databases with an option to select them and delete them, like this:

Okay. That does it for the prep work and part 1 of the tutorial. Now, with our address book registered, we can actually do the label merge.

Part 2. Label Merge In LibreOffice

Honestly, the first part is the hardest part. This next part goes pretty quick.

From any document in LibreOffice (it can be a Calc or Writer document; doesn’t matter), click on File -> New -> Labels:

You’ll then see this window:

Some explanation is in order. The big box is where you’re going to construct your addresses. I’ll walk you through that. The little check box at the top that has “Address” next to it is kind of nifty. If you’re a good LibreOffice user, when you first installed the software, you’ll click on Tools -> Options and fill in your User Data:

If you actually did that, you can click that little check box by “Address” and you’ll see your information populate the field:

This is a really slick way to, for instance, create business cards. But that’s not what we’re trying to do. So, uncheck that box and let’s get to merging some labels. First, in the drop down menu under “Database,” select the database we just created (and now Part 1 makes sense):

In the drop down menu under “Table,” select “Sheet1” (it’s the only sheet we had; we could always have named it something else). So, your window should look like this now:

Next, we start working with the drop down menu under “Database field.” In that menu, you should see all the fields you had in your spreadsheet:

Let’s build our address label. Select “firstname” then click on the little arrow pointing left:

That will insert that field into the label box, so you’ll see this:

Now, build the rest of your label, keeping in mind that you’ll want to add spaces and punctuation in between the fields, so it looks like this:

Once you’ve got it set up how you want it, we have a few other things we need to do. At the bottom, you need to choose between “Continuous” or “Sheet.” I’m assuming the Continuous is for printers that can print on labels that are connected. I typically print on individual sheets, so I select that. On the bottom right, find the “Brand” you want and then the “Type.” (Honest Aside: LibreOffice doesn’t always have every option I need for this, but you can usually find something that will work.)

We’re almost done. At the top of that window you’ll see two other tabs: “Format” and “Options.” If you want to customize the dimensions of your label, click on the Format tab. I rarely use this option, but it might be useful if you have a custom label you want to print. There is one thing on the “Option” tab that you probably want to select: “Synchronize contents”:

This will allow you to synchronize any formatting you do to the labels later. Trust me, you’ll want this option like 99% of the time. Once you’re done and have your label selected, click on “New Document” at the bottom.

You’ll then get an entirely new Writer file with labels spread out across the document and your fields highlighted in gray:

What you won’t see, unfortunately, is the actual data in those fields. That will come later. What you’ll want to do now is customize your label formatting. So, if you want to change the font, the font size, make the text bold or italicized, now is the time to do it. And, do it all in the top-left cell. In my document, I increased the font and made everything bold:

Remember when I said to choose “Synchronize contents.” Yeah, now is when you’ll want that. You don’t have to format every individual label. Just format the first one, as I said. And when you’re ready, click on the “Synchronize Labels” button in the floating window that popped up:

When you do, the formatting from the first cell transfers to all the other labels. Way easier than formatting each cell individually.

Now, to print the labels. This part is also, unfortunately, a little confusing. Click File -> Print or just hit the printer icon on the toolbar and you’ll get this message:

“Your document contains address database fields. Do you want to print a form letter?”

What an unfortunate prompt. We’re doing a label merge, so “No.” But don’t choose No! We may not want to print a form letter, but there isn’t a separate prompt for doing a label merge. So choose “Yes.” (Nudge to LibreOffice programmers – fix this.)

When you do, you’ll get this window:

This is a little confusing, but it’s basically that same Data Source window you saw in Part 1, but now we are applying it. You’ll see your Address Data Source on the top left. If you select your sheet (Sheet1 in my screenshot) you’ll see all your addresses. You have a couple of options here. You can choose not to print all of the addresses. This is in the Records option on the bottom left. If you want to test this with a single sheet, for instance, you can choose just the first XX addresses and test this out. On the bottom right, you can choose to save this as a File or send it directly to the Printer. Up to you. If you’re wary and don’t want to waste label sheets, this might be a good option. Or if you need to print these on a different printer, that would be helpful. But if you’re ready to print, select “OK” and you’ll get one more chance to change your mind because you’re finally going to see THE LABEL MERGE! (Woot! Rejoice!):

The screenshot above shows you the final window I get before I actually print the labels. And, assuming everything worked correctly, you’ll finally see the address information merged into the labels. Success!

This is not a simple process but there is, as with all things LibreOffice, a lot of customizability, which is why I prefer LO over Microsoft products.

Anyway, that’s how you do labels merge in LibreOffice. And, bonus, if you ever need to use that same address information in the future, it’s already registered in LibreOffice so you can just do this again. If not, you can delete it as I illustrated above.

 5,635 total views,  16 views today

R – Finding and Setting Working Directory

R, like many software programs, likes to have a folder or directory on your computer to operate in. When you start R, depending on how you start it and whether or not you previously saved your session, it’s likely that R will set a default “working directory” or folder where it is going to look for files and folders and where it will default to storing whatever it is you are working (e.g., script files, etc.). Many R beginners don’t know that you can change the working directory AND it is really useful to do so.

There are two ways to change your working directory if you are using R with RStudio – from the console or using the menus in RStudio. I’ll show them both.

To begin with, you can use the following code to get your current working directory:


When you enter this into the console or run this from a script file, R will indicate what the current working directory is, like this:

In the screenshot above, you can see that I had set my working directory to a folder called “new analysis” for a project I am working on, but it also shows the entire folder hierarchy to my working directory: “/home/ryan/Dropbox/Ryan/writing/transing god/new analysis”. Knowing what my working directory is, makes it much easier to change to my working directory.

To change your working directory, you can copy the folder hierarchy that R provided and simply change it to the new location. So, for instance, if I wanted to change my working directory to a different project that is stored in a different folder, I can just change the folder hierarchy with the following command:

setwd("/home/ryan/Dropbox/Ryan/writing/futurism studies/data/")

Basically, getting your working directory uses the code “getwd()” with nothing in the parentheses, and setting your working directory uses the code “setwd(“/path/to/folder/”)” with the folder hierarchy included inside quotes inside the parentheses. This is how you get and set your working directory from the console.

If you’re using RStudio to interface with R, you can also set your working directory using the point-and-click menus. Click on Session -> Set Working Directory -> Choose Directory:

Once you click on “Choose Directory,” a window will pop up that will let you select the folder that you want to be your working directory:

Navigate to the folder you want to use as your working directory, select it, and hit “Open” and that will set your working directory. You should also see the corresponding code in the console that matches what we did above.

You can, of course, check to make sure that your working directory has changed by using the code above – “getwd()”. It should now be your new working directory.

Why might you want to change your working directory? The major advantage to doing this is that you no longer have to give the full path length to files you want to import, export, or work on. You can simply give the relative path based on the working directory. For instance, if I want to save a table of data from my environment, if I have set my working directory, I don’t have to specify the entire path to the file when I save it, I can simply save it to my working directory with the name, like this:

write.csv(MyData, file = "MyData.csv")

The code above will save the environment object “MyData” as a CSV file into my working directory and call it “MyData.csv”. If I haven’t set my working directory and want to save the same object, I would have to specify the directory where I want to save it, like this:

write.csv(MyData, file = "/home/ryan/Dropbox/writing/someproject/MyData.csv")

Setting your working directory also makes it easier to import files as you only have to use the name of the file you want to import and not the entire folder hierarchy to the file. With my working directory, I could import a CSV file like this:

dataframe1 <- read.csv("MyData.csv", header=TRUE)

Contrast that code with this code that would be required if I had not set my working directory:

dataframe1 <- read.csv("/home/ryan/Dropbox/writing/someproject/MyData.csv", header=TRUE)

Using a working directory saves time and makes it much easier to import and export files from R.


If you ever need to find your folder hierarchy, this is relatively easy to do on Linux or Windows (no promises on Mac). On Linux, just open a file manager (like Dolphin), navigate to the folder you want, then select the folder hierarchy in your file manager, like this:

You can simply copy and paste that into R. If you want to use the console to do it, you can also navigate to the folder in a console on Linux then use the “pwd” (path to working directory) command to get your current directory:

 1,254 total views,  3 views today