To date all the fuss over the various URL shortening services has been about how to get the shortest URL after "http://", but what about shortening that part? We could apply some convention over configuration and declare that a single / was sufficient to decorate a link in a tweet. This would work exactly the same way that # for hash tag links and @ for username links work currently. Instead of http://bit.ly/xxxx or http://tinyurl.com/xxxx, lets just all start using /bit.ly/xxxx and /tinyurl.com/xxxx!
Once a few of the major Twitter apps start recognizing this convention, it will really work great!
Thursday, August 20, 2009
Wednesday, March 11, 2009
Bug in VB.NET LINQ to XML
Here is the simple code to reproduce the bug I found in VB.NET LINQ to XML using Visual Studio 2008.
I'm expecting the type of XQuery to be inferred as IEnumerable(Of String)
The Value property of child on line 13 has a blue squiggly and the compiler gives the following error:
Update 3/17: The Visual Studio Team updated my bug report as Resolved (By Design). They suggested changing line 13 to "Select someOtherName = child.Value". Has to do with the "range variable" named Value, which is created by the query. Apparently there are a few bits of the internals of LINQ queries that I don't really get yet. I think this falls into the category of things I can still use even thought I don't fully understand how they work behind the scenes.
Public Class Class1
Private MyValue As String
Public Property SomeXMLValue() As String
Get
Return <test>
<child><%= MyValue %></child>
</test>.ToString
End Get
Set(ByVal value As String)
Dim ValueXElem = XElement.Parse(value)
Dim XQuery = From child In ValueXElem...<child> _
Select child.Value
' Code that uses XQuery here
End Set
End Property
End Class
I'm expecting the type of XQuery to be inferred as IEnumerable(Of String)
The Value property of child on line 13 has a blue squiggly and the compiler gives the following error:
Range variable 'Value' hides a variable in an enclosing block or a range variable previously defined in the query expression.In order to get this to compile I must rename the variable on line 10 to something other than 'value'.
Update 3/17: The Visual Studio Team updated my bug report as Resolved (By Design). They suggested changing line 13 to "Select someOtherName = child.Value". Has to do with the "range variable" named Value, which is created by the query. Apparently there are a few bits of the internals of LINQ queries that I don't really get yet. I think this falls into the category of things I can still use even thought I don't fully understand how they work behind the scenes.
Monday, January 26, 2009
I write code
Several years ago I had a t-shirt with this text:
I am a programor
I am a programmor
I'm a progamer
I write code
To this day I have to look up the proper spelling of the word programmer. Now I see that dictionary.com says that programer is an acceptable spelling. I wonder if that's from all of us who couldn't remember to spell it with 2 m's.
Subscribe to:
Posts (Atom)