The power of SQL–WP edition

lightning photoI’ve noticed a lot of comment spam lately, and had been dealing with it piecemeal. I have all comments moderated, so it wasn’t affecting the user experience, but I was getting email reminders to moderate lots of comments that were not English and/or advertising something.

WordPress lets you turn off comments for a post, but it is tedious through the GUI. So, I dove into the wordpress database, and ran this SQL query:

update wp_posts set comment_status = 'closed' where post_date < '2014-01-01';

This sets comments to closed for all posts from 2013 or earlier (over 1000 posts).  The power of the command line is the ability to repeat yourself effortlessly.  (The drawback of the command line is its obscurity.)

I should probably write a cron job to do that every year, as posts older than two years old aren’t commented on much. To be honest, the comments section of ‘Dan Moore!’ isn’t used much at all–I know some blogs (AVC) have vibrant comments areas, but I never tried to foster a community.


RSS Pick: Dion Almaer

dion almaer photo

Photo by marcosfernandez

I think that the RSS reader is such a fantastic invention. It lets me monitor many bloggers and news sites, and see new content.  This lets you have an eye on lots of writers, including some that haven’t written for a long time.  I’m going to be highlighting blogs that I follow, one per month.

The first is Dion Almaer’s, who, unfortunately, has moved most of his writing to Medium.  But Dion is a great technologist.  He currently is employed at WalmartLabs Mobile.  He’s written such gems as:

Your coding voice:

When people ask me about Java and why I don’t often write applications in it, my answer is not that I think “Java sucks”. I think the JVM is amazing technology, and there are a ton of fantastic APIs. Using Java is a great answer for many situations. However, the least amount of fun that I have had programming has been when using the Java language. It isn’t just that it feels frustratingly verbose, although that is part of it.

and Browsers are Finally Catching Up (in 2009):

But, the browsers are finally changing. The new crop come with technologies that show that the browser vendors are thinking about building a platform for desktop quality applications. The Chrome comic book was full of this.

Remember the Chrome Comic Book?

Dion, thanks for sharing your knowledge, please resurrect your blog!  (Dion, I know this is an old photo–feel free to send me a new one and I’ll update this post.)


Throttling Back My Writing Schedule

For a while, I have been writing a post a day.  Then I took a vacation, and cut back to 2-3 times a week in order to spend more time with the family.  I actually like the 2-3 times a week schedule because it lets me take time that I was previously using to write and spend that investigating new technology and tools.  Or to write meatier posts.

So, I think that will be the new normal.

Just wanted to let you know.

PS If you don’t want to check back periodically, you can subscribe to my blog.



WP-Inject Rocks

inject photo

Photo by MattysFlicks

Inspired by Drew Meyers over at the Geek Estate Blog, I’ve made an effort to start putting images into my blog posts. I manually searched Flickr for commercially licenseable images, upload them to my server and put them into my post. After I did this a couple of times, I thought–surely there’s a plugin for this. And if not, I should write one!

A quick search turned up WP-Inject. I installed it and never looked back. It takes care of searching Flickr (and another site that I’ve never heard of called Pixabay). It takes care of the attribution link. It uploads the file to my server. It puts the image into my blog post. Well worth the install if you want to add any images to your posts at all.

My only wish is that it handled captions a bit better, but this could be a config option I’m overlooking. And that’s a small flaw for such an awesome plugin!


10 years on

A decade ago, I wrote my first post about RSS, and how I wished someone would aggregate events via RSS. I’m still waiting for this 🙂

I had recently come back from a trip abroad, and was a young contract programmer living as cheaply as I could. One decade on, I am a married father with a house who is a full time employee. Things change, but I still blog.

A decade of blogging has taught me many things. How much I enjoy teaching, how widely the Internet lets you reach, how much people care about Yahoo Mail and dating software, how powerful Google is. But most of all, how writing about something helps you truly understand it.

I’ve been hot and cold on blogging–sometimes posting every couple of days and interacting with the commenters, sometimes ignoring my blog and treating it is a write only medium. Either way, the corpus of 600+ posts (more than one post a week) and the thousands of visits per month the blog gets, are gratifying.

I look back on proudly on all my blog posts. And I can’t tell you how fun it is to hear from someone that I’ve helped them, or to run across a post of mine when I’m doing a google search, or to see from where people have linked to my articles.

Here’s to another decade.


Switching wordpress themes…

After many moons (almost 7 years), I switched up my theme to a more modern (thought still stark) one.

Why?

  • The older theme was borked in a couple of ways that I couldn’t be bothered to investigate.
  • I wanted something that was more responsive and a better experience for mobile users (only 6% of my traffic in 2013 is mobile, and I’m hoping to increase that).
  • Sometimes it’s just time for a change.

So, I hope you enjoy the new theme.  Same dorky content, new dorky look!


Nine years of blogging

Wow, it is hard to believe it has been nine years since my first post.  This is the 660th post!

When I started my blog, I was just back from a sabbatical in Australia, living in a rented basement.  Now I’m a family man with a house.  When I started, I was a contractor, happy to get $40/hr to do development, tracking time and invoicing using MS word docs.  Now I use google docs for almost everything, am an employee, and manage a department.

The benefits of blogging keep me going.  I encourage everyone I meet to start a blog, because I think the act of writing forces you to crystallize your thoughts.  It has certainly crystallized mine.  I also enjoy the historical record, much like a public journal, and the projects I can look back on.  Plus, it is fun to occasionally hear someone say ‘I ran across a post you wrote’.

My blog has been much more about broadcast than conversation.  I think that’s because it varies in content, and in quality, and in timeliness.  The couple of posts that have blown up were due to them turning into forums on a controversial topic (Yahoo Mail problems, Skadate review).  But I’m OK with that.

I wish I had twice the time to write, but am happy that I’ve had the time I’ve had.

Thanks for reading!



Why I’m using a RSS reader (again)

Many moons ago, I moved from a personal handwritten RSS reader to Bloglines.  Then, a few years ago, I stopped using Bloglines (before they were bought).  I had too many feeds on Bloglines and was spending less time on the computer after work.  I also had some big personal happenings taking a lot of time, and was burnt out on learning new technologies.

So, for a couple of years, I read blogs occasionally, but didn’t subscribe to them in a reader.  The ones that really spoke to me were either visited regularly (by memory) or subscribed to via email (and often unsubscribed quickly).

But recently, I have been consuming a lot more content.  I think there are a number of reasons for this, but the biggest is that the household has an iPad. The iPad is crappy for creating content, but is fantastic for consuming it.  I also enjoy the ability to email articles with the tap of the finger.

Last week, I found myself visiting the same seven or eight sites over and over again, to see if there was anything new posted.  After the third go-around, I mentally kicked myself and said, ‘that’s what an RSS reader is for!’.

By happenstance, I saw an article on HackerNews about the NewsBlur founder around the same time, and decided to check NewsBlur out.  I actually appreciate the limited number of blogs available on the free version of NewsBlur–I hope that will help me avoid the blog overflow that occured last time.



© Moore Consulting, 2003-2017 +