Friday, August 31, 2007

Well, sonny is me, actually.

I spent quite a long time trying to understand why my LINQ average function wasn't working.

Paring down to a simple example, I wanted to check the average of a filtered subset of data.

Say my data is an array if integers:

int[] nums = { 84, 123, 101, 94, 238 };

I can get the average of these by calling:

var numavg=nums.Average();  --returns 128.0

I then wanted to get the average of only those numbers that were greater than 100.

But wait, I really started this in VB! So I was writing this function:

Dim avgnums = mynums.Average(Function(n) n > 100)

Which compiled and ran, but returned -0.333333333333.

I looked at it inside and out, over and under and could not figure out what was going on.

so then I tried it in C# and got this compiler error:

Cannot convert lambda expression to delegate type 'System.Func<int,int>' because some of the return types in the block are not implicitly convertible to the delegate return type 

Finally I noticed the other error listed in the Errors window:

Cannot implicitly convert type 'bool' to 'int'

And realized the error of my ways.

I was thinking that my lambda was for filtering, but all I was doing was an eval which was returning trues and falses depending on whether the value was >100 or not. And the average function was the same as Average(0,0,0,0,-1,-1) which is -2/6. So -0.333333333 was correct!

[note - Option Strict was off which imacted this - see additional comments at the end of this post]

So what is the correct way to do what I wanted? I need a filtering method, duh!

in C#:

var numavg3 = nums.Where(q => q > 100).Average();

in VB

Dim avgnums2 = mynums.Where(Function(n) n > 100).Average(Function(n) n)

About VB's Option Strict in this example

As Bill McCarthy points out, Option Strict=On would have caught the attempt to use a boolean in the Average function, forcing me to specifiy the types in the array, which I *had* in fact done in the C# code, (because it forced me to). Option Strict is one of those things you need to change to "ON" after you install Visual Studio. I had missed it in this installation and because I was focused on what I was doing wrong with the lambdas, it hadn't even occurred to me.

Dim mynums() As Integer = {10, 20, 40, 100, 120, 140}

Otherwise, he compiler tells you: "Option Strict on requires all variable declarations to have an 'As' clause." Which is a lie. There are cases where it is required and cases where it is not. Note my VB code for calculating the average is still valid and avgnums2 is recognized as a Double at compile time.

On the other hand, VB's implicit casting is still in play as is demonstrated by then taking that double and concatenating it with a string.

 Dim x = avgnums2 & "xya"

VB
Friday, August 31, 2007 4:54:05 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Just for fun, Vermont.NET will have our October 8th meeting at RiRa's in downtown Burlington.

No powerpoints, no projector, no screen.

Bring your laptop. We'll come up with a topic for discussion in advance.

Friday, August 31, 2007 10:17:01 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, August 30, 2007

[#1: Complex Types]

The next item in Danny's list that I wanted to look at was this:

·         Better support for span over LINQ to Entities queries

The span feature makes it possible to pre-fetch related entities.  In previous CTPs span was specified through a property on ObjectQuery<T>, but in this CTP span has been changed to work as a builder method, Include, which makes it simpler to specify span rules in LINQ to Entities queries.  Include can be called on the ObjectQuery used in the from clause of the LINQ query.

This is low-hanging fruit for me because I had seen the use of SPAN in March and tried it out when it was released with the June CTP. Here is the blog post I wrote at that time.

The use of span changed a lot since then. In fact, the word "span" no longer exists!

Previously you had to tell the object context that you wanted to include child data before you actually ran the query. Now you include that instruction in the query itself by attaching the Include property to the object in the query like this query which says to grab the SalesorderHeader info along with the customers.

 Dim custQuery = From cust In aw.Customer.Include("SalesOrderHeader")_
 Where cust.SalesPerson = "adventure-works\jae0" Select cust
  For Each c In custQuery
   Debug.Print(c.CompanyName & "..............")
   For Each so In c.SalesOrderHeader
    Debug.Print(so.OrderDate)
   Next
  Next

You could also drill in further

   Dim custQuery = From cust In aw.Customer.Include("SalesOrderHeader.SalesOrderDetail") _
   Where cust.SalesPerson = "adventure-works\jae0" Select cust
   For Each c In custQuery
    Debug.Print(c.CompanyName & "..............")
     For Each so In c.SalesOrderHeader
       Debug.Print(so.OrderDate)
           For  Each sd In so.SalesOrderDetail
              Debug.Print("..." & sd.OrderQty)
          Next
       Next
    Next

This would get the headers and their child detail records.

You can also define multiple collection properties to grab such as here where I get the salesOrderHeaders and the Addresses for the customer. Looking at how to get at the addresses makes me really happy to have entity framework and the associations doing this job. What a pain in the rear the joins would be otherwise!

  Dim custQuery = From cust In aw.Customer.Include("SalesOrderHeader").Include("CustomerAddress.Address") _
   Where cust.SalesPerson = "adventure-works\jae0" Select cust
  For Each c In custQuery
   'c.SalesOrderHeader.Load()
   Debug.Print(c.CompanyName & "..............")
   For Each so In c.SalesOrderHeader
    Debug.Print(so.OrderDate)
   Next
   For Each add In c.CustomerAddress
    Debug.Print("Cust City: " & add.Address.City)
   Next
  Next

Outputs:

Action Bicycle Specialists..............
6/1/2004
Cust City: Woolston
Central Bicycle Specialists..............
6/1/2004
Cust City: Maidenhead
Downhill Bicycle Specialists..............
Cust City: Berks
Metropolitan Bicycle Supply..............
6/1/2004
Cust City: London

I looked to see if you could skip a generation eg aw.Customer.Include("SalesOrderDetail"), but that didn't pan out. Makes sense, but it only took an extra 5 seconds to be sure.

The nice thing is that include is now explicitly tied to the objectQuery it is used in. No more resetting the object context.

So if you want to do another similar query, you won't get the related data unless you ask for it. Getting what you ask for is part of the mantra of Entity Framework. No assumptions are made.

Dim custQuery = From cust In aw.Customer.Include("SalesOrderHeader") _
   Where cust.SalesPerson = "adventure-works\jae0" Select cust

 Dim custQuery2 = From cust In aw.Customer _
    Where cust.SalesPerson = "adventure-works\shu0" Select cust

The 2nd query will only bring back customer data. If you want SalesOrderHeaders, you will need to explicitly load them as you iterate through the customers.

For Each c In custQuery2
   c.SalesOrderHeader.Load()
   Debug.Print(c.CompanyName & "..............")
   For Each so In c.SalesOrderHeader
    Debug.Print(so.OrderDate)
   Next
  Next

Thursday, August 30, 2007 9:00:45 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Wednesday, August 29, 2007

I saw complex types in the March CTP of Entity Framework and tried to implement them but found out the hard way that the functionality wasn't fully implemented. Here's the forum thread from that time.

So Complex Types were the first thing I wanted to try out on Danny's list of what's new in Beta 2. Complex types can only be used as properties of other entities. They have no keys and can only have a one to one relationship with the main entity.

Here is his description:

Complex types “Complex types” is the Entity Framework name for value properties which have more intricate structure than scalars.  The canonical example is an Address type which contains several parts (street, city, state, etc.)  Complex types are somewhat like entities except that they do not have any identity of their own (they are value types).  This means that a complex type instance is always a part of some other enclosing entity—it can’t stand on its own, it doesn’t have relationships, etc.  In this release, the mapping scenarios for complex types are significantly limited: inheritance is not supported, complex type properties cannot be null and they can only occur in single instances, not collections.

I am using the Adventureworks LT database, which can be found on the CodePlex site for SQL Server Product Samples.

I modified the entity for SalesOrderHeader taking the ShipDate and ShipMethod properties and putting them into their own complex type.  I had to do this manually in the XML. There's no support for it currently in the Designer.

   <ComplexType Name="ShipmentDetails">
     <Property Name="ShipMethod" Type="String" Nullable="false" MaxLength="50" />
     <Property Name="ShipDate" Type="DateTime" />
    </ComplexType>

Then the SalesOrderHeader needs a property to hook up to the ShipmentDetails.

     <Property Name="Shipment" Type="Self.ShipmentDetails" Nullable="false" />

Next I modified the mapping so that it could find the properties in their new spot.

This mean moving the ScalarProperties for those fields into a ComplexProperty. Note that the ComplexProperty is a sibling of the other ScalarProperties inside of the MappingFragment.

        <ComplexProperty Name="Shipment" TypeName="AWModel.ShipmentDetails">
         <ScalarProperty Name="ShipMethod" ColumnName="ShipMethod"/>
         <ScalarProperty Name="ShipDate" ColumnName="ShipDate" />
        </ComplexProperty>

The ComplexProperty Name points to the name of the property in the entity and the typename, which has a reference to the namespace of the Conceptual Layer, points to the ComplexType that I created.

The complex type does not get surfaced in the current version of the designer or in the browser. All you can see is the shipment property and it has no Type defined.

 

But it is well represented in the class that is generated and available in code with help from intellisense:

In the end, I thought something was wrong because all of the ShipDates and ShipMethods were the same, but it turned out that this is what the raw data looks like in the sample database. So I changed some of the data and ran it again to be sure.

Now when I have entities with a lot of properties, I can make them more organized and readable with complex types. Since the designer is only the CTP1, I'm giving them the benefit of the doubt that I'll see the complex type in the designer eventually.

Note: The complex type came through like a champ when I returned SalesOrderHeaders from a web service.

Wednesday, August 29, 2007 2:41:46 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Monday, August 27, 2007

The first thing I wanted to look at after I downloaded the new Entity Framework Beta2 and Tools CTP was the EDM Designer.

The designer is displayed as the result of opening up an EDMX file. The EDMX file is the wrapper for the three Entity Data Model files (CDSL, MSL, SSDL). Therefore, you need to create a new EDM, either from a database or a blank EDM.

For the sake of familiarity, I created one based on the Northwind database and when asked, I selected all tables, all views and all stored procedures to be part of my model.

When the wizard finished it's job, I saw this in the output window.


The new EDMX file was displayed in my solution, but I don't see the xml files any more in the solution explorer. Opening up the EDMX file in an XML tool (rather than the default designer) I see that this contains what used to be the SSDL, the CSDL and the MSL file.

But I'll worry about that a little later. It was time to double click on the EDMX file and see the designer!

Not only was the conceptual model laid out as expected, but there is an explorer as well where you can drill into the conceptual model and it's entities and association sets. You can also  drill into the Storage layer.

I noticed these warnings, but if you look closely, they are just saying that the model is not able to create keys for the stored procedures so they'll be read only. These particular sprocs are just queries for viewing, so that's fine.

If you select an entity in the designer, you can see it's mapping to the store model in the output window below.

This is also where you can create mappings. See how you can drop down and select other tables and views from the storage model. The Value/property items are also dropdowns for mapping.

What I didn't see anywhere is a visual designer for the storage model or for visually mapping between the two.

I know in a screencast from (was it) February (?), the storage layer was not only part of the designer, but malleable. Perhaps we'll see that in a future CTP.

Clicking around in the designer, you'll find a context menu also. Here's a function for exporting the diagram.

And playing around in the explorer you can see tooltips of the xml that represents the various bits and pieces of the schemas.

One thing I have been struggling with since the June CTP came out was stored procedures. There is finally an example that appeared in the forums today and also in the help file that came with the Beta2.

Since the designer is now the default for opening up the edmx, I need to right click on it in Solution Explorer and open with the XML Editor instead. It will be interesting to watch the cause and effect as I work from both ends now.

Monday, August 27, 2007 9:47:30 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
Monday, August 27, 2007 7:51:38 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Sunday, August 26, 2007

I was looking at a LINQ Query that I wrote when I was first exploring LINQ in depth at the beginning of the year.

This example was to see how to create a named anonymous type like this:

Dim query= From s In nw.Suppliers _
    Order By s.CompanyName _
    Select Supp = New With {s.CompanyName, s.Country, s.Products}

Looking at it today though I could not see what creating a name (Supp) for the new anonymous type was buying me in this particular case.

Its results were no different than

Dim query = From s In nw.Suppliers _
 Order By s.CompanyName _
 Select s.CompanyName, s.Country, s.Products

And whether I iterate through the results or bind them to a data control, there's no still no difference.

So I wanted to make sure i was clear on when naming the anonymous type was beneficial.

One great example is in the (dog-eared by now) LINQ article that Anders Hejlsberg and Don Box wrote in February where the LINQ query results in objects with child objects. I've used the idea behind their couple/wife/husband example to create my own query where I combine data into new types.

For example, this query lets me create a type from some product data with a new sub-type (anonymous) of SupplierHighlights. The sub-type has only the properties Name and Country.

Dim MyQuery = From p In db.Products _
Select p.ProductName, p.QuantityPerUnit, _
SupplierHighlights = New With {.Name = p.Supplier.CompanyName, .Country = p.Supplier.Country}

Then I can access the new type and sub-type data because the subtype has a name.

For Each q In MyQuery
     Console.WriteLine("Prod Name: {0},Quantity Per Unit: {1}, Supplier: {2}, Country: {3}", q.ProductName, q.QuantityPerUnit, q.SupplierHighlights.Name, q.SupplierHighlights.Country)
    Next

Sure, I could have just created properties called SupplierName and SupplierCountry, but having the child type SupplierHighlights not only makes me more organized, but gives me the ability to do further queries if I wanted to get all of the supplier info out of the product query. This is why I am considering SupplierHighlights to be a type rather than just a property within a complex type and I should point out that I could be incorrect in calling it a type, but will stick to it until I find better evidence that it's not. Because I have everything already grouped into a supplier type, I don't have to list each of the fields (SupplierName, SupplierCountry), I can just query :

   Dim nextQuery = From prod In query Select prod.SupplierHighlights
    For Each s In nextQuery
     Debug.WriteLine(s.Name, s.Country)
    Next

So, here creating the named type (I really want to call it a named anonymous type. I wonder if that's accurate?), it is really useful and necessary. Try creating the sub type without a name, and you'll see what I mean!

Another place to leverage the named type SupplierHighlights is in databinding. I can databind directly to prod.SupplierHighlights and automatically get all of the columns. In databinding to the properties of the base query results (ProductName, QuantityPerUnit), I have to bind to "MyQuery", so even if I had named that type, I don't use that name anyway.

Also,  take a look at this post by Paul Vick about mutable and immutable anonmyous types in VB9.

(The italicized text are a result of feedback from Bill McCarthy, who is constantly (and generously) attempting to drag me down into the depths of complexity of VB.)

Sunday, August 26, 2007 6:08:14 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, August 24, 2007

I just came across this interview on the INFO-Q website. I like how they do this. Short questions and answers. Each q/a has a video clip, where you can watch and listen to the subject of the interview and simultaneously read the text of the question and answer. That makes it really easy for me to paste these two tidbits.

Basiically he says LINQ to SQL is for simple database scenarios and EDM (Entity Data Model) is for very complex schemas and giant databases. Not earthshatteringly different than what are figuring out, but interesting to hear it from the guy who is credited for inventing LINQ. He's NOT comparing it to Entity Framework, since there's more to Entity Framework than the EDM that lies at it's core. Here is a post about Mike Pizzo comparing LINQ to SQL and Entity Framework directly.

What about DLINQ (aka LINQ to SQL)? 
DLINQ is and instance of LINQ over Relational Data, which is trying to address the simpler mapping scenarios. In DLINQ there are several ways to do this. You can point at your database and get your classes from the metadata and the database, you can put custom attributes on your classes, and define your mapping like that or you can use an external mapping file. DLINQ, like many other object relation mappings, has this notion of context, which is the bridge between the object world and the database world, that does the change tracking and holds the database context, and the transaction context and so on. Also this context will take your expression trees, translate them to SQL and then materialize your objects. DLINQ is one example of using LINQ to query against Relational Data.

Can you relate EDM into this discussion?
Yes, the EDM is designed for situations where you have really complicated schemas and giant databases, where your mapping scenarios are much more complex, where you want to do de-normalization, and where you want to map different tables to a single type or you want to have one table mapped to different types, or you have complicated implementations of inheritance. These are situations where you have really complicated enterprise applications, legacy applications, where simple direct one to one mapping doesn't fit.
 
Also interesting to hear him talk about what he's working now.
Friday, August 24, 2007 4:37:15 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

At DevConnections this fall, I'm going to do a post-con, 1/2 day workshop to provide some guidance over which Data Access options in .NET 3.5 are right for you now that we have MORE choices coming out.

Do you use classic ADO.NET? LINQ to SQL? Entity Framework? And if Entity Framework, do you use Entity SQL? LINQ to Entities? Entity Client?

More options should be liberating, but at first glance, it's a little daunting, which is why I am doing this session.

While the main conference will have a special Data Access track, and plenty of opportunities to learn about Entity Framework, LINQ to SQL and more, I think that a wrap-up session will be really helpful.

Because it's a post-con, it's an additional fee on top of the main conference - but only $199.

Be sure to check it out!

Friday, August 24, 2007 9:26:10 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I'm very excited about the Data Access track at DevConnections this fall.

Generally, people don't know what to do with data access sessions. Do they go into Visual Studio Connections? ASP Connections? SQL Server Connections? They belong everywhere! Whenever I'm submitting ADO.NEt talks for a conference I struggle with deciding which track to choose, because it belongs in most of them.

So we built a single track with nothing but Data Access talks and it's a rock start line-up!

You'll find the talks listed under the ASP Connections Sessions and the Visual Studio Connections Sessions (look for Microsoft Day Visual Studio section for the MS talks, and Data Access Track for the 3rd part speaker talks).

Thanks to all of the conference chairs, conference staff, speakers and folks on the Data Programmability Team at Microsoft who have helped bring this about.

Microsoft Day:

  • ADO.NET Entity Framework Designers
  • Data Modeling and Application Development with the ADO.NET Entity Framework and LINQ over Entities
  • Project Astoria: Data Services for the Web
  • Optimizing Online, Enabling Offline with SQL Server Compact and Sync Services for ADO.NET

Wed & Thursday

John Papa, author of the MSDN Magazine Data Points column

  • Unraveling the Entity Framework
  • Implementing the Entity Framework

Dino Esposito, All 'round .NET wizard

  • Typed DataSets, Linq-to-SQL, Linq-to-Entities: Data Design Patterns Do Matter

Don Kiely: Data & Security Guru

  • ADO.NET Performance Tips & Tricks

Kathleen Dollard: The Queen of CodeGen

  • ADO.NET Metadata and Code Generation

Bill Vaughn, The Legendary Bill Vaughn :-)

  • ADO.NET Connecting

Dave Sussman, Author of many ADO.NET & ASP.NET Books

  • Black Belt Data Binding (in ASP.NET)

Alex Homer, Partner in crime to the many ADO.NET & ASP.NET Books with Dave Sussman

  • Five Favorite Features in ADO.NET and SQL Client

Julie Lerman (moi)

  • Real World Entity Framework (looking at 3-tier patterns)
  • ADO.NET 3.5 Data Access Guidance (post conference 1/2 day workshop: 9-12am, add'l fee)
Friday, August 24, 2007 8:44:23 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, August 23, 2007

Chris Bowen has posted the agenda for the full day of free training aka "Bob & Chris' MSDN Roadshow" that will make Burlington it's first whistlestop on Sept 10th.

The day's topics are:

  1. Coding in a Dynamic World
  2. Practical Silverlight
  3. Developer Productivity Tips and Tricks for Visual Studio 2005 and 2008
  4. Software as a Service, Software + Services, Service with a Smile, Can I Get Some Service, Where is the Waiter?

More details about the day, the topics and registering are here on Chris' blog.

Also, don't forget to sign up for Code Camp 8: Rise of the Silverlight Surfer on the weekend of Sept 29/30. Submit abstracts for sessions or chalk talks and register. More details here...

Thursday, August 23, 2007 7:14:04 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

One of the many midwestern towns that has been impacted greatly by the flooding is Findlay Ohio. Here's a picture that is currently on the home page of CNN.com.

According to the latest CNN article:

Findlay, Ohio, was enduring its worst flood in nearly 100 years.

"This is the most widespread it's ever been," Findlay Mayor Tony Iriti told The Associated Press.

Findlay is a beautiful small city with a lot of glamour to it thanks to it being the home of Marathon Oil. It has a main street right out of the 1920's and a lot of charming homes from that era as well. Of course, it's also home to the Sugar Towers, which should be one of the wonders of the world!

I got to go to Findlay last fall on my Central Ohio INETA "tour" (3 groups in 3 nights) and just loved the town and totally enjoyed the attendees at the user group meeting.

I've emailed Gary Shank, the leader of Findlay.NET who is currently sitting in a remote office, but still in Ohio and still suffering from the sweltering heat and the floods, but hanging in there.

I wish them all the best and look forward to coming back to do another user group talk and to get some pictures of those Sugar Towers!!

Thursday, August 23, 2007 12:39:12 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [5]  | 
 Wednesday, August 22, 2007

Our resident garden snake has gone of for some growing and left behind his skin - right next to the garden. Something of an "I'll be back" message, I suspect. This year he (she?) was about 15" long. Rich is already teasing me about how BIG and scary he'll be next year!

Wednesday, August 22, 2007 7:19:49 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

At first glance, the new ImpliciltyTyped Local Variables in C#3.0 and VB9 might look familiar to VB programmers.

Earlier (that would be "current" as well) versions of VB can do a lot of implicit stuff. This has been a point of aggravation to many non-VB programmers, but I guess they have a new perspective. Next thing you know they'll be using declarative languages! Eek!

In VB2005, we can create an integer implicitly and do integer-like things with it.

  Dim ii = 5
  Console.WriteLine(ii + 2)

Or we can do the same with something more complex like a FileInfo class. I'm not explicitly declaring files, but VB infers it from what is returned by New DirectoryInfo.GetFiles (an array of FileInfo objects).

   Dim files = New IO.DirectoryInfo("C:\").GetFiles

We can even go a bit further with an iteration, using f to represent each FileInfo object without explicitly defining it.

   For Each f In files
       Console.WriteLine(f.FullName)
   Next

All of this runs just fine.

But, if you were actually typing this code, you would notice that the compiler does not comprehend the types at design time.

That's because it can't really identify the type at design time. All that's happening here is that we are getting late binding.

The undeclared f (FileInfo) doesn't even give you this much help with late binding. No method or property suggestions and it's just an object.

So here is where VB9 is definitely different. We are truly getting strong typing, not just the intelligence of late binding.

When using the implicit variables in VB9, the compiler is smarter and much more helpful!

In the For Each, f is now recognized as a FileInfo and gives intellisense as well.

Note that all of this is using the default VS2008 properties for Compiler Options. Jim Wooley has an interesting blog post about Option Infer (a new option) which allows the strong typing to occur.

VB
Wednesday, August 22, 2007 3:57:19 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

One week ago, I gave up on the Treo 700wx, gave up waiting for the "maybe in a few more months but we can't promise it" replies about Mobile6 phones and got a Blackberry. I like the Blackberry, really I do.

But now Verizon has a Motorola Q with Mobile 6 available.

I was only allowed one exchange, so I won't be playing with this. I'm sure I would have had the same issues that I had with the Treo, except for the lack of upgrade to Mobile6.

Wednesday, August 22, 2007 3:23:42 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, August 20, 2007

Our friend Brian Berry is pedaling in the Paris Brest Paris ride that started today. It's a 1200km route that must be completed in 90 hours. That's about 750 miles in 3.75 days. That's about 200 miles per day. The ride is every 4 years. Brian has ridden it before, though I can't recall how many times. He  does a lot of long distance riding. In the past when Brian and his wife have come to visit, he generally leaves their home in Woodstock NY on his bike at about 2am and she drives up. It's about a 250 mile drive to where we lived the first time they did this. The second time, he slacked off and only road to Burlington - just 230 miles. That's about a normal day's ride for Brian. He thinks nothing of riding through the night with lamps. He's a nut.

Brian also often rides in the "BMB" (Boston Montreal  Boston ride) also 1200 km and goes almost right by our house.

RUSA (Randonneurs USA) also has lots of great info on PBP and the riders from the U.S.

Monday, August 20, 2007 2:45:30 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

“A Technical Community – How Do We Get There From Here?”
Dean Kamen
Tuesday, September 18, 2007
5:00 – 6:20 p.m.
Davis Auditorium
Medical Education Building on the University of Vermont Campus

Dean Kamen, an inventor and entrepreneur and an inspiring speaker, will address a serious issue facing society.

How can we attract the next generation to fields of Science and Technology? Society as a whole needs to start promoting careers in Science and Engineering to our youth.

We live in a technical world. Vermont, like many other states, is having a difficult time attracting and retaining a technical work force, which is essential for the growth of local businesses. If Vermont is to have a high quality of life 20 years from now, we need more skilled scientists and engineers, with a broad vision of the society we want to create.

Also - VT Science Teacher of the Year awards

MORE INFORMATION HERE

Monday, August 20, 2007 2:26:21 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, August 19, 2007

My Blackberry "locked up" today and I thought I was going crazy. I was suddenly and utterly unable to call out or use the browser. It told me "Cannot connect. Call in progress." I knew there was no call in progress. All other non-connection functionality was working perfectly well. I powered the phone down three times, but still I received this same message.

When I got home, I jumped online and very quickly found that, as luck would have it, this was a known problem with the Verizon Blackberry 8830. It happens if you are on a call and a another call comes in (which was my scenario). Some believe that if you avoid hitting the green dial/answer button to answer, that will prevent the problem from happening. Otherwise, a soft boot (Alt + Right Shift + Delete) or a hard boot (reseat the battery) should get you back to working order. I did the soft boot. However this is not a good long-term solution since people are having to do it repeatedly.

There is a particular thread on the Crackberry.com forums that has very recent posts on it where I learned all of this. The latest post (from only 2 days ago) suggests that just getting a replacement phone might do the trick.

Other than that, I'm really enjoying this phone.

Sunday, August 19, 2007 5:43:28 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [3]  | 
 Friday, August 17, 2007

Here's why

[A New DevLife Post]

Friday, August 17, 2007 10:13:12 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, August 16, 2007

New England Code Camp 8

Rise of the Silverlight Surfer

Saturday & Sunday, Sept 29-30 in Waltham, MA

It's free, it's fun and it is filled with great information!

If you have a story to tell, come tell it! You can do a regular presentation or a lead a chalk talk discussion. Prior experience not required!

Submit a talk or register as an attendee.

This is a FUN weekend and we should plan to have an big carpool from Vermont this time!

Read all about it here on Chris Bowen's weblog.

Thursday, August 16, 2007 8:28:51 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Once again, we could not have asked for better weather for an evening cruise out on the lake! This was VTSDA's 2nd annual sunset cruise aboard the Spirit of the Ethan Allen from the Burlington waterfront. We had twice as many attendees as last year (60 this time). It was great to see our friends from the state there also, including some of our favorite Vermont Dept of Economic Development reps, James Candido and Mike Quinn as well Christine Werneke (Chief Marketing Officer for Vermont). These folks and others from the state have all become great supporters of VTSDA and it's definitely fun to have them at our social events, as well! A new face for us was Ted Brady, who is Sen. Leahy's field rep in Vermont. Though I've never personally met Sen. Leahy, Ted seems to represent him so well. He has a great presence, is quite affable and laid back, and can probably make sure things happen when push comes to shove.

Another special part of this event was that we got to introduce our new Executive Director, Patrick Martell, who started on Monday. It is a huge step for our organization to have gotten to this point. Read the press release here.

I was happy to have my pal Dave Burke there who I had emailed and said "hey, you are a software business, now, Dave. So you should come to this event!". 

The weather forecast looked iffy during the day but we had a beautiful night, a gorgeous sunset and spectacular views of the Adirondacks, the Green Mountains and the lake.

I didn't see anyone swimming away from the boat, so I think everyone had a great time.

Look for pictures on the VTSDA website coming soon.

Thursday, August 16, 2007 12:37:59 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

When John Canning showed us his iPhone a few weeks ago and explained that he bought it in Boston after walking by the AT&T store too many times, we were all surprised at his risk-taking. AT&T doesn't provide service in Vermont and therefore we can't get iPhones here and certainly can't get an iPhone with an 802 area code. His has a Boston phone #.

You could tell he was in love with this phone. I had just gotten a Treo the day before so we were both showing off our phones to the small group we were with. I almost blogged about John's without naming names of course, but didn't want to get John in trouble. (Me, the paranoid rule-follower.)

So I had a good laugh today when I saw John's picture on the home page of Burlington's local paper, brandishing his iPhone. Hey, he outed himself; I had nothing to do with it. You can read about John and some of our wireless woes in the article.

So, I'm curious to see if (or is it "how quickly") John gets his service cancelled. The whole notion of AT&T having exclusive access to the iPhone seems wrong anyway. I understand it as a competitive marketing advantage, but it doesn't seem like good marketing to refuse entry to entire populations of your potential market. (Okay, i know Vermont is not a huge market, but...) I thought a key mantra for sales was about making it easy for people to give you money. But with the case of iPhones (it's the iPhone that John covets, not the AT&T service) users have to be wiling to use em and lose em.

I love that one of the comments on the article that"Vermont needs to get its head out of the sand." I don't know how these things work, but did Vermont explicitly ban AT&T?

Oh, and I traded my Treo in for a Blackberry yesterday (with a GSM chip). More on that later...

Thursday, August 16, 2007 8:11:10 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Wednesday, August 15, 2007

Thanks again to Richard Hale Shaw for driving up to Burlington on Monday (even a flat tire didn't stop him) to give VTdotNETters a very in-depth perspective on LINQ. Rather than just open up VS2008 and start pounding out LINQ queries, Richard spent most of the time building up our understanding of the underlying technology that makes LINQ possible. Custom Iterators, anonymous methods and generics. Then when he showed us LINQ, it made perfect sense.

I know that when I talk about "that which is returned by a LINQ query", I have a hard time saying "it's an iEnumerable" or "an iQueryable". Most people don't get what that means. Richard made it easy to understand by his initial desicription of an iEnumerable being a collection with only the enumerator exposed, so the only thing you can do to the collection is iterate over it. That will help me a lot when I do future talks about LINQ and Entity Framework (which is three of my four talks at DevConnections this fall).

In addition to Richard's generosity with his time and knowledge, big thanks to go telerik who made this meeting possible, covering Richard's travel expenses and our pizza, and providing raffles and lots of fun t-shirts. We also had a few great raffles, thanks to CodeZone.

Although I was wearing my new telerik "Geekette" t-shirt, there were only 2 other gals at the meeting. So when we were down to only one Geekette shirt at the end, I was surprised. Rather than take the regular guy t-shirts, the guys were taking the girlie shirts for their wives, girlfriends and daughters. Awesome!

Watch out for a gaggle of geekettes wandering around Burlington for the rest of this summer.

Wednesday, August 15, 2007 12:59:50 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, August 14, 2007

Researchers at RPI are working on some pretty amazing battery technology! Read more...

[A new DevLife post]

Tuesday, August 14, 2007 9:18:35 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
Tuesday, August 14, 2007 10:22:13 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I'm taking it back. Here's why.

[A New DevLife Post]

Tuesday, August 14, 2007 9:31:16 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Besides being a technical guru and an amazing teacher (e.g. conference presenting and more), Kate Gregory is, to me, somewhat of a sage, a very wise and even-keeled person. So when she diverts a little from her great technical tips on her blog and gives some bigger lessons  -- life advice -- I definitely perk up my ears.

She has written about giving and taking, whether it's on newsgroups or forums, job interviews, interacting with clients or anywhere in your daily work.In the post she also references another post about knowing what you want (which I believe also inspired me to blog about at the time she wrote it).

Tuesday, August 14, 2007 7:55:06 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, August 13, 2007

Rich and I work way too much and sometimes forget why we moved to Vermont. But we had a perfect Vermont summer weekend this weekend.

On Saturday, the lake was calm and we kayaked a 4 mile stretch from a put-in near Button Bay State Park across to Westport NY where they were having a heritage day festival. The wind picked up after lunch and we had a fun paddle against the wind on the return trip.(Yes, that is fun. I'm not being facetious.)

Yesterday we went on a beautiful bike ride in Addison County - lots of rolling hills, beautiful old farmhouses, long stretches through flat farmland and then riding up along the lake.

We ate lots of sweet summertime corn, blueberries, raspberries from around our property, and tomatoes & basil out of our garden. We swam in an amazing local swimming hole and laid out on the lawn under an amazing blanket of stars to watch a bit of the Persied Meteor shower.

It doesn't get much better than this!

Monday, August 13, 2007 7:57:53 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Sunday, August 12, 2007

I caught this in the Microsoft Download notifications:

Visual Studio 2008 SDK - August 2007 CTP

This CTP includes tools, documentation, and samples for developers to write, build, test, and deploy extensions for Visual Studio 2008 Beta 2.

Sunday, August 12, 2007 4:30:50 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, August 10, 2007

There are some new vista updates that deal with performance issues and in the list of what they fix I saw two things that had been annoying me. Read more...

[A New DevLife Post]

Friday, August 10, 2007 4:29:43 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, August 08, 2007

This is a big source of pride for many Vermonters.

It's amazing what goes into the process. The trees are selected many years in advance by local foresters and nurtured.

But there's more: fundraising, promotion, etc. THere is a whole website devoted to this cause: http://www.capitolchristmastree2007.org.

 

Wednesday, August 08, 2007 1:29:44 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Vermont Teddy Bear is looking for a mid-level VB.NET programmer, who is comfortable with OO design principles, using the 2.0 framework and has some experience writing both Windows and Web applications.

Pluses would include writing SQL Stored Procedures, table design/normalization and using XML.

Please forward your resume to Jobs@VTBear.com

Wednesday, August 08, 2007 9:41:16 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Monday, August 06, 2007

I have updated two of my demo Silverlight apps which broke with the RC version of Silverlight that came out last week.

The little embedded drawing surface at the top of this blog has been fixed along with my more full blown annoation application.

All of the changes I made were listed in the "What Changed Between Beta and RC" topic in the Help file that comes with the SDK. The one that had me confused for a while was switching the "\" to "/" in the xaml where I had images in subfolders etc. It confused me because I somehow skipped over it in the list and the error that it threw the error "2210: AG_E_INVALID_ARGUMENT" which didn't tell me too much.

You can read more about updating your Silverlight apps to work with the Release Candidate version here.
 

Monday, August 06, 2007 5:07:02 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Social networking comes full circle. FrontPorchForum connects me to my very own neighbors and I am lovin' it! Read more here

[A New DevLife Post]

Monday, August 06, 2007 4:18:45 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

After many years of being an icon of teaching us all how to use Microsoft development tools, Mike Gunderloy decided he needed to transition himself away from a dependency on Microsoft for personal reasons stated in this blog post, the first of his alter-blog "A Fresh Cup".

It was a scary proposition, mostly because he has a family of 6 (including himself) to support.

It's been 7 months and in a recent "status report", Mike seems to be content with his progress, productive with his learning curve and getting work using his new tools.

I'm not sure if I could go through the refactoring that he has done, going from "expert" to starting over again with a new set of development tools. On the other hand, he brings an enormous amount of IP to his adventure which makes the transition that much more interesting.

I think if I were going to make a big life change like this, it would be more along the lines of doing a dramatic life-style downsizing and returning to my love of potting (as in making clay pots and sculptures) and that just ain't gonna happen any time soon.

I have an enormous amount of respect for Mike on many levels and his commitment to following (and following through on) what he believes in is pretty impressive.

Monday, August 06, 2007 2:03:20 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Saturday, August 04, 2007

While today was a perfect summer day and I not only got to go for a great bike ride, but I was introduced to a fantastic swimming hole, tomorrow is a day I've been looking forward to for a long time.

I am on a team of 20 women who are paddling a Dragonboat, along with 75 other teams, in the DragonFest.

I have never witnessed this event, but seen articles and videos and promised myself that I would go watch this year, but I was lucky enough to be invited to be on a boat filled with mostly women from my town.

You can learn all about the Dragon Boat Festival on this website.

Saturday, August 04, 2007 8:16:50 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, August 03, 2007

I've written an article on the Jasper project that was just published on O'Reilly's WindowsDevCenter website.

Jasper is a new incubation project within the ADO.NET team at Microsoft, that leverages Entity Framework to allow developers to build websites dynamically. 

If you are just curious to learn more about what the heck Jasper is, why you should care about it or want to get your feet wet with the CTP, hopefully this will give you a good start.

Friday, August 03, 2007 12:56:49 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, August 01, 2007

Vermont Energy Investment Corp is looking for an Applications Programmer.

The Applications Programmer creates, modifies and maintains database driven applications for VEIC as a member of a software development team. 

Requirements: Two years experience or demonstrated proficiency writing the Microsoft.NET applications that use relational databases and undergraduate degree in computer science, computer information systems, or database design and development or a similar combination of education and experience from which comparable knowledge and skills are acquired.  C# and SQL Server experience preferred.

Respond with cover letter and resume to:
resume@veic.org
or mail to: VEIC Recruitment
255 South Champlain Street, Suite 7
Burlington, VT 05401
For more information: www.veic.org

Link to complete job description: http://www.veic.org/AboutUs/Jobs.cfm

Please note that the deadline for resume submission has been extended.

 

Wednesday, August 01, 2007 10:09:12 PM (Eastern Standard Time, UTC-05:00)