Remembering My Grandfather on Memorial Day

by kevin 5/25/2008 6:15:00 PM

Grandpa and meThis time of year, I think about my mother's father a lot. He was on the beach at Normandy on June 6th, 1944. He was one of only a handful of men in his platoon who survived the initial assault. His unit pushed on through France and fought in the Ardennes Forest in the Battle of the Bulge in December and January. As I was growing up, he told me terrible stories of things that happened during that time. It gave me a very non-Romantic view of war that persists in my mind even to this day.

My grandfather suffered from terrible alcoholism and bouts of anger and depression for the remainder of his life after returning from Europe. And many of us in his family also suffered by association. But we loved him dearly. My grandfather often told me that the day on the beach in Normandy was the worst day of his life. He said is was the day he stopped believing in God.

In the fall of 1990, as he began the downward spiral of succumbing to the cancer that would claim his life just a few months later, my grandfather told me a part of the story that he had never told me before. For 20 years after D-Day, around June 6th, my grandfather would get terribly drunk and do awful, abusive things to his friends and family members. That part wasn't news. We were all well aware of the problems he had. Of course, this behavior was simpy a projection of the internal anger and guilt left over from those bad earlier times. My grandfather told me that near D-Day, he would cry out to a god he knew wasn't there for a sign. He wanted some sort of redemption, some sort of answer for the lives he had taken and seen taken all around him. And every year, his plea for help went unanswered. Year after year, for 20 years it went on like this.

Then, in 1964, he said that something radical happened. My grandfather's oldest daughter, my mother, announced that she was expecting her first child. He was angry. He was mad at my mother for getting married in the first place. He was mad at her for getting pregnant too young in life. He was mad at his wife for not stopping all of this. He was just mad about everything, really. His anger continued to fester and grow through the winter and spring of 1965 as that fateful time of year approached when he would be forced to relive all the horrible memories of what had happened in France. He told me that he often dreamed of the faces of the men he had killed. He dreamed of the faces of his friends who had died. He dreamt of their horribly disfigured bodies. My grandfather told me that in the spring of 1965, he asked God for some relief from his own memories once again. And he expected to be disappointed.

Then on June 6, 1965 at 6:30 a.m., I was born. His first grandchild was born at H-0 (or D+0) time 21 years later, meaning the exact moment of the amphibious landings on the beaches at Normandy. My grandfather never accounted for the several hours of difference between Eastern Daylight Savings Time (EDT) in the US and British Double Summer Time (BDST). To him, if his wristwatch read 6:30 then and now, it was the same 6:30 in the morning. In any case, my grandfather, Lester Earl Lawson, counted the timing of my birth as a miracle, a sign that God was listening to him. He continued to struggle with alcoholism and anger for the rest of his days. But he told me that the horrible dreams and sleepless nights ended when I was born. I don't think of myself as a miracle, per se. But to him, I was a gift from God and he treated me that way. I miss my grandfather at this time of year more than any other. The stretch of time from Memorial Day to D-Day is an important period of remembrance for me. Thank you, grandpa, for your service. I love you.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Personal

StyleCop MSBuild Integration

by kevin 5/24/2008 8:10:00 PM
The Source Code Analysis team at Microsoft has a new blog. An article was published today by Jason Allor describing how to do MSBuild integration. I was going to write an article on this subject but why reinvent the wheel when Jason did such a good job?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

C# | Software Development | MSBuild

StyleCop - Microsoft Source Code Analysis for CSharp

by kevin 5/23/2008 11:07:00 PM

Microsoft released their source code analysis tool for C# today. It's called StyleCop, sort of like FxCop except for source code. This tool is available for download here. I've been getting some coding standards in place at SnagAJob.com and this tool comes at the perfect time. StyleCop works with both Visual Studio 2005 and 2008. After you install it, right-clicking on a file in the Solution Explorer or in the code editor will present a new option on the context menu entitled Run Source Analysis like this:

 

Clicking on the new option will run the source code analysis tool on the selected file(s) and produce a report in a new source analysis window that looks like this:

Notice that each StyleCop violation shown has a code beginning with the letters SA and followed by a numeric identifier. These codes defined by StyleCop rules are grouped in the following way:

  • Spacing rules - 1000 series
  • Readability rules - 1100 series 
  • Ordering rules - 1200 series 
  • Naming rules - 1300 series
  • Maintainability rules - 1400 series 
  • Layout rules - 1500 series 
  • Documentation rules - 1600 series

In the Source Analysis output window above, notice the error SA1027. That rule is not valid for me because, for my projects, I want to promote the use of tabs in source code whenever possible. So how can I turn this source code analysis error off? Well, in the installation folder for StyleCop, there is an XML file called Settings.SourceAnalysis. On my Longhorn installation, this can be found in D:\Program Files\Microsoft Source Analysis Tool for C#. On your system, that folder may be elsewhere. There is also an executable program named SourceAnalysisSettingsEditor.exe in the installation folder. If you run the settings editor, passing the name of the settings file as the first parameter, you'll see something like this:

Notice the seven items under C# in the tree on the left? Those are the seven rule groups I mentioned earlier. Since it's the rule for SA1027 that I want to disable, I simply open up the Spacing Rules node and locate that rule by its code. I need to uncheck the checkbox for that rule like this:

Clicking on the Apply button, the change is made to the XML settings file. Opening the XML file in Notepad, we can see the change documented this way:

From the XML, you can see that the Boolean property called Enabled has been set to False for the rule named TabsMustNotBeUsed within the SpacingRules. And running the source code analysis on my file(s) from Visual Studio again shows that the SA1027 error related to the use of tabs in the source code has been eliminated from the output. Nice. You can tune the master settings file for all the other rules to suit your needs in the same manner. I'll be blogging more about MSBuild integration and other cool stuff that StyleCop can do in the near future.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

C# | Software Development | StyleCop

Silverlight Assembly Handling

by kevin 5/20/2008 9:16:00 PM
Hanu Kommalapati is blogging again! Awesome. In his latest post, he addresses the issue of assembly handling by Silverlight. With security at the forefront of everyone's mind these days, you need to be able to relate to others how Silverlight handles XAP files and their contents on the web desktop. In his post, Hanu explains how this is done. Scroll down and read his reply to a reader's question to fully understand. In essence, he says, "As of beta1, [the XAP files] won't leave any footprint on disk." This is good to know when you are selling the idea of using Silverlight to your clients or your management team.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Silverlight | Security

SnagAJob.com Open House 4 June 2008

by kevin 5/20/2008 5:38:00 PM

My company is having an open house on June 4th, 2008 in Richmond, Virginia. Free tickets to see the Wailers concert at the SnagAJob.com Pavilion across the lake from our office. And did I mention free cocktails and heavy appetizers? Mmmmm. Here's the text of the invitation. If you are in Richmond on the 4th of June, please come out and have some fun with us.

YOU ARE INVITED TO OUR OPEN HOUSE
Time:
5:30pm-7:00pm
Location:
4880 Cox Road Suite 200
Glen Allen, VA 23060
RSVP to openhouse@snagajob.com by Friday, May 23

SnagAJob.com is going through an exciting period of expansion and we’d love to show you our office space, and give you the opportunity to chat with some “Snaggers.”

This is truly an Open House, so please feel free to pass this invitation on to your friends and colleagues. While this is not a recruiting event, we do welcome you to check out our current opportunities at http://www.snagajob.com/careers/, and talk with Snaggers about what it’s like to work here.

This will be a casual event with cocktails and plenty of heavy hors d’oeuvers. After the Open House those interested can head next door to Innsbrook’s SnagAJob.com Pavilion for the Wailer’s concert – Tickets are Free!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Fun | Richmond

Profiling LINQ Queries Presentation

by kevin 5/19/2008 10:45:00 PM

I did a presentation called "Profiling and Tuning LINQ Queries" for the Richmond Sharepoint User Group on May 8th. I had gotten so busy, I forgot to post the slides and sample code. Here it is.

Profiling and Tuning LINQ Queries.pptx (75.58 kb) - these are the PowerPoint 2007 slides

ProfileLINQ20080508.zip (27.96 kb) - this C# project builds a dynamic query against the Northwind database using LINQ to SQL, allowing the use of the SQL Profiler to be used to see the increasing complexity of the queries as criteria is added and data is shaped using increasingly complex anonymous types.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Debugging | Richmond | SQL Server | User Group

Invoking a SOAP-based Web Service with PowerShell

by kevin 5/18/2008 10:45:00 PM

When I was at the NOVA Code Camp 2008.1 on Saturday, during one of my presentations, a question came up about using my ProxyForWsdl class (which I am now calling SuperSOAP, by the way) to invoke a SOAP-based web service from PowerShell. Nothing could be easier. This simple script would invoke the FactorService that I demonstrated during the talk to get the prime number integer factors of the number 8,675,303:

1: [Reflection.Assembly]::LoadFile( "<Path Omitted>\ProxyForWsdl.dll" )
2: $client = [gotnet.biz.ProxyGen.WsdlHelper]::GenerateProxyObjectForService( "http://<Server Omitted>/FactorService.asmx?WSDL", "FactorServiceSoap12" )
3: $client.GetIntegerFactors( 8675303 )

Line 1 loads the ProxyForWsdl assembly into PowerShell. Line 2 generates a dynamic proxy object for the FactorService based on the service's WSDL and a known endpoint named FactorServiceSoap12 (described in the WSDL). The PowerShell variable holding the proxy reference is named $client. Line 3 invokes the remote GetIntegerFactors web service method through $client with the parameter 8675303. The output of this script is:

7
7
13
13619

These are the prime number factors of the integer 8,675,303 just as you would expect. The service invocation worked! To build the ProxyForWsdl assembly referenced in the PowerShell script:

  • Download my ProxyGen source code and unzip it
  • The TestHarness project in the ProxyGen solution uses IronPython but you don't need it. Either remove the TestHarness project or download IronPython 2.0 (or later) and fix up the references to the IronPython, IronPython.Modules and Microsoft.Scripting assemblies to make the solution build. I recommend downloading IronPython, of course, because the TestHarness has some interesting code in it that shows how you can use C# code to host a PythonEngine. This can come in handy for injecting scriptlets into C#. The combination of languages feels good to me. C# for its wonderful retentiveness and Python for its equally wonderful expulsiveness.
  • Build the project and note the location of the ProxyForWsdl.dll assembly. You'll need that path in the PowerShell script shown above.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

User Group | PowerShell

Silverlight Web Services Slides and Sample Code from NOVA 2008.1 Code Camp

by kevin 5/17/2008 4:42:00 PM

This was the first time I gave this talk but the attendees seemed to be very receptive. The concerns about security in Silverlight, especially related to the protection of Intellectual Property (IP) and account access are really on peoples' minds. Based on the thoughtful question I received here and in Roanoke 2 weeks ago, I have decided to dedicate a whole chapter in my new book to Silverlight security principles.

In this talk, I discussed the various methods by which a Silverlight application can access remote web services. We didn't have time to get into RSS/Atom syndication but I'll be sure to cover it in a future talk. We also discussed cross-domain policy, another hot security topic, as it turns out. I showed how to enabled a WCF web service for RESTful delivery and then showed how to consume SOAP-based services from Silverlight. We closed by looking at the use of an in-domain, SOAP-based WCF service to act as a proxy for a cross-domain RESTful service that does not allow cross-domain access by policy. Here are the slides and sample code:

WCFRESTDEMO20080517.zip (18.89 kb) - sample code that shows how to make a WCF service RESTful; a Silverlight control is included that demonstrates how to use it; there is also a Digg.com downloader that demonstrates cross-domain functionality from Silverlight.

Twitter20080517.zip (25.59 kb) - sample code that shows how to consume an in-domain SOAP-based service from Silverlight; that SOAP-based service is really a proxy to a RESTful service at Twitter.com. And since Twitter.com's cross-domain policy doesn't allow access from my domain, this example shows how the server-side WebClient class can be used to circumvent the policy limitation.

Silverlight and WCF - NOVA Code Camp 2008.1.pptx (199.39 kb) - my PowerPoint slides from this discussion.

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , , , ,

Architecture | C# | Silverlight | User Group | WCF

SuperSOAP Slides and Code from NOVA Code Camp 2008.1

by kevin 5/17/2008 4:28:00 PM

Accessing web services with SOAP can be just as easy as using REST with all the enterprise-class features you've come to expect from WSDL and SOAP. Who says that the cycle of metadata and proxy generation should be so hard? I gave a talk at the NOVA Code Camp 2008.1 that shows how by using the CodeDOM, and the ServiceModel.MetadataImporter, you can generate proxy code dynamically.

In this talk, I also showed how IronPython can be used to add a dynamic "lower edge" to a C# application to make it much more dynamic feeling. Finally, we finished with a discussion about features that may be added to Visual Studio 10 and the C# 4.0 language sprecification to make SOA achievable for many more developers. It was a lively discussion with lots of great questions. Here are the slides and the demo code:

ProxyGen20080517.zip (20.86 kb) - Sample code that demonstrates the use of IronPython and some custom CodeDOM code to avoid generating proxies for WCF integration via SOAP/WSDL. IronPython 2.0 Beta 1 or newer is required to compile this code.

Simple SOA with SuperSOAP by Kevin Hazzard.pptx (208.46 kb) - my PowerPoint slides from this discussion.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Architecture | C# | DLR | IronPython | User Group | WCF

Excellent Post from Hanu Kommalapati on Silverlight Deployment

by kevin 5/16/2008 12:22:00 PM
Hanu Kommalapati has a fantastic blog post on Silverlight deployment from 5/11/2008 at http://blogs.msdn.com/hanuk/archive/2008/05/11/silverlight-for-the-enterprises-fundamentals.aspx. Hanu doesn't blog often but his stuff is very good. I think I'll write to him and encourage him to share more often.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Silverlight

Powered by BlogEngine.NET 1.3.1.0
Theme by Mads Kristensen


Kevin's on Twitter / FriendFeed

W. Kevin Hazzard Welcome to Kevin Hazzard's Blog. Kevin is a Software Architect, Professor and Microsoft MVP specializing in C#, WCF, Silverlight and IronPython.

View Kevin Hazzard's profile on LinkedIn
Microsoft MVP Award When a problem comes along, you must flip it!

Calendar

<<  August 2008  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in