Aug 16

Wow, I nearly fell out of my chair when I read this little gem on TechCrunch:

Android chief Andy Rubin wrote in a 2005 email, “If Sun doesn’t want to work with us, we have two options: 1) Abandon our work and adopt MSFT CLR VM and C# language – or – 2) Do Java anyway and defend our decision, perhaps making enemies along the way.”

Continue reading »

Jul 13

Peace & Quiet. Copyright © Chris Chidsey. Photo used under license.

DotNetBaby says, “I’m an expert on sucking, and I can assure you that C# doesn’t suck.”

YourLanguageSucks is a wiki on theory.org that lists reasons why the most popular programming languages suck.  There are long lists of reasons why Java, JavaScript, C++ and PHP suck.  But the list for C# is very short:

  • Supports ‘goto’.
  • Two distinct sets of collections: non-generic and generic.  Stack and Queue have the same name in both their generic and non-generic flavors, but then we have Hashtable (non-generic) and Dictionary (generic).

The first reason is easy to discount: just avoid using goto!  The second reason is valid, but not really an issue if you use only generic collections, as I do.

Continue reading »

Feb 05

Vanity Guids

Uncategorized 2 Comments »

Do you notice anything odd about the following list?

00000000-9b6d-4998-9dd7-6026894bdfba
11111111-9022-4400-bac2-8b66a9874443
22222222-a890-4dec-98bc-f41536b760bc
33333333-e361-4239-8d04-3f16f68ad9ce
44444444-d8c2-40ab-91bd-5a84511ed9d3
55555555-447a-4aa9-a51f-35c74a154156
66666666-193b-4ac3-bd92-860b6b49aedb
77777777-49de-4cc5-b9e6-2e5785dd47af
88888888-0d00-4672-933a-d68e240772be
99999999-7d9d-4d77-9e35-5e919db0f7d1
aaaaaaaa-76cd-4d6b-bae2-574e5b57c7ab
bbbbbbbb-6f9e-4d2d-ba11-64df5c7355fa
cccccccc-b897-4b15-9ab3-11b97836ce85
dddddddd-b417-48ad-8b5b-b762df75e03b
eeeeeeee-cc9c-4cb8-bae0-bbd4b10307fa
ffffffff-8d46-4a31-b297-2ac67dda3600

Yes, they are all legitimate Guids (Globally Unique IDs).  But each is also a Vanity Guid, which is a unique ID that has some recognizable pattern embedded in the Guid’s text representation.  A Vanity Guid is like a vanity license plate, only geekier.

Read the rest at C#411 >>

Aug 14

Here’s a clever way to pre-screen candidates: post the job description in C# code.  That’s what a company in Port Chester, New York did for a $80K-$100K .NET Developer position posted on CraigsList.  The job description starts as:

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace CandidateSearchApp
{
    class Program
    {
        static void Main( string[] args )
        {
            var candidateSearch = new CandidateSearch();

            foreach (Candidate candidate in candidateSearch.GetCandidates())
            {
                if (candidate.IsViable() && candidate.IsQualified())
                    candidate.SubmitResume();
            }
        }
    }

And the necessary qualifications are summarized as follows:

return
    canWriteCSharp
    && canWriteCPlusPlus
    && knowsOO
    && knowsInterop
    && knowsThreading
    && knowsEntity
    && knowsClientWCF
    && knowsLinq
    && knowsWinForms;

 

Apr 12

Microsoft is releasing Visual Studio 2010, .NET Framework 4.0, and Silverlight 4 at the Visual Studio Developer Conference in Las Vegas.  VS 2010 and .NET 4 are available today, and Silverlight 4 will be available to download later this week.

 

Continue reading »

Jan 15

I ran across a novel new tool called SharpKit that generates JavaScript code from C#.  I’m not using JavaScript in my current projects, so I haven’t tested this tool yet, but anyone who has worked with JavaScript knows what a hassle it can be compared to the polished managed code environment of C# and Visual Studio.

image SharpKit is a free Web Toolkit that enables you to write and maintain code in C#, then convert it to JavaScript during compilation.  SharpKit enables web development teams to take advantage of C# and Visual Studio benefits such as compile-time syntax verification, code-completion, XML documentation and refactoring.  Many developers prefer this managed code environment versus the expensive and error-prone world of JavaScript programming.

In addition, SharpKit is a nonintrusive, compile-time solution.  SharpKit does not change native JavaScript syntax, require server-side changes, nor affect your existing file structure.  This non-lock-in model enables you to stop using SharpKit at any time and work directly with the JavaScript source code, if desired.

You can also use SharpKit with VB.NET, and use SharpKit to create iPhone and SmartPhone mobile browser applications.

SharpKit Home Page

Jul 31

Arguing “Which programming language is better?” is like debating “Which religion is better?”  You will never find an answer because people have different needs, they judge with different criteria, and in the end, the debaters just end up getting pissed off at each other.  That’s why you’ll frequently see developers label the programming language debate as a “religious war.”

For me in my current job, C# is my language of choice.  But I’ve also worked with Java, PHP, C++, C, RGB II and even assembler.  In general, I feel it’s better to select the right programming language for the job, rather than force the job to use my current favorite language.

That said, Java fan Brian M. Clapper has written an interesting article claiming that the Java language “depresses me lately.  It’s being left in the dust by other languages.  Worse, though, for Java enthusiasts: Java has fallen behind C#.”

Continue reading »

Mar 03

Want insight into the design and development of C#?  Then check out these blogs by key members of the Microsoft C# development team:

Continue reading »

Oct 02

Computerworld has published an in-depth interview with Microsoft’s leader of C# development, Anders Hejlsberg.  A prominent Danish software engineer, Hejlsberg also wrote Turbo Pascal and was lead architect of the team that developed Delphi.  Hejlsberg shared with Computerworld his thoughts on the development of C#, future programming trends, and his experiences putting out fires.  Here is a brief excerpt:

Continue reading »

Feb 28

Quick: How long does it take to construct one million C# objects?

Continue reading »