Archive by Author

What is a browser?

Google went to Times Square in New York and posed (what we believe to be) a simple question – What is a browser? The answers were quite interesting – some people had no clue; others were painfully close, it just seemed like they didn’t have the right words to explain what they meant. Either way, it’s an interesting watch, and goes to show that what we take for granted isn’t always common knowledge.

2 Javascript lectures you need to watch

Javascript is one of those languages, similar to PHP, where we feel that it’s OK to start programming in it without learning the language. That’s a great thing – it means that anyone can easily pick it up and quickly get something working through a simple Google search and copy-paste. But that’s not how real software works. And the web is software – or at least the more dynamic parts of it are.

I have included two videos from the Google Talks series in this post which I think will help you to really understand, not just use the language. I have learnt a lot from these talks, and I hope you will do to. So without any more waffling, here they are.

Best practices in Javascript Library Design

Libraries are a huge part of software design and engineering. You and me both use them all the time without even realising it. Do you have a core set of (even simple) functions which you include (or copy-paste) into your new projects? That’s a library. Strictly, it’s only a library if you include it as a whole, but loosely, a copied and pasted function could be described as a library.

I present you with a talk from John Resig (the creator of jQuery) who is giving a talk on how to create a great Javascript library.

Javascript – the good parts

Javascript is often slated as not being a ‘real’ programming language. It has loose typing, it’s an interpreted language and (worst of all, apparently) allows beginners to write code. Doug Crockford from Yahoo argues that Javascript does have good parts – and not only good parts, but chuffin’ marvelous parts, which include very powerful concepts such as lambda – which is what entire languages such as Lisp and Scheme are based upon. It’s well worth a watch – it’s great for learning some of the more technical and powerful aspects of javascript such as the closure.

Any missing?

Do you have any Javascript lectures (either video or text-based) which you have learnt from and would like to show everyone else? Maybe you’ve recorded a video tutorial, or written a series on Javascript techniques. If you have anything else which you think can help the Javascript community (both beginners and advanced), please post them in the comments.

Don’t leave post slugs as the default

This post is mainly aimed towards Wordpress, Textpattern and (probably) a multitude of other CMS driven website users. ‘Smart’ web software will automatically create a ’slug’ for your new article, but it’s not always best to trust the CMS to come up with the best URL for you.

Oh, by the way, a slug is a part of the URL which uniquely identifies a post in a CMS. For example, in the URL http://www.example.com/blog/my-new-post, the slug is my-new-post

The rant

Take my new FGQWhat does the -= operator do?. Auto-slug-generators will (mostly) create the slug what-does-the-operator-do – which I’m sure you’ll agree is not too useful. Firstly, it would be difficult from a user’s point of view to remember which characters to remove and add in to the URL, but secondly, from an SEO point of view, it’s not terribly descriptive. Thirdly, if I then wrote an article with the title what does the += operator do – wordpress would create a very similar slug.

The point

Most, if not all, CMS systems allow you to change the slug of the post or article. Most of them also automatically create one for you. I am making the point that the automatically created slug is not always the best. When you create a new post, take a moment to think about what you’re trying to say, how people might search for it, and optimise for both. For example, this post is called Don’t leave post slugs as the default, but I have decided that the best way to describe it SEO-wise is post-slug-optimisation. It’s a minor thing, but it can make all the difference between being on the first or second page on google.

I’m upgrading to Wordpress 2.8

It’s always a good idea to keep all software on your website up-to-date, and for that reason I have just upgraded slightlymore to run Wordpress 2.8 (previously 2.7.0). Having said that, it’s still in the beta stage, so there might well be a multitude of bugs in it. I am a believer in open source and want to help to make wordpress better and more secure, and in fact that was my main reason for upgrading before the official stable release – so if you find any weirdies on the site, do let me know.

You can also upgrade by visiting the wordpress development blog.