Saturday, September 17, 2005

[Code/Tips] Avoiding Doing it Again

A suggestion to those modifying their blog templates. Before making changes, copy the current template, paste it into a Notepad document, and save it. Then if you screw up you can drop back to where you were before the changes by pasting the saved copy back into the template editor.

I go a step further by keeping the starting template and then a separate copy each time I make and test a change. This enables me to back up to the last valid alteration without having to go all the way back to where I started.

This post was written by Kevin from Seriously good


Kalyn Denny said...

This is a very good idea. Thanks for the suggestion.

I'm too scared to do any really significant modifying, but I have screwed things up a few times with the small things I've done.

Anonymous said...

I'm about to do a post on some other basic things to note when your dabbling in your code - but here's something you should do in addition to this tip - add comments to your code, documenting what you did and what you changed. Add a comment with this code:

≤!-- comment --≥

(Change the ≤'s and ≥'s to regular <'s and >'s) Everything inside the hashes are invisible.

Add the comment in your code whenever you mess with something - it will save you time later, trying to find out where thing's went wrong. Even if you change a color, comment what the color was and is now - it'll save you time trying to find the rgb hex code later.

Cybele said...

Often when I want to make radical changes to my blog template I'll just create a new blog (I have several test blogs on blogger for this purpose). I'll just copy my current template in there, do some trial and error stuff to check it out, then paste it into my real blog.

It's definitely a good plan to not only save your current blog template, but save the template that you loaded up as a default ... it's usually got some good code you can use to restore things when you've messed it up.

Banlieue Blog said...

Amen! Yep, I tweaked and lost.
Now I have a test blog for playing!