Blog Archives

The less obvious changes in TortoiseSVN 1.7

Haven’t heard much from people about their observations on what is a fairly major upgrade to the SVN shell for Windows.

Anyone who uses Tortoise and is considering the upgrade should check the changelog before proceeding.

The obvious/major changes are covered there including the new metadata format for working copies which requires your project working copies to be upgraded. Also the log dialog, revision graph, branch/tag and commit dialogs have all undergone a lot of interface improvements.

So far I’ve already noticed two other changes not documented in the changelog on tortoisesvn.net, they’re specific to functions that I know I use at least once a day so it’s worth highlighting them.

SVN Export

The ‘SVN Export’ function has always been one of Tortoise SVN’s most overlooked menu items. Export only runs on folders and when run, it copies the selected folder to another folder removing the .svn folders recursively so that you get a completely unversioned copy of the original folder and it’s children.

One of the problems with the function that was always counter-intuitive was that the destination folder could not be created, it was just created under the destination you selected. So exporting ‘Temp’ to C:\Temp would put the unversioned contents in C:\Temp\Temp.

In 1.7, this has been changed. When you export an SVN folder, the destination folder is where the contents of the folder you’re exporting will be placed. So now you have to create a new folder where your export will be copied to.

Hard to see why this wasn’t included in the changelog and something you only find out through trial-and-error, as welcome as the change is.

SVN Cleanup

I’m not sure how many people ever knew what ‘Cleanup’ did. Over the years I’ve seen developers run it on folders trying to fix conflicts, directory not found errors and every other SVN error a repo could return.

In 1.7, running an SVN Cleanup will now give you an options menu that allows you to choose what cleanup options to run. I know I’ve always used cleanup to refresh shell overlays (the SVN icons), but now the new menu shows you some other options. Nice.

 

Tortoise SVN Cleanup dialog in 1.7

Tortoise SVN: Release notes/changelog for 1.7

LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

Obscure Sitecore Features, inspired by Julian’s Flight Simulator

To the untrained eye, this blog might look a little neglected when really it’s just been taking a hiatus from publishing blog posts. More regular updates are around the corner including a project I’ve wanted to finish for almost six months.

In the meantime, I wanted to highlight an excellent blog post by Julian over at Igloo.

I’ve worked with Julian twice before and now for an account at Reactive we’re working together to create an SVN masterpiece that will allow two separate development teams to compete directly to create code conflicts. You can follow Julian on Twitter.


Microsoft Flight Simulator 9/11

This is Julian's screen most days


Around June, Julian took a break from playing Microsoft Flight Simulator and wrote a blog post about some useful but obscure features of Sitecore. Only coming across it last night, I notice that it’s only be re-tweeted five times which is a shame because it’s really useful.

The Gloo: Top 5 Obscure Sitecore Features

Hopefully this blog post and my excessive use of WordPress SEO plugins will help generate some more views for this piece. A couple of the most interesting for me were: BulkUpdateContext; is a must-have for anyone who is doing content migration using Sitecore and the third (UrlString Class) is something I’ve used before, but like many parts of the Sitecore API, aren’t widely known.

Not sure if I can come up with five of my own but here’s a couple, perhaps not-as-obscure features.

  1. Developer Center: XPath Builder: hardly obscure you might say but the number of certified developers I’ve come across who didn’t know it existed is surprising. In the CMS, open the menu and run Developer Center, when it loads click  Tools > XPath Builder from the menu.

    XPath Builder

    This tool allows a developer to test Sitecore XPath queries in the CMS against the database, these queries can then be used by the Sitecore.Data.Database methods: SelectItems, SelectItemsUsingXPath, SelectSingleItem and SelectSingleItemUsingXPath. The Sitecore Developer Network has an excellent reference on using Sitecore Query, you’ll need an SDN login to view it.

    Besides from testing query syntax, it’s also a useful way to compare query:/ vs fastquery:/ speeds.

    Here’s a basic rundown of the fields in XPath Builder:

    • Context Node: the node from which the query will be executed, this can help you test ancestor and descedant queries
    • Database selector: choose to run the query against core, master or web
    • XPath Expression: enter a Sitecore Query using query or XPath notation
    • Result: returns the results of the query (or any error messsages). The number of items returned is limited by web.config setting Query.MaxItems
  2. Utility classes in the root Sitecore namespace: they can be easy to miss if you’ve never looked in the Sitecore namespace or the documented API before, here’s a rundown of a few that I’ve found useful in the past:
    • Sitecore.Constants: system-wide constants, far too many to describe here but I’ve no doubt many places/developers have coded their own ways to get these values
    • Sitecore.DateUtil: Sitecore stores all datetimes in ISO format “yyyyMMddTHHmmss”, this class contains methods to convert this string to and from .Net’s DateTime type
    • Sitecore.DaysOfWeek enum: pretty straight-forward
    • Sitecore.FieldIDs: a static class for holding well-known GUIDs relating to template fields, useful for API work on Templates
    • Sitecore.ItemIDs: a static class for holding assorted well-known GUIDs, for example the ID of the Layouts root folder or the Templates root folder
    • Sitecore.MainUtil: far too broad to describe in detail but here’s a few functions included you may have coded yourself in previous Sitecore projects: ColorToString, CombineArrays, DecodeName, EncodeName, SendMail (uses SMTP settings from the web.config).
    • Sitecore.StringUtil: utility functions for string manipulation
    • Sitecore.TemplateIDs: (really, really useful) a static class for holding well-known GUIDs relating to core Sitecore templates, i.e. Command, Folder, Image, MediaFolder and many more.

    Details of all these classes and more are available through SDN, especially useful in Windows Help format for the entire API as part of the documentation package.

Finally, just to continue the private jokes with Igloo, Julian has been kind enough to wait for us to do something on the shared server “when you’re finished playing Microsoft Flight Simulator”, and I’ve told him repeatedly that it’s actually The Sims we’re all hooked on. The pool trick I told Julian about last week, well I found the page where I learnt about it as a kid in my late teens (with no friends). On Sammys Kill your Sim tutorial (possibly the greatest title in SEO history) the example you see below has not been photoshopped.

 

Nice ass Jules

This is what will happen if Igloo commit code that breaks the build

LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

Firefox overtakes Internet Explorer in Germany

Das Spiegel Online

Good news!

LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

Who is responsible for WordPress maintenance?

This post is a response to a blog post by Jeff Chandler at Weblog Tools Collection titled:

Are You Responsible Enough To Run WordPress?

As Jeff mentions, the advent of such a powerful blogging framework lowers the bar of entry significantly for web publishing, but to blame the end users for a failure on their part to update their WP installations is unfair. While I don’t think WordPress themselves are in any way to blame, I don’t agree with the implications of expecting content authors to also be website administrators.

I think WP publishers are no different to end users of the Windows operating system. What WordPress and the massive developer community around it has achieved is unprecedented in the history of the web, but to ask end users of this product to see themselves as having some measure of technical responsibility for their site will require a significant paradigm shift.

You can’t just upload WordPress, perform a bunch of customizations, install 50 plugins, 50 themes, and think everything will be fine from that day forward.

Yet this is exactly what WP users are doing and nothing in the installation process really makes someone pay attention to the community around WP development or stay informed with product development. Anyone who buys hosting space and sets up WordPress immediately falls into “end user” mode. It’s like expecting your average Excel user to keep updated with Microsoft Office security bulletins.

Yes, WordPress is incredibly easy-to-use, easy-to-install and a walk in the park to customise, but there’s still plenty of room for improvement. I believe the developers of an application have a responsibility to make sure the users are being properly educated on their obligations, so why aren’t people installing WordPress told more about security, why aren’t people installing plug-ins or themes being told (perhaps they need to be told more forcefully) about how these installations can impede their upgrade options and the security ramifications that can result?

You don’t have to be a fan of Microsoft or Apple to recognise that they got rich by buffering end-users from the technical details underlying the technology we use every day.

The sentiment from some sections of this community; that people without the technical knowledge to manage Apache configuration, understand PHP code or perform an SVN merge have no business running a website is something that needs to die (in a fire).

LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

REVIEW: osCommerce 2.2 rc2a

Lately I’ve been getting familiar with osCommerce for use as an online store for my aunty’s business. After doing a fair bit of research on Whirlpool and reading about other people’s experiences setting up a store, I chose this open-source package.

Initially, like many that move into the online space, the store will open as an online catalog without ordering abilities. Given the business revolves around a wholesale infrastructure, I will likely recommend that there is little point for them to move into retail orders online. When the catalog opens, one of the requirements of the business is that the entire catalog only be viewable by members, who they create.

To achieve this, I’ve had to modify osCommerce heavily to remove all front-end member sign-up abilities and modify the category browser/infoboxes to hide categories and products when a user is not logged in. I’ve also had to add a module that allows administrators to create new users… in fact finding a usable , working module that worked without problems in 2.2 rc2 proved to be a challenge so I had to hack apart a module that came closest.

Resources

After working with tools like vBulletin and WordPress, it was something of a shock to navigate through osCommerce’s unwieldy and ad-hoc approach to customisation. It was really, really messy and while hacking through table-based layouts in PHP files does afford a level of flexibility for those looking to customise heavily, it’s not something I would want to do again. The lack of abstraction between presentation and functionality in code makes the product practically impossible to upgrade, even with use of versioning software like SVN.

On the plus side, osCommerce does come with a lot of functionality which immediately allows someone to set up a fully-fledged ecommerce site with ordering, shipping, membership and lots of other features built straight in. It’s pretty easy to install and the administration interface is fairly intuitive, if unsightly. There’s also a huge developer community behind it and there are better packages than the bare-bones 2.2 rc2 version I used; some of these might give you everything you need “out-of-the-box”, or you can also wait for version 3 which is currently in alpha and looks a vast improvement on 2.2.

Next time I think I might give Magento, Zencart or even Joomla or WordPress (with add-ons) a go for an online shop. It’s hard to believe that such a popular product in the ecommerce space is designed and coded so poorly, as a developer this isn’t a product I would enjoy customising and can only spare a thought for the people out there who have to maintain heavily customised osCommerce sites.

LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

Web browsers battle to convert IE6 users

Web browsers battle to convert IE6 users

Wikipedia: History of Internet Explorer

I wish I could be there to delete, format or physically destroy the very last IE6 installation in existence. Probably somewhere in the year 2027… at which point the resistance would send me back to Redmond in 2000 to stop Microsoft from attaching this thing to Windows in the first place.

LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

HOW-TO: Disable DISQUS comments on WordPress pages

DISQUS is pretty neat, but there’s no built-in way to make it obey the WP setting of ‘Allow comments on this post’. After a quick search around, I figured it out.

  • Go to Plugins > Editor
  • Select plugin DISQUS Comment System
  • Edit the first file, ‘disqus-comment-system/disqus.php’

Around line 120 (you might need to copy this out into a text editor), add the following line.

if ( 'closed' == $post->comment_status ) { return false; }  

Thanks to Ted Aronson for the tip, found on this blog.

UPDATED: 4 Mar 2011, new line number for code as plug-in has changed.

UPDATED: 3 Sep 2011, tip no longer relevant, functionality appears to be built-in to Disqus for WordPress, see last comment below.

LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

Apple secrecy is damaging the brand

I’d be the last person who would call themselves an Apple fanboy but I don’t hate the company either. I own two iPods, use iTunes and was pretty close to buying an iPhone (opted for a HTC Magic, Android OS instead). I’ve had a chance to use Macbooks too so I like what they do overall, but it’s easy to see what happens when you don’t have a commitment to “not do evil” that Google aspires to.

Apple’s Chickenshit Approval Process Has Gone Too Far

Apple in hot water over ‘exploding iPhones’

Blocking competition from the Apple App Store is one thing, covering up exploding hardware is another, I’m a big supporter of open-platforms and would love it if my friends who have iPhones could have access to the same awesome Google apps I do.

I might not be a regular Apple fan but I’ll think even longer now before buying any more of their products, or using iTunes for music and movies. Incidentally, just the other week I rented a movie on iTunes for the first time.

It’s interesting to see how long they’re going to let this public relations disaster continue.

LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

Speeding up Outlook

From Lifehacker today…

Complete Guide to Making Outlook Faster (Than Molasses)

The tip that I would add for IMAP from my own experience:

  • If possible just install Thunderbird for IMAP, if you have to keep Outlook, instead of downloading whole messages as suggested, set it to just get message headers and only for your Inbox folder.
LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

Switch to our mobile site