Skip to content Skip to navigation

Stack Overflow has always been a better-than-average resource for finding answers to programming questions. In particular, I have found a number of helpful answers to really obscure questions on the site, many of which helped me get past a road block either at work or in my hobby programming. As such, I decided I’d join the site to see if I could help out. Never before has a website given me a worse first impression.

In an effort to keep the community as clean and orderly as possible, new users have very little rights from the get-go. On paper, this is a pretty nice idea. In practice, it makes it difficult for new users to gain any traction. I read through a number of questions today and had several comments for the original poster. Unfortunately, I couldn’t make my comments, since new users cannot post comments on articles they themselves didn’t write (you have to gain “reputation” in order to gain that privilege). Posting my comment as an “answer” to the original question seemed like bad form, so I didn’t do that.

Looking elsewhere around the site, I found a few questions I felt I could answer. As soon as I went to answer said questions, someone else (in some cases, a number of other people) had jumped in and beaten me to the punch. I never had a chance to provide a helpful answer. Not only do you have to be very knowledgeable about a subject, you’ve also got to be very fast in providing said answer. I eventually did provide an answer for a question, then realized that my approach wouldn’t work. Before I could take action and modify the answer, my submission had already been modded down by several people, several of whom left snarky remarks. What a warm welcome for a new user! I subsequently deleted my answer.

I later searched the Meta Stack Overflow site, looking for advice for new users. It turns out I’m not the only one who thinks that it’s very easy for new users to get dumped on. Take a look at the questions revolving around new users on the site, and note how a number of them revolve around how hard it is for new users to improve. Documentation for how best to contribute as a new user is sorely needed.

The folks who manage these websites need to examine the barrier of entry for new users. I fully understand the need for keeping spammers and trolls out, but someone needs to develop a tutorial (or better yet, a set of tutorials) for how to properly use the website. New users do occasionally need hand holding, especially with websites as complicated as Stack Overflow. I think the community as a whole would benefit, and it would certainly help people like me who have been quickly overwhelmed by what the site offers.

At some point last year, I noticed that the Google snippets for search results pointing to my photo section at this site were incorrect. Instead of listing helpful content, they instead showed page navigation information. Here’s an example:

Monkey Album Snippet Google Snippet Example

Note how in this example, the snippet lists the links that appear in the navigation section of my site. That’s clearly unhelpful to users who find my content through search engines. As a result, I’m trying to fix this issue. Today, I made a change to include appropriate meta description tags on each page. The tags are as follows:

  • All “static” pages (list of albums, list of collections, and favorites) now use a suitable static page description
  • Album pages use the album description itself for the meta tag contents
  • Image pages use the image’s alt-text for the page description

I’m not sure if duplicating the content (in the case of the album description) is a wise decision or not, but I don’t know what else to put there. I suppose I could truncate the data to maybe 150 characters, but that might seem strange on a Google search result page. Do you have any suggestions for how search results of this type should appear? Any ideas would be welcome.

Skyrim Review

November 21, 2011

For those who live under a rock, The Elder Scrolls V: Skyrim was released ten days ago. I’m already nearly 70 hours into this game, and there’s still a ton of stuff I haven’t done. That said, I figured I’d post a few quick thoughts about this game. In short, this is easily one of the best games I’ve ever played.

There is simply too much to do in this game. You could spend all day making potions, crafting items, enchanting items, or simply exploring the world, all without ever starting a single quest. I found myself completing many of the “miscellaneous” quests long before I joined any particular faction, or started along the main quest line. There are still giant chunks of the map that I have yet to visit, which is incredible given that I’m so far in.

The game’s graphics are outstanding; head and shoulders above Oblivion’s engine. I’m really impressed with the draw distance, and every dungeon, cave, and mine has a unique feel (fixing one of Oblivion’s few failings). It’s also silky smooth on my system, running on the “High” detail level. Story lines have been interesting so far (though the Thieves’ Guild seemed a little weak), and I’m loving the Dragon Shout abilities. Blasting an enemy off the top of a mountain is so incredibly fun.

I do have a few complaints. The user interface on the PC is pretty terrible, though I’m hopeful that a mod will come along soon to fix that. Voice acting is good, but some of the voices are reused way too much for my liking. Perk points (a new way of leveling your character) are too rare. Give me 2 or 3 points per level, not just 1! Finally, as is usual with this type of game, there are still quite a few bugs. Another patch is coming after Thanksgiving, which should hopefully smooth out some of the rough spots.

If you like role playing games, and you enjoyed the previous Elder Scrolls titles, you’ll like this title. It’s an instant classic in my opinion, and has taken its rightful place in my “best games of all time” list. 5 stars

Mount Mitchell State Park

October 9, 2011

The final photo album from my trip to the mountains of North Carolina last month has finally been posted. This time, it’s a collection from Mount Mitchell State Park, located on the highest peak east of the Mississippi River. I enjoyed my visit to this park; it’s one that I will definitely return to.

Comments Off

Using the nsIFind Interface

October 3, 2011

In a recent update to Googlebar Lite, I made a number of improvements to the search term highlighting feature, fixing several bugs along the way. This feature uses the nsIFind interface available in Firefox, which is poorly documented in my opinion. Unable to find any decent examples, I picked apart another extension I found that uses this interface, and I now better understand how it works. As such, I thought I’d provide an example of how to use this interface so that future developers won’t have to dig down in the source like I did.

Read the rest of this entry »

Chimney Rock State Park

September 30, 2011

I’ve just posted the fourth album from my recent trip to the mountains. This set showcases Chimney Rock State Park, which is a fantastic place to visit. Though it costs money to get in, the views and hikes are worth it. I’ve got one more photo album to post from this small vacation trip to the Asheville area; it should show up within the next week or so.

Comments Off

Whitewater Falls Photos

September 22, 2011

I’ve just posted the third of five photo albums from my recent trip to the mountains. This time around, it’s a set from a short visit to Whitewater Falls, the highest waterfall east of the Rocky Mountains (though that term is debatable). Visiting the park costs $2, but the views are worth it, in my opinion. Definitely check it out if you’re ever in the southwestern mountains of our state.

Comments Off
Tags:

Getting Form Data With PHP

September 19, 2011

A couple of years ago, I blogged about two helper functions I wrote to get HTML form data in PHP: getGet and getPost. These functions do a pretty good job, but I have since replaced them with a single function: getData. Seeing as I haven’t discussed it yet, I thought I would do so today. First, here’s the function in its entirety:

/**
 * Obtains the specified field from either the $_GET or $_POST arrays
 * ($_GET always has higher priority using this function). If the value
 * is a simple scalar, HTML tags are stripped and whitespace is trimmed.
 * Otherwise, nothing is done, and the array reference is passed back.
 *
 * @return The value from the superglobal array, or null if it's not present
 *
 * @param $key (Required) The associative array key to query in either
 * the $_GET or $_POST superglobal
 */
function getData($key)
{
    if(isset($_GET[$key]))
    {
        if(is_array($_GET[$key]))
            return $_GET[$key];
        else
            return (strip_tags(trim($_GET[$key])));
    }
    else if(isset($_POST[$key]))
    {
        if(is_array($_POST[$key]))
            return $_POST[$key];
        else
            return (strip_tags(trim($_POST[$key])));
    }
    else
        return null;
}

Using this function prevents me from having to do two checks for data, one in $_GET and one in $_POST, and so reduces my code’s footprint. I made the decision to make $_GET the tightest binding search location, but feel free to change that if you like.

As you can see, I first test to see if the given key points to an array in each location. If it is an array, I do nothing but pass the reference along. This is very important to note. I’ve thought about building in functionality to trim and strip tags on the array’s values, but I figure it should be left up to the user of this function to do that work. Be sure to sanitize any arrays that this function passes back (I’ve been bitten before by forgetting to do this).

If the given key isn’t found in either the $_GET or $_POST superglobals, I return null. Thus, a simple if(empty()) test can determine whether or not a value has been provided, which is generally all you care about with form submissions. An is_null() test could also be performed if you so desire. This function has made handling form submissions way easier in my various work with PHP, and it’s one tool that’s worth having in your toolbox.

Comments Off

Gorges State Park

September 18, 2011

I’ve just posted some photos from Gorges State Park, the westernmost state park in North Carolina. This park is also one of the newest; visitor facilities are currently under construction. That being said, the views and hikes from this park are fantastic. I will certainly make an effort to return to this park in the future; this is one that definitely warrants multiple visits.

Comments Off

South Mountains State Park

September 13, 2011

Late last week, I stopped at South Mountains State Park on my way to the Asheville area for some vacation. The park is located south of Morganton, NC, and has terrific hiking trails and beautiful scenery. High Shoals Falls, an 80-foot high waterfall, is located at the park. Knowing this, I took my tripod along, and got some nicer-than-usual photos in the process. If you’re ever in that particular area of North Carolina, I highly recommend a visit to this park. This is one I would love to return to!

Comments Off
Older Posts »