Yet more website tweaks

Improve server response time

In my original post about hosting my own blog, I mentioned that Google PageSpeed Insights was complaining about server response time. After some research, I realized that my home page was quite large. It was over 1 MB, mainly because of a particular post which contained some large images. (I was complaining about the way graphics are configured on Windows, and included some large screenshots.) The fix was two parts. First, I cropped two of the screenshots to bring the size down a bit more. Second, I added the “More” tag, which makes users click a “Continue reading” link from the home page if they want to see the whole post.

If you want to measure the page load size on your own blog, clear your browser cache, then open up developer tools. Reload the page. On the “Network” tab (“Net” in Firebug), there is a summary of the number of HTTP requests, the amount of data downloaded, and the time it took.

Add LaTeX and YouTube to WordPress

Recently I found another post that needed some special care. In 2012 I posted about my computer animation project and included a YouTube video and some math equations. These used features unique to WordPress.com: by simply pasting the link, it will embed a YouTube video, and by using a special tag, you can include math equations using the popular typesetting language LaTeX. One way to bring these into my WordPress.org blog would be to use WordPress.com’s plugin Jetpack. Jetpack brings a lot of WordPress.com features to WordPress.org, but I didn’t want all of them. Instead, I opted for two small plugins, WP-Latex and YouTube Embed Plus.

For people setting up their own blog, I’d recommend either Jetpack or a combination of smaller plugins to enable these features.

From the Garden to the City book review

From the Garden to the City: The Redeeming and Corrupting Power of Technology
John Dyer

John Dyer is a web programmer and a theologian. I’ve played with his Javascript app Browser Bible and I’ve followed his blog Don’t Eat the Fruit for some time. In 2011 he published From the Garden to the City. I read it last year, and am now digging out my notes to share some of the ways it influenced me.

Technology is not neutral

I had always thought that technology was neutral. When I was growing up, my mom would try to get me to stop spending so much time on the computer. The computer is bad, she would say. It didn’t seem so particularly bad to me. I knew that it could be used in moral or immoral ways. For example, I could use it to watch porn, or I could use it to do my homework. But if I spent too much time using it, surely that wasn’t because the computer was bad—maybe I just needed to go play in the park every once in a while.

My neutral view of technology was too simplistic. The computer is not so much neutral as it is transformative. It changes me, it changes my family, it changes society. It brings tendencies, for example, a tendency to be used by only one person at a time. It brings a tendency toward distraction because the computer can be downloading a file, installing an update, and playing music all while I’m trying to write a research paper. It tends to make communication easier, bringing people closer through social networks. Saying that a computer is neutral would wrongly ignore its more nuanced characteristics.

In Dyer’s book, he gives three examples of technologies that are not neutral. The first example is a simple one: a shovel. A shovel is a tool used to make holes in the ground. It can be used for good purposes, say to plant a tree, or for bad purposes, say to conceal stolen treasure. But regardless of the purpose it is used for, the shovel has (1) made digging holes easier, and (2) given somebody blisters in the process, and maybe even a sore back. It makes it easier to shape the gound, and may inspire somebody to plant a tree.

The second example is Twitter, a digital communication tool used to share 140-character messages with the public. A person can choose what tweets they want to read. So one person follows Seth Godin, and another person follows Justin Bieber. Obviously there is a difference in what benefit they will get out of the content of the tweets. But another, more subtle difference, is that the more tweets they read, the more they train their mind to process information in very short snippets.

The third example is a book, a communication tool which became common about 500 years ago with the invention of the printing press. Again, a person can choose what books they read. One person reads Richard Dawkin, and another person reads Wayne Grudem. Obviously both people get different benefits out of the content that they read. But the technology of the printed book has also changed the way their mind processes information. After reading a few books, their mind will become adept at processing information in multiple chapters and pages, and understanding complex arguments. If reading Tweets trains the mind to process information in short snippets, then reading a book does the opposite.

Redemption through technology

One section of the book that inspired me was the way technology is involved in redemption. Technology can be used by God and humans to temporarily overcome the effects of the fall. God uses it for his grand purposes of redemption, and it points to the Redeemer who will makes all things new

One example is the technology of written words. Prior to written words, people remembered by telling stories. Memory was important, and the person with the most memory had authority and wisdom. Written words have a different sort of authority. If someone reads aloud the written words, they obviously are not the authority. The authority comes from the person who originally recorded those words.

God used this technology when he recorded the law to his people on Mount Sinai. The recorded commandments indicated God’s authority, so that the person who read them (and obeyed them!) had to acknowledge their original source. What’s more, God used this technology right when it came out! Around the same time of the Exodus, other civilizations were beginning to adopt alphabets as a way to write down their spoken languages.

A contemporary example of technology having a redemptive effect is medical technology. We are able to partially reverse the effects of the fall by aiding the body in the process of healing.

Conclusion

Another story from my years of growing up is my affinity for “how stuff works” books. My favorite by far is the one that featured cartoon woolly mammoths (The New Way Things Work). These whimsical mammoths would appear in the cutaway drawings of different gadgets and gizmos. For example, on the page about how the electric guitar works, there was a mammoth doing a tightrope walk down the guitar string.

Mammoths aside, the history of science in the last few hundred years is fascinating. This invention led to that one. That scientist made this discovery. However, the story of technology is more than a historical timeline of inventions. It is the story of technology influencing society and vice versa, and God influencing them both, directing them to his glorious purposes.

Add tracking code to static content

By using a combination of WordPress, Piwik, and the WP-Piwik plugin, I’m able to track analytics on all the pages of my blog. However, my site is more than my blog, and I wanted to track visits to my static pages, namely my portfolio and my Post Voting app. One idea is to paste in the tracking code and just have it be versioned like my other static content. I see two downsides to this:

  1. The tracking code could change, and then I’d be updating it across all the pages, polluting the version history and causing a mess of confusion.
  2. The tracker would track my own visits that happen as I do web development on the various pages.

The solution is to use Server Side Includes to include the tracking code. This addresses the two concerns above:

  1. The tracking code is stored as a separate file, so it can be versioned independently.
  2. The include can be conditional on whether this is a development or production server.

As a further feature, I wanted the tracking code source file to be hidden from anybody that tries to access it directly. (Not really essential, but it helps me learn about configuring .htaccess)

Running into snags

I ran into two snags that helped me learn a lot more than I had originally intended. First, while trying to get the syntax of the conditional include right, I was reading the Apache documentation. However, I failed to realize that my development machine had Apache 2.2, and my web host has Apache 2.4. I was reading the documentation for Apache 2.4 ap_expr syntax. I was stumped as to why the code worked on my web host, but gave an Invalid expression error on my development machine. The solution was to create a new virtual machine using the same version of Apache as my web host. The lesson learned was to ensure that development and production environments are as close in configuration as possible.

The second snag happened when I restricted access to my tracking code piwik.html using .htaccess. I realized that this also restricted mod_include from including it! The solution came from reading the Apache 2.4 documentation for mod_rewrite. The NS flag prevents a rule from applying to an internal subrequest.

The solution

In portfolio and postvoting folders, I renamed index.html to index.shtml. The include source code which follows was added to each page:

<!--#if expr="%{SERVER_NAME} == 'bobbyratliff.nfshost.com'" -->
<!--#include virtual="piwik.html" -->
<!--#endif -->

You can view the current version of the Piwik tracking code on github.

The .htaccess file has the following line added to it:

RewriteRule ^/?piwik.html$ - [F,L,NS]

That’s all there is to it. Just use the static deploy method and your site will be updated.

Website maintenance and tweaks

Keeping WordPress up to date

I originally installed WordPress using Subversion. This provides a really easy way for me to update WordPress:

svn switch http://core.svn.wordpress.org/tags/3.4.1

Replace 3.4.1 with the latest version number. Then I visit the admin panel of the blog and it will redirects me to perform any necessary database upgrades.

Use .htaccess to prevent access to the .svn directory:

# Prevent access to .svn directory
# From http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion
RewriteEngine On
RewriteRule ^(.*/)?\.svn/ - [F,L]
ErrorDocument 403 "Access Forbidden"

Compression

I’ve learned that content can be categorized into static content and dynamic content. There is an Apache module, mod_deflate, that can compress both types of content seamlessly. It only requires a configuration change in .htaccess, and no changes will need to be made to the application. However, it is inefficient because it recompresses the same content every time someone requests it. For this reason, my web host does not support mod_deflate. Instead, they recommend different tactics for each type of content.

On my blog, an example of dynamic content is the home page, http://www.rratliff.com/. This test or this test can test whether the home page is compressed. At time of writing, I have not found a good way to compress dynamic content.

On my blog, there are several static content files that are typically requested. For example, the CSS and JS files that WordPress includes in every page. Google Page Speed Insights is the a tool that tests compression of every resource needed for loading my blog’s home page, both the dynamic and static pages. I’m looking for a reliable way to compress the static content files that Google Page Speed Insights finds.

Deploying static content

I now have two sections of static content on my website, my Post Voting App and my Portfolio. I’ve adopted a simple solution to keep these sections up to date. Each section is maintained in a github repository. I have a matching repository on my own computer where I make changes, commit, and then push to the github repository. Then, to update the content on my website, I SSH to the host, cd to the directory, and do a git pull.

I reuse the .htaccess code above in order to prevent access to the .git subdirectory. See the .htaccess file for an example.

Backups

I created two scripts to backup the files and the database in my NearlyFreeSpeech site. The scripts aren’t fancy, they just contain one command each.

For the database, I created a non-privileged backup user who has permissions necessary to do a mysqldump on all the tables in my database. Here’s the gist of it. (It should be all one line. Lines wrapped for display purposes.)

ssh user@host mysqldump --user=nonprivilegeduser 
    --password=password --host=mysql_host 
    --all-databases | gzip > backup-file-name-$(date +%Y%m%d).sql.gz

Just change the underlined parts. The $(date) thing creates a filename like this:

backup-file-name-20131029.sql.gz

For the files, I use rsync with the options -aAXE --delete.

SSD benchmarks

I’ve recently purchased an SSD upgrade for my Asus Eee PC 900 (XP). It will be a size upgrade (from 16 GB to 32 GB) and it should be a speed upgrade as well. I decided to do a benchmark of every SSD I currently own in order to compare their performance.

TL;DR: Jump to the results

The contenders

I have four SSDs. They vary in size, and as we’ll find out, speed.

Short name Size Disk ID Comments
Samsung internal 8 GB SanDisk iSSD P4
64BG external 64 GB M4-CT064 M4SSD2 Crucial M4, connected by USB 3.0
Eee PC internal 16 GB ASUS-PHISON SSD
New Eee PC internal 32 GB STT_RPM32GLSE Super Talent, purchased here

Getting the benchmarks

First, I had to choose a benchmark tool that would benchmark both the internal SSDs (Actually the Samsung internal is soldered onto the motherboard) and the external SSDs. I chose a familiar tool, the Disk Utility in Ubuntu 12.04.3. I used the old version after running into this bug on Disk Utility in newer versions of Ubuntu.

This benchmark tool works well for read benchmarks, but for write benchmarks it has a quirk of wanting the disk to have no partition table. Yep, you’ll have to delete all your partitions as well as the partition table. When I benchmarked the Samsung internal, I had to first backup the disk with Clonezilla, then restore the disk after the benchmark completed.

I benchmarked the first three drives listed above, then upgraded the Eee PC’s drive in order to benchmark it.

Upgrading the Eee PC 900

I upgraded the SSD following the recommendation of this article. So before installing the new SSD, I updated the BIOS. This was fairly straightforward. I went to the ASUS support page for the Eee PC 900 XP and downloaded BIOS version 1006. I unzipped the file, and in order to get it to install, I had to rename the file to 900.ROM. I copied 900.ROM to a 256 MB USB stick, and inserted it in the left USB port. Then, when the POST screen showed, I pressed Alt+F2 and got the BIOS update screen. Pretty cool.

Results and conclusion

Read and write benchmarks for solid state disks
Device Average Read Rate (Mb/s) Average Write Rate (Mb/s) Average Access Time (ms)
Samsung internal 137.0 21.2 0.4
64GB external 200.1 51.7 0.2
Eee PC internal 31.3 9.9 0.7
New Eee PC internal 135.8 23.7 0.5

In conclusion, the Eee PC has enjoyed a decent upgrade. Twice the storage space, and a SSD fast enough to compete with the Samsung internal SSD soldered onto the motherboard!

Moving a WordPress blog to Nearly Free Speech

Up till recently, this blog has lived on WordPress.com. Now I’ve moved it to http://www.rratliff.com/, where I have control over more of the configuration. I’ve had some experience with WordPress before, but I wanted to update my knowledge. Also, with all this recent talk about privacy on the web, I wanted to set up my own server and see how I could eavesdrop on my visitors learn about it.

For my non-tech friends, here is some quick background. WordPress is two things. It is a blogging software, which anyone can install on a web server that they control. It is also a company who has installed this blogging software on WordPress.com. They control it, but they give it away as a free service (and also have a paid service for those who want more advanced features.) I’ve chosen to move from the free service to the service that I can control. Now I pay NearlyFreeSpeech.net some money to host my blog on their site, but again, it gives me more control over the configuration, and more opportunities to learn.

Things I learned

  • How to list all the tags in Subversion. (I used this to make sure I was downloading the most recent version of WordPress.)
  • An SQL process can have multiple databases in it.
  • WordPress can use a single database to host multiple sites by using a table prefix.
  • In the world of web servers, file permissions matter. For most of my life up till now, I’ve been working on single user systems. Therefore I have not needed to worry about the group and other sections of the unix permission modes.
  • The ability to export and import a blog from WordPress.com to self-hosted WordPress is pretty cool.
  • How to install a WordPress plugin manually. The fastest way is to SSH into the host and wget the zip file. Then unzip it there.
  • My hosted site does not utilize HTTPS right now. Therefore several passwords that I use to administer WordPress are transmitted in the clear. Say hello to my government surveillance friends, and hackers too? Hopefully not.
  • Piwik is a really cool way to do web analytics. There’s two pieces.
    • One is the Piwik tracking Javascript, which is added to all pages on my website. This can be done by the WP-Piwik plugin.
    • The other is the Piwik web server, which handles the requests from the tracking Javascript and then stores the information in the database. It also provides a Dashboard for admins who log in to view the analytics data.
    • Also, Piwik can anonymize part of visitors’ IP addresses to reduce the amount of personal information that is collected.
    • Google Analytics provides a free (as in price) service, but my analytics data is being aggregated with the analytics of a lot of other website, thus contributing to Google’s database. They use this for marketing, which I view as a form of corporate surveillance.
  • WordPress by default does not generate valid HTML. I fixed it on my site by modifying functions.php. See WordPress category tag validation error fix for more information.
  • I installed the Use Google Libraries plugin to change the jQuery to use Google hosting. This has a small speed benefit for users.

Still to learn

  • How to get Apache to do what I want. I really want a good rating in Google Page Speed. Two sticking points right now are leveraging browser caching and enabling gzip compression. There are WordPress plugins that will manage my .htaccess for me, but I think it would serve me well (pun intended) to learn how to configure it myself. Another tool for testing blogs is ismyblogworking.com
  • It would be cool to set up a staging environment, where I can work on plugins and WordPress tweaks without worrying about disabling my production website.
  • It would be nice to have blog posts and pages stored as files instead of in a database. That way I could put them under version control.
  • Either WordPress or my web host has poor performance, because I’m getting the “Reduce server response time” suggestion pretty consistently from Google Page Speed. I know a static site would help immensely in this area, but at the cost of some convenience of administration.
  • Even cooler would be to tie the version control and the staging environment together. When I am happy with the way my blog looks in the staging environment, I can commit the changes, then push (deploy) them to the production blog.
  • My host supports some sort of HTTPS/SSL. I’d like to learn more about this and then consider asking them to enable it.
  • Another suggestion from Google Page Speed is “Eliminate render-blocking JavaScript and CSS in above-the-fold content.” To fix this will require diving into WordPress themes, which I am not looking forward to.
  • There are more recently popular blogging frameworks, such as Jekyll or Octopress.

Spies, surveillance, and God’s power

Also known as: A theology of government surveillance (part 2). Part 1 was here.

The Bible is 2,000 years old. Technology back then was pretty simple. So I don’t read the Bible because I’m looking for exact answers on what to do. Instead, I read it to learn principles. These principles transcend the technology that is here today and obsolete tomorrow. These principles address who we are as humans, and who God is as the creator.

The creatures and the Creator

  • Achan sinned by taking the spoils of war that were to be dedicated to God. The consequences were dire: Israel lost a battle. Achan’s sin was not kept private, but “all Israel” participated in the stoning of him and his family (Joshua 7:25).
  • God sent spies to the promised land. They were asked to report on the reality of the land that they were attacking, and Moses told them to “be of good courage” (Numbers 13:20). When the spies came back and gave their report, their courage was lacking. They said “We are not able to go up against the people, for they are stronger than we are” (Numbers 13:31). These spies disobeyed because they forgot the reality that God is great. However, the spies’s words led the whole congregation astray, and the people complained bitterly. They failed to trust in God to be stronger than the nations they were opposing. The consequence for the false report was 40 years of wandering in the desert!
  • Through the coming of the wise men, Herod learned that the king of the Jews was born. He was afraid of this new information, so he asked the wise men to tell him where Jesus was. When they did not, Herod ordered that all male children under two years be killed in Bethlehem.  But Joseph was warned, and Jesus was not in Bethlehem when the killing happened. It seems that God was in control over the situation. Herod knew something (the king of the Jews is under two years old and in Bethlehem), yet he didn’t know something (where he is located). Joseph knew something (that he should flee to Egypt), but he didn’t know something (the exact nature of the threat). Yet God was in control, and prophecy was fulfilled by the tragic actions that happened. (See Matthew chapter 2)
  • While David is on the roof of the king’s house, he sees a woman bathing. While this woman might have wished that her naked body remain private, David now sees that she is beautiful. David has not sinned up to this point, but what he does next is entirely his responsibility. He inquires about the woman and learns her name is Bathsheba (2 Samuel 11:3). Spies may or may not gather certain information that we wish to be held private, but it is their responsibility what they do with that information.

Reading these stories (can you think of others?) helped me remember that God is in control and I am not. I am reminded of God’s attributes (as I wrote about earlier) and of my position before him as a child of God, clothed in righteousness because of the death and resurrection of Jesus Christ. Now I am ready to respond to the situation in front of me!

Our response

When faced with recent revelation that the United States government is overstepping its constitutional bounds in searching and seizing our data, how should we respond? I don’t think we should panic or become paranoid. After all, we should not fear those who kill the body, or spy on it, and after that have nothing more that they can do. But fear him who sees all and has authority to cast into hell! (Luke 12:4-5)

So if you’re reading this and you don’t know Jesus and trust in him for the forgiveness of your sins and to change your eternal destiny, please trust him now! His work has been done, and that is good news. (Others have written and spoken about this–here’s a good starting place.)

If you do know Jesus, then God has an interesting kind of surveillance over your heart: “O Lord you have searched me and known me” (Psalm 139). Indeed, the very hairs on your head are numbered (Luke 12:7). (Even the NSA and the CIA don’t know that.)

Getting practical

I love the reminders from the Bible. They help me worship God. Still, my original issue is unanswered, how do I maintain the security of my data in the face of government surveillance?

Much of this surveillance is in response to the terror attacks of 2001. I ask myself, what is my response when tragic events happen in the world? In Luke 13:1-5, Jesus uses some contemporary tragic events to make the point that we should repent. Terror attacks remind us that life is short, and we need to be ready to die. I think that many Americans have failed to see this reminder, and our government has decided that what is best for us is to be “safer.” So we change some security rules, hoping that someone will notice that we tried to make our country “safer.”

An ideal government would do what is best for the people. But I know that I live in a fallen world. Sin affects the relationship between people and their God, and it affects the relationships among people. Therefore, I am not surprised when my government is imperfect. I can pray for my government leaders and (praise God) I live in a country where I can write my representative leaders and vote in elections.

Still, in the short-term I would like to keep my data private. Some people will say, if I haven’t done anything wrong, why should I worry? I can’t address the answer to this question here, because it would take too long, but Daniel J. Solove has written an excellent answer in his article Why Privacy Matters Even if You Have ‘Nothing to Hide’.

After reading that article, do some research and learn how much information about you is being collected: by the government, by the cloud services we voluntarily use, and by the advertising agencies that track us on the web. Then do something about it. Maybe delete a few cloud services, and install a cookie blocker on your web browser. Some changes will be minor, some may be a little inconvenient, and some are more drastic. It is up to you.

USB hardware smackdown

Continuing in the vein of my USB 3.0 benchmarks, I’d like to compare the USB 2.0 controller on my Samsung Chronos Series 7 NP700Z3A laptop (purchased in 2012) and my HP Compaq dc7900 CMT desktop (purchased in 2009).

My two flash drives for testing are the SanDisk Cruzer Red and the Kingston DataTraveler 111.

For both machines, I ran Ubuntu 12.04.3 amd64 desktop edition, and used Disk Utility (3.0.2) to perform a read-write benchmark.

Samsung Chronos Series 7 NP700Z3A

Average and maximum read rate for a read-write benchmark on the Samsung laptop
Device and port Maximum Read Rate (MB/s) Average Read Rate (MB/s)
Cruzer in USB 2 port 23.1 22.6
DataTraveler in USB 2 port 33.8 30.3

HP Compaq dc7900 CMT

Average and maximum read rate for a read-write benchmark on the HP desktop
Device and port Maximum Read Rate (MB/s) Average Read Rate (MB/s)
Cruzer in USB 2 port 24.8 24.3
DataTraveler in USB 2 port 40.5 39.4

My conclusion is that the HP desktop has a faster USB 2 controller than the Samsung by 7 MB/s or so, but this is only evident when comparing performance of the Kingston.

Some USB 3.0 benchmarks

After transferring large amounts of data and working with hard drives a lot, it interests me to compare the performance of USB 2.0 and USB 3.0. I have one of each of these ports on my Samsung laptop.

In March 2013, I bought a Kingston DataTraveler 111 8GB, and I wanted to compare it to another flash drive, the SanDisk Cruzer Red 4GB, which I purchased in August 2012. The Kingston is a USB 3.0 flash drive, whereas the Cruzer only supports USB 2.0. The tool I used to compare these two was HD Tune, which is free for read-only benchmarks.

Read benchmarks for USB flash drives
Using the USB 2.0 port Using the USB 3.0 port
SanDisk Cruzer Red Kingston DataTraveler 111 SanDisk Cruzer Red Kingston DataTraveler 111
Transfer Rate: Minimum (MB/sec) 19.0 25.4 20.7 60.4
Transfer Rate: Maximum (MB/sec) 29.7 29.6 29.2 72.2
Transfer Rate: Average (MB/sec) 27.7 26.4 28.3 64.8
Access Time (ms) 0.8 1.0 0.5 0.7

According to Wikipedia’s page on USB, the maximum transfer rate of a USB 2.0 link is 35 MB/s, and we see this port reaching very near that, with maximum transfer rates of 29.6 and 29.7. Without doing multiple trials of any of these experiments, we can see that the Kingston DataTraveler is much faster at reads over a USB 3.0 port than the SanDisk Cruzer on either port. However, the comparative write performance of either of these drives remains to be seen.

Sidenote: My pet peeve about USB ports is that (1) laptop manufacturers place them too close together, and (2) USB flash drive manufacturers make flash drives that take up a large profile. The result is you can only fit one flash drive at a time on the USB ports that have been packed too close together.

A theology of government surveillance (part 1)

As I navigate the modern world, I am presented with a bewildering array of technology options. Not only that, but I find that governments are increasingly interested in recording what I do. Hopefully, for now they will find nothing worth acting on in what they have found. Still, I find it all too easy to fall into fear in the face of the unknown. Who is reading this blog post? What will a government agency do with the information they find in my cell phone text messages?

In the face of this fear, I need to remind myself that God is sovereign. He is seeking his glory by giving grace toward undeserving humans through the death and resurrection of Jesus Christ. As I am a follower of Jesus, I am interested in trusting in him and finding out what the Bible has to say about security.

A Christian view of technology

Other writers have addressed a Christian view of technology. This past year I read (or rather listened to) Tim Challies’ book, The Next Story: Life and Faith after the Digital Explosion. The quantity of information available to us through digital means presents new challenges for those who wish to obey God. Some problems include a redefinition of truth and authority, the distraction brought on by technology, and communication becoming an idol in our lives. The information that technology allows us to so easily store and transmit is not neutral! Rather it has implications for how we live our lives.

God’s attributes

The attributes of God that seem most relevant to our discussion are the “omni” attributes, which come from a prefix meaning all.

  • God is omnipotent. That is, he is able to do all his holy will. This is also called God’s sovereignty.
  • God is omniscient. God fully knows himself and all actual and possible things.
  • God is omnipresent. God has no size or shape and is present in all places with his entire being.
  • God is eternal. God has always existed, having no beginning and no end, and experiencing no succession of moments.

Source: Tim Challies, Visual Theology – The Attributes of God

What is security and privacy?

My brief definition of security is that I want access to my data, and I don’t want others to. My data, or my information, includes files on my computer, digital information about my phone calls, information about my web browsing habits, books that I am interested in, and pictures of me at the beach. I want access to my data with little hassle, that is I don’t want to bother with too many USB drives or too many passwords and complex security measures. But when it comes to others accessing my data, I really only want those I trust to have access to specific things.

The government might want access to some information about me in order to keep me safer. For example, the police might know that my phone number is tied to my address in order to respond to a 911 call. My bank legally needs to know some contact information, because, after all, it is my money they are holding. I willingly provide this information to them when I open an account.

Privacy, secrecy, and confidentiality are related words that also apply to this situation. I’m using these terms loosely as synonyms for security as I’ve defined it above.

What is the role of government?

Let every person be subject to the governing authorities. For there is no authority except from God, and those that exist have been instituted by God.  Therefore whoever resists the authorities resists what God has appointed, and those who resist will incur judgment.  For rulers are not a terror to good conduct, but to bad. Would you have no fear of the one who is in authority? Then do what is good, and you will receive his approval,  for he is God’s servant for your good. But if you do wrong, be afraid, for he does not bear the sword in vain. For he is the servant of God, an avenger who carries out God’s wrath on the wrongdoer.  Therefore one must be in subjection, not only to avoid God’s wrath but also for the sake of conscience.
(Romans 13:1-5 ESV)

After laying out “the depth of the riches and wisdom and knowledge of God” (11:33) in his plan for salvation, Paul turns to moral exhortations. The Christians in Rome are to “be subject to the governing authorities” (verse 1). For them, that meant being subject to a government that was sometimes hostile toward them.

But in a broader sense, this passage from Romans describes a basic duty of government. Government should rule its subjects with justice. In the words of verse 3, government should punish those who do bad and not those who do good. In the Old Testament, God set up a special system of government over his people, the Israelites. He gave them laws and a system for enforcing those laws.

There several ways to connect this with a modern nation like the United States. First, we have a law, that murder is illegal. The system for enforcing that law in my city is the police department. If a dead body is found somewhere, there’s probably going to be a murder investigation. If the police can find out who did it, then this individual will be brought to justice. Law enforcement should be adept at fingerprints, footprints, and all kinds of crime scene evidence in order to catch criminals.

Digital technology creates more possibilities for crime and more ways for law enforcement to catch criminals. For example, the murderer could have revealed his plans in an online chat room a few days before the dead body was found. There are also online crimes, such as phishing and stealing people’s credit card information. Law enforcement should be adept at technology in order to catch these criminals as well.

A sidenote: Isn’t it interesting that we enforce a law against murder mainly by punishing people after they have already committed murder. This is because we can’t predict the future, and we are limited in our ability to prevent people from doing bad things. In Minority Report, the police had the ability to predict when and where and who would commit a murder, but this led to some interesting side effects. God, of course, is omniscient, and because he is eternal, he knows the future.

More to come…

In part 2 I’ll write some thoughts on passages of the Bible about spies, surveillance, and God’s power.