Categories
Uncategorized

“Better Living Through Blogging”: The Slide Deck

Here’s the presentation I did at WordCamp Toronto 2009 this weekend, Better Living Through Blogging, in which I talk about how taking up blogging has paid off in all sorts of ways, from relationships to career to even saving my bacon.

Some Notes About the Deck

You’ve probably suffered through presentations whose slides look something like this:

who_am_i

I’m not a big fan of background templates in slides, but at least this one (from one of the themes provided in PowerPoint 2007) isn’t so bad. There are worse themes I could’ve picked, such as this one:

purple_theme

That’s just downright ugly.

I find that a plain black background with white text works best. The plain black background is simple, doesn’t interfere with or overpower your content, and works well with all sorts of room sizes, lighting conditions, projector types, projection surfaces and so on.

Whenever possible, I avoid putting the company logo at the bottom of every slide. It’s not a fight I’m always going to win, but I do my best to convince the guardians of corporate identity that the audience won’t forget the company name if we don’t beat the audience’s head with it on every slide. I think that it detracts from the presentation by drawing attention away from the content; I think that it also reeks of branding desperation. I think it’s enough to show the logo at the start and end.

Your slides are not cue cards. The purpose of standing in front of an audience is not to read aloud a document written in point form. You’re there not only to communicate an idea, but to engage the people in the room as well; the slides are there as support. That’s why slide presentation software has “presenter mode”, where the slides are displayed on the projector and your notes are displayed on your laptop.

A Little Sample

Here’s what my audience saw instead of the “Who Am I?” slide above. I’ve included a rough paraphrase of what I said along with the slides…

slide_01

“Some of you already know me, some of you think you know me, and some of you are wondering ‘who is this Microsoft Guy and why is he speaking at a WordPress event?’. So I guess a proper introduction is in order.”

slide_02

“Yes, I work for Microsoft. The Empire. I’m still new, having been working there for just over six months. I’ve had a blast so far – it’s a fun place to work, and in my particular job, they give you a wide degree of latitude.”

 slide_03

“As for my job, if I could pick the title, it would be…Sith Lord.”

slide_04

“But the company, being what it is, prefers to give me the slightly less interesting title of Evangelista.”

 slide_05

“Actually, that’s not true. The title is Evangelist. It’s a relatively new kind of job in the big scheme of things, which is a combination of…”

 slide_06

“Super-smart hottie with programming skills and…”

 slide_07

“Dapper, intelligent and quick-witted communicator of ideas. I’m kind of like a marketer. But with a brain. And a soul. [Looking at wincing marketers in the audience] Oh, I kid because I love.”

 slide_08

“The concept of a technology evangelist was pioneered by the The Esteemed Competition over at Apple by Mike Boich, but it was Guy Kawasaki who popularized the position. He’s since gone on to do other tech-related things in Silicon Valley, but a lot of what he does can still be considered to be evangelism.”

 slide_09

“Microsoft also has technology evangelists. The one you probably know is Robert Scoble, who was with the company for three-ish years, and like Guy, although he doesn’t have the title or work for Microsoft anymore, a lot of what he does is still evangelism.”

 slide_10

“And yeah, I know the guy.”

I’d much rather see a presentation done in the style that I used rather than seeing someone simply grind through a deck of items in point form, acting as a narration service.

And Now a Question for the Audience

If I were to post a more detailed version of my presentation online, would you rather have it…

  • in the form shown above, with the slides shown above what I said in text form?
  • as a video, with the slides displayed in the video portion and my voice as the audio?

Let me know.

Categories
Uncategorized

Okay, I’m Convinced: A Believable Non-Porn Use for “Porn Mode”

I’ve always laughed at how the guys on the Internet Explorer 8 team bent over backwards trying to come up with non-porn-surfing uses for “InPrivate Browsing”, which I often refer to as “Porn Mode”. Somehow the examples they use, however practical and legitimate they are, fail to convince:

  • “I want to buy a present for my wife from an online store and want to keep it a surprise.”
  • “I want to check my account balance from an internet cafe while I’m on holiday.”

But this Post Secret postcard shows a believable use case for “Porn Mode” on browsers: 

"Post Secret" postcard made of the Google home page, showing a search for "signs of teen autism": "The least you could have done is erase the history. Now I know what you really think of me, Dad."

Categories
Uncategorized

My “Microsoft: Stop Making Fun of Us” Slide

I started my presentation at WordCamp Toronto 2009 yesterday – Better Living Through Blogging — with this slide, which got a lot of laughs. A number of people have requested it, and I’m only too happy to oblige. Here you go: share and enjoy!

"I'm a PC" guy holding a gun pointed at "I'm a Mac" guy: "Microsoft: Stop making fun of us."Click the photo to see it at full size.

The image comes from a Worth1000 Photoshopping contest – here’s the original.

Categories
Uncategorized

A Special PHP/Windows-Themed Coffee and Code: This THURSDAY at the Dark Horse

This article also appears in Canadian Developer Connection.

Coffee cup

This week, I’m going to have my hands full on Friday with WordCamp Toronto, so I’m moving my Coffee and Code session from Friday to this Thursday, May 7th, from 2:00 p.m. to 5:00 p.m. at the Dark Horse Cafe (215 Spadina).

This particular Coffee and Code has a theme: developing and deploying PHP applications on Windows. I’ll be talking about and answering questions about PHP on Windows, the Web Platform Installer (which I recently covered in this article) and the PHP FTW! contest, which pits student developers against professional developers for cash prizes.

Come on down and join me for a coffee! I’m going to see if I can bring some PHP-themed goodies to give away, just in case my scintillating company and Dark Horse’s great coffee aren’t enticements enough for you to drop by.

Categories
Uncategorized

Toronto F# Study Group: Thursday at the Dark Horse

This article also appears in Canadian Developer Connection.

Surface plot program written in F# F# (pronounced “eff sharp”) is multi-paradigm .NET programming language that supports both imperative object-oriented and functional programming styles. It’s a dialect of the ML programming language and very close to OCaml. Used as a functional programming language, F# gives you expressive power that’s tricky to duplicate in your run-of-the-mill imperative programming languages. As a .NET programming language, you can integrate modules written in F# into C# and Visual Basic projects, with F# doing the data-crunching, and C# or VB handling the user interface.

Justin Lee talked to me about starting a Toronto F# study group a couple of weeks ago at Toronto CodeCamp, and he’s holding the first meeting this Thursday, May 7th at 6:00 p.m. at the Dark Horse Cafe (215 Spadina Avenue). He says that in this first meeting, he wants to start talking about the study group itself and cover a few simple “getting started with F#” exercises.

There’s nothing like a taking up a new programming language to stretch your brain, and there’s a lot of evidence to suggest that functional programming concepts are the future. The F# Study Group is an opportunity to get started, and the Dark Horse is a pretty nice setting with great coffee.

Categories
Uncategorized

Installing PHP on Windows Using the Web Platform Installer 2.0 Beta

This article also appears in Canadian Developer Connection.

Yesterday, I showed you how to install MySQL Server 5.1 (Community Edition) onto your Windows-based development machine. The reason I wrote the article was to help you prep your machine for installing PHP and PHP-based applications using Microsoft’s Web Platform Installer.

What is Web Platform Installer?

Web Platform Installer is, as the website puts it, “a free tool that makes it simple to download, install and keep up-to-date with the latest components of the Microsoft Web Platform”. Yes, this is stuff you can do yourself, but I’m all for tools that automate away drudgery.

As of this writing, there are two versions of Web Platform Installer available: the original 1.0 version and the beta 2.0 version. In this article, I’m going to focus on the 2.0 version.

Here’s what you’ll see when you fire up the Web Platform Installer 2.0 beta:

wpi_01

Web Platform Installer has three tabs:

  1. What’s New?: This lists the newest applications that are available for download and aren’t already installed on your system. This is the tab that is automatically selected when you launch Web Platform Installer.
  2. Web Platform: This lists web platform applications that are available for download and whether they’re installed on your system. These apps are divided into the following categories:
    • Web Server Applications: Extensions for IIS as well as other server software such as the FTP server
    • Frameworks and Runtimes: Both Microsoft and open source frameworks and runtimes, such as .NET Framework and ASP.NET MVC. This is where you’ll find PHP.
    • Database: SQL Server Express and management tools.
    • Tools: Applications for web development, such as Silverlight and Visual Web Developer Express.
  3. Web Applications: This lists web applications that are available for download and whether they’re installed on your system. These apps are divided into the following categories:
    • Blogs: A selection of .NET blogging apps such as BlogEngine.NET and DasBlog, as well as WordPress.
    • Content Management: Applications like DotNetNuke and Acquia Drupal.
    • Galleries: Photo gallery applications.
    • Wiki: Wikis and apps with wiki functionality, such as the PHP-based Acquia Drupal and the ASP.NET-based ScrewTurn Wiki.

Installing PHP

If PHP isn’t on your system, it will appear on the What’s New? tab page. If you click on the “information” icon beside the checkbox item for PHP, you’ll be shown its information page:

wpi_02

You can choose to install PHP by checking PHP’s checkbox in the list of applications or the Click to include in your install button.

You can choose to add other applications to your install. Once you’ve chosen all the apps you want, click the Install button. You’ll be presented with a list of the apps you chose for review, along with any dependencies for those apps:

wpi_04

To start the installation, click the I Accept button, and Web Platform Installer will do its thing:

wpi_05

Taking PHP for a Quick Spin

Let’s write a very quick script to confirm that PHP is up and running:

<?php

phpinfo();

?>

In case you’re not familiar with PHP’s built-in phpinfo() function, it returns information about your PHP installation, its configuration and its current environment. It’s useful for all sorts of things, not the least of which is checking to see if your PHP installation worked.

Enter the script above using your favourite editor, and save it as test.php into the web root directory, c:/inetpub/wwwroot Note that in order to save to this directory, you’ll need to be running the editor with administrator privileges. Alternately, you can save to another directory and then copy the file to c:/inetpub/wwwroot, giving your administrative approval when prompted by the dialog box.

Then point your browser at http://localhost/test.php — you should see something that looks like this:

wpi_06

Next Steps

With PHP up and running, you can install PHP-based apps. PHP apps are like old-school ASP apps; installing them is often a matter of moving the files into the webroot directory and perhaps running an install script by typing its URL into your browser.

phpMyAdmin

One app you might want to consider installing is phpMyAdmin, a PHP-based web application for administering MySQL databases. While it’s possible to administer MySQL solely through its command-line interfaces, phpMyAdmin makes it so much easier. I can’t recommend this utility enough.

Cover of "Wicked Cool PHP"

If I had to recommend just one PHP book, it would be No Starch Press’ Wicked Cool PHP. I find No Starch books to be both informative and enjoyable reads, and this book is no exception. If you’ve got at least a little programming experience under your belt. I think that you’ll find this book and its very useful examples, coupled with the online documentation at PHP.net, will serve you very well.

Happy PHPing!

Categories
Uncategorized

Installing MySQL Server 5.1 on Windows

MySQL dolphin balancing Windows "ball" logo on its snout

You’ve probably heard of Microsoft’s Web Platform Installer, a free-as-in-beer tool that makes it a snap to install a variety of Microsoft and Open Source web applications and development tools, ranging from “The Usual Suspects”, such as Visual Web Developer, IIS and SQL Server 2008 Express to stuff you might not expect, such as PHP and WordPress. It makes installing these goodies a simple of matter of checking the items you want and clicking the Install button. (While the old way of installing PHP on Windows wasn’t rocket science, it involved enough steps and configuration changes to justify my writing a whole article on the topic in an old developer blog of mine.)

One necessary thing that the Web Platform Installer doesn’t do for you – and I assume it’s because of licensing restrictions of one kind or another – is install MySQL, which many PHP apps, including a number that the Web Platform Installer installs, use. You’ll be told that you need to install MySQL, but it leaves installing it up to you.

Hence this article, where I walk through the steps of installing MySQL Server 5.1 on Windows for a developer machine. Whether you just need PHP and MySQL so that you can experiment with WordPress template designs or are the “I build on Windows, but deploy on Linux” type or are developing for a server setup where IIS is serving both ASP.NET and PHP apps (and yes, IIS does that!), you’re going to want MySQL on your dev box.

Get the Installer

The version we’re interested in is the free-as-in-both-speech-and-beer Community Edition, which is available at the MySQL site. Here are the links to the installers:

Both these options provide you with three different installers. I recommend getting the .msi (Windows Installer) as it’s the lowest-headache option. It’s also the version I use in this walkthrough.

By the way, the screenshots provided in this walkthrough are from my actual installation process on my laptop, which runs the 64-bit edition of Windows 7 Beta, Build 7000 (I’m not installing the Release Candidate until later this week). I’m installing the 64-bit version of MySQL Server 5.1 Community Edition, but whether you’re installing the 32- or 64-bit version on Windows XP, Vista or 7, your experience should be roughly the same.

Here’s what you should see when you launch the installer:

01

Which Setup Type?

The first choice you have to make is the type of setup you want:

02

The three choices offered are:

  1. Typical: Installs the basic components for MySQL to the default installation path, C:\Program Files\MySQL\MySQL Server 5.1\, including:
    • The MySQL server
    • The mysql command-line client
    • Other command-line utilities like mysqldump, myisamchk and more.
  2. Complete: Installs all the MySQL components to the default installation path, C:\Program Files\MySQL\MySQL Server 5.1\, including those listed in the Typical setup, plus:
    • Documentation
    • The embedded server library
    • The benchmark suite
    • Support scripts
  3. Custom: Gives you complete control over the components installed and the installation path.

Although the components in the Typical setup will work fine for most web development purposes, I like having the docs handy, so I went with the Complete setup.

Once you’ve selected the setup, you’ll be shown a confirmation window like the one below:

 03

Once MySQL has been installed, you’ll see the window below:

 04

You’ll be given the choice to configure MySQL server, which I recommend. You can do so by leaving the Configure the MySQL Server now checkbox checked and then clicking Finish.

The Configuration Wizard

Here’s the first window of the Configuration Wizard:

 05

Which Configuration?

You’ll be asked which configuration type to use:

 06

The two choices offered are:

  1. Detailed Configuration: Gives you fine-grained control over the configuration process. I’m familiar with the options being offered, so this is the option I chose. If you choose this option, you will have to make some additional choices in the windows that follow.
  2. Standard Configuration: If you’re new to MySQL and need a server configured as a single-user developer machine, this configuration should suit your needs. If you choose this option, you’ll skip the next few steps and go directly to the Root Password window.

Detailed Configuration Options

If you chose to use the Detailed Configuration, you will see the following windows.

Server Type

The first choice in the Detailed Configuration is Server Type:

 07

The three options are:

  1. Developer Machine: This setup assumes that MySQL will be running on a machine used to write applications, where the database will be used for basic developer proofs of concept and simple testing. MySQL will be configured to use minimal system resources. This is the option I selected.
  2. Server Machine: This setup is for server systems where MySQL will be running along with other server applications such as a web server, mail server, FTP server and so on. MySQL will be configured to use a moderate portion of the system resources.
  3. Dedicated MySQL Server Machine: This is for machines that will be running only MySQL. in this configuration, MySQL will be configured to use all available system resources.

Storage Engines

The next choice to make is selecting the storage engines to be used: MyISAM or InnoDB. If you’re not familiar with MySQL, you’re probably asking “What’s the difference between InnoDB and MyISAM?”

Of the two engines, MyISAM is the older of the two, and the default engine. The general consensus is that in most cases, it’s faster than InnoDB for typical CRUD operations. It supports up to around 4 billion rows of data and 64 indexed fields per table. MyISAM uses table-level locking, which means than when a row is being updated, the table is locked and no other operations can update any other rows until the first row is updated and the lock on the table is released.

InnoDB is the newer (and some would say sexier) engine. It’s called “the transactional one”, and it’s built with data integrity in mind. It supports foreign key constraints, meaning that changes to a table (say, “Actors”) that references another table (say, “Movies”) are allowed only if those changes leave both in a valid state. For example, you wouldn’t be able to delete a row from the “Actors” table if it referenced any rows in the “Movies” table (that is, you can’t remove an actor from the database if s/he’s listed as starring in any movies). It also supports row-level locking, which means that so that more than one row can be updated at the same time.

The general guidelines for choosing between MyISAM and InnoDB are as follows:

  • Will your use of the database be mostly reading? That is, will you be doing mostly select operations and few insert, update and delete operations? Then you want MyISAM.
  • Will your use of the database involve at least as many writes as reads, if not more? That is, will you be doing as many insert, update and delete operations as select operations? Then you want InnoDB.
  • Do you need full-text search? You want MyISAM.
  • Do you need to conserve disk space and RAM? You want MyISAM.
  • Does the idea of using a non-SQL Server database irk you? You might feel better going with InnoDB, since it has the row-level locking, transaction safety and generally more “relational” feel.

Keep in mind that when adding a table to a MySQL database, you can specify which engine it uses. Lately, I’ve been in the habit of specifying InnoDB for most tables except those on which I want to provide full-text search; for those, I’ve specified MyISAM. (For more on specifying engines when creating tables, see MySQL’s page on the create table command.)

Now that I’ve done a quick review of MyISAM and InnoDB, let’s look at the storage engine choices that the Configuration Wizard offers.

 08

The three choices are:

  1. Multifunctional Database: This enables both InnoDB and MyISAM storage engines and divides resources evenly between the two. This is the recommended option for developers who use both storage engines on a regular basis. It’s the option I chose, since it yields the most flexibility.
  2. Transactional Database Only: This enables both InnoDB and MyISAM storage engines, but dedicates more resources to the InnoDB engine.
  3. Non-Transactional Database Only: This option completely disables InnoDB; all resources are dedicated to the MyISAM storage engine.

If you chose Multifunctional Database or Transactional Database Only, you’ll be presented a windows asking you where to put the InnoDB tablespace:

 09

I went with the default, which puts the tablespace in the MySQL installation directory.

Concurrent Connection Settings

The next window is all about the number of concurrent connections supported:

 10

The three choices offered are:

  1. Decision Support (DSS)/OLAP: This assumes an average of around 20 concurrent connections, with a maximum of 100 concurrent connections supports. I chose this option, as it works for most development scenarios.
  2. Online Transaction Processing: This supports up to 500 concurrent connections and is generally for production use.
  3. Manual Setting: This lets you specify a specific number of connections. I’ve seen it used mostly for testing.

Networking Options

The next window concerns itself with networking options:

11

Port 3306 is the default MySQL port, so that’s what I went with; I also checked the Add firewall exception for this port checkbox. I also left the Enable Strict Mode checkbox checked.

Default Character Encoding

Now it’s time to select the default character encoding:

 12

You’re given a number of options, but I suggest you go with my choice. I chose UTF-8 because it’s the encoding of the Web.

Service Options

Here’s the next window:

 13

I strongly recommend:

  • Checking the Install As Windows Service checkbox. When installed as a Windows service, MySQL can be started automatically at system startup and restarted in the event of a service failure.
  • Going with the default service name of MySQL unless there’s already an instance of MySQL installed, in which case you’ll want to provide a different name. Note that service names should be 255 characters or less and can have any legal character except for the forward-slash (/) or backslash (/).
  • Checking the Launch the MySQL Server automatically checkbox.
  • Checking the Include Bin Directory in Windows PATH checkbox. You’ll save yourself a lot of typing if you do this.

Security Options

And now, the Security Options window…

 14

You’ll be asked to provide a password for the root user twice.

You can also choose to:

  • Enable root access from remote machines. I don’t really need this on my development machine, so I didn’t check this checkbox.
  • Create an anonymous account. I don’t need this either, so I didn’t check this checkbox.

Go!

That’s it for all the option setting. You’ll now be presented with this window:

 15

If you’re satisfied with your configuration choices in the previous windows, click the Execute button. You’ll be presented with this window as your reward:

 16

…and you’re done!

Taking it for a Quick Spin

Let’s take MySQL for a quick spin to confirm it’s working. We’ll do this using the mysql command-line client and logging in as root. There are a couple of ways to do this. One is by firing up the MySQL Command Line Client from your Windows menu (or Start Menu on XP):

start_menu

A command-line window will pop up, where you’ll be prompted to enter the root password. Enter it, and you’ll be in the command-line client!

prompt_01

The other way is to fire up the Command Prompt and (if you specified that you wanted MySQL’s bin directory included in Windows’ PATH, which you should have), enter mysql –u root –p. The -u switch is for specifying a username, and the -p switch is for specifying that you will be providing a password for the specified username.

You’ll be prompted to enter a password. Enter the root password and you’ll be in the command-line client:

prompt_02 

And MySQL is ready to use! You can now use the Web Platform Installer to install PHP-based apps that require MySQL.

I can’t give you a walkthrough of MySQL’s command line – that’ll have to wait for another article, or you might want to check out this article – but here’s a quick one: the show databases; command (don’t forget the semicolon at the end!) will return a list of all the databases currently in the system.

Happy MySQLing!