home · blog · groups · about us · contact us
DevelopmentNow Blog
 Tuesday, June 10, 2008
 
 

A reminder that Portland Open Beer Club is this Thursday, June 12, at Bailey's Taproom downtown. Grab a brew & chat about the web in a laid-back manner.

 

http://www.portlandopenbeerclub.com/
June 10, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, May 19, 2008
 
 

I called a popular hosting provider today to talk with them about getting a client's server order straightened out, as my client wasn't able to make progress on a few issues. However, the account was set up in my client's name only, which made the provider reluctant to assist me. I can understand that from a security standpoint, they can't hand out information on the phone to just anyone, but still, the account rep sounded like I was wasting his time and couldn't wait to get off the phone.

(FYI the account was set up in the client's name so that they bill the client, not me.)

So here are some tips:

Tip for developers: When your client gets web hosting, make sure that you are listed as the technical contact (or a secondary technical contact), and that your client is listed as the administration & billing contact. This may require you being on the phone while the client places the order, or perhaps they can email server specs (provided by you) to the sales rep. Or I guess you could set up the order & then have the sales rep contact your client to switch the billing from you to them.

Tip for hosting providers: If a new client's webmaster calls about an order, treat them like a new customer, not some prank caller.

 

May 19, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Saturday, May 17, 2008
 
 

I do more & more Linux work from the shell, and it's starting to grow on me. ;)

I used to search through files using this command

find . | xargs grep -s 'keyword'

but now & again get errors like xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option

So I found this command works instead

find . -printf '"%p"\n' | xargs grep -s 'keyword'

or you can make a handy shell script (e.g. search.sh) like this

#!/bin/bash

find . -printf '"%p"\n' | xargs grep -s "$1"

and then search files like

search.sh 'keyword'
May 17, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [1]



 Wednesday, May 14, 2008
 
 

I was unable to temporarily stop AVG antivirus in Vista until I saw this tip from highmastodon:

  1. Shut down AVG Control Center by right-clicking the AVG icon in your taskbar & choosing Quit.
  2. Now click the Vista start button and type "AVG" in the search box. AVG Control Center should appear.
  3. Right-click AVG Control Center and choose "Run as Administrator"
  4. Now you can open up AVG Control Center, double-click Resident Shield, uncheck "Turn On Resident Shield", and save the changes.
May 14, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, May 12, 2008
 
 

So apparently if I start a blog post but don't submit it within an hour or two my session times out & I lose the post. Nice.

Anyhow, performance has been terrible with VS2008 inside of Virtual PC. CPU is pegged, 30 seconds to load pages, you know the drill.

So here are some tips to improve performance.

  1. Don't use Virtual PC. Instead, run VS2008 on VMWare or your own computer, and have it access all CPU cores.
  2. Get good hardware. Quad-core CPUs, 3+gb RAM, fast disks (especially in a RAID 0 arrangement).
  3. Install the VS2008 Performance Patch. It didnt' help me, but it might help you.
  4. Make sure your anti-virus is ignoring your VM & compile folders.
  5. Change your <compilation tempDirectory="" /> to point to a very fast drive, like a RAM drive.
  6. Ensure VS2008 is running multiple parallel builds under the Tools->Options->Projects & Solutions->Builds & Compilation. The default is only 1 build at a time, but you can run more if you have a multi-core CPU.

 

 

May 12, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, May 09, 2008
 
 

SliceHost and Affordable Linux Hosting

I'm trying out a new provider, SliceHost, for the upcoming Portland Open Coffee Club and Portland Open Beer Club web sites. SliceHost provides fast & affordable Linux VPSes with a variety of distros to choose from.

The one downside (for me at least) is that the distros come with nothing installed. Well, I shouldn't say nothing (since SSH is on there), but no database, no web server, no ftp, no PHP, no mail. I was surprised when I first uncovered this, since I ordered an Ubuntu 8.04 server VPS & figured it would have a normal LAMP stack installed. But no, it's a minimal Linux install. That's so if you have specific needs, you can install exactly what you want & avoid installing anything you don't. But if you're more of a programmer than a sysadmin ... well, you may want to check out RimuHosting for a VPS. Great support, nice VPSes, good upgrade path, & the boxes are ready for your PHP code.

Or if you want a bit more hand-holding, you can go with GoDaddy or Dreamhost. GoDaddy's support is meh, but they're easy to get started with and are fine for a small site. Dreamhost has better support, but recently I had a really bad performance experience with them & canceled my account.

So anyhow, this wasn't supposed to all be about affordable Linux hosting providers -- I was also going to mention securing SSH. 

Securing SSH

I've been following PickledOnion's great Ubuntu setup guide, and it mentioned securing SSH by moving it to a different port (other than port 22). You can basically edit /etc/ssh/sshd_config, change the port number at the top, and then restart ssh with /etc/init.d/ssh restart.

Note: once you change the port, don't log out of SSH right away! Instead, open a new SSH window & try connecting to your box on the new port. If it doesn't work, you can go back to your previous still-open SSH window & troubleshoot.

Another option in /etc/ssh/sshd_config is to disallow root access, which is definitely a good idea. Although, if you end up SUDOing users so they have access to everything, then it doesn't protect as much as you think, since someone who can log in as you could do almost as much damage as root, including editing /etc/ssh/sshd_config to switch the ports to something different and allow root back in.

An additional way to secure SSH is to edit your firewall to block most IPs from accessing SSH, and block any unneeded ports. I'll refer you to the setup guide again ... scroll down & you'll see the section on iptables.

BTW, experienced Linux admins probably already know the above tips (plus more!), but I figured there's a lot of people getting into Linux admin work these days, so some basic admin knowledge doesn't hurt.

May 9, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [2]



 Thursday, April 10, 2008
 
 

We don't branch or tag super often, usually just on major releases, experimental code, or not-yet-ready code. But sometimes you'll have changes in a branch that you want to merge back into the main development trunk.

So assume your project's trunk is at myproject/trunk.  You then create a branch for a major release in myproject/branches/1.0-release. After a few weeks, you have to fix a bug in the 1.0-release version of your project, so you make the changes to the /myproject/branches/1.0-release branch. Then you build, test, & deploy that fixed version to production or whatever.

But now you want to merge that fix into your trunk. The main thing to remember is that the only changes you want to merge are the ones you made after the branch was created. You don't want to merge the entire branch into the trunk, otherwise you'll end up merging old code (from the branch) into the trunk, too.

BTW you might ask why I use "branches" instead of "tags" in the above example. That's because tags and branches are the same as far as SVN is concerned, and the main difference is that a "tag" is supposed to be a "snapshot" of your code that you don't make changes to (i.e. a static archive), while a "branch" is a version of the code that people might change. Since there's always a chance that we'll need to make changes to a major release (without accidentally including any not-yet-ready trunk changes), all our major releases are branches, not tags.

Ok so enough of all that. Below are some links on this topic that I suggest you read.

  1. SVN Book Chapter 4. It's a quick read, explains the principles, and shows the commands. You can skip through some of the beginning if you already know about branching, but sections "Copying Changes Between Branches" and "Common Use Cases for Merging" have good overviews on merging changes and branches. I'd suggest first reading the explanations and skipping the actual commands, so you know what's going on from a high-level.
  2. SVN Branch Merging from Michael Sepcot. Nice easy SVN commands to follow, now that you understand what's going on. If you're using Subversion from a command line, that is.
  3. How to Merge using Tortoise SVN. If you're a Windows developer, you're probably using TortoiseSVN. This guide explains how to perform the merge. Remember that the changes are merged into your local copy, so you can confirm they're ok and then commit them into SVN.

Happy merging!

April 10, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [1]



 Tuesday, April 08, 2008
 
 

Portland Open Beer Club (a spinoff of the Open Coffee Club) is meeting this Thursday 5pm at Bailey’s Taproom, 213 SW Broadway, Portland, OR. It’s an informal meetup where entrepreneurs, developers and investors can chat, network and grow. Very laid back, no agenda, stay as little or as long as you want.

 

Portland Open Beer Club is different from Open Coffee Club in that it's

·         Beer instead of coffee

·         At 5pm instead or 10am

·         usually attended by more people J

Hope to see you there! If you've never met me before, I'm the tall blond guy in the orange jacket.

April 8, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]