Tech Tock

Time is of the essence.

3 New Favorite Techniques in Visual Studio

Here’s 3 techniques in Visual Studio that have lately become favorites of mine.

Breakpoint Output Logging

In my previous post on output logging with breakpoints, my colleague Ken Overton, pointed out the existence of something that used to be called “TracePoints”.  I went looking for these mythical beasts and was pleasantly surprised to find the “When Hit” option for breakpoints.  It’s available in the breakpoint right click menu.

image

You can output text and variable values when the breakpoint is hit instead of stopping:

image

The logging will show in the Output Window.  On the downside, it slows down program execution speed, seemingly more than conditional and regular breakpoints.

Object ID

My colleague Andrei Kashcha, master extraordinaire of debugging techniques, shared this with me and I’m starting to use it regularly.  When you make an “object id” for a  class instance, its a globally available reference to that instance for debug inspection and can be used to breakpoint in a single instance or verify which instance you are looking at.

To “Make Object ID”, just select that in the watch window context menu for an initialized variable.

image

That instance can now be referenced globally as 1#:

image

And to breakpoint in just that instance, set a conditional breakpoint with the condition “this == 1#”:

image

ReSharper Class List Navigator

I see a lot of people using this, but its recently become my goto navigation method.  For those of us ReSharper fans (with standard R# key mappings), just press ctl-t and up pops a handy class navigator that supports filtered search with partial class name and Pascal Cased abbreviations such as AVLCN for AVeryLongClassName.

image

July 11, 2011 Posted by | Uncategorized | , , , , , | Leave a Comment

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

How To Kill Regions

If you are as annoyed by regions as I am do this in Visual Studio 2008:

Tools / Options / Text Editor / C# / Advanced

Uncheck “Enter outlining mode when files open”

August 16, 2010 Posted by | Uncategorized | , | Leave a Comment

Cider – A Bitter Brew

Cider is the name for that incredibly slow and useless XAML preview in Visual Studio 2008.  Instructions on how to turn it off can be found here.

July 22, 2010 Posted by | Uncategorized | , , , | Leave a Comment

Week @Lab – Jan 23, 2010

A random selection of lab happenings witnessed by yours truly.

Coming Soon:  Crazy Eddy’s

Preparation is underway for a Crazy Eddy at our NY Office.  Have your passcards ready.

Happy MLK

I arrived in the office Monday to a party atmosphere.  Since clients were closed and we weren’t, lots of Labbers were in attendance.

Recruiting is Funny

I’ve got to hand it to our recruiters – it can’t be easy to screen with an audience.  We all cracked up when J responded “So, you’re asking why I’m hiring developers from Singapore?”  Yes, we scour the globe.

Visual Studio Can Wait

From what I hear, the beta of VS 2010 is not ready to be my primary dev environment and the R# beta is even worse.  I think VS 2008 crashes enough, I can wait a few more months for VS2010.

Jerked TwitterMania

The lunch cart is on Twitter???  Service is hardly “Facebook Fast”, but Labbers swear by the Jerk Chicken.  I prefer the closer cart with lamb.

Fundamentals of Finance – Week 2

Pay attention N***.  Two down, six to go.

January 23, 2010 Posted by | Uncategorized | , | Leave a Comment

Week @Lab

A random list of things I saw and heard @Lab this week.

Reactive

There’s been Some discussion of the Reactive Framework.  It seems to be this year’s hot .Net topic (aside from .Net 4.0 itself).

Mini Meetup

I stayed late at the office on Wednesday and almost got roped in to a Java mini-Meetup – half a dozen lab guys talking Java for a couple hours.

Maybe next time if you guys have food I’ll stay.

Microsoft Success Story?

Is this success story this actual IT failure?  Maybe I should switch to Java…

UX on Friday

I’ve keep hearing about a Friday meeting that the UX folks have.  I wonder what they’re up to.

All the Cool Kids Are Wearing Black

Some of the best developers @Lab prefer a black background in their Visual Studio dev environment (along with a host of other color customizations).  One developer who attempted the switch this week went back in just a couple days.  I personally, get overwhelmed by the look and have trouble understanding code this way. YMMV.

image

Chocolate Diet

I brought chocolates to the office to celebrate my new diet which made lots of people happy but confused.  My new diet is basically drinking diluted vinegar with sweetener all day and eating pretty much anything I want.  I found it to be the cure for heartburn and hypoglycemia. I’m also wheat free – because it makes me sick (don’t ask) , not because I’m trendy – not that anybody should really care.

Another Labber brought in some farmer’s market apples of which I thoroughly partook.

Just another reason we love the home office – its homey.

January 16, 2010 Posted by | Uncategorized | , , , | 1 Comment

New Year’s Resolution App

I’m going to learn all the hotkeys and snippets in Visual Studio and ReSharper.

Towards that end I built an application to email me a new hotkey every day.  Until a better name can be found, I’m calling it OneADay (even though I added a feature so you can make it send email several times a day).  I’ve been using it for a couple weeks now and have added several useful hotkeys to my repertoire effortlessly (I recommend ctl-shift-v).

If you want to join me in my quest you can use it here.  You can put many kinds of data in, so it may solve several different problems where recurring reminders are needed.

It started a few months ago when I noticed a colleague was working quickly with Visual Studio using all the hotkeys.  I lamented that through the umpteen versions of VS (remember VS6?) I have forgotten so many hotkeys and immediately resolved to relearn all the hotkeys in the current version.  I printed out the poster and put it on my desk where it proceeded to collect dust.  Of course I needed an application to help me.  So here it is.

January 13, 2010 Posted by | Uncategorized | , | Leave a Comment

@Lab This Month

There was plenty going on at lab in the last few weeks, but hey, I’ve been busy too, so December gets a monthly installment.

Die Region Die

Very few of us like Visual Studio Regions.  A dozen spoke up within minutes when the topic came up.

This VS Macro was recommended to help control regions.

If you have any love for regions you’ll want this automagic regionator.

Using regions to organize by functionality instead of type of members or access modifiers got some support.  Also, using regions to hide boilerplate code like copyrights and imports sections could be acceptable to some.

WPF In Your Inbox

<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat=”Date: {0:MM/dd/yyyy}, Percent: {1:P}”>
<Binding Path=”BeginDate” />
<Binding Path=”Percent” />

</MultiBinding>

</TextBlock.Text>
</TextBlock>

This code was shared without comment a couple weeks ago and looking again now, I could have used it several times lately instead of the ugliness I committed.

Miscellany

Again charting came up and ChartFX was recommended for its rich features and stability.

TeamCity 5.0 adds Amazon EC2 cloud integration, boosts scalability and further enhances user experience.  Sounds good to me.

A Cloud Computing in Finance focus group is starting @Lab – I can’t wait till they hold a seminar.

Folks are trying out Google Wave.

Your abomination is my clever hack

This is getting a lot of discussion, but I haven’t had enough time so I’ve been willfully ignoring it, but constantly feel drawn to review it nonetheless – maybe over vacation. I’ll read up on it.

Hiring Continues @Lab

You may have noticed that financial companies are hiring.  On the one hand, I think they’re hiring like crazy and I’ve gotten a few recruiter emails each week lately – on the other, you can never tell with these recruiters.  I know people at companies that are hiring and companies that are still laying off.  Some companies are doing both at once.  Lab49 is Hiring, so if you’re a senior engineer just send your resume to jobs@lab49.com and tell them your read it here – hey couldn’t hurt, might help.

December Madness

December has been a bit too busy for me so I missed the UX Group Seminar and the .Net Meetup:(

Happy New Year

Can’t wait for the new year, when all us Lab Newbies will be taking 8 weeks of Finance 101. New projects are coming. And lots of new tech.

See you next year @Lab.

December 23, 2009 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

Code Blogging Utility – CopySourceAsHtml

CopySourceAsHtml (free on CodePlex) will do exactly what it says.  It’s a Visual Studio 2008 add-in.  It adds a “Copy As Html” menu item in your right click menu inside Visual Studio.  The source code will be copied with all its color coding intact, perfect for blogging.

See the results in this post.

November 20, 2009 Posted by | Uncategorized | , , , , | Leave a Comment

Follow

Get every new post delivered to your Inbox.