Categories
Uncategorized

Halifax Coffee and Code / Windows 7 Mini-Installfest Today

This article also appears in Canadian Developer Connection.

just_us_barrington_thumbToday, as part of our EnergizeIT cross-Canada tour, Christian Beauclair, Rick Claus and Pierre Roman are heading out to Halifax. As part of their visit, they’ll be hosting a Coffee and Code event today from 1:30 p.m. to 5:00 p.m. at the Just Us Cafe at 1678 Barrington Street.

Coffee and Code is your chance to have a nice up-close-and-personal get-together with people from Microsoft, ask questions, let us know what you think and get to know us better. As an added bonus, it’s your chance to install the Windows 7 beta on your laptop: Christian, Rick and Pierre will be bringing installer discs and helping people get the new operating system (which we’ve been using on our production machines since January) installed.

For more details about today’s Coffee and Code and mini-installfest, see this earlier article.

Categories
Uncategorized

The “FTW!” Ultimate PHP App Throwdown

For the Win! For the Web! FTW: Ultimate App Throwdown -- Professionals vs. Students

This article also appears in Canadian Developer Connection.

Wait a Minute…Microsoft and PHP?

You probably wouldn’t be surprised that Microsoft is holding a development contest that pits professional developers against student developers. You might be surprised that Microsoft is holding a development contest where the challenge is to build a PHP application.

You read that right: PHP. Microsoft’s web server, IIS (Internet Information Services) can run PHP as well as ASP.NET; in fact, it can even run both on the same site at the same time, so you can have apps like WordPress along with your ASP.NET-based apps.

Think of ASP.NET and PHP running on the same server as the great jam session with Spock and the space hippie from that old Star Trek “hippies in space” episode.

Spock and a space hippie, jamming on their instrumentsSee? We’re not Herbert!

Even more unexpected is that the beta for the 2.0 version of the Microsoft Web Platform Installer doesn’t do a “couple-of-clicks” installation of the expected stuff like IIS and SQL Server 2008 Express, it also provides a “couple-of-clicks” installation of PHP and WordPress.

The FTW! Throwdown

"Goopymart" comic of a dog holding a trophy: "FTW!"

That’s “FTW!” as in “For the Win” or “For the Web”, by the way.

The contest is pretty simple: the idea is to show the best application written in PHP and deployed on Windows. The app can be either:

  • A new application developed by you in PHP and running on IIS in Windows
  • An existing application or framework written in PHP and ported by you to run on IIS in Windows

That’s right: if you’re pressed for ideas or time to make a new application, it’s all right – you can take a PHP application that already exists, make the necessary changes so that it’ll run on IIS (and hey, for bonus points, make it tie into SQL Server instead of MySQL), and submit that as your contest entry!

Students vs. Professionals

Another twist to the FTW! Throwdown is that we’re getting student developers and professional developers to challenge each other. The pros have experience and resources on their side; students have youthful energy and fewer distractions going for them. Not since “Pirates vs. Ninjas” has there been a challenge like this!

One application developed or ported by students and one application developed or ported by professionals will be chosen from the submissions for the Ultimate Challenge, which will be a final bout at Microsoft’s Make Web, Not War conference. In that last match, it “Two apps enter! One app leaves!”. Simply put, one of the apps – either the student one or the professional one – will be declared the Ultimate Champion.

As they said in Highlander: “There can be…only one!”

The Booty

Stuffed animal prizes at a carnival

We want to reward the best contestants for their efforts in the FTW! Throwdown, and we plan to do so with some pretty nice prizes, which include:

  • The grand prize: $5000 for the winning entrant.
  • The runner-up prize: $3000 for the runner-up.
  • The SQL Server prize: $3000 for the finalist whose app showcases the best use of PHP with a Microsoft SQL Server database.
  • The PHP/.NET Mash-Up prize: $2000 for the finalist whose app showcases the best of PHP with .NET-based code working together in a single application.
  • The student finalist prize: The student developer who makes it to the last match will also get an interview and resume critique from Microsoft and a $200 Petro-Canada gas card.
  • The professional finalist prize: The professional developer who makes it to the last match will also get a chance for a published case study, enrollment in the MAPS or EMPOWER program and a $200 Petro-Canada gas card.

Hosting Options

Naturally, the apps that you submit for the FTW! Throwdown need a place to live. If you don’t already have IIS hosting, our partners at myhosting and RackForce are offering a 60-day free hosting promotion.

Deadlines and Details

The deadline for entering the FTW! Throwdown is Wednesday, June 3rd, 2009. Finalists will be announced on Friday, June 5th, 2009, and the main event where the student finalist faces off against the professional finalist happens on Wednesday June 10th, 2009.

If you’d like to know more about the FTW! Throwdown, visit the FTW! Throwdown site. I’ll be posting regular bulletins about the FTW! Throwdown on this blog, and you can follow the FTW! team on Twitter as the user @PHPOnWindows and the hashtag #FTW09.

Categories
Uncategorized

Woot!’s $140 XBox 360

XBox 360, 20GB drive, wireless controller, power supply, ethernet cable, composite video cable

Woot! has a pretty sweet deal on refurbed XBox 360s: $140 for a refurbished model with 20GB hard drive and HDMI output. The package comes with all the stuff shown above. If you want it, get it now, because this deal isn’t likely to last very long!

Categories
Uncategorized

Halifax Coffee and Code/Windows 7 Mini-Installfest: Monday, April 20th

Coffee and Code is Coming to Halifax!

just_us_barrington

As part of Microsoft’s EnergizeIT cross-Canada tour, we’re holding a Coffee and Code event in Halifax at the Just Us Cafe at 1678 Barrington Street on Monday, April 20th from 1:30 p.m. to 5:00 p.m..

Hosting the event will be Developer Advisor Christian Beauclair and IT Pro Advisors Pierre Roman and gool ol’ east coast boy Rick Claus. Whether you’re a developer, IT pro or tech enthusiast, they’ll be happy to chat with you, answer your questions, take your comments, and if you bring your laptop, they’ll even hook you up with a copy of the Windows 7 beta and help you install it.

Windows 7 Mini-Installfest

We’ve been holding Windows 7 Installfests in some pretty large venues across the country, but there’s no reason we can’t hold one at a Coffee and Code event. If you decide that you want to bring your laptop to the Halifax Coffee and Code, please do the following prep to ensure you get the best experience:

  • Note that the version of Windows 7 we’re giving out is the Windows 7 Beta, Build 7000. That’s the version that was made available for download in January, and it’s the version that all of us on the Developer and Platform Evangelism Team have been using as our main operating system since then. It’ll work until August 1, 2009.
  • Ensure that your laptop’s BIOS is at the latest revision and ACPI compliant. If it’s not the latest version, go to your laptop manufacturer’s website to download the latest BIOS installer and run it to upgrade your system.
  • You have two options when installing Windows 7: a clean install or upgrade.
  • If you’re doing an upgrade, the amount of data in your profile will greatly affect the length of your upgrade. We’ve seen an upgrade on a system that took over 2 and a half hours. Our advice: clean up your system before you show up. Delete temporary internet files, back up and move off your 10,000 song library – do whatever you can do to reduce the number of files on your system. If you don’t, your upgrade process could take more time then we have scheduled for the InstallFest.
  • That being said, we STRONGLY suggest you go for a clean install or dual boot. The majority of previous InstallFest participants went this route. It’s the fastest, cleanest, simplest way to do it.
  • Bring all the needed drivers for your system on a USB key. Check out your manufacturer’s site for Beta Windows 7 drivers; failing that, bring 32- or 64-bit Vista drivers. They may not be required; this is a precaution just in case Windows 7’s built-in drivers don’t work for your system.

      And most importantly, remember that this event is about sharing, connecting with each other and having fun! We hope to see you there!

    • Categories
      Uncategorized

      Coffee and Code Today at the Dark Horse!

      Photo of Dark Horse Cafe Spadina: "Toronto Coffee and Code - Dark Horse Cafe (Spadina), Friday April 17th)

      It’s Friday, and that means it’s time for another Coffee and Code here in Accordion City! Today’s Coffee and Code is happening at the new branch of the Dark Horse Cafe (215 Spadina, at Sullivan, which is south of Dundas and north of Queen) between 11 a.m. and 6 p.m..

      What is Coffee and Code, Anyway?

      It goes back to 1998, when I first tried out “cafe coding”. I shared a consultancy with my friend Adam, where we did a pretty good business writing custom software for small- and medium-sized companies. I was going a little stir-crazy working out of either Adam’s spare room or my home office and just for kicks decided to try working for a day at the Tequila Bookworm cafe on Queen Street West.

      Here’s a photo of me at “The ‘Worm” from back then, with my Windows 98-equipped 233 MHz Toshiba Portege laptop sporting a then-respectable 96 megs of RAM. That green box in the foreground is a Jaz Drive, which held 1-gig hard drive cartridges:

      Working at the 'WormMe at Tequila Bookworm, November 1998.

      It worked out so well that I started working there at least twice a week. I also found that as a “regular” at the cafe, I started meeting of all sorts of people – not just friends, but potential customers, colleagues, collaborators and business contacts. We exchanged ideas, traded stories, made suggestions on each other’s projects and formed friendships. I’m still in touch with a lot of these people today,

      My job at Microsoft Canada – Developer Evangelist – is a “mobile worker” position, since our job is to make connections with software developers wherever they are. Sometimes it’s at our home offices, sometimes it’s at the Microsoft offices, sometimes it’s on the road. As long as the job gets done, where we are is where we work.

      So I thought “Why not re-create the situation at Tequila Bookworm?” It might work out even better than last time, since I now had some reasonably widely-read blogs to announce my presence, and since the Toronto tech scene is now considerably more vibrant than it was ten years ago (thanks largely to things like DemoCamp and HackLabTO).

      I’ve had about a half-dozen Coffee and Codes so far, and I think the endeavour has proved to be worthwhile. I’ve made connections — new and old — with all sorts of techies, answered questions and taken suggestions, hooked up people with software and other nerds, learned a lot and even given a human face to The Empire. We’ve talked about all sorts of things: the expected “shop talk”, but all sorts of non-techie stuff as well. It’s sort of like the salons of old.

      Coffee and Code has grown beyond just me holding them:

      The internet is a great and scalable communications medium, but there’s something about meeting face-to-face that it can’t provide; that’s why the saying “You had to be there” exists. That’s what Coffee and Code is all about.

      Come to chat, come for coffee, come to hang out and even get some work done. Whatever you come to do, I hope to see you there!

      The Wifi Situation at Dark Horse

      south_park_broken_internet

      The Dark Horse opened on Tuesday, and word is that they haven’t got their wifi up and running yet. If you need to catch up on your email and Twitter, I suggest you bring a 3G phone. I hope it doesn’t deter you from dropping in, but I thought you should know.

      Categories
      Uncategorized

      Coffee and iPhone This Afternoon at Dark Horse Spadina

      coffee_donut_iphone

      I didn’t find out until just now, but David Janes is holding a Coffee and iPhone session this afternoon from 4 to 6 p.m. at the Dark Horse Cafe on Spadina. Check it out if you’re in the area – it’s a good topic, and it’s happening in a gorgeous location!

      Categories
      Uncategorized

      Upwardly Mobile, Part 2: Your First Windows Mobile 6 Application

      treo_pro_large

      (In case you missed part 1, it’s here. Be warned; it’s long, but it’s a good read.)

      In this installment of Upwardly Mobile, I’m going to give you a quick introduction to developing applications for Windows Mobile 6 phones and handheld devices. I can’t cover all aspects of Windows Mobile development in this article, but there should be enough material in this entry to get you started.

      What You Need

      In order to build an application for Windows Mobile 6, you’ll need the following things:

      Visual Studio 2008, Professional Edition or higher
      visual_studio_2008_pro
      This is the development environment. It’s not the only one that you can use to develop Windows Mobile apps, but it’s the one we’re using.

      You can also use Visual Studio 2005 – if you do so, Standard Edition or higher will do. If you don’t have Visual Studio, you can download a trial version of Visual Studio 2008.
       

      The Windows Mobile 6 SDKs
      gear_icon
       
      The Windows Mobile 6 SDKs contain the templates for building Windows Mobile 6 projects and emulators for various Windows mobile phones.

      There are two such SDKs to choose from:

    • The Standard SDK. The general rule is that if the device doesn’t have a touch screen, its OS is Windows Mobile 6 Standard, and this is the SDK for developing for it.
    • The Professional SDK. The general rule is that if the device has a touch screen, its OS is Windows Mobile 6 Professional, and this is the SDK for developing for it.

      I recommend downloading both SDKs. You never know where you’ll deploy! 

    • .NET Compact Framework 3.5 Redistributable
      dotnet_logo
       
      The .NET Compact Framework 3.5 Redistributable is the version of the .NET framework for mobile devices. It only needs to be sent to the device once.
      A Windows Mobile 6 Device
      palm_treo_pro
       
      You can get by in the beginning with just the emulators, but you’ll eventually want to try out your app on a real phone. I’m using my phone, a Palm Treo Pro.

      As the saying goes, “In theory, there is no difference between theory and practice; in practice, there is.”

      The mobile device syncing utility that works with your operating system
      windows_mobile_device_center_icon
      If you’ve got a Windows Mobile 6 device, you’ll need the application that connects your mobile phone to your OS:

    • For Windows 7 and Vista, use Windows Mobile Device Center.
    • For Windows XP and Server 2003, use ActiveSync.
    • Let’s Start Programming!

      In this example, we’re going to write a “Magic 8-Ball” style application called Ask the Kitty. It’ll be a simple app that provides random answers to questions that can be answered with a “yes” or “no”.

      Fire up Visual Studio, open the File menu and click on Project… (or click control-shift-N). The New Project dialog box will appear:

      new_project

      In this example, we’ll be doing development in Visual C#. From the Project types list on the left, expand the Visual C# menu and click the Smart Device sub-item. The Templates list on the right will display the available templates for a smart device project; select Smart Device Project.

      (You can do Windows Mobile 6 development in Visual Basic if you prefer; there’s a Smart Device option under the Visual Basic menu.)

      Give your project a name (for this example, I’m using the name HelloPhone) and specify a location (I’m just using the default Visual Studio directory for projects), make sure the Create directory for solutioncheckbox is checked, and click the OK button.

      The Add New Smart Device Project dialog box will appear:

      add_new_smart_device

      You specify the type of device you’re developing for using the Target platform menu. My Palm Treo Pro is a touch screen device and uses Windows Mobile 6 Professional as its OS, so I’m going to select Windows Mobile 6 Professional SDK from that menu.

      We want to use the latest version of the .NET Compact Framework, so leave the default option, .NET Compact Framework Version 3.5, selected in the .NET Compact Framework version menu.

      We want to create an application, so select Device Application from the Templates menu and click the OK button. Visual Studio will create your project, and you can start developing. Here’s what you’ll see:

      visual_studio_1

      If we were writing a regular WinForms desktop app, the forms designer would show a blank window. If we were developing an ASP.NET application, the forms designer would show a blank web page, Since we’re developing a Windows Mobile app, the forms designer by default shows a blank mobile app window enclosed in a mockup – the “skin” — of a generalized mobile device. Here’s the skin for a Windows Mobile 6 Professional device:

      forms_designer_mobile_skin

      You can choose to display or hide the skin in the Forms Designer. I’m going to work without the skin; I can hid it by opening the Format menu and toggling the Show Skin item.

      Set Up the User Interface

      This application will use a single form. We’ll take the default form from the project, Form1, and do the following using the Properties pane:

      frmMain_properties

      • Rename it as frmMain.
      • Change its AutoScaleMode property to None (We don’t want the app to automatically resize its controls and fonts, we want it to use the control sizes and locations and font sizes that we specify).
      • Change its Size to 320,250, the right size for many Windows Mobile 6 Professional Devices including my Palm Treo Pro.
      • Change the form’s heading – set the Text property to My First WinMo App.

      We’ll set up the form to look like this:

      frmMain

      The “Ask the Kitty!” at the top of the form is a Label control, with its font set to Tahoma, font style set to Bold, font size set to 12 points and text set to Ask the Kitty!

      The “Click for an answer!” at the bottom is a Button control, with its font set to Tahoma, font style set to Regular, font size set to 9 points and text set to Click for an answer!. I also renamed the button as btnAnswer.

      The cat picture in the middle is a PictureBox control. The trick is to provide a picture to fill the PictureBox. It’s simple. The first step is to copy a picture file into the project directory:

      project_directory

      Make sure that the picture is included in the project. If you can’t see the picture file in the Solution Explorer window, click the Show All Files button. Right-click the picture file in Solution Explorer and select Include in Project:

      solution_explorer

      Once you’ve included the picture file in the project, you can use it to fill the PictureBox. Select the PictureBox in the Forms Designer, go to the Properties window and change its Image property – use the selector to pick the picture file that we just included in the project.

      Add Some Code

      There’s a lot of example code out there that puts programming logic inside the UI – that is, in the code for the forms. I’m going to avoid that and do the right thing by creating a class for the “engine” of this application. Creating a new class is easy – open the Project Menu, select Add Class…, and then select Visual C# Items –> Code –> Class. I named the class file Kitty.cs in the Solution Explorer; here’s its code:

      using System;
      using System.Linq;
      using System.Collections.Generic;
      using System.Text;
      
      namespace HelloPhone
      {
          class Kitty
          {
              List<string> _responses = new List<string< {
                  "Yes",
                  "No",
                  "Maybe",
                  "Ask again later"
              };
              Random _rand = new Random();
      
              public string GetResponse() 
              {
                return _responses[_rand.Next(_responses.Count)];  
              }
          }
      }

      The next step is to wire up btnAnswer to provide an answer when clicked. This means adding an event handler to btnAnswer. The easiest way to do this is select btnAnswer, then go to the Properties window, select the Events view (it’s the lightning bolt button) and double-click on the Click event. That will automatically create a method called btnAnswer_Click() in the frmMain class and wire up that method to be called whenever btnAnswer is clicked.

      Here’s the code for frmMain:

      using System.Drawing;
      using System.Text;
      using System.Windows.Forms;
      
      namespace HelloPhone
      {
          public partial class frmMain : Form
          {
              Kitty _eightBall = new Kitty();
      
              public frmMain()
              {
                  InitializeComponent();
              }
      
              private void btnAnswer_Click(object sender, EventArgs e)
              {
                  btnAnswer.Text = _eightBall.GetResponse();
              }
      
          }
      }

      Run the App in the Emulator

      The app’ is now ready to take for a test run in the emulator. Click the Start Debugging button (it looks like a “play” button) or press the F5 key. This window showing your deployment options will appear:

      deploy_emulator

      I want an emulator that best matches my Palm Treo Pro, which has a square QVGA display, so I selected Windows Mobile 6 Professional Square QVGA Emulator and clicked the Deploy button. Give it a moment or two to compile and fire up the emulator, after which you should see this:

      emulator

      Run the App on Your Mobile Device

      Running the app on your mobile device is almost as easy. Make sure that your mobile device is connected to your computer, then click the Start Debugging button (it looks like a “play” button) or press the F5 key. This window showing your deployment options will appear:

      deploy_device

      This time, select Windows Mobile 6 Professional Device in the menu and click Deploy.

      Keep an eye on your phone; you’ll get a couple of “should I install this?”-type messages – click Yes to all of them:

      device_message

      After that, you should see this:

      app_device

      You should have enough information to start experimenting with Windows Mobile 6 development. Have fun, try things, and if you have any questions, feel free to ask them in the comments!