Categories
Uncategorized

Coffee and Code Today in Calgary and Toronto

This article originally appeared in the Coffee and Code blog.

We’re Not Slackers, We’re Coffee Achievers

In response to John Bristowe’s announcement of the first Calgary Coffee and Code, we got this comment from a reader named Cameron:

How do all of you people have the day off. 9am to 4pm on a weekday? Gen-Y is in full effect.

Gen Y? Technically, we’re Gen Xers, since we were both born between 1960 and  1980. If I’m not mistaken, John is a “Nintendo Wave” Xer, since he was born in the 70s and I’m an “Atari Wave” Xer, having been born in 1967.

In response to Cameron’s comment, I couldn’t resist doctoring a graphic from the website for the animated series Slacker Cats:

Slacker Cats, starring John Bristowe and Joey deVilla

(Come to think of, they sort of look like us. The hair colour’s the same.)

But seriously: John and I (as well as a number of other people in Microsoft Canada’s Developer & Platform Evangelism team) are officially classified by Microsoft as mobile workers. All the computers assigned to us are laptops, our internet and mobile phones are subsidized and our workplaces are wherever we happen to be working at the time: our home offices, Microsoft or on the road. It’s not for everyone, but if you have the discipline to handle the freedom, it can be a pretty nice way to work.

Coffee and Code was created to make us more accessible and give Microsoft a more human “face” by taking advantage of our flexible working arrangements. By working out of places like cafes, we’re making it quite easy for you to find us and join us in a conversation about whatever interests you, whether it’s Microsoft tools and technologies, the state of the industry or any other topic. It also makes for the perfect setting for us to help build local tech communities by gathering developers, IT pros, architects and other techies together. And finally, we’re patronizing “third place” businesses – those essential social places that are neither home nor the office – that are vital to the general community.

If a Coffee and Code attracts a large enough crowd, I find that I don’t get much programming, writing or administrative work done. That’s okay, because I’m getting another kind of work done: talking with local software developers, answering their questions, making note of their needs and suggestions and exchanging ideas. In short, I’m making connections with them, and that’s a major pillar of the Developer Evangelist position. If I’m not doing that, I’m not doing my job.

Where We’ll Be

If you’re in Calgary, you’ll want to head to Kawa Espresso Bar, where John Bristowe will be hosting the event from 9 a.m. to 4 p.m.. You’ll find more details about his Coffee and Code event in this entry.

If you’re in Toronto, your Coffee and Code event will be hosted by Yours Truly at the spacious upstairs “Red Velvet Lounge” of the Starbucks at Yonge and Davisville from 11 a.m. to 6 p.m.. You’ll find more details about it in this entry.

Since both events overlap perfectly, both locations are wifi equipped and both John and I have laptops with integrated cameras, I’m going to try videoconferencing with him, making this another Coffee and Code first. If you’re in eithe rof our neighbourhoods, please drop by!

Categories
Uncategorized

EnergizeIT

This article originally appeared in Canadian Developer Connection.

EnergizeIT: Anything is Possible Next week marks the beginning of EnergizeIT, Microsoft’s cross-Canada tour where we’ll be talking about some of the new tools and technologies that are coming soon. We’ll be hosting all kinds of things, including:

  • User Group Connection: The Future of the Platform: We’ll show you the upcoming versions of our operating systems, Windows 7 and Windows Server 2008 R2, some of their features, all with this question in mind: “How is this going to make my life easier?”
  • EnergizeIT: From the Client to the Cloud: We’ll show you Microsoft’s “Software + Services” vision, which combines the power and richness of local software with the global reach of internet services to get the best of both worlds.
  • Architecting Flexibility:  A session for architects covering Microsoft’s “Software + Services” vision and showing the infrastructure possibilities that come from choosing from on-premises, cloud computing and hybrid models.
  • Windows 7 Installfest: See Windows 7 in action, see the new features and improved user interface and get the Windows 7 beta (which we’ve been running on our machines for the past little while) installed on your computer!

We’ll be sending out people from all branches of the Evangelism team: Developer Evangelists like me, as well as the IT Pro and Architect Evangelists. Unlike previous EnergizeIT events, which were held just in Toronto, we’re going to 18 major cities across Canada over the next six weeks to make sure that we reach as many Canadian developers, IT pros, architects and techies as we can, as up-close-and-personal as we can.

Best of all, it costs nothing to attend an EnergizeIT session. That’s right, it’s free! Space is limited, so you’ll have to register if you want to attend – you can do that at the EnergizeIT site.

Geeks with their laptops at a cafe at Coffee and Code

In addition to our organized sessions, we’ll be holding Coffee and Code events in the cities we’re visiting. If you’re not familiar with Coffee and Code, it’s an informal gathering where we spend the day working out of a cafe with wifi, where you can come right up to us, join us for a coffee and talk to us, ask questions and get to know us as “your people on the inside” at Microsoft. Keep an eye on this blog or the Coffee and Code blog to find out when we’ll be hosting them in your town.

Here’s a list of the cities where we’ll be doing EnergizeIT. Please note that some of the events are completely booked – make sure you check the EnergizeIT site to see if there’s still space at the event nearest you.

Montreal, PQ
March 17 – 19

  • User Group Connection: The Future of the Platform (March 17)
  • Architecting Flexibility (March 18, afternoon)
  • EnergizeIT: From the Client to the Cloud (March 18, evening)
  • Windows 7 Installfest (March 19)

Victoria, BC
March 23

  • User Group Connection: The Future of the Platform

Kitchener, ON
March 24

  • User Group Connection: The Future of the Platform

London, ON
March 25 – 26

  • EnergizeIT: From the Client to the Cloud (March 25)
  • User Group Connection: The Future of the Platform (March 26)

Calgary, AB
March 31 – April 2

  • User Group Connection: The Future of the Platform (March 31)
  • Architecting Flexibility (April 1)
  • EnergizeIT: From the Client to the Cloud (April 1)
  • Windows 7 Installfest (April 2)

Mississauga, ON
March 31 – April 1, April 4

  • User Group Connection: The Future of the Platform (March 31)
  • Architecting Flexibility (April 1)
  • EnergizeIT: From the Client to the Cloud (April 1)
  • Windows 7 Installfest (April 4, am)
  • Windows 7 Installfest (April 4, pm)

Ottawa, ON
April 7 – 9

  • User Group Connection: The Future of the Platform (April 7)
  • Architecting Flexibility (April 8)
  • EnergizeIT: From the Client to the Cloud (April 8)
  • Windows 7 Installfest (April 9)

Vancouver, BC
April 7 – 9

  • User Group Connection: The Future of the Platform (April 7)
  • Architecting Flexibility (April 8)
  • EnergizeIT: From the Client to the Cloud (April 8)
  • Windows 7 Installfest (April 9)

Toronto, ON
April 14

  • User Group Connection: The Future of the Platform

Winnipeg, MB
April 14 – 16

  • User Group Connection: The Future of the Platform (April 14)
  • EnergizeIT: From the Client to the Cloud (April 15)
  • Windows 7 Installfest (April 16)

Dartmouth, NS
April 20

  • EnergizeIT: From the Client to the Cloud

Moncton, NB
April 21

  • User Group Connection: The Future of the Platform

Regina, SK
April 21

  • EnergizeIT: From the Client to the Cloud

Fredericton, NB
April 22

  • User Group Connection: The Future of the Platform

St. John’s, NL
April 23

  • User Group Connection: The Future of the Platform

Saskatoon, SK
April 23

  • User Group Connection: The Future of the Platform

Edmonton, AB
April 28 – 30

  • User Group Connection: The Future of the Platform (April 28)
  • Architecting Flexibility (April 29, afternoon)
  • EnergizeIT: From the Client to the Cloud (April 29, evening)
  • Windows 7 Installfest (April 30)

Quebec City, PQ
April 29

  • EnergizeIT: From the Client to the Cloud (April 29)

I myself will be at the Kitchener, London, Mississauga and Toronto events, with Windows 7 in one hand and the accordion in the other. Hope to see you there!

Categories
Uncategorized

Default and Named Parameters in C# 4.0 / Sith Lord in Training

Round Trip

sith_lord_in_training Back when I was working for OpenCola (from January 2000 through January 2002), the start-up cofounded by Cory Doctorow, I was doing a lot of work using beta versions of C# to build prototype peer-to-peer applications that got demoed to some large companies, including Microsoft, who were kind enough to provide us with betas of Visual Studio .NET and Windows XP.

I graduated to the 1.0 version when it came out. Even during the year after I left OpenCola (or more accurately, got the boot), I continued to write applications in C#, from things like a sales app for people who were selling practice certification tests to a trivia game for a company that was pitching it to Maxim. I do manage to land some interesting jobs from time to time.

That changed on Bastille Day 2003, my first day as Tucows’ Technical Evangelist, or as the title originally read, “Technical Community Development Coordinator”. Tucows’ client base were people who wanted to resell things like domain names and email, and as such were largely hosting companies. This in turn meant that they were using languages that you might consider “webbier”: open source dynamically-typed languages like Perl, PHP, Python and Ruby. I did what I could to stay away from Perl, I’d coded in PHP and Python for work before, and I picked up Ruby along the way.

Feeling a bit restless, I left Tucows in late 2007 to do Ruby on Rails development at what turned out to be Toronto’s worst-run startup, possibly ever. After that, it was project management at b5media, where I used Ruby to implement some “housekeeping” scripts. Although I hit up Microsoft Evangelist David Crow for a copy of Visual Studio so I could try out XNA, I really didn’t pay too much attention to C#. I installed it on my machine, wrote a lazy “Hello, World” app – a single WinForm with a button that displayed a MessageBox with the word “poop” when you clicked it – and promptly forgot about it.

The situation changed when I got laid off in September and then got hired as a Developer Evangelist for “The Empire” in October. Suddenly, I’m back in a world with a three-versions-later Visual Studio and a two-and-a-bit-versions-later of C# and .NET. I’ve got the programming know-how and the language basics down cold; it’s the changes in the language and library – generics, LINQ and a bunch of 2- and 3-letter acronyms beginning with “W” – that keep catching me by surprise.

Luckily, management is cool with my first year being a “learning journey”. They’re really interested in how I mix my schmoozing and community-building skills with a love of technology and programming and don’t mind that my first year is a “learning journey”. They especially don’t mind if I share what I learn along the way, which is what this series of articles, Sith Lord in Training, is all about. As I learn more about C# and the .NET framework, both present versions and the upcoming 4.0 versions, I’ll write about them here.

Default Parameters in C# 4.0

Suppose that you’ve got a method that takes a single boolean argument. Here’s how the argument affects what the method does":

  • If the argument is anything other than true or if no argument is provided, the method performs its normal task.
  • If the argument is true, the method performs its task, plus some additional stuff.

Here’s the Ruby implementation:

# Ruby

def myMethod(doSomethingOptional = false)
    puts "Doing my regular thing."
    if doSomethingOptional
        puts "Doing the optional thing."
    end
end

doSomethingOptional is a parameter with a default value. If myMethod is called without any parameters, doSomethingOptional is given the default value of false.

Unfortunately, the current 3.0 version of C# doesn’t support parameter defaults. The way to emulate this behaviour is to use method overloading:

  • One method to handle cases where no parameter is given
  • Another method to handle cases where a parameter is given

Here’s the implementation in C# 3.0:

// C# 3.0

public void MyMethod()
{
    MyMethod(false);
}

public void MyMethod(bool doSomethingOptional)
{
   Console.WriteLine("Doing my regular thing.");
   if (doSomethingOptional)
   {
       Console.WriteLine("Doing the optional thing.");
   }
}

That’s a bit long-winded for something that should be pretty simple. Luckily, this has been fixed in C# 4.0:

// C# 4.0

public void MyMethod(bool doSomethingOptional = false)
{
   Console.WriteLine("Doing my regular thing.");
   if (doSomethingOptional)
   {
       Console.WriteLine("Doing the optional thing.");
   }
}

And with that, the long-winded (and unnecessary, at least to my mind) method overloading workaround vanishes. Yay!

Named Parameters in C# 4.0

Named parameters make the meaning of the parameters explicit, as long as the parameter names themselves are pretty meaningful. Contrast the following call:

drawCircle(100, 200, 200, "yellow")

with this, which is supported in Python:

drawCircle(radius = 100, x = 200, y = 200, color = "yellow")

C# 3.0 doesn’t support named parameters, but C# 4.0 does. Here’s how you’d call MyMethod in C# 4.0 using them:

myMethod(doSomethingOptional: true)

As for the Python drawCircle method in the example above. here’s how you’d call it in C# 4.0:

DrawCircle(radius: 100, x: 200, y: 200, color: "yellow")

If this syntax is giving you some deja vu, it might be because it’s reminding you of Objective-C, where the call would look something like this:

[someObject drawCircleWithRadius:100 x:200 y:200 color:"yellow"]

See the Video

If you’d like to see more about default and named parameters in C# 4.0, there’s a video on the Chanel 9 site that covers them quite extensively. Go check it out!

Categories
Uncategorized

Toronto Coffee and Code This Friday!

davisville_station
Davisville Station at night.

This article originally appeared in the Coffee and Code blog.

Yes, there’s going to be a Coffee and Code in Toronto this Friday, March 13th, and this time, it’s going to be midtown. I’ll be holding it at the Starbucks at Yonge at Davisville (1909 Yonge Street, right by Davisville subway station) from 11 a.m. to 6 p.m..

Map picture

This particular Starbucks branch is pretty big, with a large second floor. A number of local groups, such as the Toronto Spanish Group, the “Mompreneurs” and other business networking groups have used it as a meetup location. The WiFi isn’t free, but if you have a Starbucks card with at least a $5 balance, you get two hours’ worth of wifi access at any wifi-equipped Starbucks every day. I myself have 3 such cards.

If you’re a telecommuter, come and hang out for the day! If you work in a nearby office, drop by during your coffee break! I’ll be handing out installer DVDs for the beta version of Windows 7 and ready to talk about Microsoft, programming, technology, the industry in general, accordion, music, whatever! Who knows – we might even start a video chat session with the Calgary Coffee and Code, which will be taking place at the same time out west.

Categories
Uncategorized

The “Paris Hilton vs. Paris, France” Search Results Meter

paris_hilton_france_gauge

I have a soft spot for tech-meets-art projects, like this one by Tim Schwartz, titled Paris – Physical. The meter is driven by search results for the phrases “Paris Hilton” and “Paris France” and displays an “average result” (their words, not mine) by using an electrical gauge.

Here’s a look at the innards of the project:

Interior of the "Paris-Physical" project

Categories
Uncategorized

FutureRuby and Failcamp: Register Now!

futureruby

Last year, the folks at Unspace held a fantastic Ruby conference called RubyFringe. They took the standard conference format, threw out the stuff they didn’t like, amplified the stuff they loved and kept the attendance down to around Dunbar’s number. The end result: quite possibly the best geek conference I’ve ever attended (a lot of the other attendees would concur). I wrote quite extensively about RubyFringe in this entry, and here are my notes from the conference:

This year, they’re holding a slightly different conference called FutureRuby. They’ve described it as bill it as “an opportunity to prepare for the future by learning from the mistakes of the past”, and promise us that it won’t just be RubyFringe warmed over – we shouldn’t expect to find the same things in the same places! Here’s what the FutureRuby site says:

We are the artists, philosophers, and troublemakers. We realize that the fringe of today is
the mainstream of tomorrow. We grease the engines of progress, even when we’re working outside of the machine.

FutureRuby isn’t a Ruby conference, but a conference for Rubyists. This is a call to order – a congress of the curious characters that drew us to this community in the first place. We have a singular opportunity to express a long-term vision, a future where Ruby drives creativity and prosperity without being dampened by partisan politics.

FutureRuby runs from Friday, July 10th at 5:00 p.m. and officially end on Sunday, July 12th at around 11:55 p.m.. FutureRuby will also be paired with FailCampTO, which will take place on Thursday, July 9th (I’ll be MCing this event, and I’ll talk more about it in another post).

The early bird tickets for FutureRuby, which sell for CAD$700, are already gone. The regular rate tickets, which sell for CAD$800, are still available, but probably not for long. If you want to attend FutureRuby, I strongly recommend that you go to the FutureRuby registration page and sign up right now.

Categories
Uncategorized

Windows Mobile Gets Widgets!

This article originally appeared in Canadian Developer Connection.

There’s been quite a bit of good news on the Windows Mobile front lately. First, there’s the considerably improved user interface coming with Windows 6.5, including the “hexagon” menu (the rationale for which is explained quite well by Long Zheng). There’s also the upcoming Mobile Incubation Week, where startups are invited to come down to The Empire’s Silicon Valley Campus and workshop Windows Mobile 6.5 apps.

There’s even more good news, as shown in the photo below:

Various Windows Mobile screens showing widgets in action

They’re widgets: little web applications that run within IE Mobile 6 with the “chrome” (that is, the standard browser controls) removed. They’re HTML/CSS/JavaScript-based web applications in the same spirit of the desktop/sidebar gadgets in Windows, Dashboard widgets in Mac OS, or web apps on the iPhone (which aren’t getting as much love now that native apps are all the rage).

This is a very important development for Windows Mobile. You don’t need Visual Studio Pro (as far as I can tell, the Pro edition is the lowest-level version of Visual Studio that supports mobile development) to make widgets for Windows phones; all you need is your favourite web development tool set. At long last, Windows Mobile development will be open to just about everybody, regardless of their platform.