Archive for April 16th, 2010

Today’s Business: 2010-04-16

Friday, April 16th, 2010

Today’s Activities

  • Shower.  DONE.
  • Cat duty.   DONE.
  • Do three loads of laundry.  DONE.

Log

07:00 AM: My weight did not change from yesterday.  It’s still 173.5 Lbs.    See   here   for a summary of the progress on this goal so far in 2010.

10:00 AM: Heading out   shopping.

01:40 PM: Just got back from   shopping.

02:15 PM: Finished all of yesterday’s laundry and did a load for Mom as well.

04:00 PM: [Customer D] came to pick up her computer.  We’re installing the remaining apps and making sure she knows how to access them all. 

05:00 PM: A windy thunderstorm passed through here and disabled the electricity.  Unable to continue her PC configuration at this location, we drove to her house.  But, her lights were off as well.  So, I connected the cables, and she said she’d test it out when the power returns.  At that, she drove me back down here.  Still, no lights. 

06:15 PM: I listed to the iPod while periodically walking throughout the house.  It occurred to turn off the main breaker (200 amp) where the power line enters the house, to protect our equipment and appliances from potential surges (that happen quite a bit) when electricity is restored.  Of course, this means that I’ll have to look out the window every so often, watching for electric lights in neighbors’ windows.  When these come on, and they’re burning steady, only then will I throw our main switch back on.  I’ve already lost several computer pieces due to these voltage and current spikes.  So I’m hopeful that this measure will keep the bulk of these problems out. 

07:00 PM: It’s getting quite dark inside.  So I’m rounding up sevral candles that Mom likes to burn now and then, lighting them, and placing them around the house. 

08:15 PM: The power is back on. But I’ll wait an hour or two before blowing out the candles; just in case it fails again. 

09:00 PM: Posted a letter to the   WPSBC Alumni Web Site   for Ellen Goldfon,  here

09:40 PM: Talked with [Emmy]   on the phone.  We listened to periods two and three of the Penguins hockey game.  The Pens won!

10:30 PM: Watched today’s episode of   The Young and the Restless   on the DVR.

02:25 AM: Worked the   Deleting Self Pingbacks   project.  These have been successfully removed from this blog.

03:05 AM: Improved linkage and categorized posts in this, the   Tom’s Diary   blog. 

03:07 AM: Way past my bedtime now.  So I’m heading there.  Enjoy what’s left of your night, and take care.

Tom

Received Mail and Shipments

  • Monthly sewage bill  ($40).

 

Related Posts

Deleting Self Pingbacks

Friday, April 16th, 2010

So, I’m talking to [Emmy] the other night, and she says that she doesn’t like so many of those “automated” comments on my posts, because they make it harder to find real comments (from other humans).

I looked into the matter and found that I had 1060 of these pingbacks, strewn throughout my collection of posts for this, the   Tom’s Diary   blog.  Upon examination, I discovered that all of those were pingbacks from this blog,   to   this blog; thus the term:  self pingback.

In short, a pingback is a special comment attached to a particular post, which is generated by WordPress whenever another blog (or another post in thisblog) links to the subject post.  Upon reviewing the WordPress documentation and goggling around for “independent” explanations of pingbacks, I determined that these self pingbacks probably aren’t that useful; especially since most of them referenced my daily revisions posts, which give little more information than the names of revised documents that day.  Therefore, I figure that I don’t need these, because when I write a post, I always add links to other relevant posts to it, and so, need not rely on any self pingbacks in the comments beneath to provide those links.

Subsequently, I deleted all self pingbacks from this blog.  This involved a couple steps; the first of which was to run an SQL script on the   wp_comments   table in the blog’s database.  That script was as follows:

DELETE FROM `wp_comments`WHERE  `comment_author` LIKE "%Diary%"

Note that you’d have to modify this statement for your particular blog’s name.  Since this blog is called   Tom’s Diary   and since I knew that nobody left any non self pingbacks with the string “Diary” in the author’s name, I surmised that this would be safe.  It deleted 1060 comment records.

Well, immediately after this, I thought I was done, but soon realized that the comment counts displayed beneath each post on the blog had become incorrect.  The self pingbacks had been deleted alright.  But the count of comments in the affected posts had not been decremented to reflect this.  I had assumed that the WordPress database would have triggers to automatically update the counts.  But It appears not to.

So I wrote a non destructive SQL script, to get a count of the post records whose comment count field did not match the actual number of comments associated with that post in the   wp_comments   table.

SELECT count( * ) FROM `wp_posts`
          WHERE `comment_count` <> (
          SELECT COUNT( * )
          FROM `wp_comments`
          WHERE `comment_post_ID` = `wp_posts`.`ID` )

I verified that I got what appeared to be a reasonable count of disagreeing records.

Next, I rewrote the above SQL that, instead of just displaying a a count,  actually update the counts in the offending records as follows;

UPDATE `wp_posts` SET `comment_count` =
          (SELECT COUNT( * )
          FROM `wp_comments`
          WHERE `comment_post_ID` = `wp_posts`.`ID` )

What this does is that, for each post, it counts the number of comments that list that post in their   comment_post_ID   field, and assigns that value to the comment_count field.

This seems to have done the trick, as the ten or fifteen posts I examined that had comments noe display the correct number below, and there appear to be no missing comments either.

Thanks for the tip,   [Emmy].

I’ll need to run the above SQL against the databases for my other blogs as well, and will note in the comments below when I finish that.

Of course, there’s still the problem of preventing the self pingbacks from being written to the database in the first place.  I read of some plugins for WordPress that may solve this problem.  So I’ll look into them at some point and install them.

Take care.

Tom Hesley

Related Posts

Diary Revisions: 2010-04-16

Friday, April 16th, 2010

Today, I either added or modified the following posts in  the   Tom’s Diary   blog for improved brevity, clarity, categorization, decreased spelling errors, appearance,  and search-ability:

  • Site Stats: 2010-04-16
  • Today’s Business: 2010-04-16
  • Today’s Diet: 2010-04-16
  • Today’s Business: 2010-04-15
  • Today’s Business: 2010-04-11
  • Classics For Pleasure
  • Diary Revisions: 2010-03-10
  • Pink’s PC Problems: 2010-03-10
  • Book: To Kill A Mockingbird
  • Today’s Diet: 2010-03-10
  • Today’s Business: 2010-03-09
  • Diary Revisions: 2010-03-09
  • Today’s Diet: 2010-03-09
  • Today’s Business: 2010-03-08
  • Diary Revisions: 2010-03-08
  • Mom’s Status: 2010-03-08
  • Today’s Diet: 2010-03-08
  • Today’s Business: 2010-03-07
  • Diary Revisions: 2010-03-07
  • Mom’s Status: 2010-03-07
  • Today’s Diet: 2010-03-07
  • Weekly Backups: 2010-03-07
  • Today’s Business: 2010-03-06
  • Diary Revisions: 2010-03-06
  • Today’s Diet: 2010-03-06
  • Today’s Business: 2010-03-05
  • Diary Revisions: 2010-03-05
  • Shopping Trip: 2010-03-05
  • Today’s Diet: 2010-03-05
  • Today’s Business: 2010-03-04
  • Diary Revisions: 2010-03-04
  • Today’s Diet: 2010-03-04
  • Today’s Business: 2010-03-03
  • Diary Revisions: 2010-03-03
  • Bandwidth Usage: 2010-02
  • Today’s Diet: 2010-03-03
  • Today’s Business: 2010-03-02
  • Diary Revisions: 2010-03-02
  • Book: Team Of Rivals
  • Today’s Diet: 2010-03-02
  • Today’s Business: 2010-03-01
  • Diary Revisions: 2010-03-01
  • Internet Shopping: 2010-03-01
  • Shopping Trip: 2010-03-01
  • Yahoo Site Submissions: 2010-03-01
  • Bing Site Submissions: 2010-03-01
  • Today’s Diet: 2010-03-01
  • Today’s Business: 2010-02-28
  • Diary Revisions: 2010-02-28
  • Sway
  • Today’s Diet: 2010-02-28
  • Today’s Business: 2010-02-27
  • Diary Revisions: 2010-02-27
  • Weekly Backups: 2010-02-27
  • Smart Calcium, The New Rave
  • Today’s Diet: 2010-02-27
  • Tom

    Shopping Trip: 2010-04-16

    Friday, April 16th, 2010

    11:30 AM: Went shopping at Wal Mart this morning and bought the following items:

    • Scrub sponges (2 packs)
    • Full-sized flat bed sheet (1)
    • Anchovies (3 cans)
    • Fish steaks (3 cans)
    • Diet caffeine-free Pepsi (4 liters)

    Total: $24.67

    Tom Hesley

    Related Posts

    Site Stats: 2010-04-16

    Friday, April 16th, 2010

    —–

    General Summary
    1. Host name prosaic-expressions.com
    2. Host URL http://www.prosaic-expressions.com
    3. Program start time Apr 16, 2010 10:30
    4. Time of first request Feb 1, 2010 00:01
    5. Time of last request Apr 16, 2010 00:00
    6. Time last 7 days lasts until Apr 16, 2010 10:30
    7. Successful server requests 521,058 Requests
    8. Successful requests in last 7 days 72,569 Requests
    9. Successful requests for pages 332,110 Requests for pages
    10. Successful requests for pages in last 7 days 50,136 Requests for pages
    11. Failed requests 6,760 Requests
    12. Failed requests in last 7 days 1,128 Requests
    13. Distinct files requested 34,631 Files
    14. Distinct files requested in last 7 days 13,572 Files
    15. Distinct hosts served 3,592 Hosts
    16. Distinct hosts served in last 7 days 911 Hosts
    17. Unwanted lines in the logfile 9,747 Lines
    18. Total data transferred 8.747 GB
    19. Total data transferred in last 7 days 1,022.980 MB

     

    Tom Hesley

    Related Posts

    Today’s Diet: 2010-04-16

    Friday, April 16th, 2010

    I keep this food diary to stay aware of just how many calories I’m eating daily, with the hope that it decreases the likelihood that I’ll overeat.    It seems to work, so here we go with another day…

    Today, I consumed the following items:

    • Herbal tea and diet caffeine-free Pepsi  throughout the day. 0 calories.
    • 08:30 AM: 1 cup oatmeal & Parmesan cheese.  600 calories.
    • 12:30 PM: Pecan chicken salad at TGI Friday’s.  1000 calories.
    • 12:40 PM: A quarter of Mom’s leftover chicken club sandwich.  300 calories.
    • 08:30 PM: 1 bowl of Cheerios, skim milk, blueberries, and raisins.  600 calories.

    Total calories: 2400.

    Tom

    Related Posts