Sunday, June 13, 2004

Time to start Riding

This afternoon I got my bike back from the shop. It's a 1990 Centurion Le Mans. It's a very nice bike and I have had it since it was new. It's almost hard for me to believe that this bike is 14 years old. I've put a lot of miles on it, and it still rides great. I put it into the shop to get a tune-up and the bar tape put on it. I use to ride a lot. Everyday I use to get up and at least ride 8 miles or so, and then get ready for school or work. The last 5 or 6 years it has been in the garage. It has been patiently waiting till I have had time. Time to ride it, time to take care of it, time to just get on the road and pedal.

My goal is to start riding at least three times a week. Being in IT for 7 years now, I have the typical IT body type. I admit I need to lose a couple of pounds (my ego won't let me write down the real number but it is over 2). So apparently sitting in front of a computer all day and eating nachos and drinking vanilla coke one after another isn't as healthy for you as once thought.  Who knows, I may actually build up to riding to work one of these days.

Thursday, June 10, 2004

Security Summit Resources

Michele Leroux Bustamante, who did an amazing job presenting all of the sessions at Tuesday's Developer Track of the Microsoft Security Summit, has just posted the Resources for the sessions. Check out her blog at dasblonde.net. She has some great insights into ASP.NET, Web Services and Security.

Guaranteed or Your Money Back

Matt Warren has a great post on what it takes to be a multi-post a day blogger. The fact that he had 6 posts on monday and three on tuesday points to the fact that he knows what he is talking about.

I've been Quoted!

I've been Quoted! The company that makes the rockin CMS we use asked me for a quote about their product. And guess what, They've used it. Check it out, its in the sidebar. The whole product quote I wrote is on the testimonials section.

Tuesday, June 08, 2004

Security Summit

Today was spent in deep learning on security. I had the pleasure of attending the Microsoft Security Summit in Anaheim today. It was a very good event with content that hit the mark. Most of the information was things I have already learned but it was a very good refresher. Buffer Overruns, Cross-Site Scripting, SQL injection Oh, My.

Everything I had as far as emails and printed materials about the event said it was to start at 8 o'clock sharp. Now I really don't like to be late, but due to traffic, I didn't even get to the parking lot till 8am. So I speedwalk into the building and get registered, get my agenda, and the keynote didn't start till 8:30am. I reallized that Msft really understand IT.

The keynote by Mark Valentine, address the continuing security focus that Microsoft has made and plans to keep. This was shown in several of the demos shown. The SP2 for Windows XP really demonstrates that. They have really developed a user interface that makes Windows Updates, Anti-Virus and Internet Firewall (soon to be called Windows Firewall) easy for home users to use. It is always going to make firewall rules for the corporate end a lot better to, as admins will be able to create domain and standard firewall rules. That will make it so people on your network that have laptops that they take home every night (like myself), won't be bring in malware and viruses back into the network.  Micorsoft also showed off the SD3 Framework, which means, Secure by Design, Secure by Default, Secure in Deployment. The other thing that was mentioned is that after the trustworthy computer email from Bill Gates came out, they stopped all forward progress on Windows 2003 Server and started the SD3 model. Apparently all Developers at Microsoft have to read "Writing Secure Code" before they are allowed to touch on stitch of code.

I took the Developer track of the Security Summit. This was a day well spent. Michele Leroux Bustamante taught all four sessions. She is a Microsoft Regional Directory for the San Diego area. She did an amazing job of keeping the material entertaining. I told 14 pages worth of notes from the sessions. After I get a chance to decipher my own writing (not always easy) I will share some of the nuggets I gleamed from the event.

Highlights

  • Code Access Security Explained
  • Storing SQL ConnectionStrings encrypted ( and still be able to use them in your application)
  • Strong Names for Assemblies.
  • Sand Boxing Components
  • Security settings in ASP.NET
  • Using the SQLAdapter and SQL parameters to fight SQL injection attacks.

If you get a chance to get to this event, do, the more you know about security the better you can sleep.

Monday, June 07, 2004

Simpsons: Map of Springfield

Saw this on Scott's Blog and had to blog it.

"This is so funny I was literally crying Seriously, spend some time exploring."

[ComputerZen.com - Scott Hanselman's Weblog]

Google Stats

Google.com has become synonmous with internet search engine. It has even become a verb among the techie group. "Oh I just googled that!". So with all of this popularity, have you ever wonder how much information they get from their users on what they search? It does make sense to capture that information, with more and more information you can build better and better search algorithms. Google has a program called Google Zeitgeist (I have no idea how you pronounce that). The information displayed is simply amazing. It is like webtrends on steriods. I found this link by looking at the googleblog. Which I thought was pretty fitting as they are the fine people that own blogger.com. It's nice to know they believe in what they own.

Reality TV has gone too far..

So I am really starting to think this reality TV thing has to stop. I just read about a patent that some TV producer dreamed up for a show.  The concept:

A child adoption proceeding is conducted in the form of a television game show and online media event, wherein couples compete against each other to win legal custody of the child. Adoptive parents are selected using a vote-by-phone and/or Internet voting scheme, together with 24-hour surveillance of the prospective parents, which enables television viewers and Internet users to inspect prospective parent-contestants in detail before voting for the winning parents. The present invention overcomes inequities of state-run or private adoption agencies, permitting a fairer selection process while providing greater time and access to observe a pool of prospective parents.

This to me is just wrong. There are a lot of couples that have a lot of love to give and can't have children of thier own. They have a good heart and want to give a child that is not "their-own" in the biological sense a better home, a better live, hope. So what do we as the viewing audience do to these poor souls that have love to give and good hearts. We have them humiliate them on national TV to prove to audience that they are as good and kind as them seem. Lets make them compete against other people like themselves and see if it gets nasty. People that would watch a show like this are the same kind of people that watch car racing to see the crashes. What is wrong with the world that this can be granted a patent. I am sure it will be on FOX next session.

I have a better idea for a reality TV show. Let's call it, "Bad Family to Good Family".  It's really an easy concept. Lets get the same people that would be on Jerry Springer for a six pack of bud, and have 8 children by 8 different partners. The same people that view children as a punishment for getting drunk and having sex. Now we offer these people a keg of beer and per child. Of course they won't be able to refuse this offer. Now we take the children and give them to good loving families and watch them blosom in to the good and intellegent people the can be. That's it!

Of course this would never fly. It is a heart warming concept, and those are never put on TV. Also there are too many legal issues. For some reason the breeders have all the rights, which prevents their children from having the right to a good life in a loving home. So the breeders will continue to breed, and the childless parents will continue to long for a child to love, and the children of the breeders will desperately wanted to be loved. And the breeders, they will have their "kid" get them 'nother beer from the fridge.

Friday, June 04, 2004

Coding and Parenting

There was a post on slashdot about "Parenting and a career in Coding". Here is what I came up with on that subject

  • Leave the house and get home from work at the same time. I take the train to work, so I have to leave a little earlier. So I leave the house at 6:50am and they come and pick me up at 6pm. Our boy knows what time to get me and he looks forward to seeing me as much I as look forward to see him. The consistency is great for them. And even if you have to work afterward it's a great break that does refresh you.
  • If you have to work late, work from home. I know this is sometimes hard to do, but I get more done at home where others can't bother me.
  • Dont miss story time.  This does so much for our little boy and a great deal for me. The half hour or so that you are away from the code helps you to clear your head a little bit. And reading your little one is an amazing thing. You should never miss it.
  • Do something with them during blank stare time. You know that time where you are just staring at the screen and can't think or type.
  • Show them that computers are fun. I wrote a little IE wrapper for our boy that goes to four sites. Bob the Builder, Sesame Street, Disney and Yahooligans. We play on the Bob the Builders Site and have a great time. You would be amazed how fast they get it.
  • Follow your nose. If the diaper needs changed, change it, your Wife will think are the greatest man to ever walk the face of the earth, and you have done something to help take care of the little one.
  • Never miss the good night hug and kiss.
  • Never underestimate how much you can get done when they are asleep.
  • Birdeye View

    Check out the Pigeon Kam. (Warning may caution motion sickness)

    What to get the Asthmatic Geek that has everything.

    Engadget just mentioned this handy dandy little USB gadget that I think I am going to have to pick up. Apparently there was a geek who saw a need and decided to remedy the situation. The situation you ask, well, it is all the dust and dirt and contaminates that make our workplace their home sweet home. So ask any self-respecting geek would do, this person created an Air Purifier.  But not just any Air Purifier, this one is USB powered. So I can even take it on the road with my laptop. humm, I better pack an extra battery.

    another week, another deadline missed

    Well, I am am finally over (for the most part) that flu that has been taking people down left and right. Yesterday was my first day back to work since last thursday. It's funny how it is nice to be back to work after being sick. Unfortunately being sick has caused me to miss yet another deadline. Now you would think that I won't seem like that big of a deal to me, but I really do lose sleep over this stuff.

    Last night I started writing a little app that was purely for fun. Just a little something to help me monitor somethings. The thing about this app is I wanted it to just sit in the System Tray when it was minimized. I was afraid that this was going to be terrible hard to do. That is so not the case. I did a google search (which is how all of my application ideas start life) and came up with a great article on just this subject. For the most part, you just use the notifyIcon component and set some properties and you are off!

    Tuesday, June 01, 2004

    The Perils of Indexing Services and PDFs

    So at work we have had this issue with only certain PDFs showing up in the search results. It had nothing to do with what directory the files where in (I tried that). It had to do with what version of Acrobat they were saved as.  So here is what I found, the PDF IFilter v5.0 which we installed to index our pdfs uses the pdf 1.4 protocol. However when you save a document as Acrobat 6.0 it uses the pdf 1.5 protocol. Unfortunately there isn't an updated version of the IFilter yet and the "current" version was last updated in 2001. So if indexing services isn't cataloging your pdfs, check what version they are.

    Monday, May 31, 2004

    When good Case Mods go bad

    I have seen some really cool case mod (Modifications to your computer case). But I am starting to think that some people may be taking this whole things a little too far. On the other hand I think that this one is pretty cool.

    Wednesday, May 26, 2004

    Custom Controls in ASP.NET

    Tonight I wrote my first custom control. I was at a point with this project I am reworking a little bit, where I didn't want to have to create the same set of controls four times. I have no idea why I haven't done it before. I guess I was just to stuck in the old ways of doing things. I can't tell you how hard it rocks. I wrote the control, imported the control into VS, and used it. It worked first time! (now that never happens when you are trying something for the first time). I simple followed along with a great article at 15seconds.com. The article "Building ASP.NET User and Server Controls, Part 2 By Solomon Shaffer" is a great start. I followed along with the article and had my custom control built in about a half an hour. Mr. Shaffer's article is very easy to follow and he does an excellent job of getting to the real code and methods behind building a custom control. Everything I had read on Custom Controls before was so high level, that it didn't really do me much good. However this article makes it easy.

    Interesting Blog

    This evening I was reading an article about pixar. The article mentioned Steve Jobs and Disney discussing the contract. Of course this ended with Pixar going out on its own. But it got me thinkin' does Steve Jobs have a blog?

    Guess what? He does JustOneMoreThing.com - Mac'N'Stuff - Steve Jobs' weblog ;-)

    Tuesday, May 25, 2004

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

    I pretty much thought  I had this whole Searching Indexing Services with ASP.NET all wrapped up, till my Boss' Boss' kept getting an "Access Denied Error". However it was extremely intermittent. It would work great three of four times and then show up. These kind of intermittent problems are so frustrating. How can you fix something that you can't reproduce everytime? Or even every other time? So after about an hour of doing google searchs, I found an article on support.microost.com. FIX: "Access Is Denied" Error Message When You Try to Access Indexing Service from ASP.NET with Impersonation Enabled.

    Being that I am using impersonation in my application, I felt at least this could get me on the right track. The first thing that it mentioned was if you are on Windows 2000 serve rupgrade to service pack 4. We have been a little leary of service pack 4, but I crossed my fingers, toes, eyes and installed the services pack. To my surpise it installed cleanly, but didn't fix the issue. So re-reading the article it talked about adding something to the web.config. My web config was already pretty customized, but I through caution to the wind (after making a complete back up) and added the code. It worked! This is what I added. Make sure it is outside of your current <system.web> node.

    <location path="filename.aspx">
    <system.web>
       <identity impersonate="false" />
    </system.web>
    </location>

    It' basically turns off impersonation just for the file. And as I gave ASP.NET full access to my catalog. It runs beautiful.

    Monday, May 24, 2004

    Words, Words, Words

    So the Little Boy's speech is getting better and better everyday. The funny thing about that is now he will go through his whole dictionary of words stringing them together for his own entertainment. (note: when the Little Boy calls out your name and strings it together with a vehicle, a color, a food, a smell and adjective, don't take it personally, however if your Wife does, that is a different matter completely) This is a dangerous time, but not for him, for us. He is at the parroting stage. However it isn't right after you said it. It's two hours to four days later. So you really have to watch what you say. You tell the dog 'you stink, bad dog', and two days later, the Little Boy is telling the some random kid at the park the same thing. Fortunately we can blame the school systems, being that he is in pre-school. 

    There are a lot of words he knows, and by knows I mean he understand what they mean. Usually there are driving instructions that are yelled out from the back seat when I am driving. Like 'turn here' or even worse 'turn here NOW!', when we pass the toy store on the way to walmart.(I don't go that way any more, It takes ten minutes more to go the long way, but I feel it is worth it.) And the 'No No, No, turn here please' when I keep on driving. Of course if you are really driving poorly (which apparently I do quite often. I use to think I was such a good driver.) you hear "Stop the Car, Please!".

    A new phrase that has entered the Little Boy's repertoire is "No NEVER!". He picked up this little gem from the movie "Peter Pan".  However he doesn't quite get how to use it. For example:

    Me: "Would you like a glass of milk?"

    Little Boy: "No NEVER!"

    Me: *hand Little Boy glass of milk*

    Little Boy: *Drinks it in two gulps*

    Me: "Was that good?"

    Little Boy: "No NEVER!, more please?"

    So it makes me wonder what other phrases are going to be like that. I wonder what will be the next thing he says that will be my mental "quote of the week". He is growing so fast, and really starting to get use to using this strange language we call english. He has come so far, but still has more work to come. My Beautiful Wife and I were talking about this while doing some grocery shopping tonight. It must of been a sight to see two adults going down the isles saying "No NEVER!"

    Sunday, May 23, 2004

    Finally we get a real action figure

    There is finally a real action figure. This one doesn't have freakishly large biceps. It doesn't sling webs, but it's good on the web. He doesn't have x-ray vision or lasers that shoot out of his eyes. Infact he needs glasses to see his computer screen. He is the everyday hero. He can fix DNS problems with a single command. Able to parse large log files in a single view, he's faster then an over clocked pentium 4, he is the super-alpha-uber-geek, GeekMan! Unlike other action figures you'll find in the stores, Geekman comes with full documentation, yeah, I know, pretty exciting, huh?

    Friday, May 21, 2004

    Skype and Two C# Guys

    Skype
    Today, I finally broke down and walked across the street to Frys and picked up a head set so that I could use Skype. So what is Skype? I am so glad you asked, It is a really cool piece of software that allows you to make "calls" over the internet. It uses the "IP" (Internet Protocol) transfer your voice across the ether of the internet to the person receiving the call. Now there is a couple of things, the other person has to be on Skype as well, and there isn't a version for Macs or Linux yet. Ed and I played with it this afternoon, and it is amazing it sounds just as good as the regular landline phone. You don't need anything special except for a headset. If you have a microphone and speakers that will work too. My headset is just a $10 labtech unit and it sounds great. I think this is going to a great tool, and something we will use when working from home.

    Two C# Guys
    Ed and I have started something we hope is helpful. Not only for each other but for everyone. We've started a blog that we are co-authors on called Two C# Guys. We are going to put code snippet and post about some of the C# issues and projects we run into. It's about sharing the knowledge.

    Trying something New

    Blogger has comments built into their offering now. So I have enabled them. We will see how they work. If we don't like it we can go back to haloscan comments. Let me know what you all think.

    Thursday, May 20, 2004

    The Eyes have it

    Today my Beautiful Wife and I had an appointment with our Optometrist. It has been about three years since I've gotten my eyes checked. So I was a little nervous. I know that they have gotten a little worse.  Of course sitting in front of a computer all day, typing away doesn't help them much. It went as well as can be expected. The Optometrist seemed like a nice man, and wasn't in a rush to get you out the door. The little boy of course went with us.

     Now that was a new experience for me. Last time I picked out glasses I was by myself and could take as long as I wanted. However after the Little Boy had patiently sat through both My Beautiful Wife's and my eye exam he was ready to go. But I still needed to pick out some frames. With some good advice from my Beautiful Wife I got some frames that will look nice two years from now. (When the insurance allows us to get new glasses) She on the other hand is going to go pick out hers when the little Boy is in school. (A very wise decision.) So Hightlights from the Optometrist visit.

    • The Little Boy pretending to have a conversation with my Brother on a my cell phone which was turned off. It is great to see him using his imagination.
    • One of the office stafff asked The Little Boy if he wanted to sit down and wait, and he  informed her that he was going to be with one of us and he didn't care which, but under no circumstances was he going to sit down for her.(my heart swells with pride on this one)
    • My Beautiful Wife looking at me in my new glasses, and giving me a look of 'you are the handsomest man on earth, after Johnny Dep'.
    • On the way home we stopped at A&W and everyone had a Root Beer Float.

     

    Wednesday, May 19, 2004

    Be Careful About what you promise

    Today at work, I was in an informal meeting with my boss and my boss' boss. We were talking about how one of the project that we hoped to have finished a month ago still isn't finished. Its due in part to people who should care and want it done, just not giving the project the time it deserves. Anyhow we were talking about new functions of the site that were tied to this project. One of them, I thought for sure we had done. It had been assigned to a person a couple of months back, and surely they had it done. So I told my boss' boss that we would generate the code that throw that page up on the site this afternoon. No problem right? As it turns out not so much. This one piece required some research and some terribly repeative copy and pasting (I hate that kind of work). So about a quarter of the research had been done and almost none of the coding. It was one of those things that just fell through that cracks like things sometimes do. Now of course, I had assumed it had all been done and was waiting and my boss's boss had been told it would be done today. Well I am happy to report that it was done today, with just about an hour to spare. I ended up just tearing into it, created an xml document for the data, an xsl to transform the data and used my handy dandy little html generator to create the html. Still even with the little utilities to help make it faster it was a lot more work than I initially thought it would be. However next time, I will check to make sure I have all the facts before I promise something like that.

    I know I promised way back when that I would post my little html generator. I still haven't gone through and documented the code yet, but here it is anyway.

    (Little disclamier: That the Software comes "as is", with no warranties. None whatsoever.
       This means no express, implied or statutory warranty, including without
       limitation, warranties of merchantability or fitness for a particular
       purpose or any warranty of title or non-infringement. Also, you must pass
       this disclaimer on whenever you distribute the Software or derivative
       works.)

    Monday, May 17, 2004

    Renfaire Wedding

    This weekend My Beautiful Wife and I went to a Wedding that was being held at the Renaissance Pleasure Faire. This was the first Renaissance wedding we have attended, and I have to admit it was a lot of fun. Not many weddings have musicians in Elizabethan costumes, or MooNie the Magnificent. The food was reall good and the weather was very nice. The wedding was lovely, and it really fit the couple well. One of the more interesting events was the toast. They did a 1530s style toast. How this goes, is a little different then the normal best man toast. The Best man stands up, and then the Bride and Groom do as well, each putting their right hand on the left shoulder of the person in from of them. Then they walk around the dinning tables and each person is to follow suite, until everyone at the wedding is following behind. It sort of looks like the Elizabethan version of a congo line. Once everyone is on the party train the best man circles the group around and around till they are in a tight circle around the couple. Then the toasts start. It was very nice and makes everyone feel like a part of the wedding instead of just a spectator.

    Sunday, May 16, 2004

    6 Months Old

    I see that today, this blog is six month old. That's amazing to me. It seemed like only yesterday when I started it and now, 119 post later it has been six months. I've been doing this blog longer than some people have remained married.

    Solution to the directory version application security problem

    What do you do when you need to secure the directory in IIS, but you need security at the application level as well? Since IIS doesn't give your application all of the username and password information, you can't use directory security. However you have files that need to be secured at a directory level. Of course if you use application security, your application can't communicate with IIS to give it the username and password information. So it's kind of a catch22 isn't it? So when presented with a choose, choice both. My application give access to office files if your Active Directory account is in the correct groups. So that is application level. But with application level security if anyone knows, or can guess the url of the documents, they can view them right in their web browse. Now what is the use of setting up Active Directory groups and using the System.DirectoryServices namespace, if in the end anybody can browse to it.

    The solution that I can up with was to lock down the my content directories in IIS. No rights to anyone. Then I created a page to be the proxy between the web and the NTFS level. So now you can only browse to the files if you have the correct authorization from the you Active Directory group, and if you don't it takes you to a login screen. What's really interesting about this solution is it envolves a lot lets code then you may think. The article I based my code on is in the Microsoft knowledge base, Article -306654.

    privatevoidPage_Load(object sender, System.EventArgs e)

    {

    FileInfo MyFileInfo;

    long StartPos = 0, FileSize;

    string filepath = "";

    try

    {

    //Check to see if there is anything in the QueryString.

    if (Request.QueryString["doc"].ToString() != "")

    {

    //Set filepath to Querystring.

    filepath = Request.QueryString["doc"].ToString();

    }

    }

    catch

    {

    //If the Querystring is empty send the user back to Default.aspx.

    Response.Redirect("Default.aspx");

    }

    try

    {

    //Set the appropriate document type

    Response.ContentType = "Application/pdf";

    //Response.ContentType = "Application/pdf";

    //get the physical file path

    stringstrFilePath = utilities.getPath(filepath);

    //instantiate the FileInfo class

    MyFileInfo = newFileInfo(strFilePath);

    //Get the size of the file.

    FileSize = MyFileInfo.Length;

    //Write the file directly to http content output stream

    Response.WriteFile(strFilePath, StartPos, FileSize);

    Response.End();

    }

    catch(Exception err)

    {

    //Write to custom error logging function

    logging.writeError(err.Message.ToString());

    }

    }

    So Pretty straight forward. You locate the document give the Response.WriteFile function the files path and a few properties and your aspx page opens up as if it were that document. Of course the one thing you have to be mindful of is the Content Type. That  must be set to the correct MIME type for the type of file you are opening. Wher are some of the types.

  • "text/HTML"
  • "image/GIF"
  • "image/JPEG"
  • "text/plain"
  • "Application/msword" (for Microsoft Word files)
  • "Application/x-msexcel" (for Microsoft Excel files)
  • I have ran in to a couple of issues worth mentioning. First in some cases with users that are running Internet Explorer, the page will appear to be completely blank. The issue seems to be that IE is second guessing the content type and doesn't display anything. The fix is simple, but on the client side, in their pdf reader they need to disable view pdf in browser. Here is an article that covers all of the variations of Acrobat and Internet Explorer settings to do that

    Second, is speed, with files that are larger than 2MB it takes a little longer. Not a lot, but it is noticable. This is because our ASPX page is reading the file in binary and rewriting it in binary to the browser. I haven't figured out how to speed that up just yet. If I do I will post it. However a document being 10 times more secure, is worth it being a little slower.

    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.

    Friday, May 07, 2004

    Searching Indexing Services with ASP.NET and C#

    So I have a project that requires we have a mini site search. And being that I have written the whole site in ASP.NET/C#/XML/XSL I didn't want to have to go back to classic ASP for search. I did some searching online and found a really good post on using ASP.NET with Indexing Services. The article/post "Query the Indexing Service with Ixsso and ASP.NET" covered the issue really well. However it was written in VB. So of course I needed a C# version of it, so I just translated the VB stuff to C# and voila!.

    private void searchIndexing(string strValue)

    {

    try

    {

    CissoQueryClass Q = new CissoQueryClass();

    CissoUtilClass util = new CissoUtilClass();

    OleDbDataAdapter da = new OleDbDataAdapter();

    DataSet ds = new DataSet("IndexServerResults");

    Q.Query = strValue;

    Q.SortBy = "rank[d]";

    Q.Columns = "vpath, filename, rank, characterization";

    Q.Catalog = "query://contentserver/catalogname";

    Q.MaxRecords = 1000;

    util.AddScopeToQuery(Q,"\\","deep");

    Q.LocaleID = util.ISOToLocaleID("EN-US");

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

    DataGrid1.DataSource = ds;

    DataGrid1.DataBind();

     

    }

    catch(Exception f)

    {

    lblError.Text = f.Message.ToString();

    }

    }

    Just make sure you add a reference to the IXSSO COM Object in your project and away it goes!

     

    Thursday, May 06, 2004

    Things I've learned about ASPNET (the local user account for ASP.NET)

    Well, I have been trying to trackdown an incredibly irritating issue with my ASP.NET v1.1 code not running on one of our w2k (windows 2000) servers. I think the root cause of it all has to deal with the fact that this box runs OWA (Outlook Web Access) and OWA doesn't play well will other. So here is the run down. In the machine.config , node processmodel where use name says "machine" it is using the ASPNET local user. For the most part this user has access to everything it needs because it is in the Group user. (I know a user in the user group... a little redundant). However there are some instances, depending on patches and services packs where this user doesn't get the correct NT users permissions. This table from Microsoft really helped.

    Table 1. Required NTFS permissions

    FolderRequired PermissionAccountComments
    C:\WINNT\Microsoft.NET\
    Framework\<version>\
    Temporary ASP.NET Files
    Full ControlProcess and fixed impersonation accountsThis is the ASP.NET dynamic compilation location. Application code is generated in a discrete directory for each application beneath this folder.
    The tempdir attribute on the <compilation> element can be used to change this default location.
    C:\WINNT\tempRead/Write/DeleteProcessLocation used by Web services to generate serialization proxies.
    Note that the Delete permission is set using the Advanced button on the Security page of the Windows Explorer folder properties dialog box.
    Application folderReadProcessThe location of your Web application files (that is, your application's virtual root directory: for example, c:\inetpub\wwwroot\webapp1).
    By default, the Users group has the appropriate access rights.
    %installroot% hierarchy
    (C:\WINNT\Microsoft.Net\Framework\v1.0.3705)
    ReadProcess and fixed impersonation accountsASP.NET must be able to access .NET Framework assemblies.
    By default, the Users group has the appropriate access rights.
    C:\WINNT\assemblyReadProcess and fixed impersonation accountsThis is the global assembly cache. You cannot directly use Windows Explorer to edit ACLs for this folder. Instead, use a command Windows and run the following command:
    cacls %windir%\assembly /e /t /p domain\useraccount:R
    Alternatively, prior to using Windows explorer, unregister shfusion.dll with the following command:
    regsvr32–u shfusion.dll
    After setting permissions with Windows explorer, re-register shfusion.dll with the following command:
    regsvr32 shfusion.dll
    Web site root:
    C:\inetpub\
    wwwroot or the path that the
    default Web site points to
    ReadProcessASP.NET reads configuration files and monitors for file changes in this folder.
    C:\WINNT\system32ReadProcessFor system DLLs loaded by the Framework.
    Parent directories of contextList Folder/ ReadProcessFor file change notifications and the C# compiler.

    Wednesday, May 05, 2004

    It's 3AM

    Well, It's 3 AM. I don't know why I am not sleeping away, dreaming of being on a beach with my beautiful Wife drinking some tropical drink with a little umbrella in it. Instead I am ftping a xml parser to the server and installing that. My beautiful Wife and I even talked about this. I want to be a good sleeper. It is on my goals list. Top five even, but I'm awake and working away. And working on server configurations at that. Now that is boring stuff. People have decided to have elective surgery over having to work on server configurations. But here I am plugging way at it.

    Tuesday, May 04, 2004

    A Weekend with VAM

    So this weekend I worked a lot. Come to find out that one of my applications that was ASP.NET Validators had NO client-side validation for netscape, mozilla and opera. Of course there was no mention of this deficience in the .NET framework documentation. This explains the ghost problems that I have been chasing for close to a year with this application. That being the case I need to fix it and fix it quick. That is where VAM comes in. VAM is a fantastic validation framework that Peter Blum has put together. It is completely cross-browser and cross-platform compatible validation. Simply put is it brilliant. Peter has done a great job of documenting the product. So this weekend armed with the documentation and the new validation framework, I went to work at rewriting the application the take advantage of VAM and get back a little self respect. (It's really hard to realize that something you wrote, didn't work as you planned for a year. It's kind of humiliating).

    Between learning the new framework and writing some code the make the application better than it was. (I know a year more of .NET then I did when I wrote it) I spend about 15 hours this weekend on it, but I am much happier with the product. Interesting enough, some of the code from a year ago seemed a little sloppy, and the validators thought so too. Like I would have two buttons, one for each mode the page would have and then I would hide or show the button depending on the mode. Well, that is a little redundant. So I rewrote the pages with one button that would change dependingo on the mode. It all goes back to KISS (Keep It Simple Stupid). Why would I need two buttons when one will do the job. I did a lot of clean up like that , that I feel will make the application run quicker. The less controls that have to be rendered the faster the ASP.NET will run.

    Well, this weekend wasn't all work. My Beautiful Wife vowed to get me way from my squareheaded girlfriend (my laptop). So sunday afternoon/evening, we picked up Mom and Dad and headed down to the happiest place on earth. We decided to go in the other disneyland park. It was a blast. Sunday was very warm, so everyone had apparently decided to skip going to the park that mouse built. I don't thiink I had ever seen the park so empty. We walked on to "Soarin' over California", checkout the Grand Californian, got drenched on "Grizzly Rapids", had some wine and dine at the Golden Vine. It was all so nice, and it cool down perfectly. (Especially after the soaking we got on Grizzly Rapids) Then Dad and I got to check out the new Tower of Terror Ride! I have to say that it is first rate. We both thought that it was a lot of fun. A good sunday afternoon.

    Friday, April 30, 2004

    A Week has gone by

    Well, I know I haven't been very good that last couple of weeks about blogging everyday. I have two projects due, pretty much today, and my asthma has been acting up. So by the time I get home, if I have any energy, I am working. If not, then I am sleeping.

    Asthma and the Attacks, not just a band anymore
    Last night was little tough, I had a pretty good asthma attack. It was one of those that just shuts you down.

    It was interesting, I was trying to think how to describe it. I mean, you take all of your medicine, but that doesn't make it go away. It just makes it think about going away. So you end up laying there, and sleeping, but it's not like regular sleep. Because your body has been lacking in oxygen, it just kind of goes to sleep, but your mind isn't sleeping. You can hear everything and feel time go by and you kind of can't do anything about it. I heard my beautiful Wife come in to the room to check on me, but, I couldn't really acknowledge that I knew she was in the room. Also because you are trying to move but can't really, you feel really heavy. Where regular sleep you don't feel like you are made of stone.

    So after about three to four hours of this kind of sleep your body will start responding to your mind. But everything is slow and an effort. It's one of those things that I don't talk about much. It's not the focus of my life, it is just one of those things I deal with. But today I thought, hey maybe I will write about it so that you would know what it was like. Well enough about that.

    NDoc and Documenting Code
    So I have got the one project pretty much wrapped up. I have written a lot of code that is reusable, and helpful. It authenticates with Active Directory, uses AD groups to see whether the user has access to the application and what perrmissons they have, if they do have access. It uses XML to help archive the documents, giving the user a current and archived view on the fly. A WYSIWYG (what you see is what you get) editor written to work in the Internet Explorer browser, and is written in JavaScript and XSL so that I can use it to edit content that is stored in XML if I am so inclined (I was).

    So will all of this code I need documentation to let others in the company use it and see what I Was thinking right? So am I going to sit down and type it all out in Word? No! I comment my code in C# using XML comments, and then when I build the project it gives me a xml file with every function documented! Now we have to make it human readable (I think that XML is human readable, but I am among the minority) . So I downloaded NDoc. This is a great program that takes that xml file and the dll that is created for your project and generates MSDN like documentation. Now .NET developers live and die by this stuff, so this is as good as gold. I can hand the project off to any other .NET developer and they can pretty much pick it up from there! Good stuff.

    Tuesday, April 27, 2004

    Riding and XML

    Well, the camping/riding trip was great. It was really relaxing and I got to ride a lot. The ole' XR 500 did just great. The 30 dollar ebay shock worked great and over all it was a lot of fun to ride. I really enjoyed the long group ride. It's really cool seeing 10 bikes scooting across the dry lake bed. There are some pictures on the photoblog. Saturday we had a nice surprise, my Beautiful Wife called and said, "Hey, I'm at Kramer Junction, come get me". I was so thrilled she came. Everyone was!

    So sunday morning, we hopped on a quad and went for a little ride. It was something that I have always wanted to share with her. I don't know what it is about dirt riding, I just really enjoy the feeling and the visuals of it all.

    Well, the train is getting close to work, I will talk about the XML portion of this post a little later.

    Thursday, April 22, 2004

    Gone Ride Be Back Later

    Well, tomorrow I am heading out with my Folks to go Camping and Dirt Riding. It should be a lot of funny and I am really looking forward to it.

    Now I know that this week has been a little light on the post. What can I say, work has kept me pretty busy. I have written some very cool things though. We now have a web application that is using active directory. Not just for authentication, but also assigning roles by what groups the user is in. I wrote a fairly good xml based ASP.NET forms engine. It uses XSL and transforms a xml config file in to Web forms, that includes validation. I am going to be working on adding functionality to that and making it as good as I can. In fact once I get a couple more things polished we are going to start using it at work.

    Now I know I still owe, the htmlGenerator, that takes xml and your xsl files and write you an html file. I will get it up here, I promise. I just need to takes some time to write a little documentation on it, before I set it free. But I have to tell you, I've been using the heck out if it. Infact on the ASP.NET form engine.

    So next week, some more indept post on the path to Authenication with Active Directory (i.e. how to get the microsoft example code to actually work), ASP.NET webform from an XML template. (I love code that generates code...It makes me happy) and even a little talk about the Riding Trip.

     

    Tuesday, April 20, 2004

    Active Directory and Web Form Validation in ASP.NET (How I am learning to love Active Directory)

    So it's been a little while since my last post. I have been working on a project that of course is due by the end of the month or even sooner if I can. The best part about this project is we are using active directory for our authentication engine. (If it's good enough for the network login it's good enough for me.) The data that this project is dealing with is very hush hush, only upper echelon people get to read kind of stuff (This would not be me!). So it has to be very secure and very reliable, and I have had a month to get it done. (humm, not sure how that worked out)

    The tough part about this project has been the Security. It has to be tight, and with good reason. So we decide to use AD (Active Directory). Now how about find good information on authentication with AD? Not so easy really. There is not a great deal of stuff out there, and I have had to reread a lot of it to get the idea. But it is now starting to click. There is two parts to it. The LDAP authenication, and the FormsAuthentication. The first is to authenticate the user against AD, and the second is to make sure they don't have to login on every page. I don't have all of this mastered as of yet, but I am hoping to by wednesday.

    Here are some of the links I have collected in this authentication journey.
    Use Form Authentication with Active Directory
    Forms Authentication with Active Directory
    Active Directory Authentication with ASP.NET
    ASP.NET Forms Authentication

    Sunday, April 18, 2004

    Movie Quote

    Movie Quote for the Day
    Movie : "Mystery Men"
    Character: "The Shoveller"
    Quote: "We have a blind date with destiny and it looks like she ordered the lobster."

    Saturday, April 17, 2004

    RSS Feed Junkie...have iPod will Travel

    So I admit, I am an RSS feed junkie. I rather have my RSS aggregator open and the feeds stream into it, then to open a browser and look at the site that the content is coming from. At work I leave it open all day, and check it whenever it is updated. Now I know that everyone has worked really hard to make their blog nice to look at, I know that I have, but I just like having the content coming to me, instead of me going to it.

    Now, I have my iPod, and it is great for my music, but what about RSS feeds. I know what you are thinking, those two things have nothing to do with each other. And at one time that is true. However, someone has written an app that lets you sync RSS feeds on your iPod. It is called iPod Agent. It is written in .NET (of course) and does a lot of stuff to make your iPod not only your music play, but a real world PDA. You can sync Mail, Contacts, Calendar, Tasks, Notes, Weather and RSS News Feeds.

    So now,  I can listen to Dave Brubeck "Take Five" and catch up on reading my Email, and favorite blogs! Engagdet has a great post on it.

    Thursday, April 15, 2004

    Quote of the Week

    The Wayward WebLog (Matt Warren) has summed up how it has been at work for me lately.

    Some days you get stuck and you end up doing more thinking than anything else. On those days it?s easy to take a break and punch out a few paragraphs of pondering for the internet elite. But all this week I?ve been reluctant to do anything but spit out for-loops and conditionals.>I think my F10 finger is getting sore from too much debugging.I tried to go web-surfing and it started to hurt whenever I clicked. Maybe it?s some typing related malady, or maybe it just hungers for more code.

    For me, it is the F5 key, but basically the same idea!

    The Code Project

    The Code Project is one of the best sites I've found for coders to get great examples and tutorials from other coder.

    Tuesday, April 13, 2004

    XAML

    XAML stands for "eXtenisible Application Markup Language". basically it is a new technology that allows you to created user interface of your Windows applications using markup syntax to create and describe, text, links, images and controls. This will be available on the next Windows operation system. (code named "Longhorn"). Here is an interesting article showing an application created in XAML running on "Longhorn". Click here

    Sunday, April 11, 2004

    Started a Photoblog

    So yesterday I started a photoblog. I plan on updating it once a week or so. So far, I have gotten some nice comments about my train picture. Check it out

    Saturday, April 10, 2004

    The next Wave of blogging

    So I have been reading about mobbloging. It's been around for about a year, but with cameraphones getting cheaper, it is becoming more and more popular. What is a moblogging? Simply put it is the practice of submitting text messages and images directly to online diaries. This article from the Guardian Unlimited explians the whole thing better than I can.

    It's an interesting movement. I have thought for awhile that some of the beauty of the photos that I've seen from cameraphones is the candidness of them. That the picture was very much of the moment, and had very little to do stoping everyone and getting the camera out and taking the picture. While I love those pictures, they aren't as truly a representation of day to day life. I really love the fact that moblogging lets you share those real life/real moment images with your friends and family and even the world.

    Some links to check out:
    textamerica
    http://www.buzznet.com
    http://cellphones.engadget.com/

    DNS Changes

    So yesterday, I made some (scary) changes to the DNS for our Domain at work. I changed the DNS Servers used for the domain, and transfer all of the records to the new DNS Servers. If I  goofed up, little things email for the entire company would of been down, and no one would of been able to get to our website.

    I am happy to say that none of those bad things happened. The transfer and propagation happened in about 14 hours. (which is incredibly fast) Which means when I show up on monday, I get to keep my job :-).

    Friday, April 09, 2004

    Meetings are options, days off required

    So I am not sure how it worked. We were suppose to have a meeting today about a project that is on a tight timeline. So feeling miserable, I get myself out of bed to come in to work, for this meeting. I was suppose to present what I have coded up. To show the protype site (1/3 of it with functionality built and usable) and get feedback. Little design and usability tweeks. Anyhow not one of the other people sheduled to be in the meeting were in the building today. Now, most people have a good idea earlier in the week that they are going to take friday off don't they? My boss was the only one that told me. And truth be told, he deserves some time off, he is a hard worker, and does his best to make my job easier. Sometimes he is the only reason my job is even doable. But how come the others couldn't reschedule.

    In the end it was probably good I came in, there were issues that I needed to take care of. But still it would of been nicer to be sick at home instead of sick at work.

    Thursday, April 08, 2004

    feeliing Ill

    Just not feeling well today. Got sick at work. Can't seem to keep anything down. But tomorrow is friday, maybe it will be better tomorrow.

    Tuesday, April 06, 2004

    Wrote something cool, saw something cool

    Wrote something cool
    So as a programmer, it is in my best interesting to be lazy. Not afraid of hard work lazy, and not slacker lazy. I mean lazy in a way that I never want to write the same code twice. Moreover, I don't want to write code, that I can generate with other code. Funny enough about this kind laziness, you can spend longer on writing a solution, then just doing the task at hand. Fortunately I broke even today. So what I wrote today, is a little utlity, that you feed a xml document, and the xsl stylesheet that your wrote for the xml, and it creates a html file from your xsl. So including the xsl I wrote 270 lines of code (145 for the xsl, 125 for the utlity), to create an html document, that only has 185 lines of code. Why would I do that?

    Several reasons come to mind. First, accuracy, the xsl is going to more accurate, in writing the links, that I am going to be. In 185 lines of code, there are 150 links. Anyone would started to get a little bored and start to let their mind drift off, and the links won't of been as accurate because they are thinking about lunch or that movie they just saw. Second, flexibility, what if tomorrow, my boss says hey, 'Russ that looks great, but lets try this format instead'. Correctly changing the html page around could take a lot of time. However, changing the format of the xsl, is much quicker, and I can regenerate the html in half a second after the xsl is finished. Finally, that laziness factor we were talking about earlier. I don't want to write the code, when I can have something else do it for me.
    An example of this would be the electric handsaw (skilsaw). Now you know it took longer to make the first skilsaw, then it did to cut 10 boards. But did it take longer to create the skilsaw then it would of taken to cut 5000 boards? Probably not.

    In a couple days once I get my little utility all polished I will post it. I still need to write in some error checking and clean up the UI. (Ed we can do a command line version if you want :-> )

    Something cool I saw
    Checking the logs today I saw that I got a someone who came to my site from a yahoo.com search. I was pretty please to see with the keywords "Real Life Adventure" I was ranked 6th on the search results. So, I am thinking, right on, movin my way up the search engine ladder. Out of curiosity I typed in the title of my blog "Adventures in Real Life" and I came up ranked 2nd in the search engines. Now how cool is that.

    Monday, April 05, 2004

    All About Blogs and RSS

    Here is a good article on what blogs are technically all about. It doesn't go in to the community that bloggers have, but it is quite informative. Check it out!

    New Dev site

    Ziff Davis has started a new developers site just for Windows/.NET Developers.  It's called  DevSource. On my first spin around the site it looks like it has some very useful articles and great tips. One of the articles that caught my attention was under their using VS section. ".NET Rock Stars: Chris Sells", it's an interview with Chris on windows development. It's pretty much a must read. The other article interested me was again, under the using VS section "Framework Patterns", this article specifically is targeting exception handling. It's good stuff, check it out.

    Friday, April 02, 2004

    Geek Glossary Part I

    It was brought to my attention that I use a lot of acronyms ;-). And it's true, I do. With my job, it saves me about ten hours a week using acronyms in emails, phone calls, and in meetings. The computer industry is just over flowing with them. However, some acronyms have a different meaning depending on how they are used. It's like all the rules we have in the English language at it's worst. Let me give you an example. Here are two sentences using the same acronym to say two different things.

    • wrote something in ASP today.
    • I need to call our ASP to find out what happened.

    So if that wasn't confusing enough I use phrases like "Classic ASP" and "ASP.NET". These are referring to versions of Active Server Pages. So in truth "Classic ASP" means version 3.0 and "ASP.NET" means version 4.0 and 4.1.

    During a recent meeting at work, we were discussing the "API" for interfacing with this or that, and one of the people in the lending department asked what an "API" was. I thought this was a great question, because as geeks we forget that not everyone knows or even has any clue as to what we are talking about. So what does "API" mean? Well, it stands for Applications Programming Interface. Don't you feel better knowing that? So now you are going great, what does an Application Programming Interface mean in English. What it really means is, it is a way, or more correctly an program that someone has written that has methods of letting you talk with this other program, without having to know the particulars about it. Now, you are thinking so APIs are something that makes it easier to program for something. And the answer to that is a very positive, ummmm sometimes, maybe...

    The last one we will cover today is "blog". It isn't really an acronym, and it's barely a word. Basically it's slang. What blog actually started out as was "Weblog". Then someone started to drop the "we" of "weblog" to make it "blog". So basically a blog or weblog is a web page that is updated almost daily that consists of someone?s ramblings, rants, raves and even geeky thoughts. (Kind of like this one).

    Until our next installment of Geek Glossary, here is a link to a great Geek Glossary to look up computer acronyms and other computer industry mumbo jumbo.

    Thursday, April 01, 2004

    Thing one and Thing two

    thing one
     I noticed something the other day but didn't have time to mention it. The blog has passed 1000 views. What's even cooler than that is for the most part my views aren't counted. Which is kind of cool because it is just the count of you guys visiting.

     When I started this blog four months ago, I didn't think about anyone visiting it. It was more like writing to the ether. However I have had people visit the blog from Sweden, Italy, Japan, Spain, Germany, China and of course from all over the United States. It's interesting to see on my little blog, the effect the internet has, and the whole global village idea coming true.

     Now I know that most of the readers of my blog are friends and family and I thank you for thinking that I have something interesting to say. Even when I go on and on about ASP.Boring (as one comment suggested ;-D ). I want all of your feedback, so please don't hesitate to use the comments feature. Just click Comment(n) and write away. If you have a popup blocker on, you may have to turn it off to use comments.

    thing two
     On tuesday's blog I talked about a little utility called BlogJet. What it is, is a windows applications that works like Word for your blog posts. You don't really have to know any html to write you posts and have it look like you want it to. It has bold, italics, underline, bulleted lists, images and hyperlinks tools built in. It also as a really nice feature for people like me that lets you look at the code. (Being that I dream in code, I couldn't image not being able to see before posting my blog.)

     Every post since tuesday has been done through Blogjet. I am not sure why, but I find it more convenient to write and edit my posts in it. It's fairly intuitive and is really easy to set up. It even has settings to allow you to post blog account (for example I use blogger.com) and upload any images you are using for your blog to another server. While I haven't used this yet, it is a great idea and really speeds up the time it takes to post content to your blog.  Another nice feature is it allows you to connect to different blogger accounts. Not everybody uses only one  blog service and the creators of blogjet understand this.

     While I do think this is a great little product I do have a short feature wishlist. (Remember it is still in beta 1)

    • Spellchecker
    • CSS support
    • Cleaner HTML code in Code View

    I am happy to tell that these features are on the feature request list on the BlogJet forum.

    Got to code today

    Today ended up having fun coding this afternoon. We needed something that let people securely move the data. So that is what I wrote. It was in classic asp and it was made up of little components that I have created over the last year or so. I also used some components from AspUpload that are really nice and easy to use. We also purchased and are using thier XUpload product which is a very user friendly way of uploading multiple files. It even lets the users drag and drop out of windows explorer.

    It has been a little while since I've done anything in classic asp. It was actually nice. I am surprised about how easy it is to switch languages some days and so difficult others. I didn't have any problems today. Everything just flowed from a code point of few. For the most part I got a secure upload and download application done in a couple of hours including the user interface and security. Don't get me wrong, this isn't a modular piece of code that is reusable and perfect to use in ten other things. It was a one off solution. But it works and it solved a problem. Sometimes it's really nice to be able to solve a problem quickly.

    Of course I am working on a .NET version of the same thing that is way more modular and will use Active Directory for security of the internal users and a salted hashed password for the external users. It will always create and delete directories and documents on the fly or scheduled. It will allow the helpdesk group to create the secure transfer sites on the fly.

    Wednesday, March 31, 2004

    late train early day

    So today started at 5:00am, to make it to the train at 5:30am to get to work by 7:15am to get work done before the meeting at 8:00 am. After the Meeting at 8:00am ended at 9:00am, we had a meeting that lasted from 9:15am to 5:30pm. I caught the last train for home at 5:50pm. Got stuck in union station because the train taking me home at 7:00pm hadn't even showed up yet at 7:15pm. So I took the gold line to pasadena that left at 7:20pm to get to old town pasadena at 7:50pm. My beautiful wife picked me up at 8:00pm and we got home at 8:45pm.

    Tuesday, March 30, 2004

    XML-Based page templates

    So at work I am trying to find ways of automating and templatizing everything. One of things that I found today with this goal in mind was an article on xmlforasp.net regarding XML-Based ASP.NET Page templates. This is such a nice was to things. While all of the internal/intranet applications that Ed and I write have different functionality, we are trying to keep them having the same look and feel. This goes a long way to help that happen. The other great thing that this article addresses is making it easier for Jr. Developers and Content Publishers to use these templates. They only need to know basic html to get the job done. If you've ever tried to discribe a for loop to a non-technical person, you know how wonderful this is.

    Test of something new

    I downloaded this cool little utility called BlogJet. It seems to be working okay. I will try it for the next couple days and let everyone know what I think.

    Monday, March 29, 2004

    Happy Monday

    Well today is my Beautiful Wife's and my three year anniversary. Three years has gone by so fast. It is such a pleasure to be with her. I so enjoy her company, her wit and sense of humor and even her `onery streak. (I find it so adorable, I can't help but be completely in Love with her.) She really is the love of my life!

    Today is going to be a happy monday. I am playing hookie from work (with the proper forms filled out in triplicate and signed by the correct people in human resources and management) and the little boy is play hookie from school (told the bus driver friday he wasn't coming in) and we are going to Disneyland. It should be a beautiful day for it.

    I do have to say, I got the coolest thing for my anniversary present. I got a 20gig apple iPod.It is an amazing device. This little mp3 player will hold up to 4000 songs and is about as thick as two CD cases stacked. The other thing about it is the sound quality is so amazing. It's really nice gift. I know I will enjoy it for a long time.

    I know that it's been like three days since I've blogged, it was almost a test to see if I could go a weekend without writing anything in C#, XML, XSD or HTML. So apparently I can, however the withdrawals and terrible :-). I ended up dreaming in code. Speaking of code, one of the other gifts I got was a gift card to Barnes and Noble. This was very nice indeed, and of course I ended up picking out a book on C#, XML and XSD. (Not a big surprise now was it). It's called ".NET and XML understanding the code and markup behind with Wizards", its one of those great O'Reilly books, that us techy geeks love to have on our bookshelves.

    Welp, I am off to get ready to go to the happiest place on earth....The Apple store... hmmm I mean Disneyland.

    Thursday, March 25, 2004

    It's okay to Love Cartoons but...

    It's okay to love cartoons, but trying to live them is something completely different. Apparently someone loves the Simpson so much that they built a really life replica of their house to live in. Now that's going just a little bit to far don't you think? I mean, I loved the cartoon the transformers growing up, but I'm not in the garage night after night trying to make a porcshe that transfroms into a robot.

    Now don't get me wrong. I do enjoy watching cartoons. With a three year old in the house the view choices are rather limited. Fortunately there are movies like "Finding Nemo", "Toy Story" and "Monsters Inc" that were created by people who know how to entertain children and adults in the same film. Like I said, it's great to love cartoons, but don't try to live one. In the life of a cartoon, you never know when a piano would get dropped on your head.

    Tuesday, March 23, 2004

    iPodraces

    I love it when someone is as creative as they were here in iPodraces. You got to like when someone merges the best MP3 Player on the market with the best part of Star Wars Episode I.

    Monday, March 22, 2004

    If you catch on to it quick enough you can pretend you where there

    Friday night, I was reading by blogroll and came across some that struck a cord. It was on ComputerZen, it linked to a post called "Real Coders, Real Code" by Mat Warren.

    It's late, do you know where your coder is? Really, it's a very good question. You think your spouse is sleeping next to you at night. They are not. They are awake, bleary, weary and barely lucid, secretly feeding their addiction. Yes, it is sad and depraved, and utterly reprehensible. Of course, they don't want you to know because they need to keep the mystery. It will make it all the more poignant when the truth does come out, because they have a plan, and it is big. They need to code. It is what makes them go; the juice that makes them feel alive, and it is all leading somewhere. You see, there's an app, and it does something wonderful, and you'll understand when you see it, but it's not exactly done yet. It would be if they could just figure out that frigging API, but the doc sucks straws and the on-line help is out to lunch.

    It's nice to know your not alone stressing and obsessing over your code. The comments on the post sure reflected that. My favorite comment was from a women married to a man that is struck with the same "affliction". What she had to say was genius.

    Oh yes, I knew this already! I pray for the day my husband comes up from the cold, dark, stinky basement and asks for a beer and plops down in front of the TV to watch the Packers play. Heck I'd settle for a white wine spritzer and figure skating at this point! I sit with a smile on my face nodding as I listen to him excitedly rant about .Net and how he got a (whatever you call it) down to .003 seconds from its previous 3.8! I hug him and tell him I'm proud of him and he can do anything because I know that one day, that idea that's clawing and chewing its way out of his brain will make it out! Yep, I love that coder of mine!

    First Review: Dell Latitude D800

    So I got the laptop Friday morning, of course I wasn't able to get switched over in an afternoon. (despite how hard I tried) So this weekend took it home, and of course it passed the first test, the curbside appeal. My Beautiful Wife said that it was a very nice looking machine. (from a Mac user that is a very nice complement) The next test was the home network. I have a DLink WiFi router (802.11b, yeah, I know only "b" but, my DSL doesn't do 54mbps, yet so..) and of course it found it immediately. I had no problems with the connection all weekend long, in every room!.

    I definitely think that ordering the faster 5400rpm harddrive was the way to go. Between the faster drive and 1gig of RAM it is amazing how fast applications open up. When I got into work today, the last test was completed. Dual Monitors. I have two flatscreens at work and it is something that I am very used to having. I've been running dual monitors since Windows 98. So it was important to me that it worked and it did. After a little Tinkering I set my 1st Monitor up with the DVI connection in the back of the port replicator and then the 2nd Monitor with the anolog VGA connection. They are working and looking great.

    The screen on the laptop itself is simply stunning, the color depth and the resolution is awesome.

    I can tell that this is going to be a real workhorse of a laptop. I am sure that we will create many wonderful apps together.

    Friday, March 19, 2004

    Rockin Laptop, Rockin Demo

    So this morning when I came in this morning, by Boss told me that he had signed for my laptop today and it is in the building. So I had to do my best to not jump up and down and clap like a fool. I got a new Dell with 1.7ghz Processor, 1 Gig of RAM and a 60gig Harddrive. Of course it has WiFi and Bluetooth. My phone is Bluetooth is it should be a happy little device. So this weekend is going to be taken up with playing...hmmmm I mean working with the new laptop. My first impression is that it is larger than I thought it would be, but it is beautiful.

    Yesterday was other vendor demo. It differed from the previous by the answers to the questions. Everywhere we were told "No" in the demo on wednesday, we were told "Yes" in the demo yesterday! So that is just amazingly impressive. Something that works out of the box and yet is amazingly customizable and cofigurable. I am sold. If the decision was up to me we would have gave them a check yesterday.

    One part of the demo that I really enjoyed was their Chief Architect , Scott Hanselman going over the architecture of the product. It really open'd some eyes! I was in heaven. I am very thankful Scott took the time to go over that with us. I have to say later that night I had visions of XML Schemas dancing in my head!

    One of the other thing that I got from Scott's presentation was CodeSmith. If you aren't using CodeSmith, why? I know what you are going to say, I don't really like the idea of code generators. Well, what about one that you write the template for, hmmmm? Something that saves you 60% of your time doing the redunant coding for you. Okay wait it gets better. Eric Smith has made it a freeware. Now there is a professional version, but isn't only about 80 bucks. Come on, does it get better than that. That is so worth the two to three hours we all spend finding that typo on the easy stuff that we just goofed on.

    Thursday, March 18, 2004

    thought for food

    The images that was posted here is no longer available

    More Quotes

    Absurdity, n.: A statement or belief manifestly inconsistent with one's own opinion.
    Ambrose Bierce (1842 - 1914), The Devil's Dictionary

    The time to stop talking is when the other person nods his head affirmatively but says nothing.
    Henry S. Haskins (1878 - 1957)

    I am prepared to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter.
    Sir Winston Churchill (1874 - 1965), on the eve of his 75th birthday

    Architecture is the art of how to waste space.
    Philip Johnson (1906 - )

    Wednesday, March 17, 2004

    The long Parade of Salesman

    So today was the first in the Long Parade of Salesman. We are going through the vendor demos for the project at work. It's a large project for us, so the vendor demos last about 8 hours. Yes friends 8 hours! Dare I say it again, 8 hours.

    Today was the first one and it went fairly well. Tomorrow is the one I am looking forward too. It's a great company that starts with the letters "cor" and ends in "illian". I get to meet Scott Hanselman tomorrow!

    Monday, March 15, 2004

    Fuzzy's ready to go

    Who's Fuzzy? Actually the question is what is Fuzzy? Before your minds go to far with this..Fuzzy is the Quad that my Dad, brothers and I build. It started life as a YZ 490 dirt bike and is now a full fledge quad. Fuzzy is a purebred mut! It's front suspension and brakes are off of a Honda 250R FourTrax. The Latter half of the rear swingarm and brake are from a Suzuki LT250R, while the first part of the swingarm is the stock YZ490 parts. It using the YZ 490 rear shock and linkage. Keeping with the Mut theme, the front plastic is from a 1986 Honda 250R FourTrax and the Rear Plastic is from a 1987 Suzuki LT250R. The Tank is (strange enough) stock YZ490. We fabricated, modified and welded the frame ourselves. We had a friend do the aluminum welding that merged two swingarms in to one.

    In the end, Dad has a one off quad that doesn't look, sounds or ride like anyone else's. It is fast and stable and just a lot of fun to ride. There is a lot of bragging rights that goes with building your own quad. Anyone can buy one, but not everyone can make one!

    Sunday, March 14, 2004

    Quotable Quotes

    I currently don't have anything interesting to say, so I will differ to those that do.

    No animal should ever jump up on the dining-room furniture unless absolutely certain that he can hold his own in the conversation.
    -Fran Lebowitz

    Remember not only to say the right thing in the right place, but far more difficult still, to leave unsaid the wrong thing at the tempting moment.
    -Benjamin Franklin

    We all have strength enough to endure the misfortunes of others.
    -Francois de La Rochefoucauld

    Be careful about reading health books. You may die of a misprint.
    -Mark Twain

    Our chief want in life is somebody who shall make us do what we can.
    -Ralph Waldo Emerson

    Do not be awe struck by other people and try to copy them. Nobody can be you as efficiently as you can.
    -Norman Vincent Peale

    It is a waste of energy to be angry with a man who behaves badly, just as it is to be angry with a car that won't go.
    -Bertrand Russell

    Why is it drug addicts and computer aficionados are both called users?
    -Clifford Stoll

    Home computers are being called upon to perform many new functions, including the consumption of homework formerly eaten by the dog.
    -Doug Larson

    Thursday, March 11, 2004

    Taking the fun out of fishing

    I was taking a little break from coding this afternoon and decided to check out some of my regular blogs. While surfing Engadget.com to check out the latest geekwares and what do I find? The Fishing Cam, a camera that goes on your line like a floater and then inline you add the wireless transmitter. Of course right about your Penn reel you have a video screen showing you what the camera sees. No don't get me wrong, I am a big fan of technology. I mean I program for a living.

    However somehow this fish cam idea seems just wrong! I mean one of the great things about fishing is being outdoors on a beautiful lake, with friends and family. I mean some of my favorite fishing trips was with my two brothers, Dad and Granddad K. We rented a couple of boats and fished lake skinner for the day. We told stories and jokes all day long. As far as the fishing catching goes I think only K got a fish, and we all had "the one that got away" stories.

    The other thing about fishing is the thrill of the hunt. Your pray is almost invisible to you and the only way for you to get your pray is to have knowledge of it. Trying different lures and baits. Trying different ways of moving the bait. All the guess work is removed, you see the species and know exactly what bait to use. At that point why don't you just buy the fish at the market and pay a fishing video game.

    Wednesday, March 10, 2004

    XSL in ASP.NET the Easy way

    Well Boys and Girls, I am about to get geek here. I've just spend an hour trying to figure out how to write a function in C# that will let me display my xml transformed with my XSL Stylesheet. That is nothing cool then seperating the data from the presentation layer! So how come it took an hour? Well, because I was thinking in Classic ASP mode. Yup we all do it from time to time. You see in Classic ASP if you were going to transform your xml with an xsl it looked something like this:
    dim xmlDoc, xslDoc
    Set xml = Server.CreateObject("MSXML2.DOMDocument.4.0")
    xml.async = false
    xml.load(Server.MapPath("book.xml"))

    Set xsl = Server.CreateObject("MSXML2.DOMDocument.4.0")
    xsl.async = false
    xsl.load(Server.MapPath("output.xsl"))

    Response.Write (xml.transformNode(xsl))

    So of course this is how I was thinking that I was going to have to do it in .NET. I won't bore you with the details of everything I tried. Let's just say that after trying the StreamWriter and still not getting what I wanted I was frustrated. I was thinking this can't be harder in ASP.NET then it was in Classic ASP, that would be a step in the wrong direction. So I did one more google search. Ah-ha, there was what I was looking for. It was easy I knew it had to be. So here is how to do the same thing in ASP.NET...Ready

    < asp:Xml ID="books" DocumentSource="xml/books.xml" TransformSource="xsl/output.xsl" Runat="server" />
    Yup, that's all there is too it! I have to thank aspalliance.com for doing such a great job of documenting the controls and giving great example code.

    Happy coding :-)

    Tuesday, March 09, 2004

    A Nice surprise

    So yesterday my Beautiful Wife surprised me with some gifts. Presents are always nice. Just little things to know you are thought of always makes one feel good. Anyhow she got me something that I have wanted for years. The movie "Animal Crackers" on DVD. This is so amazing, because amazon hasn't had it for over two years now. I don't even know how she found it.

    I am just a huge fan of the Marx Brothers. There is something about their humor being witty and corny at the same time, I just love.

    "One morning I shot an elephant in my pajamas. How he got into my pajamas I'll never know."

    Plus the characters, that Harpo and Chico always played, they were the underdogs but you knew they would make it. And of course there is always something amazing about the way that Harpo played the harp, and Chico played the piano. Two completely different styles, yet both filled with showman ship.

    And we can't forget Groucho shooting off the oneliners like a machine gun.

    Well in the words of Jeffery T. Spaulding - "Hello, I must be going, I'm glad I came all the same I must be going, I'll stay a week or two, I'll stay the summer through, but what I'm telling you is... I must be going"

    Monday, March 08, 2004

    typographic illustration

    Surfing the blogs and found this link. Typographic illustration
    Having a background in typesetting and pre-press work, I found this illustrations to be both beautiful and intriguing.

    Sunday, March 07, 2004

    How to Read a RFP response

    A good portion of my afternoon has been spend reading some of the RFP responses we have received for a project we are doing at work. What is an RFP? Well friends it is an acronym for Request for Proposal. So we sent out a fifty page RFP. What we get back ranges in size depending on how bored the sales and marketing teams are at each company. From this I have come away with some useful information. No so much on the products but on how to read a RFP response.

    1. If within three paragraphs they mention how flexible the product is more than five times, it probably isn't.
    2. Gleaming technical information from marketing materials is like reading hieroglyphics, it is doable it just takes a lot of studying and it may not be a true representation
    3. A RFP response is like staring at the sun, if you look long enough you will burnout your retina.
    4. Brevity is our friend...All of those marketing people out there, repeat after me brevity is our friend.
    5. Sending me a RFP response in PDF format is great, but don't expect me to read 200 pages off of the screen, cause, I'm just not going to.
    6. Most important of all, the ones that include pictures keep you from getting bored as fast! If their in color it's even better.