WordPress: Hacking Navigation to stay in category

Out of the box, WordPress post navigation goes to the last post that you’ve written. This makes sense for a basic blog, but I, like many, use categories and other techniques to separate my blog into different threads of thought. If you’re looking at technical stuff and then back into something “off topic” it’s confusing at best, off-putting at worst. Maybe you just want to figure out how to make something work and aren’t really interested in my thoughts about sports or politics.

This seems to come up often enough that some sort of navigation tweaking would already be built into WordPress. It is, sort of, but it requires going into the code a little. There are plenty of discussions telling you what to tweak, but I wanted to write this to explain a little of my own journey for this, where I got confused, and how I worked it out. I think it may be helpful to WordPress  and PHP newbies who feel thrown to the wolves when they need to hack something. Ultimately, when I was done, it was all pretty obvious. My goal is to save you a little time and frustration and help you to have a more solid and effective strategy in little tweaks that you need to do.

I will cover:

Initial research and confusion

Basically, I wanted to have a set of posts, grouped by category. I wanted navigation to only show you what was in that category. I knew I had done this before and it was a simple fix, but the template I was using, Twentyfourteen (for reasons… Don’t judge), handled the design a little differently.

The basic change is pretty straight forward. In the templates that display a post there are navigation functions that kick in under the content to show links for the next and previous posts. These functions are documented by WordPress on their site. Here’s the information about next_post_link(), with pointers to the related function previous_post_link(). I’ll admit, that looking at this documentation did not clarify it all for me. So, I did a little digging.

The most popular answer was this simple tweak, which I found repeated in a number of places, with varying degrees of snarky comments. It’s a pretty easy fix. Find the section for the navigation and add “TRUE” at the end of the function call. This will cause the navigation to stay within the same taxonomy, which defaults to category. (Later I may tinker with changing this taxonomy, but that wasn’t necessary right now.)

So, we change this:

previous_post_link('« %link', '%title');
next_post_link('%link »', '%title');

to this:

previous_post_link('« %link', '%title' TRUE);
next_post_link('%link »', '%title' TRUE);

The location of this navigation code typically lies in the template for showing the post. In the past, I edited a file called single.php. The problem was, that when I went into that file, I didn’t see any references to the post_link functions. I saw this:

<?php
/**
* The Template for displaying all single posts
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/

get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
// Start the Loop.
while ( have_posts() ) :
the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
// Previous/next post navigation.
twentyfourteen_post_nav();

// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
endwhile;
?>
</div><!-- #content -->
</div><!-- #primary -->
<?php
get_sidebar( 'content' );
get_sidebar();
get_footer();

I find a clearly marked navigation section, which points to twentyfourteen_post_nav(). A little digging turns this function up in another file under the twentyfourteen template structure called inc/template-tags.php.

function twentyfourteen_post_nav() {
// Don't print empty markup if there's nowhere to navigate.
$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
if ( ! $next && ! $previous ) {
return;
}
?>
<nav class="navigation post-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
<div class="nav-links">
<?php
if ( is_attachment() ) :
previous_post_link( '%link', __( '<span class="meta-nav">Published In</span>%title', 'twentyfourteen' ) );
else :
previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) );
next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) );
endif;
?>
</div><!-- .nav-links -->
</nav><!-- .navigation -->
<?php
}

And, here are my next_post_link() and previous_post_link() calls! Success! Or is it? I need to think about this a little.

Creating a child theme, and why I did it that way

I was going to make the edits to the file in the twentyfourteen template directly; but if I did that I would have to keep up with it. I would have to re-hack this every time that an update occurred.  A child theme is really the right approach. That way, as long as that code remains reasonably intact, my fix will still work. If it changes somewhere, then I have to revisit my solution, but likely it will be a permanent fix. I like that. So, I create a child theme.

The WordPress documentation on child themes is pretty clear. I do the following steps.

  • I create a twentyfourteen-child directory
  • I add a style.css and a functions.php file into this directory with the basic templates
  • I tweak style.css to include the previous theme and have the right names and information.
  • I add my hacked function into functions.php

The documentation tells you to create a new directory in the same directory where your theme resides. The convention is to put “-child” after the theme name, but you can actually call it anything that you want. In this case, I just followed the convention and called it twentyfourteen-child.

Inside this directory, I created two files. The first is the style.css, which contains the general logic to connect your child theme with the parent theme. The documentation included a template which looks like this:

/*
Theme Name: Twenty Fifteen Child Theme
URI: http://example.com/twenty-fifteen-child/
Description: Twenty Fifteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfifteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fifteen-child
*/

This preamble is included at the top of the style.css file in the twentyfourteen directory, followed by a lot of style definitions. To begin, we really only need the preamble. If we make changes to styles, they will go here, and everything here will override the previous definitions. I’m only doing function code, so my style.css  looks like this (my edits are emphasized):

/*
Theme Name: Twenty Fourteen Child
Theme URI: http://mythmade.com/twenty-fourteen-child/
Description: Twenty Fourteen Child
Theme Author: Chris Walden
Author URI: http://mythmade.com
Template: twentyfourteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
Text Domain: twentyfourteen-child
*/

That’s really it for the style.css. We’re just putting the right information in so that WordPress can find what it needs. Not doing this causes WordPress to not find your child theme. If you can’t see it in the themes listing to activate, double-check that you have included everything in this file. Now we create the functions.php. Again, the documentation has some standard templating here. 

<?php
function my_theme_enqueue_styles() {
$parent_style = 'parent-style'; // This points to the parent style

wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );

?>

Really not much to do there. At this point, I should be able to activate the theme and it will be identical to the original twentyfourteen style because it’s just calling all the original code. So far so good!

Finding the right things to hack in the right ways

So, now that I have a child theme, I simply replace elements with something that does what I want. My replacement will override the original theme elements. If twentyfourteen ever receives an update, my changes should continue to work. I just need to decide what to hack. I have a few options.

  1. I change the single.php template. It currently does a call to  twentyfourteen_post_nav(), but I could replace that call with my own navigation routine.
  2. I copy the inc/template-tags.php and make my changes in there. I could delete all but the relevant part.
  3. I copy the  twentyfourteen_post_nav() function into my child functions.php and change it there.

I decide to go with number 3. My change is small. If I keep as much as I can in the functions.php with useful comments it will be easy to find what I’ve done and adjust it later if necessary. I don’t have to follow the original file hierarchy for my override to work. However, any of those methods would have been reasonable and valid. It was a matter of personal choice and technique. Whatever choice you make, be sure to include useful comments and documentation about what you did and why. You may have to look back at your code literally years later and have to remember where your head was today.

The original file had an if() statement to check the existence of the twentyfourteen_post_nav() function. I don’t see that this is important, so I just copy the functional code as-is. You can see that code block earlier in this article.

Getting everything to work, and overcoming my final confusion

Now it should be pretty straight-forward. I just need to add “TRUE” to the end of the function calls to next_post_link() and previous_post_link(). Easy! I got a little confused here, though. What confused me is an easy mistake for people who don’t do PHP every day, so I wanted to go over it. Here is my new version of the code with the changes emphasized. You’ll probably need to scroll the code to the right to see the changes. Again, my changes are emphasized.

<?php
function my_theme_enqueue_styles() {
$parent_style = 'twentyfourteen-style'; // This is 'twentyfourteen-style' for the Twenty Fourteen theme.

wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
/* Replacement twentyfourteen_post_nav() * Causes navigation to move within current category * Added TRUE to end of next_post_link() and previous_post_link() calls * cMw 11/5/2018 */ function twentyfourteen_post_nav() {
// Don't print empty markup if there's nowhere to navigate.
$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );

if ( ! $next && ! $previous ) {
return;
}
?>
<nav class="navigation post-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
<div class="nav-links">
<?php
if ( is_attachment() ) :
previous_post_link( '%link', __( '<span class="meta-nav">Published In</span>%title', 'twentyfourteen' ), TRUE );
else :
previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ), TRUE );
next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ), TRUE );
endif;
?>
</div><!-- .nav-links -->
</nav><!-- .navigation -->
<?php
}
?>

What confused me was the placement of the TRUE statement. The solutions I found showed that you placed TRUE at the end, before the closing parenthesis of the function.

next_post_link( '%link', %title, TRUE );

That’s straightforward. However, in this usage the %title parameter is actually replaced by a call to the __() function. This provides a translation of the text so that people who have their browsers set for different languages will automatically see something useful. That’s a good idea. But it meant that I needed to place my statement on the back side of that function call, before the last parenthesis. 

next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ), TRUE );

It’s obvious when you see it and think about it, but it can be easy to get lost in the sea of nested parentheses and brackets. I wasted a little time before I’d figured out what I was doing wrong. Maybe this will help save you time. This is a common usage in WordPress design, so just look carefully at the code and notice when function calls are used as a parameter. It’s like diagramming a sentence. You may have to visually break it down for yourself.

Conclusion

Everything works! My posts navigate within the category, just as I wish. I can easily make adjustments to anything on my theme’s functionality without disrupting the original theme. Updates will likely have no affect on what I’m doing.

I hope this saves someone a little trouble, and that you can see how I explored the code and documentation to decide the best approach for my needs. If something is unclear, let me know and I’ll try to address it. Happy WordPress hacking!

Net Neutrality a thing?

For a while you may have been hearing the phrase “net neutrality” being bounced around. It’s an odd concept, but an important one. If you already understand the concepts, then you can skip a bit. Otherwise you might like a little explanation.

Arial photo of a complext network of highway intersections
The Tom Moreland Interchange in DeKalb County, Georgia, a four level stack with frontage roads

If we think of the Internet as a roadway, there is not really any such thing as a public highway system. All roads are privately owned and people pay tolls to drive on them. The infrastructure is such that they are all interconnected and there are agreements in place that let you access the various roadways once you’ve paid your toll… but none of it is really free.

Right now, you basically pay and can go anywhere you want. You can stream video, read documents, conduct business transactions. Outside of certain legalities, there are not restrictions on how you get to use your roadway. You pay your fee, you access the road. You go about your business.

However, the infrastructure owners are starting to notice trends. Consumers are doing a lot on the Internet. Traffic is getting congested. Infrastructure is getting clogged. Important commercial customers are potentially getting bogged down by Sunday drivers. It’s all moving in directions that were not anticipated. It’s becoming difficult to keep up with demands.

Building infrastructure is expensive. It eats into the bottom line. However, technology provides some other answers. Prioritize the traffic on your road based on who they are and what they pay. Traffic can be analyzed and people who are “lower class” customers can be put in the slow lane while the higher paying people are given a police escort.

On the face of it, there are some reasonable arguments, but the devil is always in the details. Who gets to decide who has the most important reason to be on the road? Is it the person streaming a live concert that is making millions of dollars in revenue or the doctor who is doing informal teaching to colleagues about a procedure he is developing? Is it the sanctioned, sponsored news, or the independent reporter?

Vehicle being searched by security forces

Would you tolerate having to file a travel plan when you went somewhere and have your car searched to verify your truthfulness…then to have your travel restricted in various ways because of who you were and what you wanted to do?

There’s lots more on the subject all over the place. Wikipedia is as good a place to start as any to start finding resources.


Skip to here

The analogies wear down a bit, but the upshot is that net neutrality is about ensuring that the Internet superhighway is equally available to everyone without picking favorites. I should be able to buy a connection and do with it what I will, without any content prioritization. (Prioritization essentially amounts to user profiling, by tracking and categorizing what you do, and censorship, by making information deemed “low value” harder to access.)

The FCC are the ones who govern the communications enforcement in the networking space. They have laws about the communications devices and how they are used. Yesterday, Tom Wheeler, the chairman of the FCC, wrote a an opinion post for WIRED where he addressed net neutrality. It’s a good read and shows signs that his organization will address some of these issues. I see it as a good sign.

It is true that wealthy individuals and corporations will always have the biggest, fastest roadways on the Internet. They can just go buy it. (We could too if we pooled community resources together, but that’s a whole other issue.) The important thing is that everyone gets what they pay for and that the infrastructure doesn’t begin playing favorites with the information. I’m curious to see what happens next.

Ubuntu, coming to a drone near you

I just read David Meyer’s article, “Robots embrace Ubuntu as it invades the internet of things” on gigaom.com. It describes Canonical’s continued progress in the device space.

I’ve used Ubuntu as my desktop system for many years now, and I genuinely like it as an environment. I don’t use their Unity interface, but my daughter does. (My wife uses classic GNOME and I use a Cairo-GNOME hybrid.

Of course, drones, phones, fridges and other “black box” sorts of devices don’t use desktops. They deal with the underlying core of operations where it gets pretty ugly. That’s where I like Ubuntu as a base. One of my favorite aspects of Ubuntu, and why I tend to install it first for friends and family, is it’s usage of Debian package system. This package system is pretty resilient and does a great job of pulling together requirements for you. I install something and the system automatically says “Hey! You need all this other stuff to make that run. Do you want to install that too?” It also does a good job of cleaning up after itself, removing things that are no longer needed.

Ubuntu enhances this by having a good, reliable set of repositories, including commercial partners. They make it easy to turn off anything that is intellectually encumbered if your goal is to have a more open system. They also make it easy to add new repositories so you can keep up with your favorite packages that have not been included in their official list. It’s automation has been good. When I set up a system for a non-techie person and tell it to keep itself up to date, it generally does a good job of it on its own.

Now, I know that these kinds of things are all human conveniences, and that the needs of a drone or other device will be different. But just like Alamo Drafthouse has tapped into what I enjoy about seeing movies, Canonical has tapped into what I enjoy most about using my computer. I’m confident that this understanding will translate well into other areas and that having devices, desktops and servers that share that base will create some good benefits. I wish them well.

All that said, Linux is Linux. Any devices running it, no matter what flavor, is a good thing.

An it harm none, code as thou wilt

The other day I had a little problem to solve. It was not a complex problem. I wanted to generate a set of coupon codes to hand out for something. I wanted them to be in an alphanumeric format like A3YH-UB4S. I often do things like that in a LibreOffice spreadsheet, because I’m sort of lazy that way. I tinkered for a while at getting the randomness to work the way I wanted and to generate the numbers and letters the way I wanted, then realized I was going to have to write some sort of macro code to make it do what I wanted. At that point I decided that if I was going to write code, rather than write it in the spreadsheet tool I would do something external that could generate my list. I decided to use Python. I’ve been interested in doing something with Python for some time, mostly because there seems to be a lot of integration for it in tools like GIMP and Blender. The logic involved was not really rocket surgery. I did some searches to find out how to do the basic loops and output and soon had a trivial little program that did the job.

#makecodes.py
import random
import sys

for x in range(0,100):
    for y in range(0,9):
        z=random.randint(0,35)
        if z<10:
            z+=48
        else:
            z+=55
        
        if y<>4:
            sys.stdout.write(chr(z))
        else:
            sys.stdout.write("-")
    sys.stdout.write("\n")

If I work with this often there are a number of things I’ll probably do with it. For example, there is not real uniqueness check that is happening. It’s possible to generate duplicate codes. Ideally I should track each code generated and make sure there are no repeated values. I could also have a way to change the number of entries generated, and their format. However, for the time and task I had, this worked fine. I piped the output to a text file, pulled that into my LibreOffice base and generated the coupons.

Feeling proud, like the Brave Little Tailor, I made a social post about my first Python program. Of course, I immediately received feedback from some of my technical friends. Some praised my choice of Python. Others questioned it and suggested languages and approaches that would have been  a better accomplishment. However, my job was done. This was not something I plan to release (though I guess I just did by posting it here). It was a way to quickly solve a problem and let me see what coding Python was like.

There are many situations where we want to use technology to get something done. Sometimes these are critical circumstances that have far-reaching impact. In those cases it is very important that we understand the moving parts and how our actions and choices impact the rest of the environment (especially as we are more cloud-facing). However, there are also many situations where something just needs to be done and it’s fine to reach for the nearest technical duct tape for the job.

Depending on your role, it may be that your duct tape gets moved into production fairly often, so you should probably always consider that and not do things that are too weird. But technology is also about curiosity and finding new skills and ways to do things. If the duct tape will do, don’t sweat it. You solve your problem. You learn some things. The world continues to spin. Explore and experiment and be proud of your creations.

(I used Bluefish as my code editor. I’m becoming rather fond of it.)

Thinking about Linux

When people talk about computers they usually label themselves a Windows or Mac person. I’m a Linux guy. I’ve run Linux on my computers for about 15 years. My family runs Linux on their computers. No, we’re not a super-cyber-family who hacks all the time. My daughter is 12 and mostly interested in her music. My wife works with Girl Scout events and is not deep into technology. In that time we’ve not had a single virus infection on our computers and we’ve been able to get things done. Maybe Linux is a good answer for you too.

Screenshot of Chris's laptop. He's running Ubuntu Linux with the Cairo desktop, giving him a Mac-like feel for some functions.
Screenshot of Chris’s laptop. He’s running Ubuntu Linux with the Cairo desktop, giving him a Mac-like feel for some functions.

I’m going to spend a few posts talking about Linux and why I use it. A few of my friends, after seeing how I get things done have also decided to move to Linux. Ultimately, I’m not trying to convince you to make a change. My goal here is to help you understand that you have choices and help you decide if Linux might benefit you.

What is Linux?

Tux the penguin
“Tux” the penquin has long been a symbol for Linux. You’ll see a lot of variations whenever Linux is around.

Linux is an operating system, the core software that runs your computer when you first turn it on. The operating system is the layer between the programs that you run—word processors, music players, Internet browsers, etc.—and your hardware—disk drives, keyboards, pointing devices, monitors, etc. They’ve always been around in one form or another and many have passed into obscurity that you’ve never heard of.

photo of Linus Torvalds
The father of Linux, Linus Torvalds

For personal computers the most popular systems are Microsoft Windows and Apple Mac OS. You’re likely already familiar with them, so I won’t go into more detail. In 1992, a developer named Linus Torvalds began a personal project to develop a new operating system. He based it on a long-standing system called UNIX, which had been running for decades on complex back-office computers. UNIX was designed to multi-task, or perform many different functions at once. A personal version of this seemed ideal for the way that computer usage was going.

Fast forward to today and his variation, called Linux (See what he did there?) has become very successful. Much of the Internet runs on Linux machines. Your high-end televisions and many other Internet-connected devices use it as well. I even saw a bar-top video game that ran on Linux. (I found out because I was curious what a button did. It turns out that it rebooted the machine. Curiosity is going to get me into a lot of trouble some day.)

While it’s true that Linux can run on very big, complex computers, it also runs well on laptops and desktop machine. If you have an Android device you are already running something that is based on Linux.

Linux is open-source software. That means that the code behind Linux is available for anyone to see. It is licensed with the GNU Public License (GPL), which means that it is specifically intended to be freely available. You can get the source code, compile it and use it without any cost. Obviously you would need to be a little nerdy to do that (and I’m afraid I have). However, there are pre-built installations of Linux with guided installations that are as easy to set up as Windows.

These distributions are easy to download from the Internet. In many cases you can test drive them or run them off of a CD, DVD, or USB disk without having to install anything on your system.

What this means for you is that if you want to you can get Linux for free, install it on your system, and use it for free. Modern installations have a graphical interface and all kinds of software included, everything from office suites to media software.

Photo of Lego-style blocks
Because Linux is free it’s easy for people to get creative and remix it in different ways.

A really interesting site to browse and learn about different Linux distributions is DistroWatch. There you will see all of the different installations that people have designed. It’s actually a little overwhelming because people treat Linux like Legos® and are always building new stuff with it. However, don’t be nervous. In my next entry I’ll break things down into a few distributions that I think are most useful to start with.

 

Overcome with nostalgia

Today I ported a few more of my old developerWorks blogs onto this site. One of them had several videos about classic computer commercials. (By classic I mean that they might be from before you were born…which is not your fault. You’ll be classic some day too!) All the old YouTube videos were still intact. Take a look, it might make you smile.

For the curious, I’m also starting to get my AustinComputerWizard site running, to support my freelance consulting. It’s pretty bare bones right now. (The cobbler’s children have no shoes!) Look for it to get some legs here pretty soon. I’ll likely be providing some free tutorials and things through that site and leave this going as a general blog. There will be some level of cross-pollination, though. If you know people in the Austin area who could use a compassionate nerd to help them, please send them my way.  I can also do some projects remotely. It would be lovely if this could get off the ground and let me spend time helping people do cool stuff rather than wandering around in job-search land.

 

Open fun with Microsoft Surface Pro 3

Like many, I’ve been fast-forwarding past the Microsoft Surface commercials as I watch recorded episodes of The Walking Dead. (Though, I will admit that I had to use Google’s listening capabilities to find out what that music was… it’s I Am the Best, by 2NE1.) It looks cool and all, but it also comes with a Windows lifestyle. I don’t mind if you decide to use Windows, but I’d really rather not.

Then I saw this article:

CNN Discovers Promotional Surface Pros Make Fantastic iPad Stands

photo of iPads propped up against Surface Pro devices
Last night, CNN wasn’t just covering the mid-term elections. It was also pimping the Surface Pro 3, conspicuously placing a kickstand-ed unit in front of a bunch of its commentators. The catch? They were actually just being used as iPad stands.

This makes me laugh. It’s such a beautiful example of how people react to having technology pushed on them when they are trying to get something done. I wonder what sort of time was spent setting up the SPs and trying to orient staff on how to use them. Did they just pass them out or was there a concerted effort that was ultimately just ignored.

When I first saw the Surface Pro 3 I thought it looked interesting, but, as I mentioned before, I wasn’t interested in moving to Windows for the privilege. I wondered how long it would take to see Linux running there. The answer… it already does:

So… I would probably need some time to poke through the tweaks for the keyboard and bluetooth, but I have no doubt that those things would all fall into place at some point… possibly by magic as the updates embraced the nuances of the hardware.

I could totally get on board with this! I wonder if they have any leftovers from CNN I could use!

Hey! Space taxi!!!!

Saw the news that Boeing, SpaceX win contracts to build ‘space taxis’ for NASA. It’s been three years since the space shuttle Atlantis made it’s final flight and US space travel was dependent on Russian vehicles.

The race for a privately produced spacecraft has gone on in the background since before the shuttle was retired, sometimes obscurely, sometimes with bursts of interesting developments. I largely followed things on the surface, so knew that SpaceX was looking promising, but not really knowing the details. I imagine we’ll all know a lot more very soon.

This is the SpaceX Dragon commercial cargo craft in 2012 Will the passenger vehicles be similar? (Photo from WikiMedia.)

There are concerns about the privatization of space. The opportunities and scientific developments that come from space exploration are important to everyone and some are concerned that this marks a trend to limiting the benefits of space to the elite.  I’m not worried, though. I think this marks a new era in space and might lead us closer to the time when a trip into space is as common as an airplane trip to Florida. That’s some time away, obviously, but perhaps in our lifetime.

I’ll be watching developments with interest.

Do you make posting too hard?

The other day at a WordPress meetup the presenter was talking about content and how many businesses struggle with creating it. When I was managing editor for developerWorks I dealt with a lot of authors at different stages of comfort with writing. I found that many of them made things harder than they needed to be. Their writing was stilted and artificial, as though they were trying to impress a professor.

Writing a blog, or making little updates to you content shouldn’t be difficult. It should be natural. There are also dozens of little opportunities during the day where a question or an idea comes up that is worth sharing. It doesn’t have to be international news, just something that keeps people in touch with you. Think of the traditional journalistic questions: Who, what where, when, why, how. Speak to one or more of those about your activities and you’ll be off to the races.

Keep a little notepad or electronic document for one-liner ideas. I use Google Keep for some of this sort of thing, since I can can access it from my whatever. I jot down things that people comment on as interesting, links to news stories that might need some comment, cool things that I did that I might want to demonstrate.

Later, when I want to write but feel uninspired I can look through my little list and there’s always something to do.

If this is interesting to people let me know and I’ll write a little more detail about writing when you need to. Of course, if you want some personal help I’m happy to consult and help you generate a solid editorial plan!

Care and extermination of trolls

The other day I read the riotous article that George Takei posted about the Rainbow Cake discussion. If you haven’t read it, it’s worth your time.

That, and some personal situations—past, present and likely future—got me to thinking about the nature of trolling and our responsibilities. I have decided that trolls are not an endangered species and that we are fully within our rights to treat them as vermin. In other words, we not only shouldn’t feed them but we are fully within our rights to pull them out of a conversation and clean up the mess they left.

For those who are not fully buzzword compliant:

troll2
/trōl/
verb
verb: troll; 3rd person present: trolls; past tense: trolled; past participle: trolled; gerund or present participle: trolling
  1. informal
    make a deliberately offensive or provocative online posting with the aim of upsetting someone or eliciting an angry response from them.
    “if people are obviously trolling then I’ll delete your posts and do my best to ban you”

Some people troll deliberately because they think it’s fun to watch the dominoes fall. Some people are just fixated on certain things and can’t help transforming any conversation into a rant about it. (Think of the person you know that will turn your story about a flat tire this morning into a conversation about how George W. Bush or Barack Obama have destroyed the country.) In either case, what you have is a sort of crazy person who is changing your conversation to be all about them.

At a dinner table people can exert a sort of uncomfortable silence that will turn the tide of this sort of conversation…usually with a comment about the weather. In Internet conversation it just spirals out of control… like rats in your house. So… I’ve made some decisions about trolling and I thought I would share them with others who may be overwhelmed with good intentions and suffering needlessly for it. You may agree or disagree with my choices. It really doesn’t matter to me.

This is your conversation

If you are in a forum or something that has guidelines about participation you may have to allow these sorts of ravings. If this is your own blog, Facebook post or what have you you do not. Somewhere someone has created the idea that because it’s social media that you have to accept the equivalent of people screaming obscenities in your face. This is not true. If someone is taking a conversation about your cake recipe and turning it into some sort of childish, mud-slinging conversation about religion, or politics, or whatever, you don’t have to put up with it.

Now, there are situations where you might need to be open to honest critical discussion, and not all uncomfortable conversation is bad, but that’s up to you. It’s your party. It’s your living room. It’s your feed. If you don’t like stuff that’s in there you are completely within your rights to manage that stuff.

You get to clean house

All threads have delete buttons next to the comments. You own that thread. If someone is messing things up there is nothing wrong with deleting their comment. You are not stepping on their free speech rights. You are not oppressing them. You are maintaining control in your own house for the comfort and safety of your other guests. If someone became unstable during a party there would be nothing wrong with removing them. The same goes here. If people are uncomfortable with that idea they may become upset and never want to come to your house again. That’s fine.

If someone wants to unfriend you because you refuse to put up with their boorish intrusions into your conversations you should probably just accept that. Perhaps they aren’t really your friend after all.

Use the tools that you have

There are several methods at your disposal to deal with this sort of thing in Facebook. Other environments will have other tools.

A simple way to deal with problem comments are to simply delete them. If you want it’s probably nice to send them a note saying that you removed the comment because it was off-topic. However, if you think this will cause more trouble than it will solve you aren’t obligated to do so. In this second case you will probably also want to…

Exclude them from the conversation. Each individual post has privacy settings. If you select custom you can exclude individuals or entire groups from a particular conversation. I use this feature a lot to not bother people with aspects of my world or my thinking that might make them uncomfortable. I treat it the same way I treat inviting people to a party. Here is a breakdown of how I do it. Guidance for all of these can be found on the Basic Privacy Settings & Tools help page (https://www.facebook.com/help/325807937506242).
* I set the default for all of my posts to be for “friends.” This way things largely stay between me and people I have chosen to engage.
* I post some things publicly so that everyone has things to see. (Sharing George Takei posts or things I am promoting generally go public.)
* I marked some people as acquaintances. This is done in your friends editing. These are people who don’t know me so well and with whom I would probably not discuss a personal decision. It’s not an insult, it’s just a degree of closeness.
* I marked some people as family. These are the people who are closest to me.
* I created a lot of other groups appropriate for particular kinds of messages. I have things like film geeks, performance artist, no adult material, etc. This gives me more control over who gets certain messages. I don’t want to bother my less technical friends with messages about how I just figured out how to automate a server process with bash scripting. But I do want to share that with my technical friends. I don’t want to talk about bewbs with people who don’t prefer adult material. My politics group contains 2 people and I rarely use it, but when I do it’s for very serious discussion about the world with people I know I can trust with my concerns and questions.
* When I post anything that I might want to limit, I choose custom privacy and include and/or exclude certain people or groups from the message.
* I will restrict someone for a while before I unfriend them. Facebook has a special group called restricted. These people remain your friends, but they don’t see things that you post to friends. When someone is being particularly troubling, I will put them in this group to cool down a bit without the unfriending drama. They only see my public posts for a while. Later on, when I’m more sober about the situation I can switch them around.

Some may see these restrictions as lacking a certain maturity… but I see it as helping to manage your virtual conversations the same way that you would manage them in person.

You can change the privacy of a conversation after you have started it. If you do one for friends and decide you want it public, or you posted it to friends and decide you want to restrict it. You can’t stop people who have already seen it, but you can deal with the future.

A scenario

You have posted your recipe for a rainbow cake. Someone gets snarky. Delete their post so other people in the conversation don’t have to deal with that poison. If you think it continue to be an issue also change the privacy for that post to custom and exclude them. That post will simply become unavailable to them and the conversation will continue. People who didn’t see the unpleasantness will never know it existed. (Many won’t bother reading past that stuff to get back to the conversation.)

Stopping trouble before it starts

Another important privacy setting that I have activated is who sees how you participate in conversations. On the timeline and tagging settings (https://www.facebook.com/settings?tab=timeline) there is a setting:

How can I manage tags people add and tagging suggestions?
When you’re tagged in a post, who do you want to add to the audience if they aren’t already in it?

I set this to “only me.” This means that I don’t inadvertently invite people to a conversation where they weren’t already included. There are a few other settings that I also restrict to help with inadvertent sharing. If you’ve never gone through all of these, they are worth exploring.

Conclusion

You are under no obligation to engage with these people in this way, especially if it makes you anxious and uncomfortable. That’s not friendship. That’s not being social. Yes, try to be kind to people and try to work things out. Develop your conversation skills and a thicker skin… but it’s your house, your party, your feed. You control it as you wish.

If someone needs to eject you from their party for being an ass… try to be cool about it and do better next time.

Living and sharing the lifestyle of an open-source kinda guy.