-
Sunday, March 07, 2010
This past weekend, I helped put on a conference, Day of Mobile, for Tech in the Middle, an organization I help run with Gabe Garms. Some folks who attended seemed to be toying with the idea of making “conference planner” a business. They seemed to think that the Day of Mobile conference and ones like it might be profitable. They aren’t. At least, not at the scale we’ve been doing them. To demonstrate this, I want to explain the expenses in a conference. Conferences have two types of expenses: expenses that increase per attendee and fixed expenses that are static regardless of attendee cost. For example, lunch is a cost per attendee. Registration staff (which we’ll likely need for our next event) is a fixed cost for every N attendees. A fixed expense is shared by the group are costs like renting the venue, contracting with a speaker, ...
Full story
-
Wednesday, March 03, 2010
Friends and folks in the .NET community learned that I got hit pretty hard by the flu last week. I was hospitalized for 3 days while they made sure I didn’t break any other internal systems. I just wanted to let folks know that I’m back at work. The rest of the family has been hit by the flu as well, though not as hard as me (thank goodness!). I appreciated all the offers of help from folks around me. Other questions: was this H1N1? I don’t know, but I did get the vaccine cocktail for everything but H1N1. You do the math—it was either H1N1 or something that I just couldn’t handle. Why was I hospitalized? I was losing fluids for 12 hours straight. That scared me and I went to the doctor. He thought it might be appendicitis. I went to the hospital and they ruled out appendicitis ...
Full story
-
Friday, February 26, 2010
I’m hosting a conference in Chicago called Day of Mobile. At the end of the day, we are having a big time keynote from Jay Freeman. These days, he’s a rock star in the iPhone universe. For some reason, and I’m a complete moron for not realizing this until a few minutes ago, he is the same guy who brought the .NET world this little tool: Anakrino. If you are scratching your head and wondering why that would impress me, it’s because I’m getting older and I’ve used every .NET tool in the world. Anakrino was a mainstay at Microsoft to decompile .NET assemblies to read in C# and VB.NET. It was easier to use than grabbing the source code. So, in the last few minutes, I’ve gone from realizing that we had a really awesome iPhone ninja speaking at the conference to realizing that we had ...
Full story
-
Wednesday, February 10, 2010
If you develop on ASP.NET MVC and have a need to return the ViewData as JSON and XML as well as HTML, take a look at the article I posted over at InformIT.com today (2/10/10): http://www.informit.com/articles/article.aspx?p=1554970. This is a shortcut to providing REST endpoints without doing a whole lot of extra work. This article doesn’t worry about versioning but does tackle the whole “how do I avoid screen scraping and extra coding” problem. Enjoy!
Full story
-
Wednesday, February 10, 2010
Thanks to Derik Whittaker for bugging me to do one of these. It was fun. Go check it out. It’s a presentation on how to use the WebCam on Silverlight 4. http://www.dimecasts.net/Casts/CastDetails/162
Full story
-
Wednesday, February 10, 2010
I installed the VS 2010 RC last night, after uninstalling the VS 2010 Beta. If you see that ASP.NET isn’t coming up/working on your machine, you may need to remap the ASP.NET handlers into IIS. To do that, go to the Microsoft.NET 4.0 folder on your machine (typically C:\Windows\Microsoft.NET\Framework64\v4.0.30128 on a 64-bit Windows install, C:\Windows\Microsoft.NET\Framework\v4.0.30128 on a 32-bit install). Once in that folder, run the following: aspnet_regiis.exe –i After doing this, your ASP.NET applications should start running again. This is the same trick that worked on earlier versions of .NET, but it’s been a while since we had a .NET upgrade. I thought this might help out a few of you out there.
Full story
-
Tuesday, February 09, 2010
The other day, a friend had an issue with a DataContract. He had an Entity Model that used DataContract serialization. The code, stripped down to its essence, had something like this:[DataContract]
public partial class SomeClass
{
[DataMember]
public int MyInt { get; set; }
}
And this was all well and good. When transmitting SomeClass over the wire, the fields on the entity model were transmitted. Now, my friend is really smart, and he knew that his version of serialization had implicit serialization. So, when adding new fields, he relied on implicit field serialization by augmenting SomeClass in a separate file as:public partial class SomeClass
{
public string MyString { get; set; }
}
Lo and behold, the field MyString didn’t appear on the wire. Why was this? This is because partial classes are a compiler trick that hides itself at the assembly level. ...
Full story
-
Tuesday, February 02, 2010
It’s been almost 4 years since I last programmed professionally with C++. C++ was my language of choice from 1994 through the end of 2000. It is a language that, once upon a time, I knew REALLY well. How well? I could read template errors and code the fix based on the build output—if you are a .NET developer, that’s kind of hard to do. Since then, I’ve done a lot of development with three languages: VB.NET, C#, and F#. Most recently, I was doing my hobbyist development in F#. I was impressed by the incremental boost in development productivity in F# over C#. The productivity boost at first was just noticeable and has recently become something where I can express F# algorithms in significantly less time that the C# equivalent. Since mid November 2009, I started using C++ because a hobby project I wanted to work on required it. ...
Full story
-
Tuesday, January 26, 2010
I’m going to be assisting the Microsoft office by doing some presentations of the PDC Roadshow. January 26, 6 PM: Rockford .NET Users Group February 3rd, 6 PM: Madison .NET Users Group February 25, 6:30 PM: Lake County .NET Users Group If you have a user group in the Wisconsin/Illinois/Indiana area and want to see this content, let me know. I can either come out to your group or help find a presenter who can deliver the content.
Full story
-
Sunday, January 24, 2010
html, body {
height: 100%;
overflow: auto;
}
body {
padding: 0;
margin: 0;
}
#silverlightcontrolhost {
height: 100%;
text-align:center;
}
Over the past week, I spent some time with Silverlight 4. I’m really impressed by how easy it is to incorporate video into an application. This post shows how to capture video from the camera and display the video on the screen. The post also handles grabbing single frames of video. You might use this type of arrangement to allow users to upload images, hold impromptu web casts, and to do video conferencing. I’ve uploaded a barebones application that turns on video capture and displays the video: To understand how this works, you need to be familiar with the following objects: CaptureSource CaptureDeviceConfiguration VideoBrush The CaptureSource type encapsulates the methods needed to interact with audio and video devices. CaptureDeviceConfiguration acts as gatekeeper to the webcam and microphone. ...
Full story
.NET
Silverlight
-
Wednesday, January 13, 2010
Tonight, I was writing some code that made use of transactional WCF bindings. I wanted to do some experimentation with all the bindings available to see which ones support flowing transactions. The pre-built bindings that do this will create a TransactionFlowBindingElement when you ask them to call CreateBindingElements(). The types I’m interested are concrete (no abstract methods) and have a zero-argument constructor. A few years ago, I would have done a bunch of looping constructs to look at each element. However, I’ve been doing a lot more work with F#. While doing this experiment in C# for a project, I wound up writing the following instead: static void Main(string[] args)
{
var bindings = from bindingType in typeof (MessageContractAttribute).
Assembly.GetTypes()
where typeof (Binding).IsAssignableFrom(bindingType) &&
!bindingType.IsAbstract &&
(from constructorInfo in bindingType.GetConstructors()
where constructorInfo.GetParameters().Length == 0
select constructorInfo).Count() > 0
select bindingType;
var ...
Full story
.NET
-
Friday, December 18, 2009
There is a problem on the Euler project, www.projecteuler.net, which asks to find the sum of all values under a given number. Problems on the Euler project have a range of solutions, where at least one solution has a runtime of under 1 minute. A popular, time efficient algorithm that finds all primes in a given range is the Sieve of Eratosthenes. The basic algorithm is: Create an array that contains all values from 2 up to the final maximum value Starting at 2, For each value in the array, mark all items that have indices of the current value that are multiples and NOT equivalent to the current index as 0 (eg. index mod [current value] == 0). March forward until you hit a non-zero value in the array, then mark all multiples as 0. Halt condition: stop when you cross the midpoint of the ...
Full story
F#
-
Thursday, December 17, 2009
Today I was reading an article in The Onion, Conquerors You May Have Missed, and noticed that the number for the ant looked like it might be a big old prime, or at least have a large prime divisor. (For reference, the ant is # 43,168,974,563,247.) There are a number of algorithms for finding this answer, but my favorite is a little brute force algorithm that keeps dividing the big number by some other value until the two numbers are equal. Yes, I know I can short circuit a bunch of testing via a square root function, but BigInteger doesn’t have a sqrt function (yet…). Anyhow, I cobbled this together and it worked right out of the gate: let rec largestFactor x y =
if (x = y) then y
else
let z = x % y
if z = 0I then largestFactor (x/y) y
else largestFactor x ...
Full story
F#
.NET
-
Monday, November 30, 2009
I was unusually quiet over the last couple of weeks. Why? My former host apparently packed too many sites on one machine and caused this page to experience OutOfMemoryExceptions galore. I run a number of sites for various purposes and decided it was time to move up to a VM host. I’m currently on MaximumASP and am using a MaxV server. Setup was pretty simple, support was helpful for a few of my questions, and I’m happy to have my blog engine up and running again.
Full story
Miscellaneous
-
Thursday, November 12, 2009
I want to say thanks to everyone who came out to watch me speak about OpenSocial at the Chicago Alt.NET meeting. Thanks for inviting me to present and for making the time so enjoyable. I’ve posted the slides and the code for the Canvas page here.
Full story
Miscellaneous
-
Monday, November 09, 2009
This month, I’ll be speaking at the Chicago Alt.Net user group meeting. Please check out the details here and register here. And, here is the blurb on the talk: November 2009 Meeting Building OpenSocial Applications 6:00 pm Pizza and networking time 6:30 pm From its official web site: Friends are fun, but they're only on some websites. OpenSocial helps these sites share their social data with the web. Applications that use the OpenSocial APIs can be embedded within a social network itself, or access a site's social data from anywhere on the web. OpenSocial is the platform that MySpace, Orkut, Ning, LinkedIn, Hi5, and pretty much every social network but Facebook supports for creating games and other applications that run on these social network sites. In this talk, we focus on the MySpace platform and how one builds a MySpace application. This involves ...
Full story
-
Saturday, November 07, 2009
I want to send out a big thank you to the team who put together the Iowa Code Camp. You people did an awesome job!!! I had a great time giving my talks and really enjoyed hanging out with the crowd in Iowa. For those of you who attended my talks, or just want to see the materials, I’ve posted things. WCF Diagnostics Talk and Materials WinDBG Talk and Materials See you next year…
Full story
WCF
Windows
-
Monday, November 02, 2009
On December 7, I’ll be speaking at the nPlus1 ArcSummit for the optional morning session. I’d love to see the place packed! Here are the details: https://www.clicktoattend.com/invitation.aspx?code=142763 About nPlus1.org nPlus1.org is a site dedicated to helping Architects, aspiring Architects and Lead Developers learn, connect and contribute. On this site you’ll have access to great first party content written by some of the most skilled and experienced Architects working today. You’ll also have access to, and be able to contribute to a nexus of content from around the Internet aimed at keeping Architects up to date on all the new developments in their fields of interest. When Monday December 7, 2009 – 10:00PM to 5:00PM Where Microsoft MTC - Aon Center 200 E. Randolph Suite 200 Chicago, IL 60601 driving directions Free Lunch Provided Agenda Morning Session (Optional): An Introduction to Object Oriented Programming 10:00 AM - 12:00 PM Are you ...
Full story
-
Wednesday, October 21, 2009
A long time ago, I was a C++ developer. I actually thought of myself as a pretty darn good C++ developer and got way too excited when I finally got to meet folks like Scott Meyers and actually landed a job working with Bobby Schmidt—same team on MSDN. (If you know Bobby’s name, well, you were pretty deep into C++ circa 1999.) Then, like many C++ devs, I moved over to a garbage collected language. I’ve done more than my fair share of professional .NET and Java development. C++ has been left by the wayside. Today, I finally downloaded and installed Visual Studio 2010 Beta 2. I dug into the “What’s New” and, out of curiosity, decided to look at C++ first (I already know about many of the C# and VB changes). I saw two cool things: 1. C++ now has an auto keyword. For you C# devs, it ...
Full story
-
Wednesday, September 30, 2009
My article on programming REST services with F# and WCF went up at InformIT. Please go read it! http://www.informit.com/articles/article.aspx?p=1394625
Full story
F#
WCF
.NET