Tag Archives: .net

LINQ LINQ LINQ

I’ve been doing a lot of research on LINQ for episode 6 of the Coding Blocks podcast and I was a bit surprised by what I came up with.

I had originally thought of LINQ as a feature. I had heard the parable of the guy at the white board, writing what they thought code should look like and then worked backwards on how to get there. This makes sense, but what surprised me was just how much of the building blocks were already there.

I wrote a blog post about it over at codingblocks.net, so go check it out: What’s So Special About LINQ?.

ColorMine.org - Color Converters and Delta E Calculators

ColorMine.org

I’m still putting together my 2013 goals, but I do know that one of them is to launch more sites.

I’ve been doing this whole internet thing for a long time now, I really aught to have more to show for it.

Knowing that perfect is the enemy of good enough I’ve opted to take a release early and release often approach to launching sites.

First up is colormine.org. It’s a simple site that wraps a small color library I wrote.
Continue reading

Reflections on Orlando Code Camp and BarCamp Orlando

In the last two weeks I’ve had the great fortune to attend two fantastic conferences here in Orlando.

Both completely free events, and both were fun, inspiring, and eye-opening in their own ways. I came away feeling inspired, invigorated, and with a couple of new nerdy (read: cool) t-shirts!

Orlando Code Camp
Orlando CodeCamp was incredibly educational and informative with it’s tech-heavy, hour-long formal presentations. I can’t imagine all the hard work put in by the speakers and volunteers to have such a large and superior quality event run, and run so smoothly.

There was a definite collegial vibe (taking place at the beautiful Seminole County College campus didn’t hurt!) but oh how I wish my university experience was as interesting, efficient, relevant, and productive.

Team Foundation Server
Special thanks to the ONETUG president Esteban Garcia for patiently and thoroughly answering all my inane TFS questions. I’ve avoided TFS talks in the past because I thought they would be boring, but boy was I wrong! It really cool to see everything up and integrated like that!

Also another special thanks to SubMain for the CodeIt.Right licensce I won. I’m already putting it to good use!

BarCamp Orlando
If CodeCamp felt like school, then BarCamp felt more like…Woodstock. The event took place in the Wall Street Plaza, with talks taking place in local venues like One-Eyed Jacks, Slingapours, and The Gibson Showroom. The presentation times and topics were updated throughout the day on a giant white board, and there was a great little mobile site for keeping track of the ever evolving schedule the on your iPhone. (I’m an Android fanboy, but I don’t think I’ve ever seen so many Apple products in one place before!)

The talks ranged from the technical to the artistic to the entrepreneurial, and there were strong revolutionary, community and outside-the-box undercurrents behind most talks.

The session that most picqued my interest was done by Stan Schultes, Microsoft MVP and organizer of the BarCamp Sarasota. He led a ‘birds of a feather’ style centered around software start-ups, and what cities like San Francisco, Boston and New York have that we in the “Greater Central Florida Region” don’t….and how we can organize to fix it!

The biggest take-away for me however is getting to see and meet so many inspired and passionate makers, shakers and enthusiasts out there trying to make a difference.

Topics and Times

Photo Credit: Nick Pettit

I’m looking forward to checking out recently discovered entities like Orlando Coding Dojo, Urban ReThink, and Familab events in the near future.

Big shout out to ONETUG, ORUG, and Envy Labs for being such big drivers behind these events and a big thanks to all the organizers, sponsors and community. Fantastic job!

Oh, and I almost forgot to mention the best part about these two events: They’re recurring!

I’m looking forward to seeing you all again soon!

To uint, or not to uint

I like unsigned integers, always have. It’s more correct, concise and expressive, you get more (positive) space out of it and you’re preventing bugs by design. What’s not to love?

Well…

I’ve been nooking CLR via C# and it’s a fantastic read for anyone who wants to ‘get serious’ about .Net. The book’s so crammed full of good information it’s hard not to gush, but I digress.

I was nooking, you see, and I came across this recommendation:

“Use signed data types (such as Int32 and Int64 instead of unsigned numeric types such as UInt32 and UInt64) wherever possible.”

Say it aint so!

Jeffrey Richter continues:

“This allows the compiler to detect more overflow/underflow errors. In addition, various parts of the class library (such as Array’s and String’s Length properties) are hard-coded to return signed values, and less casting is required as you move these values around in your code.”

Casting is ugly, no argument there but I don’t care much about the overflow/underflow errors. I generally don’t enable overflow checking, there’s no political statement here, it’s just never come up.

And it still feels wrong for me to declare a value signed when I know that it shouldn’t be.

(Richter recommends enabling checking for debug builds, and disabling for release. Sound advice!)

But here’s real the kicker for me:

In addition, unsigned numeric types are not CLS-compliant.

Doh. I did a bit of searching to try and track down why it’s not part of the CLS, and I found that Brad Abrams expresses it best in this post:

“The general feeling among many of us is that the vast majority of programming is done with signed types. Whenever you switch to unsigned types you force a mental model switch (and an ugly cast). In the worst cast you build up a whole parallel world of APIs that take unsigned types. The value of avoiding the ‘< 0' check is not worth the inclusion of generics in the CLS"

Alright, I give in. I’m apparently in the minority, these guys are way smarter than I am, and it is easier, if not more concise. So it goes.

Goodbye for now uint, you’ll always hold a positive place in my heart.

Just like Weezer:

Unit Testing in PowerShell with PSUnit

I did a bit of playing around with wcf, PowerShell and PSUnit the other day.

PSUnit is a unit-testing framework based on NUnit (or should I say JUnit). It was a bit of work to set up but I was really impressed by the speed, robustness, and ISE integration.

It doesn’t make much sense to test application logic through a web service, or even with PowerShell at all, but it’s nice to know there’s such a great tool available. I’ve been having some issues with MSTest and 64 bit assemblies and although I’ll probably end up going with NUnit, it was a fun and educational journey!

Thanks PSUnit Guys!