I Am One Man

Web designer & developer residing in Rochester, England with an RSS Feed

WordPress Short Links

Read later

This is a super quick and (i think) the best way to add short links to your WordPress powered blog.

<a href="<?php bloginfo('url'); ?>?p=<?php echo $post->ID; ?>"><small>#</small></a>

Explained

All this does is gets your blogs URL and adds the posts ID after the ?p= bit. WordPress can tell if you have pretty URLs and will redirect you there before the page even loads, as it’s all server side. The main benefit would be that it keeps your domain name in the link, and therefore part of your branding. It does have to go in the loop though.

So for this post, the following gets put into the page.

<a href="http://iamoneman.com?p=430"><small>#</small></a>

Perfect!

Quickly Increase your jQuery Run Time

Read later

My freelance website, http://codebymonkey.com, was a little slow on loading, so I decided to make it faster some how. It’s a little JS heavy so I embarked on ways to reduce what the browser had to do when the page was first opened.

$(window).bind("load",function(){/* code to run */}); was the key.

Let me explain

When the page loads, you want the execute all the JS that’s crucial to how the page looks and works, so in my case, I want the logo/tagline to be centered as soon as it’s visible, so that executes on page load. The same goes for fading in the page as it’s loaded and setting the problem & solution blocks to have the same height.

Less important things like setting the Code by Monkey logo at the top to be an internal back-to-top link, smooth internal scrolling, diagonal background scrolling, contact form validation & lazy loading of ‘Work’ images are all run after the page has stopped loading and spinning the browser loading indicator.

$(function(){
	// On page load
});

$(window).bind("load",function(){
	// When all elements have loaded
});

Results

Prerequisite; although the page rendering as a whole took .07 seconds longer, the page visibly loads twice as fast, which the JS which the results to show. The testing was done in Chrome for anyone who cares.

Before:

After:

The Long Term Dream

Read later

One day, whether that be in 1 year or 10, I want to be one of those people who’s well known in the industry with a slightly hidden background. When people find out who I really am, I want to to see that I’m the owner of a very successful creative agency doing web design, development, print work, photography & anything else the team is collectively good at.

  • I want clients like big international clothing brands & brilliant start-ups as well as a few internal projects to keep the minds ticking, they won’t be back-burner stuff either.
  • I want to hire some of the best brains in the world, to create one major force in the design world who demand the upmost respect for just being good.
  • I want to treat the team to holidays mixed in with events like SXSW, let them work from tree-houses if that’s works best for them, let them drink beer in the studio.
  • I want to have people queuing at the door to work with us.

I’ve already started; I have the domain name.