Brendan Enrick

Daily Software Development

Code Snippets Found Online

One dangerous thing that lot of people have talked about in the past is the danger of getting code snippets online. They're just not trustworthy. Yes, this includes mine. I would like to think that most of mine are good, but I don't have time to carefully check everything I post. I'll make mistakes and include typos sometimes. I attempt to make sure that what I post is accurate and useful, but you should keep in mind that anyone can post on the Internet. There is no restriction, so be careful when taking code snippets and using them. Make sure that you understand what the code does and why it is written the way it is. This understanding will keep you safe when using the code, because you'll be able to identify mistakes before you put them in production code.

One thing that always worries me when I am posting code online is that someone will use my "bad example". I sometimes use an example of the right way and the wrong way. I try to make sure that it is clear which is which, but since I put the bad first, I am worried someone will use it. I have even used the words "bad code do not use this" to describe a snippet which I was pointing out the problems with. I am pretty sure someone has used it though. I admit I've even used the "bad code" from someone's blog before, because the improvement couldn't be made in my circumstances. I did this with some SQL code where I was working with a table instead of a single row as the improvement was.

Be careful when posting or using code from the Internet. If you don't understand something don't use it.

The Joys of Windows Live Writer

I've just downloaded and started trying out windows live writer, and I think it is excellent. This has got to be just about the easiest and best program for blog writing I've ever seen.

Features I love

  • View Web Preview - This view actually shows me what the blog is going to look like and it actually shows it with my blog there including the content from the left column and the previous blog posts beneath this one.
  • The generated html is reasonably well formed.
  • I can type in my tags without having to have added them to the blog in advance.
  • Plug-ins, plug-ins, and more plug-ins. I haven't looked at it but I am assuming that it is easy to write plug-ins for Live Writer.
  • Inserting Images, Tables, and Maps is incredibly easy.
  • I have no trouble finding what I need in the toolbar even with my plug-ins installed.
  • Auto-saving my blog posts as drafts as I type.
  • Insert link has a button to select a previous post so rather than finding that post somewhere and copying the link I just found it in this application.
  • I can also save my links from within the insert link window.
  • Formatting is simple and easy (unlike other programs which I have used).

Ok I give up. I refuse to write any more about how great this program is. Now is the time for me to go and look at some more of these plug-ins. I recommend you go and download Windows Live Writer and blog away.