Friday, May 14, 2004

Bloggin Apps

Lately, I have been using BlogJet for my posts. It works pretty good and they just came out with their first version out of beta. For the most part it does what it does pretty well. However there are something that I want that it does seem to have. I like the simplcity of the interface, but I want it to support my stylesheet. On my blog site I have a pretty extensive stylesheet that controls the fonts, colors, sizes and a couple of other things. Well when I post I have to add a bunch of <span> tags and, I have to look at my styleshee to see which style I want. usually that isn't too big of a deal when it is just paragraphs or links. But when I put code examples up, it gets to be a workout. I end up spending as much time making it look right as I do writing the content.

I've looked around and other stuff out there that does use the stylesheet is more complicated. And believe it or not the whole reason for this blog is to get away from complicated web programming. I just want to type in my post, click a few buttons and publish it. So of course this got me thinking. I am just going to have to build my own blog utility. I've already written a WYSIWYG editor that works in Internet Explorer. It's actually in xsl. So all I need is to figure out how to get the post to the server right? Well Blogger has adopted the Atom API. Which means I can make my application connect through Web Services to the Server. This will let me add new post , update or delete older post. What really impressed me is how well they have documented the API. There is even a C# example of coding to the API. So I will work at writing a utlity to add to the mryiad of others out there.

I'll let you know how it goes. If it's any good I'll post it.

Wednesday, May 12, 2004

How do you get Milk from a bean?

I can't drink regular milk. It has been Soy or nothing for a while. And since I have to have my White Chocolate moca (triple shot of espresso, thank you), I have to have it soy no whip. Well PixieStitch (Sis) can't drink regular milk either, but her take on Soy Milk just cracked me up.

Searching Indexing Services with ASP.NET and C# Part II

Last friday I blogged about using Ixsso and ASP.NET to use as a site search. Well,I had to go and play with it a little more. The one thing I didn't like about the example that was given on friday was that it used a datagrid. Now don't get me wrong, I love datagrids in ASP.NET. However I just don't think of search results as tabular data. It's much more in a paragraph form. Look at google, you'll see a header/title, an abstract or paragraph and the URL. That is what people are use to seeing went they do site searches. Seeing the ranking is cool for us geeks but for most users, they want the search to be smart enough that, it is displayed in the order it was ranked in. So yesterday I had the idea that I should just serialize the results that I got from Indexing Services and use XSL to display the data. This is a great way to change the look of the results very quickly. However there was a side benefit that I didn't think of, it's fast. Now true I'm not searching an index of 6 billion pages like google, but I was amazed how quick it was. So how about some code now. This piece of code starts right before we were binding the results to the datagrid in friday's example.

da.Fill(ds, Q.CreateRecordset("nonsequential"), "IndexServerResults");

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(ds.GetXml());

XslTransform xslDoc = new XslTransform();
xslDoc.Load(utilities.getPath("xsl/search.xsl"));
xslDoc.Transform(xmlDoc, null, sw, null);
xmltest = sw.ToString();

So what we did was serialize the dataset by calling ds.GetXml(). From there we converted the string that ds.GetXml() generates by creating an new XmlDocument and loading the xml string into it by calling xmlDoc.LoadXml(ds.GetXml()). After that we created an instance of XslTransform, loaded the xsl file in to memory, and transform the xml to html, and returned it as string to be used in our aspx code. Pretty cool, huh?

What the brochure doesn't tell you.

Remember being in Jr. High and thinking that when you are an adult you can do anything you want?
I remember all of the things that I was going to be able to do and see when I was an adult. It was almost like a brochure. The brochure for adulthood. It showed parties, and cars to drive, and high paying jobs, and the ultimate apartment. I would get to spend my money however I wanted on whatever I wanted. I best of all I could go to bed whenever I wanted. Everyones brochure was what their ideal adulthood was going to be like. I remember my brother and I  would go through the JC Whitney catalog picking out the accessories that would make our ultimate van for driving across country. We had big plans we were going to drive coast to coast and back again.

So now am an adult. Legally for 12 years, actually for 8. So first and foremost, the brochure lied! I don't get to spend my money however I want. It goes to bills and necessities. The time I go to bed is dictated by the three year old and the morning commute. I haven't been to a party in ages and wouldn't have the energy to go to one. But these are the little things and really easy to get over. The brochure doesn't mention that when the Little boy falls and gets hurt that you fell like crying too. It neglected to mention the complete heartbreak you feel when he crashes his tricycle and gets road rash and a goose egg on his little head. Or how much you would rather, you were the one that was hurt instead of him. It didn't talk about how much you would do for him, and how completely in love with him you would be. It forgot to mention that I would like story time just as much if not more than he does.

The Little Boy's wounds will heal. I've had my share of road rash. I was an adventurous lad myself once. I know what it's like to be a rough tumble boy. Some of the scars go away and the rest you wear with pride. I know that he will be okay, and survive the next crash and the next one after that. They will be some of his war stories from his childhood. What I don't know is if I'll survive his next crash.

The brochure lied, things are much better than it said.

Monday, May 10, 2004

The Weekend

So, an interesting thing happened this weekend. I didn't work. I mean, I did but not really. Monitor a server doesn't really feel like work work. I got to spend time with my Beautiful Wife and the Little. My Dad and I helped a friend move. (You can always tell if someone is really your friend if they help you move) Sunday morning I was exhausted from helping our friend move. (Dad and I didn't get home till after 2:45am saturday night/sunday morning). So I couldn't do much sunday morning but sit around the house and rest up a bit.

I got to feelin' a little better in the afternoon so my Beautiful Wife, the Little Boy and I headed down to the happiest place on earth. It wasn't too crowded. The crowds weren't as light as when we went last weekend with Mom and Dad but it was good. Anyhow we did all of the little boys favorites, pirates, pooh, autopia, his new favorite star tours and honey I shrank the audience. That last one was a little too intense for him. I don't think we'll do that one for a while.

My favorite quote from the day is from the Little Boy (most of my favorite quotes here lately are from him). So let me set the scene, we are on Autopia. He steers the car, I work the gas pedal. It works good for us since he reach the pedal yet. Anyhow, the Little Boy works very hard at, driving it well, keeping it between the lines. He hates when the car bumps the inner rail because it jerks the steering wheel out of his hands. That being said, he didn't quite get the car straightened out in time, and the rail got him, and moved the steering wheel, with the attitude of someone that's been driving LA traffic, everyday for the last 10 years, he balls up his little fist, and yell "Stupid Car" and hits section of the steering wheel where the horn would be. Now this has to be all him. I don't drive during the week. (I metrolink it to work) So my driving has calmed down tremendously. My Beautiful Wife doesn't drive like that either. She is a very calm driver and doesn't get rattled by traffic. So it has to be his little personality. It's amazing to see it coming out.