Comparison of Python and Apple’s Swift Programming Language Syntax

python vs. swiftAs a Python and C# developer, I have been intrigued ever since Apple announced the Swift programming language to cheering crowds at WWDC 2014.

This post will explore the syntax of Python vs Swift. I was inspired by Chris Pietschmann’s post Basic Comparison of C# and Apple Swift Programming Language Syntax for C# and Swift. So here is the Python version.

Continue reading

Shipping Python with Windows 10

Python is awesome but Python on Windows always feels like the red-headed step child. With Window 10’s UserVoice campaign, you can help me change that! Let’s start here:

Please vote for this request on UserVoice:

Ship Python 3 and Python 2 with Windows 10

Ubuntu and OS X include the Python runtimes by default. Please Include the 64-bit version of Python 3 and Python 2 with Windows.

I believe many developers choose OS X and Linux over Windows because these OSes are more open source and CLI friendly. You have done a lot of fix the CLI experience in Windows 10. Please make Python development better on Windows by including it out of the box.

Need more inspiration? Watch this video about the future of Python (hint: it involves Windows)

Convert LINQ to MongoDB queries to JavaScript shell

github_icon If you do a lot of work with MongoDB from .NET,
this code should look familiar:

var query =
        from p in mongo.People
        where p.Age > 20 && p.Name.Length >= 2
        orderby p.Age descending
        select p;

But could you answer these questions?

  • What *exactly* does it do on the server?
  • Is it using an index or not?

Well, I just released a new .NET library on GitHub

MongoDB query helper for .NET

Now these questions are easy to answer. For example:

Console.WriteLine( query.ToMongoQueryText() );


{ "Age" : { "$gt" : 20 }, "Name" : /^.{2,}$/s }

Check it out. I hope you find it useful.

Ever wonder how big the .NET and Python communities are?

Do you ever wonder how big .NET and Python communities are? I’m working on an article about Python and .NET and this comparison definately came to mind. So I did some research on

I chose seven locations:

  1. Chicago, IL
  2. Los Angeles, CA
  3. New York, NY
  4. Seattle, WA
  5. Portland, OR
  6. San Francisco, CA
  7. Silicon Valley, CA

And did a search for meetups on .NET and on Python. Here is a graph of the results:

Relative size of python and ,net communities via user groups.[click image to enlarge] Continue reading

Much of my blog’s sample apps are now on GitHub and Azure

Here is a quick announcement if you have been downloading or using any of the libraries and sample applications from my blog. The most popular ones are now all on GitHub. This means you’re welcome to come and download or fork them! You can even contribute back if you see something useful that is missing.

My new GitHub projects:

Github: text-encoding-aspnet-mvc-by-example
Sample app:

GitHub: web-apps-hotkeys
Sample app:

GitHub: improve-mvc-perf-with-async-views
Sample app:

If you know of something I’ve published and you’d like it on GitHub, just send me a note!

Finally, the keen reader will notice I’ve moved my sample apps to Windows Azure Websites. I’ve been a vocal critic of Azure at times, but Azure Websites are quite nice. You get up to 10 domains for free. They are worth checking out.


Python and .NET in Portland

If you live in Portland, OR and are interested in Python, you might want to drop by my user group talk at PADNUG February 20, 2014. I’ll be speaking on Python for .NET developers and it’s hosted by the Portland Area .NET User Group. Here are the details. The event is free and held downtown at the Microsoft office. Hope to see you there!

Python for .NET Developers – Feb 20, 2014
Michael Kennedy

Continue reading

Special Event: MongoDB in New York from DevelopMentor

I’m excited to announce that I will be teaching MongoDB for .NET developers from DevelopMentor in New York City at MongoDB Inc.’s headquarters on Times Square. The class is March 11, 2014 to March 13, 2014.

If you are interesting in learning MongoDB or bringing MongoDB and NoSQL to your team, this is the perfect opportunity. Not only is it an amazing class, you will have the opportunity to mingle with developers at MongoDB.

Space is limited, so register now.

Contact me directly and I can likely get you a discount on admission especially if you are sending more than one developer. Continue reading