I don’t like you, Mr. Stack Overflow editor

Stack Overflow is awesome. It has a lot of answers to questions I have about specific programming problems I run into daily.

But Stack Overflow’s moderators are not awesome. A few words to describe them:

  • narcissistic
  • pedantic
  • nit-picking
  • holier-than-thou
  • egotistical
  • unhelpful

I’m pretty certain I can find that list somewhere in the Bible, somewhere where it says, “Yeah, see that list? Don’t be that guy.”

I don’t like you, Mr. Stack Overflow editor. (And I get the feeling that those feelings are mutual.)

For an example of the things that make me angry, please read this example:

Screen Shot 2014-09-12 at 2.41.02 PM

Granted, Mr. abamert isn’t a moderator, but this is just an example of the exact annoying behavior the moderators display. Maybe my answer didn’t explain things to his satisfaction, but I *did* answer the question correctly. Annoying.




Why does WP’s built-in thumbnail functionality suck so bad?

I’ll probably get flamed for this, but WordPress’ thumbnail functionality is the single largest pain point in trying to build a WP theme. It’s all well and good if you’re building a new theme from scratch, but if you’re coming in to build a new theme for pre-existing site? Heaven help you.

So this isn’t meant to be so much of a rage post, I seriously want to know why one of the most coveted carrots ever dangled in front of theme developers (WP’s thumbnail functionality) is such a PITA to work with and why is it so fickle? What’s the root cause, and what can I do to make it suck less bad?


Python batch file rename one liner

Batch file renaming is no fun, and I’m sick of Googling it every time I want to do it. For instance, if you wanted to replace underscores (_) with hyphens (-), what’s the least amount of thinking I need to do?

Also, is there an easy way to do it that is easily modifiable?

BOOM! Right here:

SpoCode Hackathon

spocode hackathon poster

I’m only just now getting around to writing about this, but I was one of the organizers of last week’s 24-hour SpoCode Hackathon. As the moderator, it was my duty to make sure that all of the participants were on task and staying awake. We drank massive quantities of Mountain Dew, watched the cougars at the bar across the street try to pick up one of our unsuspecting programmers, and had a great time.

Thanks again to our sponsors 10gen, Github, and OpenShift!

P.S. The Anonymous Rosy the Riveter is my design. Everyone loved it!

Misc. coding adventures

Here’s what I’ve been up to recently:

Moved all my websites off of Hostgator

I’ve used Hostgator for a long time now, circa 2005, and they’ve never done me wrong. Even when I worked at Adworkz, we hosted a bunch of stuff on them. Their service has always been top-notch, and I have very few complaints.

hostgator logo

However, most of my “professional” sites are hosted on one of my Linode VPS’s. My Linode is fast fast fast, due to my NGINX/PHP-FPM/microcaching setup. For the price, you can’t beat a Linode if you need a VPS. Anyway, my Hostgator account has been redundant for almost a year now, so it was time for it to go.

Github action

Perhaps just to prove that I actually do code things, I just put up three new Github repos. They might not be the greatest things ever created, but I’m proud of all of them, since I’ve had to learn quite a bit of stuff just to get them to work. I coded them from scratch, I did. They’re also part of my systematic approach to mastering Python and/or Devops.

Github Social Coding

In particular, the fabfile I put together was a major lifesaver when it came to moving all of the stuff off of my Hostgator account. Setting up the new databases, configuring NGINX, and installing WordPress was a cinch, thanks to Fabric.

If you’re of the programming persuasion, I’d love it if you took a peek at them and tell me what you think.

Adventures in MongoDB

I’ve started a new MongoDB Tumblr over at Tumblr. Does that even make sense? Whatevs.

Anyway, check it out: http://oplog.tumblr.com/

I’ll try to keep it updated with the latest MongoDB stuff as I learn it/discover it. I could just blog aboot it here, I suppose, but I like the idea of keeping that particular thing separate.

Also, check out the new Spokane MongoDB User Group that I’m a co-organizer of. If you’re interested in MongoDB and live in Spokane, join up!


HTML Build Command for Sublime Text 2

So, I love Sublime Text 2. It’s got all/most of the features of Textmate, with a better designed scripting and module system. Every config file is an easily read and modified JSON file, and the built in Python console is awesome. (I’m biased as a recently converted Pythonista, but it’s still pretty cool for people of other persuasions)

Previewing an HTML document isn’t built-in out of the box, like Textmate, and there are a few different packages available in the Sublime Package Control system, but I wanted the preview function mapped to the build system, ALA Python or Ruby.

When you code a Python script, you hit cmd-b and it runs the script right then and there and shows you the results in the built-in command console. You get so used to it, that you think “Hey, why doesn’t previewing an HTML file work this well?”

Well, here’s how to do it: In the menubar go to

Tools->Build System->New Build System...

Then copy and paste this code into the resulting file:

Save the file as html.sublime-build and you’re done!

In whatever html file you’re working on, hit cmd-b and it will open the file in your default browser.

Easy peasey.

Free MongoDB course from 10Gen

I’ve been taking the free M101 MongoDB for Developers class offered by 10Gen, and I gotta say, it’s awesome.

mongodb courses

There are a few things that I love about the M101 course:

10Gen goes through MongoDB step by step, without any assumption of prior knowledge (although, you’re hopefully proficient at using the terminal on your computer.) The lessons are clear and simple, with a short quiz after each lecture.

Python and the Bottle microframework were chosen as the app development platform for demonstrating MongoDB. I couldn’t ask for more than this, since I’m currently learning Python also, and I’ve been using Bottle for a few things like a Google App Engine API that I developed for him. This will round out my knowledge of these components without distracting from learning MongoDB.

JavaScript setInterval is a pain in my behind

I’ve been debugging some javascript code that uses the setInterval function to loop through some some code, and I was pulling my hair out. Apparently there is a bug in the ECMAScript (AKA, JavaScript) itself concerning that function, where it doesn’t keep track of the process like a normal variable/function declaration should, so if you lose the reference to each and every instance of it, WHOOF it’s gone and you’re busy debugging something that SHOULD WORK (but doesn’t).

So yes, if you have ever wondered the best way to use setInterval, the dude at Wall of Scribbles done figured it out for you:

setInterval(): the sneaky basterd child of JavaScript

The correct way to import feeds into WordPress using fetch_feed()

Feeds are a wonderful thing. I love my Google reader, because I can keep up to date with all the new web designery goodness available on teh intarwebs.

Feeds are also useful as content sources for people too lazy to write their own stuff. I know, I know, it sounds awful to say it that way, but that’s the reality of it all. If you had awesome content bursting out of your own ears, you’d never need to pull in someone elses finely wrought content.

Back to the point, this is how a trillion how-to tutorials on the web teach you to pull a feed into WordPress, server-side:
Continue reading