Tech Tock

Time is of the essence.

The Death of the Long Form

Everywhere I turn, I am faced with the short form only.  For example, here’s the MEF Documentation.

I’d love to read it, but its in wiki format and you can’t get it all in a pdf.  I want to put it all on my reader and take it with me.  And I don’t want to put on my monkey hat and convert each page myself.

And don’t even get me started on the MSDN library.

And blogs.

Aaaaargh.

Well, actually, for blogs, you can go over to zinepal and print them out.  Zinepal even helps with individual web pages.  They made the monkey work of compiling the MEF wiki into a single pdf bearable, but still not pleasant.  I used the “Add to eBook” bookmarklet and I’m sure I’ll be using it again.  Just watch out for pages that look like this before you save your pdf:

Sorry, an error occured trying to retrieve this document.
The requested URL returned error: 400

Now we’re just waiting for a one-click wiki and msdn lib solution.

Advertisements

October 11, 2010 Posted by | Uncategorized | , | 3 Comments

VS 2010 – 5 – 10 Years

Visual Studio 2010 can compare SQL Server Databases.  Of course my software from 2000, and RedGate from slightly later could do that too.  Mine could also compare data…

While I still love my platform and think VS 2010 is awesome, if you’re looking for utilities, what you’ll see in 2015 is probably already out there today.

October 6, 2010 Posted by | Uncategorized | , , | 1 Comment

A Free Database You’ll Hate (At First?)

I’m doing a small project that could use some local caching persistence, so I picked my old buddy SQL Server.  SQL Server Compact Edition (SSCE, CE) to be precise.

I’m finding it to be SQL Server with all the fun removed.  At least it supports multiple database connections.  But there’s no database diagrams, you can’t make a PK clustered, and Linq2SQL refuses to make a diagram in Visual studio among other indignities.

You can’t even generate scripts from a Compact DB schema :(.  An MVP recommended this commercial utility (what, pay for a utility?) and the guy with all the points on StackOverflow got it wrong, Management Studio won’t let you generate a script for a Compact DB.  But the answer is down in the list of responses (the first time I saw a correct answer ignored on StackOverflow).  This CodePlex tool does a good job of scripting the database.  Its a convenient Management Studio plug-in.

Strange thing that the same MVP recommends the same company for making database diagrams in SSCE. My Spidey Sense is tingling.

Since the project is so small and the database part is so trivial, I can justify Linq2SQL even though its on its way out, but try to drag a table into a Linq2SQL dbml designer and Visual Studio complains:

image

Since my project only needs a couple quick and dirty tables and SQL Server any version is acceptable to the client, I’m going to forge ahead.

Since Visual Studio UI won’t create a Linq2SQL dbml for a SQLCE database, this blog, pointed me to SQLMetal.exe, which is included with Visual Studio 2008.  Why Visual Studio should be so picky is beyond me.

On the other hand I could use a typed dataset, which I’ve found brittle in the past and hardly as user friendly as Linq2SQL.  This is created automatically when you create a CE file database in Visual Studio.  No thanks.

the SQLMetal worked on the first try, so alls well that ends well.  Its easy to keep the command window open and just delete the dbml and rerun the SQLMetal command anytime you update the schema.

Once it was all setup I was back in Linq Heaven.

So, it seems the moral of this story is that with the right collection of utilities, SQL Server Compact Edition is a workable persistence store for a small application.

December 3, 2009 Posted by | Uncategorized | , , , , , , , , | Leave a comment

SlashDon’t. ComputerWhat?

This post on Slashdot completely mischaracterizes a PDC panel discussion.  The post seems to rely exclusively on this article from ComputerWorld which also has a questionable slant on the session.  I was even taken in by this misinformation.

The CW Headline was:

Microsoft’s top developers prefer old-school coding methods

The Slashdot Headline was more pointed: 

Microsoft’s Top Devs Don’t Seem To Like Own Tools

You can watch the session and decide for yourself here.

I watched the session and thoroughly enjoyed it.  Here’s my rebuttal.  Times for the quotes are in parenthesis.

I would agree with CW that the panel was “often humorous”.  With the intro question “What problem is the most important that we face today”.  Don Box said with a wide grin (3:20):

I spend every night wondering how I’m going to make developers fall in love with the database.  There’s man-millennia worth of value in there that we keep wanting to put a prophylactic over so that we don’t get tainted by it.

This great Jim Gray quote related by Butler Lampson (7:50):

Transactions are like fairy dust.  A Cobol programmer writes a piece of business logic.  Its a sequential program, it does some relatively simple state transformation, and then you sprinkle transaction fairy dust on it, and automatically it becomes parallel, it becomes fault tolerant, and it becomes load balanced.

Jeffrey Snover had the audience in stitches unintentionally when he said (10:50):

Software tends to work when it works and fail when it fails.

Butler Lampson (26:16): “The net contribution of RPC to human welfare has been negative.”

Jeffrey Snover’s quote on managed code was much in favor (40:00):

Managed code is like antilock brakes. You used to have to be a good driver on ice or you would die. Now you don’t have to pump your brakes anymore.

Though when you read the slash/world articles it seems like he’s against it.  Like most people he’d rather drive faster with less risk of dying.  Or code faster with less risk of crashing. He’s not some old coot saying kids today have it too easy.

There were lengthy conversations on transactions, memory management, pointers, parallel programming, state, reliability, expression trees, etc.

When the text topic was introduced Don Box declared “Text f***g rocks!” in exaggerated glee (51:38).

The quote that CW latched onto was from Jeffrey Snover (53:20):

Graphical programming environments are usable when they are useless, but unusable when they would be useful…  When there are five things on the screen, you can burp that out [in text]. But when there are 500 things, [graphical programming] is completely unusable. You zoom in and zoom out and you lose all context. I think it’s just smokin’ dope.

He’s not running down Microsoft tools here, he’s dishing on all Graphical Programming tools.  Funny enough, WPF in Visual Studio has the least usable graphical environment, but the best text environment for creating graphics since the UI is defined in XAML, a type of xml like html and the IDE gives a lot of help when editing the XAML and the graphical representation updates as you edit the text.  Working directly with the graphics is near impossible, but that’s ok since building graphics with text is quite workable.  I don’t know any tool that can really help you with 500 graphical elements.

While this was a joke from Snover as noted by CW:

programming is getting so abstract, developers will soon have to use Microsoft’s in-air motion sensor game controller for the Xbox, dubbed Project Natal, to “write programs through interpretative dance.”

It was not an offhand joke or part of the conversation.  It was in response to the question “What do you think we’ll be talking about in 5 – 10 years.” (57:20)  In context it’s still funny, but makes a lot more sense.

I think the entire session went over the head of the reporter for CW.

December 1, 2009 Posted by | Uncategorized | , , , | Leave a comment

Power Everything Please

According to this Slashdot post some senior MS Developers were maligning .Net with such macho phrases as:

Managed code is like anti-lock brakes. You used to have to be a good driver on ice or you would die. Now you don’t have to pump your brakes anymore.

attributed to Jeffrey Snover

I personally am not only in favor of anti-lock brakes, but also heated seats, to say nothing of power everything.  Can’t wait for .Net 4.0!

Here’s a funny Snover (partial?) quote:

programming is getting so abstract, developers will soon have to use Natal to “write programs through interpretative dance.”

Luckily I have no idea what abstractions he’s talking about.  I’m a terrible dancer.

November 29, 2009 Posted by | Uncategorized | , , | 1 Comment

LINQ To C# – Drop Dead

What’s up with no edit & continue support for methods with Lambda Expressions(mostly from LINQ queries).

Error    7    Modifying a ‘method’ which contains a lambda expression will prevent the debug session from continuing while Edit and Continue is enabled.

Originally this post was going to be “LINQ Vs. Edit and Continue”, but then I found this article on MSDN saying how it works just fine in Visual Basic.  Visual Basic!  WTF!!!

The details for VB are a little cagey though:

You can add or remove code before the LINQ statement…. Your Visual Basic debugging experience for non-LINQ code remains the same as it was before LINQ was introduced.

Does this mean if you add or remove code after a LINQ statement it stops edit and continue, or does this mean MSDN needs a better editorial staff?  The “before” seems to cast doubt on the statement that “debugging experience for non-LINQ code remains the same ”  Not that I really care since I like my languages with curly brackets.

If you want to know what you can’t do in C# edit and continue, read this article.  I personally have no interest in what I can’t do. I only want to know when I’ll be able to do it and I couldn’t find any articles on that.  I heard from a friend that its not fixed in C# 4.0.   😦

LINQ is too good to give up, but this is really getting annoying.

I’m almost (getting this close) ready to make my own solution, or horrors, switching to VB.

November 18, 2009 Posted by | Uncategorized | , , , , , , , , , , , | Leave a comment