Local Virtual Hosts with Apache

Dave Shea on setting up Virtual Hosts:

Virtual hosts enable you to intelligently run multiple sites on a single server. The useful side effect is that with proper setup, you can point your browser to www.whatever.whatever and load a local copy. My development site is now www.mezzoblue.dev, which works exactly the same as the .com, just faster. I don’t even need a connection to work on it, because it’s all local; all my PHP scripts and Movable Type templates work, and the local filesystem access is so much nicer than using FTP.

I’ve long been aware of their use, but never committed to learning how to set up virtual hosts in Apache. A conversation with Narayan of Etherfarm on his recent trip through Vancouver enlightened, and it’s really ridiculously easy, to the point where I wish I’d done this last year.

It’s just like kludging about with the Microsoft Loopback Adapter and hacking around with your HOSTS file…only a couple of orders of magnitude easier.

Nnnngggg. The time I’ve wasted….

Not a great hacker

There are so many superstar programmers in the blogging world, speaking in geek tongues, blowing off about the latest RSS aggregator they’ve written in their lunch breaks, and making 48-hour marathon coding sessions sound like a good thing, that it’s refreshing to find two articles in the same day that emphasize some of the other qualities that a professional developer needs:

Eric Sink: Great Hacker != Great Hire

[…] When great hackers are as fussy as Graham says they are, they’re not worth the trouble. We want the super-productivity, and we want the innate love of software development, but we don’t want all the extra baggage. Instead:

  • Hire people who care about users.
  • Hire people who understand the difference between a job and a hobby.
  • Hire people who want to contribute in lots of different ways to the success of the product.

It’s okay to be in awe of these great hackers. But as a practical matter, small ISVs would be much better off hiring professionals.

Paul Tyma: Kick-ass Software Developer looking for work

So – the question wraps around to “Is a kick-ass programmer the best kind of programmer to hire to make the company the most money”. The answer seems obviously yes, but it may not be. In a specific instance we learned (as do all consulting firms) that sending 3 rockstar programmers to a client ends up with the “too many cooks in the kitchen” syndrome.

More keyboardy goodness

Some web sites have their drop-down list boxes set up in such a way that as soon as you select a different option from the list, you jump to a new page. The BBC’s weather page is a typical example. If you choose a different UK region from the list, you will be immediately transported to the local weather page for that region.

So what do you do if you don’t have a mouse for clicking on the drop-down and making the list options visible? Just pressing the down key on your keyboard changes the selected item in the list, and jumps you to a different page, so that doesn’t work. The answer is Alt+Down Arrow. This expands the list, and allows you to run up and down with the arrow keys without changing the active item. Press Enter once you’ve made your selection, and Bob’s your uncle.

Many, many more keyboard shortcuts are listed on Microsoft’s pages for keyboard assistance.

How to move and resize windows using only the keyboard

Alt+Space brings up the system menu for the window you’re working in. This menu contains Size and Move options. Choosing Move option turns the cursor into a directional compass, positioned in the centre of the window’s title bar. You can now move the window around on screen with the arrow keys. Press Enter to finish the move operation, or Escape to snap the window back to where it was previously.

The Size option also turns the cursor into a directional compass, this time positioned in the centre of the current window. Pressing any of the arrow keys turns the cursor into a resize cursor, and moves it to the relevant edge of the window. You can now shift that edge of the window either horzontally or vertically. If you want diagonal resizing from the corner of a window, press the up then the right arrow key (or any other horizontal + vertical combination), and use the directional keys to resize that corner in any direction. As with the Move operation, press Enter to fix the resize, or Escape to restore its previous dimensions.

Handy for when you find yourself stuck without a mouse!

(Don’t ask.)

Update (30 Jul):

When using this technique to move or resize a window, each press of an arror key moves or resizes the window by about 10 pixels. If you want to change the window position or size in smaller increments, hold down the Ctrl key at the same time for single-pixel control.

Movable Type 3.1 announced

MT 3.1 has been announced, and it looks like a substantial upgrade from 3.0. The addition of subcategories, dynamic PHP templates (rather than static HTML output), and post scheduling are major features that people have wanted for a long time now. So my discovery of the “Future” posting status code was an indication of things to come. How about that.

Of course, these new features mean that I’m going to have to (just have to, you know?) rip up my fresh new site design and start again. Oh well.