April 14, 2010
5 comments »
Doing a quick test of the major browsers (on OSX Snow Leopard) and of the 160 HTML5 features tested these are the scores:
| Chrome 5.0.342.9b |
137 |
|
| Safari 4.0.5 |
113 |
(this is the score I got on Chrome Windows which suggests an older version of Webkit) |
| Opera 10.10 |
38 |
(I expected much better from Opera as they’re normally very quick to implement) |
| Firefox 3.6.3 |
31 |
|
| IE8 |
19 |
|
Well that’s a bunch of fascinating numbers. I think we can take away from that a simple fact: Internet Explorer is shit.
Test your browser with HTML5Test
April 11, 2010
No comments »
Snippet sites first cropped up as a way of sharing code with others in IRC and forums where formatted code with syntax highlighting wasn’t practical. Since then they’ve grown to provide version control, sharing and other features. Here’s a quick list of the major players. Personally – I’d recommend Github.
dZone Snippets
Part of the massive dZone network who also run jobs boards, social news, etc.
- URL: http://snippets.dzone.com
- Pros: huge membership, massive selection, solid brand.
- Cons: interface needs improvement.
Snipplr
- URL: http://www.snipplr.com
- Pros: Huge selection of snippets.
- Cons: suffers from spam and neglect.
ByteMyCode
Only a small selection compared to the others mentioned earlier. Nice looking site though.
- URL: http://www.bytemycode.com
- Pros: interface
- Cons: small numbers
Snipt
- Pros: clean interface and easy sharing features.
- Cons: not a huge database.
- URL: http://snipt.org
PasteBin
One of the oldest services on the net and you can tell with a mature set of features and large database.
- Pros: plugins for various browsers.
- Cons: Not much.
- URL: http://pastebin.com
Pastie
A Rails app and I suppose the opposite to dpaste below.
- Pros: Clean, basic.
- Cons: Basic.
- URL: http://pastie.org/
GitHub Gist
For a relative newcomer this service has grown massively. It helps to be a part of one of the largest developer communities on the web – Github. Not only do you get to put your code snippet up but its also version checked too – using Git obviously.
- Pros: Each snippet is also a Git repo.
- Cons: Not as feature-packed as other services like Pastebin.
- URL: http://gist.github.org
DPaste
Purely for sharing code and originally developed by and for Django developers.
- Pros: Simple.
- Cons: VERY simple. Snippets deleted after 7 days.
- URL: http://dpaste.com
January 5, 2010
1 comment »
Earlier today I was asked how to comment out multiple lines in Vim. Unfortunately I wasn’t too sure what the best way was and the only one I knew felt less than friendly. Anyway – after some research I’ve nailed a few different methods and thought I’d post them here for people to choose their favourite one.
1. Visual Insert
This is the simplest method by far. Quick fire steps are:
- Ctrl + V (enter block-visual selection mode)
- Select the first character of the lines you want to comment out using “hjkl” or cursor keys
- Shift + i
- Type your comment marker: “//”, “#”, etc.
- Escape
- The end – there is a tiny delay as the comments are now put into your other lines.
2. Visual Search/Replace
This is similar to the above but has a slightly more arcane method to adding the comments.
- Shift + V (enter line selection mode)
- Select the lines you want to comment out.
- Type:
:s/^/# [Return]
or
:s/^/\/\/ [Return]
The first will replace the the beginning of the line (^) with a hash (#) and the second will do the same with a double slash (//). Note the extra slashes to escape.
3 Line Number Range
Similar to above this is the only method I could think of and its hardly very friendly but it gets the job done.
Pick the line numbers of the first and last lines you want commented – this is rarely simple.
Type:
:2,10s/^/#
That will put hash comments at the start of lines 2 to 10.
4. Using Markers
I’m not fond of this method as I’m still not 100% on markers. In fact I’m around about…..0% on markers as I’d not heard of them until now!! Woo for learning!
Anyway – markers. Oh yes, I’ll do a nice list of steps again:
- On the first line while in command mode type “ma” (no colon required here)
- Go to the last line of your intended block.
- Type:
:'a,. s/^/# /
In English that means: Form marker “a” to here (.) perform this command: s/^/# /
5. Plugins
You could just skip all that and install a Vim plugin. The advantage being they have more features. The disadvantage being you’d have to make sure all the servers you use have this plugin otherwise you’re stumped.
January 3, 2010
No comments »

Chrome Extension Screenshot - Shiny MPs
Writing extensions for Chrome is so refreshingly simple it’s exciting. So as a result I produced another one and this time for a slightly more specialised use. If you’re UK-based and interested in politics then this plugin will enable you to keep tabs on your MP with their latest parliamentary updates and links to further info.
If anyone had suggestions I’d love to hear them.
The extension: Shiny MPs
The Source: Bitbucket Hg Repo
The API used is developed by the great TheyWorkForYou.com
December 29, 2009
2 comments »
Just released first Chrome Extension: Augment Search.
Its been heavily inspired by BetterSearch which is available on Firefox. I wanted this mainly for myself nut thought it’d be worth releasing to. Will hopefully be the first of many.
Get It
Download from Google
What It Does
- Adds links to other search results pages for: Google, Yahoo, Bing, Ask, Reddit, Digg, Technorati.
- Adds extra info links to each result: Alexa, Robotex DNS info, Web archive
Problems
If you have any problems with the extension leave a comment.
To Come
Much more goodies including an options page to customise what is shown.
December 1, 2009
1 comment »
Every time I’ve seen one of these “vs” posts its gone into great length about the philosophy behind such and such. You’ll never convince someone based on ‘religious argument’. So I’m going to take a different approach here and state who does what and hopefully the weight of ‘who does what’ will make the point quite clear.
Screw the Scientific Method!!
Notes:
- Tabs may be rendered differently on different editors and systems. So they make for less friendly code sharing.
- Its interesting to note that the ones using tabs all have histories of mental instability, cannibalism, Morris Dancing, witchcraft and heresy.
Clear win for Spaces, which happens to be what I use.
October 9, 2009
1 comment »
This is the best:
switch (mIntegrationDirection)
{
case InventoryIntegrationDirection.DoTheSameChangeInShop:
DoTheSameChangeInShop(GetChangedDataFromInventory(mLastSynchDate));
break;
case InventoryIntegrationDirection.DoTheSameChangeInInventory:
DoTheSameChangeInInventory(GetChangedDataFromShop(mLastSynchDate));
break;
case InventoryIntegrationDirection.DoTheSameChangeInShopThenDoTheSameChangeInInventoryForNotChangedDataInInventory:
DoTheSameChangeInShopThenDoTheSameChangeInInventoryForNotChangedDataInInventory(
GetChangedDataFromInventory(mLastSynchDate),
GetChangedDataFromShop(mLastSynchDate));
break;
case InventoryIntegrationDirection.DoTheSameChangeInInventoryThenDoTheSameChangeInShopForNotChangedData:
DoTheSameChangeInInventoryThenDoTheSameChangeInShopForNotChangedData(
GetChangedDataFromShop(mLastSynchDate),
GetChangedDataFromInventory(mLastSynchDate));
break;
default:
break;
}
Read how this travesty occurred at DailyWTF
September 25, 2009
No comments »
No it didn’t. According to a quote on the Telegraph website the GMail downtime affected only a small subset of users but if you look at the comments on the story it was hitting people in Florida, France, UK and Canada. That’s quite a big, “small subset”!
This is the second time this month – not good.
5 comments »
Finally a Django CMS that looks stable and well built has been released at: http://www.django-cms.org. It’s sponsored by a Swiss compay which doesn’t bother me one bit (I love ….cheese and chocolate?) but the Americans seem obsessed with the idea of everything being American, tariff charges, protectionism, etc, etc, etc.
Anyway – this isn’t a political post so here’s a quick summary of the important points about the new Django CMS project:
- BSD License
- Hosted on GitHub
- Original name: Django CMS
- Features Summary:
- Publishing workflow
- Versioning
- Multilanguage
- Application architecture – similar to Joomla Components & Modules
- Media management
- SEO friendly
- Flexible plugin architecture
All in all it looks promising so give it a go. I’m planning on setting up a few sites using it as I need something quick and dirty to use but also the ability to extend it. Being a young project this should be pretty easy. Django CMS
August 18, 2009
No comments »
I have no idea who this is but they commented about 4 months ago claiming to be lonely. They need a hug.
I’m the only one in this world. Can please someone join me in this life? Or maybe death - Seskelohots
With no spammy links posted I can only assume its one of the lonely racoons I mentioned that’s currently lost in Yorkshire.
Is this Seskelohot?
Here:
Hug Seskelohot