javascript funkyness

Posted on August 22nd, 2010 by thiswayup.
Categories: dev.

As I've started to learn more about javascript this year , I've been really enjoy digesting some interesting resources on the internet to learn more about the innards that make this rather great lanaguage. One that I have found is a great google tech talk "JavaScript: The Good Parts" from Doug Crockford and he highlighted a rather quiky thing in javascript.

function good(){
   return true
}
alert( good() );
//alert is true

function bad(){
   return
   true
}
alert( bad() );
//alert is "undefined";

One would think that if you run both function you would get the same return (ie true) but there's one thing I learnt from Doug's talk is that Javascript was built with a interesting quirk, if it runs into a compilation error, it actually backs up and puts in a semi colon in for you! This was originally designed to help people first picking up the language but as a consequence has caused this weird business. So the moral is to always add semi colons.

2 comments.

Upgrading macbook pro 13″ hard drive

Posted on August 7th, 2010 by thiswayup.
Categories: Gadgets.

I thought I'll post up my process to upgrade my Mac book pro 13" hard drive that I bought autumn 2009. I couldnt be bothered to find the exact model

Shopping list

I decided to upgrade my macbook pro hard drive recently as I'm going to use it as my primary method to store my photos. Having only 80gb left on my disc, I decided to buy most of my kit from Ebuyer. My shopping list was :

Step by step guide

Well not much much to it but here we go.

  1. After putting your new hard drive into the external case, I then backed up the whole thing using SuperDuper. The main reason being is that it not only backsup your drive but prepares it also for the switch by making it fully bootable! The benefit being is that it saves you having to install OSx and restore from the Time machine backup :)
     
  2. I then followed this video and you are done!

Other stuff

Don't forget to perform another time machine or SuperDuper backup after!

2 comments.

SEO thoughts of the day

Posted on August 4th, 2010 by thiswayup.
Categories: dev.

Today at work at we had a someone from Spring Digital do a basic introduction to SEO. At my work we have been working a bit in this space and always trying to gain SEO advantages over other sites but I thought it could be good to check out any possible new nuggets. As it stands I learnt some new things and reinforced some interesting points which have been floating around:

  • Twitter links like a "NOFOLLOW" - One of the things which I thought gave a little bit of weight was the fact that links appearing in twitter apparently hold no seo weight. I had obviously drawn an incorrect conclusion given that twitter started appearing on google searches.
     
  • Concept of "link baiting" - To follow on from the above point of twitter linking and focusing back on the idea that back linking is important, advertising yourself with interesting content obviously starts people talking. With a bit of luck, all that chatter of your site will hopefully spawn a few backlinks on other sites. Basic idea of marketing through social media I know but hey it stuck out.
     
  • PPC vs SEO - I find it interesting that SEO and PPC can sometimes both work together and against. But the majority of the time they complement each other. PPC generally is seen as the short term traffic driver with SEO requiring alot more strategic and medium/long term commitment before a good ROI.
     

Finally I have been reading a bit from The Art of SEO. As a developer I wonder about the process of our site builds and whether we are doing the correct "thing", reading this book had definitely given me some more insight. One of the points which sticks out is the advice to not use pagination. There are a few points he makes for it being bad :

  • Provides no topical relevance - since pagination results in a page of just links with no focus on seo this is bad.
  • Content between different pages can create dupe content - Duplicate content is a factor of the amount of SEO juice google gives.
  • Can create spider traps - Spiders generally can only dig so deep and if it catches the spider in a infinite spider trap then there is less chance of the page you want the spider to find, is found.

This pagination point sticks out as it goes to show that there is a site usability opportunity cost of choosing to not to use pagination. The book does concede though that it takes a seriously alot of planning to try build a certain large sites without pagination.

0 comments.