And Then There Was One (Again)

Mary and I have been spending a great deal of time organizing and re-organizing our stuff: books, electronics, housewares, tools, and all sorts of stuff. Sitting down for a few moments, drinking a Diet Coke, and doing the same thing right here. My blogging has collapsed from three blogs into one. What used to be held in Social Disorganization and Geeky Stuff have been pushed into the confines of My Sediments Exactly.

There should be no 404′s occurring as usually happens in such an exercise. It was solved quite easily, courtesy of Apache and two RedirectMatch statements in the root .htaccess file.

RedirectMatch ^/(socdis|geek|feed|sediments)/(.*) /blogging/$2
RedirectMatch ^/(socdis|geek|feed|sediments) /blogging/

One downside is that it generates two access log records for each transaction: a record with a 302 status (Moved Temporarily) for the originally entered URL and a (hopefully always) 200 status for the page that is delivered to you. Courtesy of the XML site map I push to the search engines, Google et al should be corrected shortly. I will leave them in place indefinitely to take care of visitors’ old bookmarks

As a part of this housekeeping exercise, something else occurs: duplicate pages (see the disarray of the menu at the top of this web page). That I will work through as I get things back in place. For now, just bear with me.

Dabbling Dangerously

I have mentioned this so many times before and never gone past the concept, the thought of mucking in WordPress themes. At this very moment, I am trying to focus my head on so many issues that are so far away from the Internet and using this as a way to keep my fingers from tearing out my hair. Yes, the layout theme of this blog is changing (bear with the use of red to see what changes) and I am not sure what it will become other than just another tweak of Toolbox theme from WordPress.

At this point, this may be my last post, here or anywhere. It is definitely my last post feeling the way I do right now about life outside of this maze of links and pages and such that they call the Internet. I want for life to be living again and I won’t stop until it is.

So watch as the bits and bytes change and never make the mistake of ever thinking that bits and bytes are more important. Never. Ever. Ever.

Cleaning Up 404′s and Wayward Visitors

I look through my Apache logs on a frequent basis, both to see how things are working and to see who and what is accessing our web sites, in particular, bots. I encourage bots to read through the public areas since that is the way search engines find their content. You also want to insure that they are looking where your content is, not where it was or is not. Unfortunately, it is also the way that thieves, hackers, and spammers look to find way to steal, corrupt, or bloat your content. You want to smack their hands firmly and lock any possible open doors. For the most part, Apache, WordPress, and WordPress plugins, alone and in combination, take care of these kinds of issues. Some, though, you must add a few additional tricks.

I have been lax in cleaning up the remnants of former directory strategies for sections of my web site. I decide to move, divide, or remove a blog or section and forget to make new paths to same or similar content or just provide a way for the reader/bot to find where he/she/it should be going. If you do not take care of this, you find line after line of 404 errors: document not found. This results in an error page or a broken image being delivered instead of the intended content. In any case, you run the risk that the reader or bot will give up, leave, and never come back, again, something you do not want to happen.

The easiest solution is to put in a redirect to an error document. This is simply a single line in the .htaccess file in the root web server directory:

ErrorDocument 404 /your-404-error-page.html

The page you specify can be located anywhere on your web server. It can be a web page or a script. Personally, I use a web page with server-side includes so that I can invoke a notification routine. This script gives me information as to where the reader was coming from and where they were looking to go. This gives me data to investigate if it is a potential problem in my design, as well as notify an off-site server that is linking incorrectly what the correct link should be. Here is my 404 page. As you can see, it gives feedback to the visitor as well as giving them some options as where to go next. Note: WordPress has a built-in facility to handle 404′s and most themes include a 404 page template that you can modify to your liking.

There is a particular class of 404 that should be handled in a different way. Those are for missing RSS feeds from old or moved blogs. For these errors, you should either fix the feed service if you have registered your RSS feed (example: Google Feedburner) or tell the visitor or bot where it is now located.

For example, let’s say that you had a WordPress blog at your.domain/blog/. The feed would be located by default at your.domain/blog/feed/. Today, you physically moved that blog to your.domain/newblog/ with a corresponding feed at your.domain/newblog/feed/. Those that still refer to the old address will get 404 errors. It can be remedied by keeping the directories /blog/ and /blog/feed/ and populating each of them with a single php file, called index.php, that will contain:

/blog/index.php

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://your.domain/newblog/" );
?>

/blog/feed/index.php

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://your.domain/newblog/feed/" );
?>

When encountered, they will perform the necessary action: direct the visitor to the new location.

I will address the issue of spammers and image thieves in a future article, as well as give some alternatives to this method of redirection.

Weather Widget 2.0

[weather_widget]Mary and I have a common start page that comes up when we start Google Chrome. Driven with a perl script, it is a single page where we keep our common bookmarks, with clickable icons for the dozen or so places we go to frequently. The bookmarks are kept in a formatted text file (MySQL tables… someday) that we both can edit and add more bookmarks. I made a perl script that pulls down real-time weather data (via the WeatherBug API) from the closest weather station. The display includes current observations as well as a terse, 7-day forecast.

I have been experimenting with WordPress plugins that allow for the inclusion of php code via a shortcode. Code cannot be added with the WYSIWYG editor (it breaks it). I finally found a plugin that (1) consistently works and (2) makes it easy to maintain the code fragments from within the WordPress dashboard. That plugin is Shortcode Exec PHP. The reason I want to include php code? So I can use the php virtual function which is the equivalent of the server side include (SSI) virtual function. Why? So I can include scripts written in perl within my WordPress blogs.

First script I experimented with is what you see to the right, as well as in the right widget bar, my Weather Widget 2.0. It is a modification of the one on our start page. The automated and push the button refresh of the observations and forecast have been removed, and I have designed the look and feel of it to blend better with any theme that I use.

The next version of this widget will include localization. If the reader allows the script to know where they are, it will attempt to give the weather to where they are located. I already have this feature working for Mary and me. I just need to make the is it OK code to address privacy issues for my visitors.

Back to Back Calls and a Save

Tip of the HatFun day today… not exactly. We had two back-to-back road closure calls, totaling up to about three hours in the sub-freezing temperatures today. Both were during the evening rush hour so, of course, we had to deal with frustrated commuters as well as people picking up kids from after-school activities. It never ceases to amaze me how few people know any but their well beaten path to and from anywhere, even with GPS units! Simple detours are not possible in their minds, taking a few additional minutes is totally out of the question, and being courteous is a thing of the past.

Yes, I find random times to close a road for my personal edification. Trust me, if I did, it would be on a warm sunny day on a deserted country road and not on a busy road during rush hour after dark. Yes, we wear reflective clothing, set out road flares, and drive trucks with lots of lights and arrow boards. And, yes, sadly and dangerously, drivers ignore all of them.

Today, though, was no different than any other of the 700 or so emergency calls we respond to in an average year in a wide range of conditions, except in one way, One of my fellow fire police officers was unable to respond because he was between picking up his son and going out for the evening with his wife. Yes, we are volunteers and we do have lives outside the fire service. I did respond to the call and had forgotten a creature comfort in my haste. When he called my cell phone to say he wouldn’t be responding, I mentioned what I had forgotten. Instead of saying too bad, so sad, he picked them up for me and dropped them off where I was stationed on the highway. That’s what you call teamwork, one element that is not lacking with the people I proudly serve with at Station 6.

So, in honor of this nicety, I am adding a non-rant, non-grumbling, non mad as hell category called Tip of the Hat. And the first honoree of the TOTH is my fellow fire cop, Bill N. Thank you, thank you, thank you, 6-36!

Geez, Louise, the Theme

Yes, new day, new theme. A much better, simpler one, too. I like clean shiny lines which enable the reader to actually read the content presented.

And yes, I am working on getting the advertising leashed and under control. The ads are a necessity to add some gold to the coffers, but I find that this particular plugin to control them is somewhat like herding cats. Time to shepherd these felines once and for all.

Theme-ology Changes

Yes, changing the layout here and elsewhere, as well as working on the way the ads (yes, we need the support of the ads to keep us doing this) are interlaced. I want them to flow better and not to interfere with the main purpose of what this blog is all about: communicating ideas and information.

Temporary inconvenience, permanent improvement!

Gingrich Tops 2012 GOP Candidates Geek Guide

Yes, we do have to examine the GOP and every other viable third party candidate for the 2012 Presidential Elections. I found an interesting article this morning in Scientific American…

Gingrich Tops Scientific American ‘s Geek Guide to the 2012 GOP Candidates: Scientific American.

Interesting and scary, that is. It compares the current front-running republicans based upon what they have said and written concerning the influence of technology in their lives as well as their viewpoint on a variety of scientific and technological topics.

Interesting in that you believe even 1% of what comes out of the mouths which is in effect out of their political machines. Yes, Virginia, they all have media consultants and spin doctors and I am sure someone guiding their keystrokes on Twitter. Those influences could be the likes of hired guns like Karl Rove or even bedroom consultants like Nancy was to Ronnie Reagan.

Scary in that the radical fringe influences them in their ideology, whether it be the religious right or the corporate contributors.

In the article, one of the factors that they use to show the geekiness of the candidate is the number of followers they have on Twitter. Rolls eyes big time. Let’s see: Newt, in his Twitter life as @newtgingrich, has 1,386,121 followers. AmyJo Martin (@AmyJoMartin) has 1,252,898 followers. Who is AmyJo? In her own words, she…

travels the world to speak about the latest trends in social media, how to monetize various social platforms, and how to successfully build a personal brand by utilizing social media.

Obviously not a presidential candidate but just another social media promoter. My point? Twitter to politicians and promoters and to the vast majority of the top followed Twitter users is just another advertising venue, not a show of geekiness. Cross that off your list.

Reading further into the article, you see a lot of they seem, they appear, and they have in the past type of statements. They all went to first grade, too. The areticle makes no mention of the candidates’ support or denial of Occupy Wall Street. It does give a lot of fluff about whether they read  the Lord of the Rings, the Foundation Trilogy, and Battleship Earth. so, we are trying to influence voters on what fiction they have read and espouse to be like in a non-fictional world? Cross that off your list, too.

Oh and write about how they want to import all the good math, science, and technology students and have the support of the likes of Meg Whitman and Scott McNealy? Yes, let’s support more offshore investments to gain more tax credits for developing and manufacturing bleeding edge technology outside the US. Let’s bring in all those bright kids from developing nations while relegating our own native talent to working at Walmart if working at all. With Murdoch’s support of Rick Santorum (shown off to the world by Twitter, of course), let us allow another criminal from the same country that we fought for and won independence from influence our country.

Whatever happened to the voters researching the issues and demanding that their elected officials support the needs of the populace rather than the desires of the few? That is what is going on with Occupy. They are showing that they are mad as hell and not going to take it anymore. Sort of like dumping tea into Boston harbor rather than pressing keys on a Blackberry.