Archive for January, 2010

Page 1 of 2

#Motivation, #Web Design, #Writing

Getting Motivated to Start Something New

Is it the start of a new year that often gets you thinking about what made you so disappointed with your efforts last year, or is it simple pessimism? Because I’ve found myself not only reinventing my branding and website in an effort to clean out the cob webs of creativity, but writing many posts relating to said motivation, writing, and goals for the year. Not that this is necessarily an unusual or unwanted thing; it serves to get me moving and motivated for the year. It helps give me a renewed sense of purpose in my design efforts, though I still have procrastination issues.1

Believe me, most tasks I undertake are neither difficult, nor do they warrant such a reaction,2 but I find myself a little terrified of starting something that could become overwhelming. In order to move past that nasty procrastination stage, and arrive at an appropriately acceptable result, I employ a couple of simple strategies that makes the given task a little less daunting.

Find a mitigating factor. In the case of getting projects started at work, I often need to find something that helps to lessen the impact of a larger task. In most circumstances that means finding a solution that makes the project easier to finish by speeding up the menial tasks; often I’ll see if there is a way to use php to my advantage by setting up a little script to run through a file, file names, or output some code that would have taken me quite some time to do manually. In other cases, I’ll take advantage of actions and batch processing in Photoshop in order to run through a long list of images in the shortest amount of time, with the least amount of manual processing possible.

Delegate tasks efficiently. Which tasks are of the need-to-do-now variety and which are less important? In a lot of cases I tend to block early sections of my day for the easy to do tasks in order to get them done, as well as to do something that requires less concentration in general, and devote the rest of the day to one or two of the more important projects on the docket. This doesn’t always work well and may not be what others recommend, but it helps me to work through tasks efficiently as well as to prepare myself mentally for the most important project; I do break this pattern if important projects are more urgent than usual. The reason I adopted this pattern was primarily as a way to deal with early morning meetings, as meetings would often interrupt my creative flow on the larger projects.3

Look on the bright side. You could always be doing something less fulfilling than what it is you are getting ready to start. I’ve not written much in the past year as far as short stories, editorials, poetry, and web design posts go, and this is because I lacked the motivation to do so. Why? Because I don’t always appreciate my skill and look pessimistically at my ideas. Don’t emulate that. Look for the good in your ideas, and you’ll be less likely to put them aside.

Make your goals public. It’s more difficult to slack off when others are holding you accountable, though it is easy to cheat that one if you’re doing it online only. Make the announcement on your blog, but make sure you’ve got a living person breathing down your neck to make sure you’re completing a task.

To summarize. You should find a mitigating factor, delegate tasks efficiently, look on the bright side, and make your goals public in order to make sure you get yourself motivated. As I said, these are simple things that I’ve done to motivate myself, and they work for me; which means, they may not work for you; which means…that you should think of things that help to motivate you, write about it, and act on it. Get to work, and hold yourself accountable to your goals.


  1. I find myself putting things off quite a bit. Mostly out of fear of the task rather than shear laziness, but neither excuse is good because once I start a task I generally do it quite well.
  2. We’re talking simple things, writing, working on new projects at work, nothing intensive.
  3. Not that I have to participate in a ton of meetings, this pattern just made it easier to deal with the days that included morning meetings.





#Design, #Goals, #Writing

Writing & Why I’m Probably Not Good At It

My only concern with my goal for this year, writing at least one piece for this blog every week, is that I don’t feel particularly creative in my writing. Now, I may be technically competent, and have enough knowledge of various subjects to pass muster in blog form, but when it comes to writing creatively, I’m egregiously lacking in the interesting department. My writing stinks unless you want a term paper.

And so the subject for this week is: strategies to help me improve my writing, or how to get better at creative pursuits. Which also happens to be the subject of one of my notes.

The Moleskine is a fantastic notebook, offering many varieties depending on your artistic needs.

As stated in that note, the strategy for me to employ is the classic “practice, practice, practice” technique successfully used by generations of people; in this case, I’ll use the stereotypical artists Moleskine notebook I carry around, and try to write a new bit of poetry every day in an effort to improve my creative process. What techniques will work best to create something new and fresh, and how will that help in my design work? I’m pretty excited about exploring this in 2010.

Which brings me around to the ol’ explanation of why I feel that I’m not good at writing to begin with. It is my lack of production that bothers me. It seems prior to the explosion in my personal time spent online, I could write fairly well, and fairly creatively, without the feeling of being hindered. Perhaps that view is simply in hindsight, rose-colored glasses and all, but my patience for some pursuits has dimmed considerably.

Wish me luck, can’t wait to post some of the results. In other news, keep an eye out for a progress meter I’m about to post.


#Humor, #Technology

Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes and weighs 30 tons, computers in the future may have only 1,000 vaccuum tubes and perhaps weigh 1.5 tons.

Unknown



#php, #Web Design, #WordPress

Overwriting WordPress Functions

WordPress finds new ways to amaze me; some of these things are neither impressive nor particularly noteworthy, except that these things enable users to customize this platform in ways unimaginable to regular Joe Blogger, who simply uses the system. And in spite of how common such things are to those who truly dive into it, I struggled for quite a while trying to find the best way to change a bit of core functionality. 1

If you scroll down to the bottom of the site on the home page, and on any entry page, you’ll notice a set of buttons that will help you navigate to the next and previous entries, or the next and previous pages of the home page. I needed a way to style these, and oddly enough WordPress did not provide a class name for either of those links. Too bad. So I needed to find out how to adjust that in order to target those links. In addition to that, I needed to also make a small change that classes wouldn’t have allowed for, which was to get the function to output code for the cases in which there were no other pages or posts in a given direction. My first thought was to find whatever core file these functions were located in and then make the change there; I proceeded to do this, got it working, and decided that I should go about this in a different way if I ever wanted to upgrade without having to change that file every time–if I even remembered in those instances.

The tags in question were: next_posts_link, previous_posts_link, next_post_link, and previous_post_link, as well as a few more functions that were related to them. Each of these provides the basic functionality I needed to modify; I tried to replicate these functions, using the same name, in an effort to essentially overwrite the original WordPress core functions. Well, I located them in the link-template.php file, copied and pasted them into my themes functions.php file, and proceeded to make the necessary changes. When I uploaded functions.php and refreshed my site, I had a big giant error; actually it was less an error and more a blank screen, which is worse in a lot of ways as you have no idea what went wrong. I should have known from my programming experience that I couldn’t duplicate these functions in this way.

I was stumped for the longest time, and search after search on Google was leading me towards something called, add_filter, which it turns out doesn’t quite overwrite the function so much as filter the function results through your new function; this was not what I wanted to do on any level. I couldn’t manipulate the data through a filter to achieve the needed results.

After some time, and a lot of searching, I landed on a WordPress MU forum (still not sure what MU is), that gave me my answer–the most obvious answer–which was to take the functions I needed and rename them. I could then use those new function names in place of the old ones wherever I needed them in my theme files.

That’s easy, ain’t it? Why don’t people explain this more often, or even need to to do this enough for it to be found on Google?


Update 1/19/2010: I wanted to clarify just in case some one stumbled upon this looking for an actual bit of code that might show them what I was up to. So here goes.

Instead of adding a filter to the function you want to change:

add_filter('next_posts_link', 'new_next_posts_link', 0);

Add a new function to functions.php and call it in your template wherever you were going to use the old one.

function new_get_next_posts_link( $label = 'Next Page »', $max_page = 0 ) {
    global $paged, $wp_query;

    if ( !$max_page ) {
        $max_page = $wp_query->max_num_pages;
    }

    if ( !$paged )
    $paged = 1;

    $nextpage = intval($paged) + 1;

    if ( !is_single() ) {
        if( empty($paged) || $nextpage <= $max_page) {
            $attr = apply_filters( 'next_posts_link_attributes', '' );
            return '<a href="' . next_posts( $max_page, false ) . "\" class=\"next\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</a>';
        } else {
            $attr = apply_filters( 'next_posts_link_attributes', '' );
            return '<span '.$attr.'>'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</span>';
        }
    }
}
function new_next_posts_link( $label = 'Next Page &raquo;', $max_page = 0 ) {
    echo new_get_next_posts_link( $label, $max_page );
}

I’ve essentially adjusted this line:

if ( !is_single() && ( empty($paged) || $nextpage <= $max_page) ) {
    $attr = apply_filters( 'next_posts_link_attributes', '' );
    return '<a href="' . next_posts( $max_page, false ) . "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</a>';
}

And changed it to this next bit in order to add a class to the link for styling purposes as well as to display a grayed out link if there was no next (or previous in the case of those set of functions) page.

if ( !is_single() ) {
    if( empty($paged) || $nextpage <= $max_page) {
        $attr = apply_filters( 'next_posts_link_attributes', '' );
        return '<a href="' . next_posts( $max_page, false ) . "\" class=\"next\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</a>';
    } else {
        $attr = apply_filters( 'next_posts_link_attributes', '' );
        return '<span '.$attr.'>'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</span>';
    }
}

So, again. If you’ve got something to modify, do it this way. The functions.php template file is your best friend.


  1. Note: I want to caution you to avoid doing anything with WordPress’ core functions if you aren’t familiar with php. You will regret it, especially if you’ve done something directly to a core file. Stick with filtering and extending with plugins.

#New Year, #Web Design

Why the New Design?

Part of me really enjoyed what I had to work with in the previous iteration; part of me wants to continue using it and it was a bit of a struggle to get this version going; now I’m stuck, whether this is good or not, because a good portion of the files for the old version are gone. That leaves me with this fully integrated WordPress theme. Not that this is a bad thing.

Prior to the version you’re reading from now, the site was an integration between WordPress and my own static site; I built parts of it beyond WordPress, portions as a theme, and the rest was some amalgamation of both. In this version my goal was to build the site using WordPress as a CMS and create custom templates for pages that I needed. So far, so good.

And this didn’t take nearly as long as I thought it would. Once I finally settled on the layout, design, and coded a raw version, I could convert it to a theme that can be used with WordPress. The initial process took me about two weeks, as I had roughly two pages to get together, and some other work to do, while turning it into a theme took four hours.

Note: I’ve been working with WordPress for about a year. Maybe you folks are impressed, maybe not, but i’m pretty proud.

Four hours.

I’m blown away by that. I’ve just about got theme customization down to a science, which is why I think I will be offering blog design and development as a service in the very near future.

And I can’t speak of the greatness of WordPress nearly enough. It is a fantastic platform for building simple dynamic web sites.

Anyway, my thinking here with the new design is to focus a little more on writing. I do it from time to time here and in other places, but I was often turning to quotes and links in an effort to fill up this site and that gets a little boring for me and anyone who happens to be swinging by the site.

At this point, I have a little work to do on the portfolio, but the site is good to go for now.