Connect bugs scare me

Posted Fri, Jul 13 2007 2:50 by bill

I was just reading Roger Jennings blog and note he logged a bug in Orcas.  What scared me was the response Roger got.

It seems his bug was acknowledged pretty quickly, and some 5 hours later they said :

Thanks for your feedback. We have reproduced this bug on Visual Studio Codename Orcas June CTP, and we are sending this bug to the appropriate group within the VisualStudio Product Team for triage and resolution.

Seems good right ?  Well not really.  The bug was just a simple syntax mistake.  The "Of " was missing in the generic parameter.  This kind of thing should NOT need triage.

The code was :

Dim Query = From c In dsNwindT.Customers _
                    Join o In dsNwindT.Orders On c.CustomerID Equals o.CustomerID _
                    Join d In dsNwindT.Order_Details On o.OrderID Equals d.OrderID _
                    Join p In dsNwindT.Products On d.ProductID Equals p.ProductID _
                    Where p.ProductID = 2 AndAlso c.Country = "USA" _
                    Order By o.OrderID Descending _
                    Select c.CustomerID, c.CompanyName, o.OrderID, _
                     ShippedDate = o.Field(Nullable(Of DateTime))("ShippedDate"), _
                     p.ProductName, d.Quantity

 

and should have been:

 

Dim Query = From c In dsNwindT.Customers _
                    Join o In dsNwindT.Orders On c.CustomerID Equals o.CustomerID _
                    Join d In dsNwindT.Order_Details On o.OrderID Equals d.OrderID _
                    Join p In dsNwindT.Products On d.ProductID Equals p.ProductID _
                    Where p.ProductID = 2 AndAlso c.Country = "USA" _
                    Order By o.OrderID Descending _
                    Select c.CustomerID, c.CompanyName, o.OrderID, _
                     ShippedDate = o.Field(Of Nullable(Of DateTime))("ShippedDate"), _
                     p.ProductName, d.Quantity

 

or alternatively using the new syntax:

 

Dim Query = From c In dsNwindT.Customers _
                    Join o In dsNwindT.Orders On c.CustomerID Equals o.CustomerID _
                    Join d In dsNwindT.Order_Details On o.OrderID Equals d.OrderID _
                    Join p In dsNwindT.Products On d.ProductID Equals p.ProductID _
                    Where p.ProductID = 2 AndAlso c.Country = "USA" _
                    Order By o.OrderID Descending _
                    Select c.CustomerID, c.CompanyName, o.OrderID, _
                     ShippedDate = o.Field(Of DateTime?)("ShippedDate"), _
                     p.ProductName, d.Quantity

 

For the record, the C# code was :

var query = from c in dsNwindT.Customers
                 join o in dsNwindT.Orders on c.CustomerID equals o.CustomerID
                 join d in dsNwindT.Order_Details on o.OrderID equals d.OrderID
                 join p in dsNwindT.Products on d.ProductID equals p.ProductID
                 where p.ProductID == 2 && c.Country == "USA"
                            orderby o.OrderID descending
                 select new { c.CustomerID, c.CompanyName, o.OrderID,
                            ShippedDate = o.Field<DateTime?>("ShippedDate"),
                            p.ProductName, d.Quantity };

 

 

One thing I will say is the VB team needs to add some greater feedback around the different uses of () in VB.  If they have different meaning they should be colored differently or something.  It should be obvious. And the error correction should suggest the Of

Filed under: , , ,

Comments

# re: Connect bugs scare me

Thursday, July 12, 2007 3:44 PM by Roger Jennings

Bill,

Thanks for waking me up on the missing "Of." The post is updated and I canceled the bug report.

I, too, was surprised to find that the "bug" went to triage.

--rj

# re: Connect bugs scare me

Monday, July 30, 2007 9:12 PM by Warren (saibet@hotmail.com)

Hey, steady people ... In the big shops, even a small change can't be pushed through in code without being reviewed and with written permission, no matter how obvious or simple. That's all the 'triage' means.

# re: Connect bugs scare me

Monday, July 30, 2007 9:31 PM by bill

Hey Warren,

But in this case there was no change needed at all. Taht is, the people that "reproduced" it, reproduced writing code usingn incorrect syntax. IOW: it should never had needed to go past the first screening