May 2004 - Posts

bool? res = count ?? 0 >= 0;

In today's presentation, Anders introduced some new syntax (to me) for nullable types. It goes like this: if you have a value variable (struct or simpler) that could get null values, you declare it like this:

int? intThatCouldBeNull;

So that later you could ask:

if (intThatCouldBeNull == null) ...

And we also get a coalesce operator:

int res = intThatCouldBeNull ?? 0;

This will assign 0 to res only if intThatCouldBeNull is indeed null. One caveat: if you compare two nulls the result is true. I would've expect the result to be null also, but they gave me good reasons for not being so. The debate is open though...

Posted by Edgar Sánchez with no comments
Filed under:

If you were here

You could be tasting this:

Posted by Edgar Sánchez with 4 comment(s)

Third and fourth steps of the journey

There are now far more interesting news about TechEd now so I will quickly finish the story of my trip:

1. Left Houston without any major incident and got to Los Angeles 1 hour behind schedule, it's not that important though as here I have to wait for my brother (who's coming from Panamá), it's a six hour wait in Los Angeles airport and I'm even getting proficient with Codesmith already, may be I'm missing something but I think it's Visual Studio integration story could really enhance, aside of that, it's a nice addition to my toolbelt.

2. My brother Alex arrives one hour late but without any major incident, so our last part of the trip (by land) starts and we finally get at Saturday night (well 11:50 PM local time). Now I am ready for the Regional Directors meeting on Sunday.

Posted by Edgar Sánchez with no comments

Second step of the journey

The hardest part here was to get to the Continental counter: it seems that an Ecuadorean guy trying to get to the U.S. through Lima is suspicious enough, so I was drilled harder than in a Java vs. .NET debate. The flight itself was easy: I slept most of the six hours, the rest of time I learnt a bit about Codesmith. I know, I know, old news for most of you, and I wish I had started using it in my latest project: the DAL would've been a breeze. Now, on to the third step: Los Angeles.

Note: this actually happened on Saturday early morning but I couldn't blog about it until now.

Posted by Edgar Sánchez with no comments

First step of the journey

I left my home town, Quito, a couple of hours ago, now I'm at Lima, Peru, so I'm now 1.200 km (800 miles) further away from TechEd, it looks like a step behind, doesn't it? There's a reason for it though: next Saturday 29th it is Lima Developer Day (part of Andean Developer Days) and I am an invited speaker, so after TechEd I have to fly directly from California to Peru; due to the business logic of air fares it is cheaper to buy a Quito-Lima-Quito ticket and a Lima-Los Angeles-Lima ticket than a Quito-Los Angeles-Lima-Quito ticket (go figure), so here I am at a Lima cyber-shop, spending my time until my second step: Houston.
Posted by Edgar Sánchez with 2 comment(s)

I'll be there TechEd 2004 (no small feat for a sold out show)

It wasn't sure until the last minute but now I'm positive I'll be at TechEd 2004. All I'll have to do (besides surviving the trip) is to spent some time at Cabana 5 & 6, so if you want to chat about the ins and outs of developing with .NET do come along (but please don't bring hard questions, who wants to work hard in San Diego?)
Posted by Edgar Sánchez with no comments
More Posts