DaedTech

Stories about Software

By

Speeding Up DaedTech

As I get back into doing web development more and more these days, I’ve started to pay attention to some of the finer points, such as not having a sluggish site that turns off visitors. To that end, my Trello Board for this site had a card/story sitting in the “To Do” bucket for speeding up DaedTech’s load performance.

The first thing that I did was visit GTMetrix and run a baseline to see if subsequent things that I did would improve performance. From there, I installed W3 Total Cache which is a WordPress plugin that provides a whole bunch of functionality for speeding your site, mostly revolving around setting cache settings. After a bit of poking around and research, I figured out what was going on, and I enabled settings that helped with some low hanging fruit.

This included “minification” of CSS and javascript, a process whereby the whitespace is compressed out of these things as they’re sent from the server, thereby reducing the total amount of data sent (and thus time to process that data on the client side before displaying it). It also included optimizing the caching settings that the site suggests to returning visitors so that pages, styles, media, etc are stored locally on your machine as much as possible, which prevents reloads. This also setup the further use of GZip for further compression.

For improvement in the future, I installed a plugin called WP-Smush.it that will use the Yahoo utility for image compression to any file I add through the media library. This seems convenient enough that I should probably start adding files through the media library in general rather than simply putting them on the server and linking to them at their full local URL to get this functionality.

While I’m at making resolutions to improve speed going forward, here are some other tips that I’ve picked up today:

  1. Serve scaled content. Meaning don’t put up some huge image that the browser downloads only to use CSS or HTML in to tell the client to shrink it down. Send over the smallest possible image.
  2. Favor using my own images instead of embedding them from other sites. This lets me control the cache expiration suggested to the browser and the size as well. With hyperlinked images, I don’t have this control.
  3. Specify the image dimensions rather than simply accepting the default.
  4. Consider using image “spriting” to combine images such as the gaggle of social buttons into a single “image” to reduce the amount of stuff getting sent over the wire.
  5. Consider using a content delivery network to store your resources in places closer to site readers.
  6. Try to limit the number of things that make HTTP requests (like social media buttons)
  7. Use a utility to defer javascript execution so that it doesn’t block page load

I’m no web performance guru by any stretch. This is just what I pieced together in a morning after saying “I want my site to load faster”. I’m hoping that people in a similar situation to me will see this and realize that there is some pretty low hanging fruit to be picked here and that it isn’t terribly complicated to do so.

By

Feed Paper: Help Yourself To My Intellectual Property

The Pledge

When it comes to US intellectual property law, specifically patents as they pertain to software, I have a very scorched Earth philosophy. Don’t tweak it. Don’t reform it. Don’t debate over it. Don’t worry about it. Just delete it. Yes, to me, it’s like a nasty, tangled mass of bad code where it’s easier to get rid of it and address what breaks than it is to try to salvage it in its current form. I understand the need for patents on things such as medicines that have prohibitive startup investment cost, but when it comes to things like “gravity” effects on your cell phone, it’s just not worth having a system where established powerhouses can bury the little guy or blast away at each other and drive up costs, benefiting no one but lawyers. But, this post is not intended to spark a debate about ownership of ideas and intellectual property.

Instead, I’m putting my money where my mouth is. I’m going to give away what I think could be a pretty cool and viable idea. Why? Well, because I’m not exactly made of time, and I’d rather trade the small chance that I’d ever parlay this into a winning business idea for the slightly greater chance that someone might take it and run with it (or point me to it if it already exists). In other words, I want this thing enough that I just want someone to do it. Maybe one day I’d get around to it, but if you want to do it first, faster, and better, please be my guest.

The Turn

Every day in my feed reader, an entry from Alvin Ashcraft called “Dew Drop” appears. Here is one such entry. It’s a link collection that he dutifully fills out every day, organizing by category. In the linked entry, he has “Top Links” at, well, the top, followed by Web Development, XAML, etc, ending up eventually with a set of other link collections and a book. You know what this reminds me of? A newspaper. I mean, the “Top Links” is pretty obviously “Front Page”, and then you’ve got your .NET equivalent of Business, Metro, Sports, Politics, etc.

Morning Dew is a nice collection of links, as are some of the others also linked in there (I personally look at Jason Haley’s and the Morning Brew a lot). And, if those weren’t enough, I have my own collection of links. Pictured here, in alphabetical order, are the ones that fit on my screen:

As you can see, my screen just barely fits A through C. So, I have an alphabetized list of feeds that have some parenthetical number of unread articles, and some of those articles have links to even more articles, some of which I may already have in my reader, and others that I don’t. In some of these places, some of these things are summarized, and in others, I may just have to go go with the title or the author. I think we can do better, so I propose “FeedPapyr”. Feedpaper.com was taken, so I bought the domain feedpapyr.us (see what I did there?) for 6 bucks.

What I envision is pretty simple. At its core, the site is just a feed reader. But, instead of having laundry lists of feeds, you create newspapers. You categorize the feeds into custom defined sections and the reader handles truncating them to fit into a newspaper-style layout. If the posts have images with them, those are rendered as well. They are not formatted in full post form, but rather somewhat like the view on the right in my google reader screenshot, but like a newspaper. And, when you click on an article, it “pops out” with a focused, higher z-index feel window as you read it, and retreats back when you’re done with it (there’s no need to preserve the whole “continued on page 22″ thing with the actual paper). Users can “thumb through” the paper, starting with their “Top Links” and delving into other sections if they have time. They can add to the size of their papers over the course of time, promote and demote things, and swap in and out content creators. I feel that this format would lend itself particularly well to consumption of tablet or ultra book devices.

A user can create an arbitrary number of papers, just as in real life one might subscribe to multiple newspapers. I personally would love this. I’d definitely have at least one programming paper, but probably also one about Chicago sports, one about science/technology, etc. It could have ads just like normal papers to finance it, and offer a “subscribe to avoid the ads” model as well (but financing is a little far afield right now). It would basically be a newspaper that was auto-formatted for the reader with custom content that was specifically chosen and subscribed to by the reader on a case by case basis.

The Prestige

It’s not normally my style to go buying up domain names on a whim, but feedpapyr.us is now in my possession. If this idea is something that interests you, please get in touch with me. I’m happy to brainstorm and collaborate but if you think it’s something you’d really like to run with, I’m perfectly happy to let you have the domain name (of course, maybe you don’t like that name and would rather have your own anyway). If this is all a moot point because something like this already exists and I’m just a clueless idiot, please, please point me at it because I would love it. At the end of the day, I’d like to see this get done and I don’t have a lot of time. Sooner or later, I’m going to build myself a “feedpapyr” because I just want one. But, if someone builds one first that I can use, so much the better.

By

404 Redirect to Main Page

I was looking around for ideas about what to do for 404 redirect for the site. My personal favorite is the “You 404’d it–gnarly, dude” message, but copying that seemed in poor taste for some reason. As I was looking, I stumbled across a solution that didn’t occur to me. It’s simple, elegant, and easy to put into place.

In http://forums.digitalpoint.com/showthread.php?t=1053249, if you scroll down to a response by ilook, you’ll see the following code:

I’m not sure if ilook is Christopher Carey or not, but kudos to both if they are not one and the same. This is a solution to a problem that I wasn’t aware of. I personally think redirecting to home is a more elegant solution than a 404 page in and of itself, even if you provide a nice message and search on that page.

If you’re wondering where to stick that PHP in a word press site, it goes in your active theme’s folder in the 404.php page. You can edit this through SSH or, if you don’t have access, through the word press control panel’s theme edit section (clicking the 404 page editor on the link at the right).

Cheers!

By

A New Breed of Spam

I haven’t had much opportunity to post lately, as I’ve been spending my free time working on some graphic design stuff for the site at large. Graphic design is not my forte, so playing with pixels and crop and MS Paint takes up more of my time than I would like. But I thought I’d throw this one out there as a quick reference for anyone in the blogosphere that might be interested.

The amount of SPAM that hits my blog kind of ebbs and flows, and I’d been in a merciful ebb until about a week ago. As a matter of principle, I prefer not to queue comments for approval or place any kind of restrictions that would keep people from posting. I don’t use captchas or Akismet or anything like that.

Generally, SPAM is fairly easy to recognize. In its most rudimentary form it includes a link or series of links and nothing besides. Sometimes it includes garbage characters and links and other times, it’s complimentary posts that include links. I take these on a case by case basis, deleting them when there’s some obvious agenda or leaving them if they seem like strange comments but include no links or anything of that nature.

Recently, however, a series of posts have started to come in that follow a distinct pattern. They’ll include some insipid compliment not referring to the content at all, and contain exactly one misspelled word. So something like, “Wow, great contnet!” The other defining characteristic is that they all register a URL to a popular site–google, facebook, yahoo, etc. In essence, harmless as far as SPAM goes–no link to something unsavory, no obvious attempt to game search engines, etc.

I pondered this a bit as I’d delete them–they come in a lot at a time. And I think I get what the game is. I believe they’re sending out feelers to test whether or not a blog has some kind of automated SPAM blocking so that they can target blogs that won’t get their IP addresses black-listed on anti-SPAM rolls of sites like Akismet. The misspelled words make it a lot easier for some automated web crawling utility to go find the spammer’s handiwork, and the harmless links tell them whether or not the blog in question will even allow them to ply their trade. Basically, the spammer or spammers try to create something that is borderline enough to trigger SPAM protection if it’s there, but not so blatant as to be classified as a real threat.

These things tend to come in volleys. I spent a few days deleting such comments every 10 minutes, and that got tiresome enough that I installed the Defensio plugin, which seems great so far. It’s free and very configurable, and it allows you to review all blocked and non-blocked comments to give it feedback. So far, it’s blocked something like 50 messages with 0 false positives and only 1 false negative. I didn’t really want to go this route, but the manual labor was getting tiresome and at least I can tell this tool if it got things wrong, so the worst case scenario is that someone’s comment is held for moderation temporarily (and my apologies if that happens to anyone).

It’s sad that we have to worry about these things, but c’est la vie, I suppose.

Acknowledgements | Contact | About | Social Media