Simple sorting in JavaScript

About three years ago I graduated and got my degree in Applied Computer Science. Although it says Computer Science, we hardly ever focused on data structures and algorithms. Obviously, I now see that as a shortcoming. So I plan to make up for that by reading up on some of the basics. While at it, I might be blogging on some of the topics. I am going to start by implementing some of the simple sorting algorithms in JavaScript. ...

July 7, 2011 · 4 min · Jef Claes

Should we get this tool?

This is a decision that often needs to be made by middle management. For managers the most natural way to make this call is by evaluating the return on investment. To calculate the ROI, you need to compare the gain of an investment relative to the amount of investment. And this is exactly where things get hard, if not impossible. Measuring developer productivity is one of the unsolvable problems in our industry. ...

June 15, 2011 · 1 min · Jef Claes

Book review: More Joel on Software

I was lucky to pick up a copy of More Joel on Software for only 5 euros at a bookfest last week. Turns out the book ships pretty cheap on Amazon as well. More Joel on Software was written by Joel Spolsky, already a legend for launching The Stack Exchange Network with Jeff Atwood. Although it’s hard to not know him, I admittedly hadn’t read a lot of his material so far. Starting my professional career in late 2008, the Spolsky writing high days were mostly over. ...

June 7, 2011 · 2 min · Jef Claes

Checking for anonymous types

Because I blogged about anonymous types last month, I thought following method would also make an interesting post. private static bool IsAnonymousType(Type type) { Debug.Assert(type != null, "Type should not be null"); // HACK: The only way to detect anonymous types right now. return Attribute.IsDefined(type, typeof(CompilerGeneratedAttribute), false) && type.IsGenericType && type.Name.Contains("AnonymousType") && (type.Name.StartsWith("<>", StringComparison.OrdinalIgnoreCase) || type.Name.StartsWith("VB$", StringComparison.OrdinalIgnoreCase)) && (type.Attributes & TypeAttributes.NotPublic) == TypeAttributes.NotPublic; } For a type to be anonymous: ...

May 21, 2011 · 1 min · Jef Claes

My thoughts on WebMatrix

After building arealdeveloper.com, I felt like I had to do a follow-up post sharing my experiences with WebMatrix. While doing some research, I came across this post by Rob Connery. And frankly, I think it’s almost impossible for me to add something to his findings. In a nutshell For those who are here for the “tl;dr”, here are my thoughts on WebMatrix.. WebMatrix is the perfect framework to start with ASP.NET development (wish I had). For people who are already familiar with ASP.NET, WebMatrix will hardly have any learning curve. They should also have a look at it though, because it’s a lot of fun ánd it is a great framework to get things done. Every developer has been asked - at least once - to slap together a site for a distant acquaintance, where the site consists of mostly static pages, with a dynamic List<Something> pulled out of a database. I see WebMatrix as a perfect gluing framework to swiftly ship these types of projects. While you could probably also build something more enterprisey, I don’t think you should. ...

May 9, 2011 · 2 min · Jef Claes

arealdeveloper.com mentioned on Channel9

While nosing around in the arealdeveloper.com analytics, I saw a bunch of traffic coming from Channel9. Clicking through, I found out A Real Developer was mentioned in this video (02:01). That’s a Channel9 front-page video! That’s so awesome, I think it’s great people find it a fun project. I have been listening to your feedback, and this Sunday I implemented some of your requests: Easier linking Sharing A feed Voting Comments I try to keep everything as simple as possible, that’s why I implemented most of these features using two popular free plug-ins: AddThis and Disqus. ...

May 2, 2011 · 1 min · Jef Claes

arealdeveloper.com

A Real Developer is a side-project I built over the weekend poking around with WebMatrix. It got a little out of hand. After publishing, I showed it to a few popular tweeps, and they were kind enough to mention it. 24 hours after the launch it has gotten over 3.5k unique visitors, 39k page views (see what I did there?) and over 240 submissions. Being mentioned by Scott Hanselman and Rey Bango helps. ...

April 26, 2011 · 2 min · Jef Claes

Prague impressions

Last year my girlfriend and I already made a trip to the Czech Republic, but we felt like we had spent to little time visiting Prague. We made up for that by making a follow-up trip last week. Find some of our most memorable impressions captured on picture below.. The Lennon Wall Love padlocks near the Lennon Wall. Hiking route in the New Town district. The Charles bridge from a distance. ...

April 24, 2011 · 1 min · Jef Claes

Anonymous type equality follow-up: Equals()

After publishing yesterday’s post on anonymous type equality, I received an interesting comment. The comment stated that even if the sequence of the property assignment were the same, the equality comparison would still return false, because the types generated by the C# compiler are reference types, making their references being tested for equality and not their data. This is very true, unless the Equals() method is overridden. And this is exactly what the compiler does for us when we define anonymous types. In the Equals() method the equality of each property is evaluated by using a generic EqualityComparer. ...

April 24, 2011 · 1 min · Jef Claes

Anonymous type equality

Let’s say you instantiate two variables (a and b) using anonymous types. They both have the same two properties (x and y) with equal values. var a = new { x = 1, y = 2 }; var b = new { y = 2, x = 1 }; Do you think they are equal? Console.WriteLine(a.Equals(b)); //Prints false :O They are not. Not something I expected! If we look at the IL the C# compiler produced, it starts making sense though. ...

April 23, 2011 · 1 min · Jef Claes