When’s the last time you used dial-up?

As a favor to a friend, I recently did some tech support for a guy who was having trouble getting his dial-up Internet connection to work properly.  Yes, that's right - dial-up.

Let me tell you - if you haven't done this recently, it's a real eye-opener.  Not that I'd wish it on anyone else, mind you, but it helped remind me that there are still people out there (in the United States, actually) who still connect to the Internet by dial-up, and that there are times when the Internet really bites for these folks.

SAN FRANCISCO - JANUARY 29:  A display of the ...
Image by Getty Images via Daylife

Here's a gigantic for-instance: it turns out that the reason this guy couldn't connect to the internet is that he'd just upgraded his computer (no, I don't know why -- maybe his old one died), so he had this brand-new Dell loaded with Vista, and he couldn't get it connected.  He'd called his dial-up provider (PeoplePC) and the tech-support guy tried to talk him through getting connected, but just couldn't seem to finish the job.  So when I got there and got the poor thing online, the first thing we wanted to do was to get email set up.

You know what the first thing the PC wanted to do was, though?  Windows updates.  Arrrgghhh.  So this poor guy is downloading 10 hours worth of Windows updates while we're trying to get email configured, and predictably, network access is godawful slow because the updates are sucking up all our bandwidth.  Nice.

Windows Update
Image via Wikipedia

I tried to drop a couple of hints to the effect that he could probably get broadband for a couple bucks more than he's paying right now for dial-up, but honestly, wouldn't it be nice if Vista would be a little more considerate about how it shoves updates at dial-up users?  If you've got a guy who's dialing up every day to get his email, and then hanging up when he's done, he might literally never catch up with the updates, and I'd bet that all the really good stuff is queued up behind 30MB worth of Office clipart updates.

And in the mean time, I'm staring at bits dribbling down the PC thinking that I'd be getting more throughput on my cell phone.

The other big problem that occurred to me was that this guy didn't have a hardware firewall / router, which meant that we were relying only on Microsoft's firewall to protect us.  A little shiver ran up my spine at this thought.

I left before the 10-hour download completed, and I'm going to have to go back to see if everything's working ok, but I've really been thinking about how effectively the Web 2.0 movement is leaving these people behind.  Flash?  Silverlight?  Painful.  Big JavaScript files to support Akax?  Doable, but not nearly as usable as a plain HTML web site.  Even Gmail crapped out while Windows update was downloading.

So the next time you see one of those studies that talks about how the USA lags behind "X" developing nations in broadband adoption, stop and think about it for a minute.  These people live in your neighborhood, and there's a good chance that they're not buying your product or using your service because they can't use your site on dial-up.  Is this really the best we can do?  Really?

Reblog this post [with Zemanta]

public class SubSonic3: IEnjoyable

Software Update
Image via Wikipedia

A couple of years ago, I heard about a data-layer code generation tool called SubSonic.  At the time, there was a fair bit of confusion about how it was to be categorized - it wasn't really an ORM, after all.  In fact, it was sort of a C# version of Ruby-On-Rails' ActiveRecord.  I played with it a bit, but I set it aside because I didn't have any projects at the time that called for something like this.

Fast forward a couple years, and some things have changed.  SubSonic's founder, Rob Conery, has been hired by Microsoft.  Somewhat surprisingly, this has not meant the end of SubSonic.  In fact, Rob's working on a new release, and it's shaping up to be really, really nice.  This is the first SubSonic release to come out with Linq support, and they look like they were made for one another.

When Rob announced the Subsonic 3 Preview 2 release, I grabbed it and took it for a quick spin.  If you're going to try this release, Rob's done a quick video that walks through a quick install and deployment, and I'd recommend watching it.  Installation couldn't be easier - the readme file lists four simple steps, and if you do everything right, you'll be up and running with scaffolding support for your database in less than five minutes (it takes less than one in the video).

What do you get for your effort?  SubSonic's scaffolding support builds out classes for each table in your database, as well as helpers for all of your stored procs.  The syntax shifts since SubSonic's earlier releases means that SubSonic 3 isn't a true ActiveRecord implementation, but the syntax is very natural and (IMO) productive -- it allows you to express database requests in a really compact form:  (example from Rob's post)

Northwind.DB db = new DB();
var result = from p in db.Products
where p.CategoryID == 5
select p;

foreach (var item in result)
{
Console.WriteLine(item.ProductName);
}
database 2
Image by Tim Morgan via Flickr

There's also support for LINQ queries, and you can batch queries so that multiple queries occur in one call to the database.  Even stored procs get an assist from SubSonic - procs are encapsulated into simple, type-safe function calls that return a reader for the results.  This is a big improvement over traditional data access layers where you'll see tons of repeated code.

Part of the magic comes from the SubSonic assembly, which supplies database-related code that could cut a bunch of repeated code out of your projects all by itself.  That's only part of the picture, though - there's a set of generated files that gives you strongly-typed objects for each of your tables.  The code generation uses T4 templates - see this screencast on the Patterns & Practices site for more on T4.

While simple applications might make use of the generated partial classes as-is, more complex apps are going to want to extend and/or encapsulate these classes, and expose more complete business classes to callers.  There are a number of ways you could do this:

  • Edit the generated code.  This is probably not an approach you'd want to take for a production app, but for a quick prototype, it could work well.  The problem with this approach is that your customizations are subject to breakage as the generated code changes.  If you can limit your changes to extensions (via partial classes), you might stand a chance here; otherwise, you'll want to explore other options.
  • Change the templates.  Since SubSonic is open-sourced, you have access to anything you might want to change.  Better yet, since the templates themselves are copied into your project, any changes you make there will be local to your project.  If your changes can be expressed in the T4 templates, this could be a really good option for you.
  • Encapsulate the generated classes.  I've come to really like working with Rocky Lhotka's CSLA Framework, but the data access parts of these classes freqently end up feeling a little more ponderous than I'd like.  SubSonic is just the thing to fix this - its syntax is crisp and compact, leaving me to focus on writing business code in my CSLA classes.  Personally, I like this model a lot - it builds on the strengths of both projects.

I'd also recommend checking out Rob's webcast on using SubSonic as a REST handler.  There are some other interesting options if you're trying to build a REST interface to your database (Astoria, WCF REST starter kit), but it's a great demonstration of SubSonic's ease-of-use.

Bear in mind that this is a preview release (before beta), so there are some rough edges.  I saw some code generation snafus where I had fields named the same as their tables, and there's a problem with LINQ support that makes it tough to construct a LINQ query using the value of a variable rather than a reference to that variable.  You're going to want to wait for a slightly more mature release before you start doing "real" work with 3.0, but this preview will give you a good indication of what's to come.  There's a lot here to like.

Reblog this post [with Zemanta]

GradSourcing

Green Bay
Image via Wikipedia

There was another great tech event in Columbus last week- the TechColumbus CIOhio 2008 conference. Unfortunately, I wasn't able to attend this event, but I followed along thanks to @bblanquera, @8101harris, and others. According to Dan, one of the topics that came up was GradSourcing. BMW Financial's Jeff Haskett spoke about a program he's put in place to bring new talent into his organization directly out of school.

When I heard about this program, I thought back to my own experience growing a team in Green Bay, WI a dozen or so years ago.  Green Bay was (is?) largely a blue-collar town, and it really didn't attract a ton of IT talent, so when I needed to build a software development team, I found that I had to relocate people to Green Bay or develop talent locally.  Relocating people to Wisconsin, it turned out, wasn't especially easy or cost-effective, so I had to find a way to grow good developers locally.

Continue reading "GradSourcing"

Great post on Generics

If there's one thing I can do...
Image by harold.lloyd (homologous) via Flickr

If you're not comfortable using C# Generics in your code, be sure to check out this great article by Karl Seguin.  It's an easy read, and it covers all the important ideas you'll need to get your head wrapped around these things.

I've mentioned Generics a couple times on this blog - they've been a great resource to me.  I'll admit - it took a little while for me to get comfortable with some of these ideas - especially multiple Generics, but since I've gained an appreciation for their capabilities, I find myself grabbing this tool early and often.

For me, the key to understanding Generics was to use them - as intensively as possible.  I used them in code I was writing from scratch, and then, when I started working with Rocky Lhotka's CSLA Framework, I needed to work with them more.  His framework, in fact, makes very heavy use of Generics - to the extent that I could see someone being put off by the learning curve if they weren't already comfortable with Generics.

Reblog this post [with Zemanta]

Columbus: Can we become a tech center?

I read an awesome post yesterday from a startup founder from Atlanta who's moving his operation's headquarters to California.  As I read about the challenges Atlanta poses to tech startups, I couldn't help but reflect on my own similar experiences.

City of Columbus
Image via Wikipedia

A few years ago, I had a chance to ride along with a software startup company here in Columbus, OH. I wrote our product's first lines of code and grew an incredible team of developers who helped grow the product. Life was challenging, and the path was steep, but we had nowhere to go but up.

Then, funding happened. Our CEO spent tireless days pounding the pavement in central Ohio looking first for Angel funding, then for VC funding. We spoke with a number of firms in ever-widening concentric circles around Columbus, but we never found anyone in this area who was looking to take on an early-stage tech startup, and we ended up being funded by a couple VC firms from Texas. I'm not sure that the distance is what led to our demise, but I can guarantee that it didn't help.  If nothing else, the amount of money we blew on airfare and hotel rooms would have kept our lights on for another couple months.

Continue reading "Columbus: Can we become a tech center?"

Spike Code vs. Reference Architecture

architecture illustration
Image via Wikipedia

I just read a post over on Codebetter.com where Jeremy Miller advises us all to not check in a code spike.  When I initially read this, I got a creepy, crawly feeling because the thought of doing any work at all without checking in makes me a little nervous.

As I read Jeremy's post, though, I became more comfortable with Jeremy's reasoning, and I also came to understand what was driving me nuts when I saw the post in the first place.  Not only did Jeremy not really mean "don't check in your code", but I was reading "spike", and thinking "reference architecture."  Let me explain.

The spikes that Jeremy is talking about are explicitly defined as throw-away code in every sense of the word.  There's no expectation that any of this code finds its way into your main source trunk.  You'll also notice that Jeremy ends up suggesting that you actually *do* want to check these spikes in -- just not into your main trunk.

Continue reading "Spike Code vs. Reference Architecture"

BizSpark and Empower for Microsoft Startups

You may be familiar with Microsoft's Empower program for ISV's.  Empower has been around for a few years as a way to help budding ISV startups ship their new Microsoft-based software products, and is widely-regarded as a no-brainer in its target audience.  Until today, if you were contemplating a new software product built with Microsoft development tools, you just couldn't beat Empower.  For an incredibly low price, you get the full MSDN suite of development tools, plus production licenses for OS and back-office products.

Continue reading "BizSpark and Empower for Microsoft Startups"

Could Azure be self-hosted?

LOS ANGELES - OCTOBER 27:  In this photograph ...
Image by Getty Images via Daylife

In response to my Azure reaction, James Bender pointed out that Azure, in its current form, really wouldn't make sense as a self-hosted platform.  Rather than burying this point in a comment, I'm going to talk about it here, because this positioning (by Microsoft) is pivotal, and it's crucial for Microsoft's future.

First, I think James is certainly right about Azure in the form you see today.  Step back from the forest a little, though, and imagine an Azure that's designed specifically for enterprises to deploy into their own data centers.  Certainly, you wouldn't have the (nearly) unlimited scaling that Azure promises, and certainly, you would have a much higher start up cost, which mitigates Azure's appeal for startups, but there's no question at all that Microsoft could have made a self-hosted platform that would create a compute fabric in your own data center.

Continue reading "Could Azure be self-hosted?"

PDC Reactions: Stuff nobody else noticed

LOS ANGELES - OCTOBER 27:  In this photograph ...
Image by Getty Images via Daylife

This was PDC week for Microsoft - this is their annual software development conference, and single best place to glimpse the future of software development according to Microsoft.  This year's big splashes came from Azure (Microsot's cloud computing platform), C# 4.0, and Windows 7 (I still can't believe they're really calling it "7").

In all cases, we got to see a little more detail about these platforms, but there weren't too many real surprises.  Azure seems to have been met with guarded enthusiasm, tempered by the fact that Microsoft didn't realease *any* pricing information *at all*, so we've got an offering that could be really, really powerful, but nobody knows how to make a business case for it.  Sigh.

Continue reading "PDC Reactions: Stuff nobody else noticed"

C# 4.0 more like VB: Sign of the Apocalypse?

Visual Studio

Gasp!  Can it be true?  Did Anders Hejlsberg really say that the next release of C# was going to be more like VB, and if he did, is this the beginning of the end for all of those holier-than-thou VB-bashers?

I hope so.

I've worked with both, and I'm really tired of the argument that one is inherently better than the other (hint: in my experience, that's a one-sided argument).  In fact, there's a lot to like about both languages.  I love, love, love the tool support that you see in C#, and I believe that at least some of this comes from C#'s type safety.  Still, I miss the easy of dynamic coding in VB (prior to VB.Net).  Event though dynamic typing was widely derided as just plan sloppy programming (and often, it was), you could do some really elegant work in VB without explicitly pulling out the big reflection guns.

Continue reading "C# 4.0 more like VB: Sign of the Apocalypse?"