Tag Archives : Database


Morning Coffee 169

  • Check out the crowd for a the Washington Capitals developmental camp scrimmage last week (My parents are in their somewhere). Standing room only in the practice facility to watch a bunch of kids, most of whom won’t ever make it to the NHL, in July. If you think Washington can’t be a hockey town, you are sorely mistaken.
  • Speaking of the Caps, they are establishing a “spirit squad“? Is that really necessary? (short answer: no). Peerless’ take is hilarious.
  • Seshadri Vijayaraghavan is a tester on the DLR team and he’s been writing quite a bit about the DLR hosting API. He’s got a series of posts about hosting, invoking and redirecting output from IronPython in a C# application.
  • I haven’t seen an official announcement, but mobile access to Live Mesh is available by pointing your phone browser to http://m.mesh.com. It’s mostly a web view of the Live Desktop, though there is a feature to upload photos from your phone. However, for some reason that feature doesn’t work for me right now. I don’t get the “browse” button.
  • ASP.NET MVC Preview 4 is available for download. Phil Haack has a few details that ScottGu didn’t cover. Scott Hanselman shows off some AJAX stuff.
  • Speaking of Scott Hanselman, he highlights the return of Terrarium from Bil Simser. Scott mentions that most Terrarium animal implementations were big collections of nested if statements. I wonder if F# pattern matching would be a cleaner approach?
  • Ted Neward obviously never “even tangentially” touched politics, as I think they have far worse flame wars far more often than we have in the software industry. However, certainly the Scala flame war he’s commenting on seems fairly counterproductive.
  • Brad Wilson runs into a wall trying to convert a string to an arbitrary Nullable<T>.He doesn’t find an answer, but I found reading thru the steps he took to try and find an answer strangely compelling.
  • Jeff Atwood argues that Maybe Normalization isn’t Normal. It’s mostly a collection of information from other places, including a compilation of high-scale database case studies. But it’s a useful collection of info and links, with a little common-sense thrown in for good measure.
  • I have a hard time imagining Pat Helland camping.

Morning Coffee 164

  • Big news since my last Morning Coffee post was the announcement of Live Mesh. I’ve been running it for about a month, and I’m really digging it. Make sure you check out the team blog and watch the developer tour video (be on the lookout for IPy about half way thru the video)

ALT.NET

  • I had a great time @ the ALT.NET open space conference last weekend. I was somewhat distracted on Saturday as due to a family communication mixup, I had to bring my son Patrick with me. Jeffrey Palermo shot a cute video of him (3 minutes in) where he explains that he’s at the conference “to be with my dad”. Having a five year old is a little distracting, but everyone was amazingly cool with having him around. When he gets a little older I have no doubt he’ll be attending conferences and leading open sessions.
  • I did a session on F#, but it felt kinda all over the place. I hadn’t touched F# in a few months and it showed IMO. Matt Podwysocki was there to help keep the session from devolving into mass chaos. Thanks Matt.
  • My favorite session of the conference was Scott Hanselman’s “Are We Innovating?” talk, which I think originated from a question I asked him: There are many examples of large OSS projects in other dev communities that get ported to .NET (NHibernate, NAnt, MonoRail, etc). Can you name one that’s gone the other way? I can’t.
  • I took Matt’s advice and joined the local ALT.NET Seattle group.

DyLang Stuff

  • Martin Maly posts about how dynamic method dispatches are cached in three different layers by the DLR. You shouldn’t care about this stuff if you’re a DLR language user, but you will certainly care about it if you’re a DLR language builder.
  • I’m really excited to see Phil Haack (whom I met F2F @ ALT.NET) is experimenting with IronRuby & ASP.NET MVC. True, I’d rather it was IPy, but his Routes.LoadFromRuby would work with Python with very little code change.
  • Note to self, take a deeper look at Twining, the IPy database DSL by David Seruyange.
  • Daily Michael Foord – Ironclad 0.2 Released. Ironclad is a project to implement Python’s C extension API in C# so that IronPython could load standard Python C modules like SciPy and NumPy. So far, they’re able to load the bz2 module

Other Stuff

  • Congrats to Brad and Jim for shipping xUnit.net 1.0.
  • Everyone seems to be jumping on the functional C# coding bandwagon. Bart De Smet’s series on pattern matching in C# is currently at eight posts. Now Luca Bolognese is in on the action, with three posts so far on functional code in C#. I like how Luca keeps writing that the C# syntax is “not terrible” for functional programming. Again, why suffer thru the “not terrible” syntax when you could be using F# instead? (via Charlie Calvert)
  • I need to take a look at VLinq. Charlie and Scott Hanselman both mentioned it recently.
  • I would like to have been in the conversation with Ted Neward, Neal Ford, Venkat Subramaniam, Don Box and Amanda Silver.
  • I haven’t had any time to play with XNA of late, which means the great list of GDC videos Dave Weller posted on the XNA team blog will remain beyond my ability to invest time for now.
  • There’s a new drop of Spec# from MS Research. IronRuby is using Spec# heavily as I recall.

Morning Coffee 131

  • On a recommendation from my mother-in-law, I’ve been watching Torchwood. Sort of Men in Black, the series and set in Cardiff. Since it’s made in England, it’ll be one of the few shows still running in the new year due to the WGA strike.
  • A while back I pointed out that many DotNetKicks articles were submitted by their authors. I submitted a few of my own, just for kicks (har har), with mixed results. Today, I discovered that the parse buffer post from my Practical Parsing in F# series was submitted, picked up some kicks, and made it to the home page. That’s pretty cool. I guess writing more dev-focused articles is the way to go to get attention on DNK.
  • Amazon has rolled out a limited beta of SimpleDB, which appears to be S3 + query support. Cost is based on usage: 14¢/hour for machine utilization, 10¢/GB upload, 13-18¢/GB download and $1.50/GB storage/month. I’d love to see SimpleDB software that I could download and install, rather than hosted only. Even if I was going to use the hosted service, I’d like to develop against a non-hosted instance.
  • Research for sale! I was checking out the MS Research download feed and discovered a link to the Automatic Graph Layout (MSAGL) library. This was previously called GLEE (Graph Layout Execution Engine) and was “free for non-commercial use”. Now, you can buy it for $295 from Windows Marketplace (though the previous free version is still available). The idea of directly commercializing research like this strikes me as pretty unusual. It must be a really good library.
  • Scott Guthrie shows off the new Dynamic Data Support that will ship as part of the ASP.NET Extensions. I’m like, whatever. Scaffolding wasn’t that that interesting to me in RoR, so it’s no surprise that it’s not that interesting in ASP.NET.
  • Jeff “Party With” Palermo blogs about the IoC support in the new MVC Contrib project. Also looks like they’re porting RoR’s simply_restful. (via Scott Guthrie
  • I need to try out some of Tomas Respro’s VS color schemes (also via Scott Guthrie)

DataReaders, LINQ to XML and Range Generation

I’m doing a bunch of database / XML stuff @ work, so I decided to use to VS08 beta 2 so I can use LINQ. For reasons I don’t want to get into, I needed a way to convert arbitrary database rows, read using a SqlDataReader, into XML. LINQ to SQL was out, since the code has to work against arbitrary tables (i.e. I have no compile time schema knowledge). But XLinq LINQ to XML helped me out a ton. Check out this example:

const string ns = "{http://some.sample.namespace.schema}";

while (dr.Read())
{
    XElement rowXml = new XElement(ns + tableName,
        from i in GetRange(0, dr.FieldCount)
        select
            new XElement(ns + dr.GetName(i), dr.GetValue(i)));
}

That’s pretty cool. The only strange thing in there is the GetRange method. I needed an easy way to build a range of integers from zero to the number of fields in the data reader. I wasn’t sure of any standard way, so I wrote this little two line function:

IEnumerable<int> GetRange(int min, int max)
{
    for (int i = min; i < max; i++)
        yield return i;
}

It’s simple enough, but I found it strange that I couldn’t find a standard way to generate a range with a more elegant syntax. Ruby has standard range syntax that looks like (1..10), but I couldn’t find the equivalent C#. Did I miss something, or am I really on my own to write a GetRange function?

Update – As expected, I missed something. John Lewicki pointed me to the static Enumerable.Range method that does exactly what I needed.


Early Afternoon Coffee 105

  • My two sessions on Rome went very well. Sort of like what I did @ TechEd last month, but with a bit more kimono opening since it was an internal audience. Best things about doing these types of talks is the questions and post-session conversation. I’ve missed that since moving over to MSIT.
  • Late last week, I got my phone switched over to the new Office Communications Server 2007 beta. In my old office, I used the Office Communicator PBX phone integration features extensively. However, when we moved we got new IP phones that didn’t integrate with Communicator. So when a chance to get on the beta came along, I jumped. I’ll let you know my impressions after a few weeks, in the meantime you can read about Mark Deakin’s experience.
  • Matevz Gacnik figures out how to build a transactional web service that interacts with the new transactional file system in Vista and Server 08. Interesting, but personally I don’t believe in using transactional web services. The whole point of service orientation is to reduce the coupling between services. Trying two services (technically, a service consumer and provider) together in an atomic transaction seems like going in the wrong direction. Still, good on Matevz for digging into the transactional file system.
  • Udi Dahan gives us 6 simple steps to being a “top” IT consultant. I notice that getting well known, speaking and publishing are at the top of the list but actually being good at what you’re well known for comes in at #5 on the list. I’m sure Udi thinks that’s implicit in becoming a “top” consultant, but I’m not so sure.
  • Pat Helland thinks Normalization is for Sissies. Slide #6 has the key take away: “For God’s Sake, Don’t Normalize Immutable Data”.
  • Larry O’Brien bashes the new binary efficient XML working group and working draft. I agree 100% w/ Larry. These aren’t the droids we’re looking for.
  • John Evdemon points to a new e-book from my old team called SOA in the Real World. I flipped thru it (figuratively) and it appears to drill into the Foundations of Solution Architecture as well as provide real-world case studdies for each of the pillars recurring logical capabilities. Need to give it a deeper read.