Posts
53
Comments
71
Trackbacks
27
August 2006 Entries
Windows Live Writer needs plugin for Corporate Intranet

I'm very impressed with Windows Live Writer, and I'm sure you are tired of reading about it.  After all, there is no shortage of blogs writing about this blog writer.  Try to hold on for just one more :)

I get emails from various groups within our office, be it the CEO, HR Manager, or IT Helpdesk.  It may be a reminder about an upcoming maintenance outage, information about our benefit changes, or the state of the union.  I've felt for a long time that it would be much better if some of these stuff was just blogged somewhere that I could subscribe to it.  It really wouldn't be that hard, the problem is that all the blogger software caters towards public sites.  We use sharepoint, but it is too difficult for many folks to post entries with our current version, and I don't want to wait for the upgrade which is intended to save the world. 

What I would like seems simple enough.  I would like Windows Live Writer to have the ability to save your post as an RSS (XML) file on a network drive.  It could either rebuilt your RSS every time, or it could grab the existing one and append to it.  Then I could use an RSS Reader to pull these local feeds, as long as I was logged onto the network. 

Am I smoking something, or does this seem straight forward?  I looked at the Live Writer api, but it appears that everything is input focused, not output focused. 

Hopefully someone out there has a simple solution that I haven't come across.

Cheers,

John

posted @ Thursday, August 24, 2006 8:15 PM | Feedback (0)
Code Formatter Plugin for Windows Live Writer

I came across this post on Steve Dunn's Blog.  It's worth taking a look at.  It is a code formatter plug-in for live writer.  I haven't tried it out yet, but it looks very cool at first glance.

posted @ Thursday, August 24, 2006 7:46 PM | Feedback (0)
Georgia Aquarium in desperate need of help

It is amazing to me that so much time and money can be spent to build an Aquarium like the one that opened last year in Atlanta, and yet they can not seem to get their act together when it comes to technology.  They seem to be doing their best at deterring people from visiting. 

We purchased season tickets the first week it was open (11/05).  Unfortunately we made the mistake of purchasing them at the Aquarium instead of on line.  Until a short time ago, we were unable to make reservations on line.  This meant that we had to call and speak to customer service and then wait in very long lines to pick up our tickets at the will call desk.  This is not a fun thing to do with a three year old at tow.  All he wants to do is get in side.  By the time you get to the window, all you want to do is go home. 

So, last week I was finally able to get my season passes linked to my login.  I have been trying ever since to make reservations and the site keeps say "We are currently experiencing a high volume of traffic.  We are unable to process your request at this time.".  It doesn't matter whether it's day or night.  This is absolutely ridiculous.  As a developer, I am embarrassed for the poor workmanship that has go into this website.  It's difficult to navigate, it has issues such as these.  The only thing that it has going for it are the nice graphics.  The surprising thing to me is that someone (Bernie Marcus)could grow a company to the size of Home Depot, and can build an aquarium that is so spectacular, but can't seem to get the simple stuff right.  If they don't start treating this like a business, they aren't going to get the funds to support such an expensive undertaking.

Because of this hassle, we have only been there twice and our year is almost up.  The second time we went, we left after less than an hour because it was so crowded we couldn't see the exhibits.  Needless to say, we will not be renewing our membership when it expires.  I'd rather drive the two hours to Chattanooga than to deal with headaches that this has given me.

posted @ Wednesday, August 23, 2006 6:54 PM | Feedback (0)
Count XML Elements in the DOM

I was asked this week to explain how to count the number of elements in an XML file.  I quickly said to use the XPath count function and left it at that.  After spending so much time using XSLT, I sometimes forget which functions are only available in XSLT, such as the count function. 

It didn't take long for this person to return for more answers.  She tried to use selectSingleNode("count(//doc/row)") to return the count, which obviously didn't work.  As I began to explain the correct answer, several others gathered around because they have struggled with the same problem.  This was a big red flag that others out there may need help with this too, so here you go. 

There is an easy way to count the number of elements in an XML file.  We have many XML files that contain recordsets.  They have a row element for each row in the recordset, and an attribute for each column.  All you have to do is use the selectNodes method to return the rows in a NodeList.  You can then check the length property value of the NodeList.  See the example below.  I know this may seem basic to some of you, but hopefully it will help someone.  I was surprised at how many people said they just loop through the file counting the records. 

Sample XML:

<doc>

  <row id="1" value="10"/>

  <row id="2" value="11"/>

</doc>

Sample JScript:

var Doc = new ActiveXObject("MSXML2.DOMDocument.4.0");

Doc.async = false;

Doc.load("countingxml.xml");

var numRows = Doc.selectNodes("//doc/row");

WScript.Echo(numRows.length);

posted @ Thursday, August 17, 2006 7:57 PM | Feedback (2)
Now posting with Live Writer

This is my first post after installing Live Writer.  I appreciate the intro to Live Writer.  Once again, geekswithblogs keeps me informed.  I wouldn't have know about this otherwise.

So far, I like the interface.  If nothing else, it has a spell checker which I desperately need.

Well.... Here goes.

posted @ Thursday, August 17, 2006 7:34 PM | Feedback (0)
SQLServer Modulo (%) with decimals instead of integers

Someone asked me a very simple question, and I was so surprised at how difficult it became to answer.  They wanted to know how to tell if a number is evenly dividable by another number.  (e.g. If you have a case of 24, you can sell it in 6 packs, but you can’t sell it in 7 packs.)  I quickly said to use the MOD function and check for a zero return value.  I walked away with confidence that this issue was resolved.  I’ve done this before, I know it works....somewhere. 

 

The problem is, that in SQLServer2000, you can only use modulo (%) with integers.  If you need to allow for decimals, it will not work.  This person is very resourceful.  When she discovered this, instead of running back to say it didn’t work, she kept digging until she found another way.  If the ceiling() and the floor() are equal, then they must be evenly dividable.  This appears to work well, but I can’t seem to stop questioning it.  Is this really the best way?  Are we going to take a performance hit from calling two functions for every row?  This seems like such a simple thing, part of me feels like it’s a little over engineered.  That being said, I also like it because I think it’s clever. 

 

Obviously our sql is more complex than this, but it’s a good example. 

 

declare @numOne decimal (8,6), @numTwo decimal (8,6)

select @numOne = 24, @numTwo = 6.2

 

select cast(@numOne as int) % cast(@numTwo as int)

 

select case when (ceiling(@numOne/@numTwo) = floor(@numOne/@numTwo)) then 0 else 1 end as Even

 

If you’ve run into this issue before, or have any thoughts concerning it, I’d be interested to read your comments.

Cheers,
John

 

**** NEW INFO ***

Thanks to Feedback from Nuri, I found out that SQL Server 2005 supports modulo for numeric data types.  Here's the details from SQL Server 2005 help:

Syntax

 

dividend % divisor

Arguments

dividend

Is the numeric expression to divide. dividend must be a valid expression of any one of the data types in the integer and monetary data type categories, or of the numeric data type.

divisor

Is the numeric expression to divide the dividend by. divisor must be any valid expression of any one of the data types in the integer and monetary data type categories, or of the numeric data type.

posted @ Thursday, August 10, 2006 8:17 PM | Feedback (2)
Visual Studio’s XSLT debugger

Last year I had written that I was having issues with Visual Studio’s XSLT debugger.  That turned out to be an issue with not having installed the “Professional” edition when I downloaded beta 2.  I have since corrected that problem and have been thoroughly enjoying the new features.  I thought it was time to set the record straight.  Although I’m not doing as much hard-core XSLT development as I had in the past, I’ve been able to make enough use of VS to point out some of the differences (both bad and good) as compared to XSelerator.  I’ve got to give Martin Rowlinson kudos.  He came up with XSelerator and helped us survive for a long time without VS support.  I couldn’t have completed some of the transforms I’ve done without it.   That being said, it’s nice having the support of Microsoft being your tools.  

 

XSelerator (Pros):

  • XSelerator has a snippet library, which I really like.  It’s great for storing repetitive code.
  • I like the look and feel of XSelerator, although there is less of a learning curve is you are used to VS
  • The price is much better than VS, although you probably already have VS for other languages you work on.

 

XSelerator (Cons):

  • Schema Support – Xselerator has no concept of schemas
  • XSelerator struggles ad-hoc queries against files with namespaces
  • Hot keys are different than all of my other development tools
  • XSelerator does not debug into msxsl:script
  • XSelerator doesn’t show you attributes when you run xpath against a file, but it does highlight the element so that you can easily see them

 

Visual Studio (Pros):

  • I already know my way around it (hot keys, etc.)
  • I already had a copy through work.
  • It’s well supported, and well written about (blogs, forums, etc.)
  • Xpath is intuitive, as it is run through the command prompt, like you would expect from VS.
  • Debugging drills into msxsl:script
  • VS includes schema support
  • When running xpath during debugging, VS shows you the attributes of the node you query.

 

Visual Studio (Cons):

  • VS doesn’t show you the current position in the input file during debugging
  • Lacks a snippet library
  • More expensive if you don’t already own a copy
  • Less intuitive if you are not already familiar with VS.

 

The bottom line is, I already use VS for all my other development.  Having XSLT support in VS allows me to obtain “One stop shopping”.  I don’t have to switch back and forth.  If I’m training others on XSLT, I can easily tell them how to debug it with VS, without explaining that I use XSelerator, that they have to download the trial copy, deal with the pain in the rear licensing that they have set up, and then they can debug it.  I can stop cussing every time I hit F11 to step into debugging in XSelerator, only to be reminded that it’s F8.  And, most importantly, I can benefit from great add-ons like the XPathmania that I recently wrote about. 

John

 

posted @ Tuesday, August 08, 2006 8:35 PM | Feedback (5)
News
Xobni outlook add-in for your inbox