Logo

(813)-421-4338

Scheduling Tasks 10/16/2011

 

For anyone running just about any size website or server, there comes a time when you have to look at scheduling tasks. Rather it’s windows, linux, Rails, .Net, or something else there are many many options for scheduling tasks. I am not going to go into all the schedule runners, instead I am going to focus on some guidelines for settings the times or frequencies. 

 

For the sake of this article I am using the word task to mean any unit of work. For example sending an email, running a backup, or clearing cache files. It’s important to note that I do not mean Scheduled Tasks, the program or facility to schedule work units in windows. In fact I am not talking about any specific implementation. I just chose the word task, other synonyms would be “job”, “unit”, “work unit”, “task”, etc. 

 

First lets talk about why you would schedule a task. For web sites and applications you want things to respond quickly. But some times a unit of work takes “too long”. The best example is sending an email. You don’t want your user waiting on a page for the 30-45 seconds it takes to send an email. So just like your email client, when the user hits send you queue the message to be sent and let the user go on about their work. Another reason might be automation. For example backing up your server should be automatic. So you would usually schedule this.

 

Now that we have some (very basic) examples of why we want to schedule a task, lets look at the types of scheduled tasks. First there’s the most visible, “Run it at a specific time”. Next there’s the “Run it every so often”. Finally there the most common (but least visible) “Run it when you can.” “Run it when you can,” is usually used by programs to run things in the background without  making the user wait. The email example is “Run when you can.” Your email client does not wait for a specific time, it sends it as soon as it can, but without making you wait.

 

My advise is to use “Run when you can” as much as possible, it lets you  give the illusion of a faster moving application (in the email example, your email doesn’t get to the receiver any faster, but the user doesn’t care after they click send). Unfortunately, this is also the most difficult (as a non-developer) to implement. In fact, it’s not possible if the application your using doesn’t support it. 

 

Because you as a client, can not implement “Run when you can” I am instead going to focus on specific time and frequency tasks. “Run at a specific time” tasks are the most common. This is a mistake most of the time. Examples of specific time tasks include (normally) backups, mass emails, and daily reports. Time based scheduling is most useful when implementing a schedule that a person (or group) cares about. Daily reports for example, are a good use of “Run at a specific time” tasks. Because we as people understand “work starts at 9am” it’s a very easy move to “I get reports daily at 9:30am”. Backups, or imports are a good example of when not to use “Run at a specific time”. No one looks at these. There’s usually no person or group who visibly see that these run. Normally your IT staff/Developer/Service Provider look to make sure this runs, but you as a user don’t care at all. 

 

That brings us to “Run every so often tasks.” This is the style I recommend for backups and imports. For example, backing up changed files every hour, keeps your backup overhead smaller, and allows you to “miss” a window due to outage without invalidating the entire schedule. Importing new items every 16 hours means you will have less items to import at each interval. The two biggest advantages to this “Run every so often” style of scheduled tasks are the spreading out of load, and the ability to recover from a missed schedule with more flexibility. We will look at each benefit closer. 

 

When running a task in a “Run every so often” manner you help spread out the load of running the task more evenly. For example, If you say “backup my files every 1 hour” you have fewer modified files each hour. In addition when running several tasks, doing them in intervals helps spread out the load so you don’t create an artificial barrier. Lets say you have 5 tasks that need to run. For the sake of easy math lets say they always take 30 minuets to run and are very resource intensive. Most people would schedule the task to run at a specific time  and would make sure that time was during their slower hours. Unfortunately what that really accomplishes is that there is 2.5 hours of time that would normally be slow that is now artificially high. Alternatively, you could say run the tasks every 20 hours. Now the load is spread out. Most decent scheduling software will allow you to choose to only let one task run at a time, and delay that task till the computer that is running it meets certain conditions (like usage). You can also “black out” specific times that you know are your most critical. So you might run the first task at 12:30pm and the second task at 4:56pm. But what does it matter so long as they get run. The down side is that you need to be aware of whats running. If your site slows down every day between 2pm and 3pm you might want to blackout that period. 

 

You will also notice in that example the I went from a specific time to every 20 hours. Where’s the missing 4 hours? Well the truth is that by offsetting the time like that, you end up “moving” the task around. Basically making sure that you never get a part of the day that has an artificially high load. The load moves around, and you have to acquire more resources because the task is now part of the days work and not “something extra thats not part of this servers job”. Let me make this clear, this is a big deal. Your basically saying that you now need a server (or servers) that are big enough to handle the scheduled tasks and the normal load, because the scheduled tasks are part of the load. When running at specific times your basically saying, the is load that can be handled outside of the normal usage so why buy resources for it. 

 

The second Advantage to “Run every so often” is the ability to miss a scheduled task with more flexibility. Let’s use backups for example. Lets say you backup at 12:00am. Now, for this example, lets say your server crashes due to software at 10pm and doesn’t get fixed till 10am the next day (standard for next day support on server support provided by most vendors). Well you just missed a backup. So now if you need backups for any reason your 2 days ahead of your last backup, when you really only want to be, at most, one (based on the schedule). If you schedule the backup every 20 hours, when the server comes back up, the backup will run, and because you have purchased the resources needed to run this task and your “normal” load everyone is happy. Some tools like cron and anacron can “catch up” for “Run at a specific time” tasks that were missed, but if your running at a specific time, it’s most likely because you don’t have the ability to run that task in the middle of the day.

 

The offset is very important. Running once a month is not the same as running every 30 days. Running once a day is not the same as running every 20 hours (or even 24 hours). I recommend that you offset your tasks when ever you can so that they get a chance to rotate around. 

 

Thats not to say there is not an incorrect usage for “Run every so often tasks”. You should never use them for something a user or group of users can see. People, as a general rule, don’t get that every 24 hours might not mean the same time every day. So to keep your users happy, run those types of tasks at a specific time. 

 

So in summary, use, or ask your developer to use “Run when you can” tasks as much as possible to make your application or site seem faster. Use “Run at a specific time” tasks for anything that a person or group of people will see. Finally, use “Run every so often” tasks for anything else, and everything that is critical. Doing so will help keep your users happy, your servers balanced, and make recovery from an outage much more stable. 

 

You can download an offline copy of this article by clicking here.

 

Notes About DNS 09/12/2011

 

Almost all of my clients run websites. A good number of them are hosted externally on services like Amazon’s EC2 or Linode’s VPS. There are a few clients that host their sites internally on their own servers. In both cases I see a lot of companies make the same serious mistakes. I thought I would take some time to run down the most common mistakes and then provide you with some real world best practices. 

 

First a bit of a lesson on how DNS works. There are three parts that we care about in DNS. The registrar, that is the person that you registered the domain with. They act as a go between for ICANN (the international organization that oversees domain registrations) and you. GoDaddy is a popular example of a Domain Registrar. Then there is the DNS provider. The DNS provider is the person that actually looks up your domain and turns it into an IP address (the numbers computers use to talk to one another). GoDaddy provides some simple DNS hosting. Some popular alternatives are DynDNS or Amazon’s Route 53. The third part is your server, or more correctly your hosted IP address. Now this can be really confusing, but over simplified, this is the IP address that you use to get to your website. 

 

A quick note on GoDaddy. I am using them as an example because they are so popular. I don’t mean to say that their service doesn’t work or that it doesn’t work well. Quite the opposite, their service is a good stop gap. But I don’t feel that you should go into production with it (though a lot of people do). 

 

The most common mistake I see is using the registrar’s DNS service. Yes GoDaddy has a pretty nice interface for editing your domain’s records, but their actually DNS resolution service, while functional, is intended as a stop gap till you can get on your own DNS servers. I don’t think any serious website should launch using GoDaddy’s DNS resolution services. There are many DNS service providers to choose from. For example Amazon’s Route 53. DynDNS is another popular choice. 

 

The reason you want to move to a more specialized DNS provider is simply speed and support. For example, a lot of times you will want to move your DNS provider to your hosting company. That way, as you make a new subdomain, it also gets auto created in DNS. Another example could be Amazon Load  Balancers working best with Route 53.  Leaving your DNS hosting on your Registrars DNS often leaves you with slow response times and longer support queues should a problem arise.

 

The next most command mistake is improper DNS setup. Setting up every subdomain as an A record, or having multiple entries for one host, when you shouldn’t. DNS really needs to be setup by someone who knows how. A lot of the DNS provider’s sites, make it look easy, but it can be very complicated. Specially on big sites or large lists of servers and services. 

 

The third most common mistake is using internal DNS servers externally. In my opinion you should never use MS DNS services as a DNS provider external to your own domain. It’s kind of like email. Why have that headache internally when you can just let someone else have it. If you insist on hosting your own DNS you should use a Bind server (which means Unix or Linux maybe Mac) and set it up correctly. This means hiring someone who knows exactly how to setup a DNS server. This is usually an expense that is not needed. But hosting your own DNS and doing it wrong can cause a huge set of problems, some of which carry government fines. Again, better to just let a provider deal with that. 

 

Now for some good rules of thumb:

  • Always have only one A record per IP address. This helps speed up changes when changing IP address or hosting providers. 
  • Always setup a SPF record. This allows you to send email without it getting marked as spam
  • Always test your response/resolution time. If you have to spend a long time in the DNS resolution phase it’s going to make your site seem slow even when it’s not. 
  • Always have your Development or IT staff setup the DNS records. They know what they need, and they should know how to set them up correctly.
  • Always check your Domains against a domain checking service. http://www.dnssy.com is a good example of a testing site. Though you might have to have someone help you read the results.
  • Never host your own DNS.
  • Alway use a provider that has DNS servers in many locations. This helps prevent failure from natural disaster or major network outage.

 

I currently strongly recommend Amazon’s Route 53. It’s easy to setup and provides reliable, quick, and standards compliant DNS hosting. Other providers are out there. Most of the time your hosting provider will offer DNS as well. For example Slicehost had very good DNS servers, so I used to place all my customers with hosting at Slicehost on their DNS servers.

 

 You can download an offline version of this article by clicking here.

A Word on Passwords 09/11/2011

 

I just wanted to take a quick minuet to stress the importance of strong passwords. A lot of people have poor password habits. These habits cause them to be at unneeded risk. This is even more true with a business. Some times an entire business can be brought down with a single bad password. So I thought I would go over a few general rules. These guidelines are not the most strict, but they are a good mesh of real world needs and security. Also they are intended for the individual. If your trying to supply password rules for an entire user base there are some other considerations to take into effect. 

 

The first mistake people make is use simple passwords. Don’t use a pet’s/child’s/lover’s name. Really, this is a huge mistake. A lot of people do this, but if your like most people you share your day with others, and thus talk about your kids, for example. Now everybody you know has a good base for your password.  The same is true for simple words. Do not choose your favorite food, or tv show. Any public information can easily be  found on the internet. Just think about how many times the average person talks about their favorite vacation spot on Facebook. You want to choose a good, strong unique password.

 

To get a strong password, the best way is to think of an easy remember phrase, then “encode” it into a password. For example, “I like to watch Farscape on Sy-fi”. Take that sentence and use the first letter of every word (IltwFoS). Now replace the vowels (1ltwF0S). Now you have a pretty decent password that is easy to remember. The longer the sentence the better. 

 

The next biggest mistake I see people do is using one password for everything. Now to be super secure, you should have a unique password for every singe site/program. But thats not very realistic. Instead I recommend having a pool of 3-5 passwords. The first you keep to your self, no matter what. You don’t even tell your loved ones that password. The second is your more general password. The one you share with your wife and not many others. The third can be your public password. This is the password that you share with the people you trust. Your friends, or employees, other family members, it’s up to you. But you have this password to share with them, and it’s not on anything critical. You should still trust the people you give this password to, but it’s not linked to anything critical so, no harm. 

 

The third biggest mistake is sharing a password. Now just as I said above if you have a pool of passwords you can decide what level of access you want to give to someone. But you should be extremely careful not to give the wrong person the wrong password. You trust these people, but remember, the more people that know a secret the less of a secret it is. It’s common for a friend to write down a password and what it’s for then forget to grab it off their desk. Do you really want your friend’s co-workers to have access to the same things you gave your friend access to?

 

Fourth on the list is not changing passwords. Inevitable, you’ll make a mistake and give the wrong password to the wrong person. You might write it down and leave it behind, or someone might really not like you, and might spend 6 months hacking away at your password. Either way the best way is to change your passwords. I recommend once every 6 months. It can be a bit of a pain, but if you just decide to do it, and change every password, when every you use an old one, then you will work through most of your passwords really quickly.

 

The fifth biggest mistake is writing down your password. You should never write down your password. Use a memorable phrase like the example above. If you have a hard time remembering passwords then use an application like 1Password. Never write down your passwords. Never print them out. And for the record, storing them in a plain text file is the same thing as writing them down (Excel too). If your going to store your passwords then you need something that has a password it’s self. Good examples on a Mac are 1Password, Bento, and KeyChain. 

 

So for quick re-cap

 

 

 

Do Not Do

Do

Use Simple passwords (kids names etc.)

“Encode” a memorable phrase into a password

Use a single password for everything

Have several passwords that your can use (3-5)

Share your password

If you must share a password then create a new password to share (or use a general password from the 3-5 password pool)

Keep the same passwords forever

Change your passwords every 6 months

Write down your password

If you need help remembering your password, use a program designed to do so.

 

 

 

 

While nothing on line is totally secure, using these guidelines will keep most people safe from hacking and ID theft. Again these guidelines are not “the most secure” but they are, in my opinion, a good balance between “so secure even the owner can’t log in” and “my password is the word password”. It’s all about finding the middle ground. And these guidelines provide a good balance. 

 

You can download an offline version of this article by clicking here.

Installing Rails 3 in 6 setps 07/30/2011

 

In my original article, which you can view here, we installed Ruby on Rails 2.3 onto a production Ubuntu box. The process has changed a little so I thought I would update it. The new process for installing Rails 3.x on a production server is a little bit easier. 

 

First a note on RVM:

There is absolutely no reason a production box should run RVM. RVM’s goal is to help you run several version of ruby on a machine. Passenger, the main way apache and rails communicate, can only run one version of ruby. So having RVM installed is more overhead and more room for things to break.  Gem(set)s should be handled by Bundler.

 

A note on Bundler:

Bundler should absolutely be installed on a production box. Bundler’s main goal is to help you keep all your gems the same version between machine. Production is a machine and therefor, you should use Bundler to help keep it’s gems the same version as you developed and tested against.

 

The New Steps:

Enough notes, time to get down to business. There are some minor changes in the process. Just like before I assume you have apache installed, and I assume you already have a MySQL server somewhere. If you want to install MySQL on the production web server be my guest, but these steps do not install MySQL server, or Apache.

 

  1. sudo apt-get install git-core ruby1.8 build-essential libssl-dev ruby rdoc irb libopenssl-ruby imagemagick libmagick9-dev ruby1.8-dev libmysqlclient15-dev apache2-prefork-dev libapr1-dev postfix libaprutil1-dev libcurl4-openssl-dev #the prerequisits
  2. wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.6.tgz #download rubygems adjust the version as needed
  3. tar -xzf rubygems-1.8.6.tgz && cd rubygems-1.8.6 && sudo ruby setup.rb #extract and install rubygems
  4. sudo gem1.8 install rails --no-rdoc --no-ri #install some version of rails
  5. sudo gem1.8 install passenger #install passenger
  6. sudo passenger-install-apache2-module  #follow the instructions

 

Just like before, remember to configure postfix for proper TLS support, or disable it. Setup your vhosts. Bundler keeps the proper rails version for your project. We just install a system wide version to help troubleshoot. Also you will notice I chose ruby 1.8. I feel that it is more suited to a production enviroment for now. That may change in the near future. If you prefer to install 1.9 then just change the version in step 1.

 

You can download an offline version of this article by clicking here.

Cloud Computing 06/06/2011

Cloud computing is becomming more and more popular so I thought I would take the time to state a few opnions and facts about cloud computing. That way you as a client can take a look at the options and see if cloud computing is right for you. 

First a definition.
The term cloud computing comes from network diagrams. In a network diagram a cloud is used to repersend a non-significant part of your network. For example, lets say you have two locations, and you are mapping the computers in both places. The cloud is used to repersent "the internet". It's non-significant, because once the data leaves the network at location 1 it just gets to location 2 and it doesn't matter how. Once it's back at location 2 then it's your job again to figure out how to get it to the proper computer. Cloud computing is called such because it happens "in the cloud", or in other words, out there somewhere non-specfic. 

The good
So some really good uses for cloud computing include hosting servers and web sites. The "cloud" usually means it's very easy to create a new server when you need to. In some instances it means it's easy to make your server bigger. EC2 is a great example of the former. It's very easy to make a new server from a preconfigured image. I could, in the time it takes to write this sentance create litterially hundres of servers to do a task. With EC2 you also get the ability to pay for what you use. When coteyr.net gets busy, I instantly (sort of) spawn a bigger server. When it's quite I go to fewer or smaller servers. Other "cloud services" include things like S3 or CloudFiles. Which exist as distribution points or offsite storage. I have had great success using S3 as a distribution point for software and high bandwidth content like videos. Because I only pay for what I am using, in slow periods I pay almost nothing and when it gets busy I pay more. CloudFront and other CDNs are also a great usage. Basiaclly it lets you  host your files from geographicly close points. So if your watching a video in Mane, your probably downloading it from a server in Mane. This helps with high traffic sites, and site that need to transfer things quickly.

The Bad
Some really bad things to use clouds for include those new "music clouds". Document syncing, and personal file sharing. I know why they exists, but they way they are structured now (and they always will be due to the nature of the cloud), if your provider is compromised, then so are you. Also your giving controll of your files to someone else. Someone who is just trying to make more money. Don't think for a second that Google, the  worlds largest advertiser, won't eventually put ads in your music collection. Dropbox, is horridly insecure. If someone were to hack dropbox do you really want them to get copies of every document you have on your computer. How about MobileMe, I am not conviced that service can stay running for an entire month. Lets also not forget that any "pure" cloud solution is going to require constant internet access. So when your in the car, or on the plane, your not going to be able to listen to your music, edit your documents, or watch your videos.

Summary
Cloud Computing is good for servers because you controll the server, the provider is just providing you some (virtual) hardware to run it on. Cloud "services" like Google Docs, iDisk, Dropbox and the music clouds, are bad becuase you don't controll anything, and your giving up the one thing you could always fall back on, the files, for someone else to controll. You watch, I predict, within the first year, one or more of the cloud music services will delete someones music because it's unlicenced or other simular reason. 

P.S. For the record, when you setup a server in the cloud you also keep a local copy of the entire server, or at least the files on the server. The files are still yours. 

Muting the Computer when Someone calls 12/15/2010

UPDATE

There were enough people wanting this, so I went ahead and made the process a lot more simple. 

If all you want to do is make you Mac mute when a phone call comes  in then just install Caller from the Android Market, and install this application on your mac. 

Caller's defaults have been changed to use the Mac Applications settings. The Mac Application runs a small server in the background that accepts connections from the Phone and handles the muting. There is also a small icon in the menu bar to help when you don't want it to auto mute.

The Caller application will still work with other scripts and applications. There is no reason to stop it from doing that. Your current settings will be preserved if your upgrading from a previous version of caller. The default values are listed below incase you want to switch over to using them.

Base Server URL: http://192.168.42.1:3366
Call Start Arguments: /mute
Call Stop Arguments: /unmute

I have left the original article intact below, so that others can reference how to setup custom scripts to do other things then mute macs.

The original article.

So a friend and I were talking to day, and we got to talking about how cool it would be if your mac would mute when you get a phone call. I was thinking about this a few days ago but figured I was just weird. When my friend made the same statement out of nowhere, I went AH HA, and started trying to figure it out. 

Well theres no automatic way to do it. Thats what I figured out. So being a developer I just made one. 

The process takes two parts. First we need a application on our phone that can make a get request when a call comes in, and one when a call ends. Second we need a script on the computer in question to do the actual muting. 

But before we go any futher....

 

My system specs

  • Several Android phones (does the muting)
  • A Mac Book Pro (needs muting)

Don't worry if you have windows or linux or some other OS this should still work, you will just need to adjust the muting script. If you have an iPhone instead of an android, your own your own (though the idea still works, you just need an iPhone app to run it) 

 

Android Side

I could not find an application to do this automatically, so I wrote one. Google really i nice to their devs, that makes it worth wile to do these nice little apps. Apple is not nice to their devs, so I will likely never create an iPhone app for this, but maybe someone else will. The code is simple, I just don't want to fight with the Mobile App Store. Not worth it for an application that I can't see charging for.

Any way, rant over, back to the app. Search the android marker for "Caller" or "Coteyr" if caller returns to many results for you.  Install and set aside.  We will come back to configuring it in a moment. 

Computer side

Make some kind of script to be called via a get request and host it somehow. I used Apache and my sites directory. Simple. Here is what I am using. It is a slightly modified version of the script found here.

Make sure you enable php on your mac (or what ever os you use). And then thats it your good to go.

Back to the Android

 Start Caller, put in your server url and the arguments you wish to send. Don't forget the ? or else....  And your done, enjoy your phone muting computer experience.

Quick Notes

  • If the app force closes, then you will have to reinstall or restart you phone. This shouldn't happen, but it sometimes can if you put in a really funky URL or your server responds with a 301/302
  • You don't have to just mute, you can do all kinds of stuff. The Caller app does a get when you get on the phone and a get when you hang up the phone. Use it for anything. 
  • You really should make sure that your nice php script isn't accessible to the outside world. At least add in some silly URL based security or something. Better to just have it on the local lan. 
  • If you have any questions just email me. But I do charge for writing code and scripts. See this website for examples. 

Site Setter 12/01/2010

Ok, so this one is strictly for the developers who use Mac out there. You know how you use apache to host files locally while your debugging/writing code. 

You know how you have to create a virtual server and a hosts entry in order to test deployments to the root directory.

You know how having multiple new projects means having to remember where those files are and how to modify them, and having to distract your self from your work.

 

Well enter Site Setter. You tell it the Document Root, the location of your apache.conf (or what ever you call it) and the host name you want, and it sets up all the entries for you. 

Download Link

How does it work.

Well apache config files are really quite simple, as is the hosts file. It takes the information you gave it and just inserts the entries into the proper files, then restarts apache for you. 

It does require you to keep your apache.conf (the one you want things added to) writable to yourself. But I suggest storing that in your home directory anyway. Specially if you share the computer.  Root elevation will occur for edits to the hosts file and restarting apache.

Entries into the apache.conf are basic so if something really special is needed (I recommend against needing something special, due to the fact that you will need to deploy your code at some point in time, and a generic config is much better then a highly specialized config in almost every case. (Again vhost config, not overall server config)) then just edit the file. It won't hurt a thing. 

I have tested, and use, the app with PHP, Rails, and static HTML with no issues. If you using it with rails remember to force passenger into development mode. PHP remember to turn on some form of debugging/logging. Again I recommend this be done at the server level.

Converting from Linux to Mac 11/19/2010

I recently upgraded my main work machine (rather I wanted to or not) to a Mac Book Pro.  The following are a few thoughts and tips for new Mac users comming from linux. 

Isn't it the same?
Yes and no. Yes it's basically the same under the hood. Its BSD (a posix compliant OS) wrapped up in some pretty candy. The transition should be very smooth for any linux user. The real reason I upgraded was because of the hardware. Not the software. The laptops I had bought in the past, were failing every 6 months. That was causing some down time for me and that is never good. I figured that if I needed to I could install linux on the Mac Book Pro and be done with bad hardware. 

All that being said there are a few differences. Mostly some subtle things about commands and of course the UI.

What's Missing
I know a lot of mac people will disagree, but there are a few things missing from OS X that just should be there. 

  • Package Management. Yes there brew, yes theres ports. Both of them suck. If your a linux user you will really miss apt-get install stuff. 
  • gcc. Thats right theres no compiler. And to get one, you have to download xcode. It's easy to do, but really, its something that should just be there.
  • A working file manager (more on this later)
  • FTP client. There are options out there but a basic FTP client is something that every OS should have. Even windows has ftp integration with explorer.

Some good included thing

  • X11. It's there. It's a bit rough to use, but it's there.
  • TextEdit. Think notepad plus
  • Time Machine. This thing is awesome. Think back in time with a fancy interface.
  • Terminal. Again a bit basic but once you round off a few corners it does the job.

Rounding Corners?
Ok, so Mac is nice and shiny but there are a few things that make a disaster out of something that should be simple. We will take a look at "fixing" some of the problems.

Refresh the page
First, if you use multiple operating systems, lets remove that silly ⌘R short cut for reloading a page and map it to F5 (this is done in the keyboard short cuts preferences panel)

Whats that short cut again?
Next up, and I am not at all sure why Apple didn't do this in the first place. Lets map some keys so we can "type" shortcuts (⌘⎇⌃⇧). This will be invaluable when asking for help or when trying to give it. To add keys for these "letters" just create the file ~/Library/KeyBindings/DefaultKeyBinding.dict in it place the code:

{
/* insert unicode characteres with Option down */
"~o" = ("insertText:", "\U2318"); /*  ⌘ */
"~c" = ("insertText:", "\U2303"); /* ⌃ */
"~s" = ("insertText:", "\U21E7"); /* ⇧ */
"~a" = ("insertText:", "\U2387"); /* ⎇ */
}


This maps ⎇o, ⎇c, ⎇s, and ⎇a to ⌘, ⌃, ⇧, and ⎇ respectively. 

 

Closing finder

You can't close finder. I really wish you could. When I hit ⌘Q anywhere else it immediately exits the app. Finder just doesn't want to do that. So we do the next best thing. Again in the keyboard short cuts preferences map finders close window to ⌘Q. That will at least make it feel like it's doing what you ask. 

 

What an UGLY prompt in terminal.

Yeah I guess they never thought we would use it. Just modify your ~/.bashrc and ~/.bash_profile to use what ever style prompt you like. I am quite fond of:

 

'${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 "[\[\e[0;32m\]%s\[\e[0m\]\[\e[0;33m\]$(parse_git_dirty)\[\e[0m\]]")$ '

Yep thats right I yanked it off my ubuntu box.
Application Time
This really isn't a nock against OS X as much as it is a list of apps that need finding and getting.  These help a lot, but there not all free.
  • TextMate - A decent code editor
  • CyberDuck - A good Transfer program supporting lots of protocols
  • Unison - NewsReader
  • Chrome - Of course
  • Adium - Chat program with much better support and look then iChat
  • BetterTouchTool - Mouse configuration - mostly allows actual window management (like making a window take up the whole screen)
  • Clyppan - Clipboard history (think klipper)
  • CocoaDialog - think kdialog.
  • GitNub - git browser
  • Handbreak - video transcoder
  • iWork - A very nice office replacement. 
  • Monolingual - Clean all that universal binary crap off the hard drive
  • Pandora - Duh
  • Quicksilver - the only way to launch applications. 
  • VLC - Thats right your mac can't play any of your videos. Just get VLC and you will be fine. 
  • Clementine - Amarok for mac
  • Transmission - bittorrent client

Things that still drive me batty!

  • Why is there a close button if it doesn't close the app. That is so very annoying. 
  • Why can't I maximize a window. I can only zoom it. Again very annoying. 
  • Finder, really. I think windows 3 had a better file manager. And I am not just being rude, its true.
  • Keyboard shortcuts that are just amazingly long like ⌘⎇⌃8 thats a real shortcut try it.
  • Dirt, man this thing can get dirty fast. 
  • Why can't i just change the font size globally?

Web safe fonts 08/26/2010

Fonts can be a great way to add a little style or flare to part of your site. A big block of text that has a few words that stand out in them can really make a difference when converting a sale, or even providing information. The only problem is there are very few fonts to choose from. 

The why

Fonts are traditionally the responsibility of the operating system. When we crate a web page what we are really creating is a bit of code that a browser like Firefox or Google Chrome can use to render the page.  However when the browser renders a page it needs to know what font to make the text. We can use styles and css to tell it to use a pituclar font, but if the computer doing the rendering does not have that font installed then the browser can not  render it.

More on rendering

So basically what a web server sends to a browser when you type in www.coteyr.net is a list of instruction on how to display a page.  Instruction like place text here, put that sentence there, display this image there. In the end it is the browser that has to do the actual placing of text on the screen, retrieving and putting images in one place or another, and other tasks. This is called rendering. It' is important to know this because, in the case of fonts, the rendering of the font is done in the browser, so the browser has to know about that font. 

What are fonts

Fonts are basically macros for how to render things. In this case, a font is a macro for putting a bunch of dots on the screen in the shape of a letter or number. There are other types of fonts, like sound fonts, midi fonts, et. al. but the only ones we care about right now are text fonts.

The Problem

The problem is that not everyone has every font on their computer. Some people have several hundred fonts installed and some people have never installed a font themselves and only have what their computer came with. To make matters worse, not every computer comes with the same fonts. Different Operating systems and even different versions of the same operating system come with different fonts. When you take this in to account and remember that the browser can only render text in a font that you have installed, you start to see the problem. 

The Solution Pt. 1

The solution is simple. Every browser recognizes a special set of "meta-fonts" that can be used. These fonts are:

  • Serif
  • Sans-Serif
  • Monospace

These three "meta-fonts" tell the browser to pick a font that is installed and meets a set of requirements and just use that font. It's not perfect but it guarantees that every browser (excluding text based browsers, or other special display browsers) will be able to display some kind of font change. 

The Solution Pt. 2

So your not happy with just three choice? Well your in luck. There are several very common fonts that almost every computer has installed. Not everyone will have them, but almost everyone will. You can safely use these fonts to liven up you text with out to much risk of someone not seeing them.

  • Georgia
  • Times New Roman
  • Times
  • Arial
  • Helvetica
  • Tahoma
  • Verdana
  • Courier

Other Solutions

Don't like only having only 8 choices. Well this is where we hit the brick wall. You can specify other fonts for the browser to use, but keep in mind that not everyone will have them. If you have created a layout based on the fullness of text or the specific font standing out, then your in for a big problem if someone viewing the site doesn't have the font you want to use. The sections below will go over some options and their pros and cons. 

Text as Images

You could render all the text that is in a different font as an image. This might get the page to look the way you want it to but has some pretty big downsides. First the page will load slower. Next, search engines and other web crawlers will not see the text (because it's not text anymore). In addition, there is no way to make every page look the same so you could be making a problem worse (remember it's the browsers job of rendering a page and not all browsers will render it the same way). Also, other text based things like screen readers or even the find function won't work on images.  If you simply must have the one font, then this may be the best choice. But if your whole web site layout depends on a font, you might want to find a new designer.

sIRF

There is a flash and javascript solution out there that will replace portions of text with flash. The rendering of the text is done in flash and thus can use a different font. The idea looks very interesting but in practice is very bad. It has a few good uses, like replacing one line of text, but any more then that and you have a problem. Add to that, the fact that most mobile browsers (and thats a growing market share) won't use flash, and that on every platform flash is unstable at best, and you begin to see why this might not be the best solution. In truth it is very interesting, and easy to use, but also very easy to mess up.  The flash replacement of text might be ok for you but you need to really consider all the negatives of this. I would never recommend this to any of my clients and when I find clients using it I always recommend they stop.

The best solution

The best solution is simple. Take your 8 choices above and make a wonderful website. Any good web designer can do it. Just look around. Being dependent upon images and flash for text based content is a very bad thing. Having text as text is a very good thing. 

Emergency Scaling 08/20/2010

It can be the biggest disaster you have ever faced, or the best thing that has ever happened. Either way it's a defining moment for your site, and the way you handle it can make or break your product.  What am I talking about? I am talking about that abnormal burst of traffic. Sure you knew the servers were going to get busy, and sure you planned for it, even scaled for it, but when the day came, you didn't get the expected 200% increase in traffic you got 2000%. 

What can you do in this situation. Well a lot, but also not much. I recently had a client who this happened to. This is how we dealt with it.

Pre-Launch

Before the day of the huge traffic hit, we knew that we were going to have an increase in traffic. We expected a substantial increase. So to match we got a bigger slice. We host the site at slice host, so going vertical is not  a big issue. To be honest I don't think anyone expected the response that we got. But we were scaled up to handle about 400% of the amount of traffic that was currently on the site. That's quite a bit of an increase. 

Launch Day

The Promo Videos and Product pages launched. The marking affiliates swung into top gear, and the only thing I can say is WOW! 

Launch Day - 10am

I get the call. I check the logs and the server and code is just moving along and working well, but there just way to much traffic. Well the server is serving, but it's just not enough to handle the raw amount of requests. So first thing we do is drop all current connections and step up the server size (again we host at SliceHost so it's not a big deal). We know that it's not going to be enough but baby steps, lets get at least some people served.

10:30am

Resize is complete and were serving consumers again, but it won't hold long. We need a more stable solution. 

11am

Using slice hosts clone feature we setup 4 hosts with Round-robin DNS. It has it's problems and the load is not spread out very well, but the site is stable now, if not a little slow.

1pm

We reconfigure the servers for a load balanced configuration. Test them and get them into production, switching DNS back to a single server, and preparing for the fact that we may need to move up to more servers.

That Evening

With the traffic starting to die down a bit, we left the four server configuration in place started working on shoring up parts of the site that we had duct taped together to get things back up in running. Mostly the fact that when we went to Round-robin DNS each server had it's own disconnected mysql server. We also started making modifications to our host tracking software to accommodate the new servers. New apache settings were tested and deployed. 

Launch Day +1

Time for another WOW! moment, only this time the servers were handling the load better. We found out there were even more people hitting the website. 

Early Morning

The website was responding fine, just slow, but it's a video page thats the main focus of this launch so slow just won't do. 

Late Morning

We added 4 more servers to the load balancer (again using the clone feature from SliceHost). 

That afternoon and onward

We just sat back and watched progress bars and traffic reports. If the traffic got to a point were it might risk the servers speed or stability we would add a new server.

Here are some tips

  • Remember, when you get this type of traffic. It's a mixed bag. It's great that your getting that much attention, but it's also bad that the servers were not prepared for it. Everyone eventually has these problems it's response time to get the problem resolved that makes the difference. In our case we had the issue "resolved" in about 40 minuets, even if we wanted a better solution to the problem. 
  • Try to keep in mind that 40 happy users are better then 400 angry ones. If you have to set limits then set them. Try not to keep them long, but people who get a "Server Busy" response will understand more then someone who gets nothing but "the spinning globe".
  • DO NOT go switching out your server setup.  Take your time. Test your solutions and make each change carefully. It takes longer but 400 angry customers are better then none. And worse then that, when you start trying to switch server setups your likely to induce more issues then your fixing. 
  • Make sure you identify all your bottle necks. Just adding servers won't work. For us, we had a CPU/RAM issue which we handled by offloading processing to many backend servers, but we also had a problem with the network throughput.  To many people watching a video meant our server was trying to send out more then it could handle there too. Adding 1000 servers would not have fixed that. We handled it by switching the movie to a dedicated set of servers that do nothing but serve the videos. 
  • Simple is better. We all want a quick answer. Something right now, that magically makes everything better. But remember implementing those solutions ahead of time is great, but after the fact in the middle of the storm is just silly. Use simple steps to make the situation better until you have time to test everything. 
  • DO TEST EVERYTHING! Don't just do it in production. Test, test, test.  Last thing you want is to crash the server and take 3 hours to get it back up. Just make tiny small changes. We did DNS Round-robin first. Not a great solution, but it worked to alleviate some pressure. Then we moved to 4 load balanced servers. Then we added in the content server (the video server), and finally moved up to 8 servers, fail-over MySQL servers, several content servers and then some.  But because we did it step by step the worse the customers saw after the first 30 minuets was a slow playing video.
  • Set up host monitoring. With out it we never would have caught the issue. Without it we would not be able to stay ahead of the issue now. Just simple things can make a huge difference. A ping check and latency check work great to test network load. Load testing and testing the actual URL make sure the server are still working well.
  • Remember, the traffic is temporary (probably). Meaning that after the initial rush is done your load numbers will change. Be prepared to want to down size. never sign up for something that you have to keep long. Also the traffic might not subside, so something really temporary is a mistake as well. 

All-in-All

A very memorable experience, but one that happens from time to time. The best thing to do is take a small set of steps, keep your cool, and TEST TEST TEST.

Facebook Woes 06/16/2010

I have been asked quite a few times how Facebook applications work and what you can and can't do with them. I thought I would take the time to answer some of the most common questions that I get in regards to Facebook and make some comments on how the platform can help or hurt you.

What is a Facebook App?

Simply put a Facebook app is a part of your website that people can access through Facebook. Their Facebook data is shared with your site and your site shares data with Facebook. 

Do I need a Facebook App?

Well that is a very tricky question. The best answer is probably no. You do not need a Facebook app. Facebook is a social site and a Facebook app can add value to you or it can add value to your customers (the Facebook users). But in most cases the core of your website can function without it. 

What are the Benifits of a Facebook App?

Well, it's a social site. It's a great way to add more users or more exposure to your main site. In addition there are sites or apps that exist entirely in Facebook and have no value outside their site. There are other sites that barely have a 1% of their function in Facebook.

What are the drawbacks of Facebook?

In truth the only real downside is cost. You are increasing the complexity of your site therefor it can take longer to develop new features. Good developers will help minimize this by using techniques to share code between the two sites.

Breaking for a comment on the Facebook Cache

Facebook's cache is a great thing, and when you get 100,000 people instantly hitting your app for some reason, you will be glad that you have it there as a buffer. However that comes at a cost. The most visible is with images, css (the stuff that says how the page looks), and javescript. The Facebook Cache caches things forever (in theory), so a change of a logo or banner on your site will not effect Facebook without some extras steps.

Continuing; How can I see if I should have a Facebook app?

First thing is first, do you offer something that you need a Facebook user for. For example do you want to put comments on a users wall, or link recent purchases with a Facebook account. If not then you should steer clear of a Facebook app in most cases.  Second, will the extra exposure and user base off set the cost of developing the Facebook app? Third, do you think there is any value at all to any Facebook user for your application? The value does not have to be high, just look at some of the silly apps out there. Some do nothing more then put an image on the wall.

What kinds of costs can I expect if I do want a Facebook app?

That is a very hard question to answer. First most of the coding for Facebook will happen in the language of the main site. Different Languages mean a different price, for me at least. Also there is complexity of the application, and what steps need to happen just to get it ready for Facebook. 

You can expect to at least have to shore up some old code if your site has been around a while before you can even start with Facebook integration. New sites have it much easier.  Again in comes the web standards stuff I always rail on. Facebook expects to receive good html and can do some pretty silly things when it doesn't get it. 

The only real way to get a good price check is have your developer give it a once over.  See what it would cost. They can even help you in qualifying rather or not your site should even have a Facebook app. 

Facebook for advertising?

NO! Facebook is not an advertising platform (not talking about Facebook ads just yet, were talking about using Facebook as a place to advertise.) Using Facebook as a platform to discuss topics or list information or other things is great, but do not expect that you can build an app that does nothing but spam back links or gibberish about how great your site is.

That being said, Facebook can be a great way to improve your user base/reader base, and by providing good information or good additions to Facebook you can really improve your main sites stats. 

For an example, lets take this post/site/app. This site also has it's articles posted on my Facebook page, and a small comment added to my stream when I update this page. However I feel that these articles offer a good service to the public and more importantly to my clients or potential clients.  I also personally think it would be fun to have discussions with other developers about some of the topics, and other business owners about others. All that said, if your viewing this article from Facebook, then you do not see, my normal "Contact Information" or the links to web hosting, Development or other things on my site that are targeted to sell services.  That does not mean that I do not expect a increase in my main sites traffic. That is what I receive for the extra work of publishing to both places.

Facebook Ads?

Facebook ads are ads inside Facebook.  Facebook has a lot of users, but their ad network is nothing special. You may consider it good if their demographic and yours overlaps, but it could also be a complete waste of money if they do not. As with any ad network, weigh the cost against your best outcome and split test like crazy. 

Any Facebook Quirks?

Oh yes, tons! If your trying to add a Facebook app feature to an older site, be prepared for the fact that it is not just plug and play. Facebook also has some pretty strict rules about styling and javascript, so be prepared to have to "slim down" some of your site features for Facebook. For a newer site (or band new) this is less of a problem because you are going into the project knowing that Facebook compatibility is a must.  Short version, yes there are quirks, but they can be coded around or corrected in many ways. The only way to tell for sure is to talk to a developer and ask them to review the possibilities. 

Summary!

Facebook can be a great place to add value to an already existing web site, or to create a new Facebook app that has nothing to do with any other website, but it is not an advertising platform, a place for back-links, or an automatic win button. It can be great if you want to add a social aspect to your existing site, but expect there to be an increased cost as you will be maintaining both a Facebook app and a Web app.

Cool Rails Trick #638 05/28/2010

This one is more for the developers. When we developers write code we try very hard to follow a DRY philosophy. DRY means don't repeat your self, and when applied to code, it is the principal that there should be one singular place for all of the similar functionality to come from.  A simple example would be sending an email. Let say your sites sends 6 different emails. In DRY code you would have one class (or method) to send all 6 emails, and you would pass in parameters to state the differences in each email.

Good developers do this with out much consideration or thought, and we refactor our code  constantly to move the more complex examples to a DRYer state. One place that is aways been a problem historically is in the markup. HTML by default is repetitive and not very DRY. But there is a way to move it to a more dry state. 

Lets Look at an example:

One of the most common things a client asks for is rounded corners. And regardless of the technique you use, it means repeating markup A LOT. For this example I am going to use a technique that I personally use on some sites. The entire problem is that we do not want to have to place 7 divs every time we want to make a rounded corner box. This is where a ruby/rails trick comes into play.

The helper

First up make two application level helpers (so that all views can access them)

 

def block_to_partial(partial_name, options = {}, &block)
    options.merge!(:body => capture(&block))    concat(render(:partial =>     partial_name, :locals => options), block.binding)
end

This method renders a block to a partial, nothing too fancy. the options hash can be used just as if you were calling any other partial.  

def box(title, options = {}, &block)
    block_to_partial('layouts/boxed', options.merge(:title => title), &block)
  end

This is the method that gets called from a view.

 The partial

<div class="box">
  <div class="title_left">
    <div class="title_right">
      <div class="title"><%= title %></div>
    </div>
  </div>
  <div class="box_inner" style="padding-top:40px;">
    <%= body %>
    <div>&nbsp;</div>
  </div>
  <div class="bottom_left">
    <div class="bottom_right">
      <div class="bottom"></div>
    </div>
  </div>
</div>
<div class="clear"></div>

Nothing to fancy here. notice the <%= body %> and <%= title %>. body is the block, title is in the options hash (check the helpers).

The View

<% box "About Us" do %>
  <p>
      This is some text for inside the box.<br/>
      <%= image_tag 'some_image.png %>
    </p>
<% end %>

Nothing complicated here. But as you can see any elements or other blocks can be nested inside this. And it's not just limited to rounded corners. Think about any place you might want to use a partial but theres just too much to pass into it, this will work there. 

Installing Rails on Production in 12 Steps 05/13/2010

I always try to get my clients to use the right host for them. In many cases this can be a VPS or dedicated host. When clients choose VPS or dedicated hosting, responsibility for setting up and maintaining the box belongs to me (at least as far as the site's production environment is concerned). That means I spend some time installing rails on clean hosts that have never had anything on them before. Below are the 12 steps I use to setup a new box for rails. It does assume that you already have apache setup and running, if you prefer nginx, adjust accordingly

 

  1. sudo apt-get install git-core ruby1.8 build-essential libssl-dev ruby rdoc irb libopenssl-ruby imagemagick libmagick9-dev ruby1.8-dev libmysqlclient15-dev apache2-prefork-dev libapr1-dev postfix libaprutil1-dev #install some prerequisites
  2. wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.6.tgz #you can change the version of rubygems
  3. tar -xzf rubygems-1.3.6.tgz #but make sure to change it here too
  4. cd rubygems-1.3.6 #and here
  5. sudo ruby setup.rb #this installs rubygems 
  6. sudo gem1.8 install rails #notice the gem1.8 thats default so as not to clash with system wide version of gem
  7. sudo gem1.8 i aws-s3 #I use this a lot, no harm in having it intalled if not used, so it gets a step
  8. sudo gem1.8 install --version=2.12.2 rmagick #later versions of rmagic do not work with packaged versions of imagemagick, this helps avoid that problem
  9. sudo gem1.8 install mysql
  10. sudo gem1.8 install passenger
  11. sudo passenger-install-apache2-module #follow the on screen instructions
  12. configure things like disabling tls for postfix and your applications path.

This does assume that you have apache installed, that you want to use apache and that you want to use postfix. Some of the gems (and their dependencies) are optional, but I use them a lot for example imagemagick is used for pretty much all inline image manipulations. Don't forget to disable postfix tls (or properly configure it). You will also notice I did not install mysql server. If you want to run it on the same host as your web server then install it, otherwise install t on a diffrent server, the client libs are all you need for rails.

 

 

To Flash or Not to Flash 05/11/2010

Steve Jobs, CEO of Apple computers has stated in this letter, that flash will not be on the next generation of mobile computers from Apple, and will likely never be. he cited a few good reasons, and a few not-so-good reasons.  What does that mean to you the website owner, and to me, the developer. Not much, but that is what were going to explore. 

The reasons:

To summerize these are the reasons he gives (as I interpret them) and my thoughts of how they effect you, the site owner.

  • The proprietary-ness of flash. This is true, any new flash player would have to come from Adobe, and while they are quick to make new versions at times, they can also be very slow. I don't know of any mobile device that has flash support, and support for flash in Mac and Linux can be dodggy at times. What this means to you is that websites should not be created that depend on flash for critical function. Navigation, and core user interaction should not be done using flash. This is an old rule, but one people sometimes forget. Even Adobe themselves do not use flash for navigation or critical user interaction. 
  • The Full Web. Honestly I think this is more of a "but we can do this" then an actual point. But do keep in mind that most of the animations and such that you would normally associate with flash can be done in JavaScript, and done in a manor that any browser can still use the site, instead of just the ones with flash plugins installed.
  • Reliability, security and performance. This is just plain true. Flash in most browsers is unstable at best. Again keeping your critical interactions out of flash helps avoid this problem, but if your website crashes someone's computer every time they his the "more info' page, they will stop hitting that page. 
  • Battery Life. Not really our concern, but CPU usage can be in a heavy web app. Though testing should cover this, but for us this has no barring on you as the client. 
  • Touch. Steve Jobs states a good case for touch devices like the iPad and iPod, but it's also true (for us non-Apple CEOs) the we make considerations for interfaces that don't use the mouse, or don't have a keyboard. With more and more people using phones to access the web, and the increased number pf people running on tablets, or touch screens, the ability to hover or click is not a given anymore. This is a valid point and one that should be considered for every web interface, not just in relation to flash. 
  • Because Apple wants it that way. Again, doesn't really effect us, but his main case is that Flash is intended to make the best cross-platform app and not the best Apple product app. It's valid, but doesn't effect us when building a site.  Some things to keep in mind though, specially for heavy applications, users expect things in a certain place. Menus on top, Save buttons on the bottom. Be careful when breaking those rules-of-thumb or you could wind up with a lot of unhappy end users. 

What it really means:

Nothing to drastic. You, as a website owner need to be aware that flash will not work on iPads, iPods, iPhones, or other iThings, but as long as you follow simple rules about flash usage you should be fine. 

Flash usage rules:

  1. Is there a more standard way, if there is do it.
  2. Don't load critical site functions into flash. Take a look at You-Tube, they use flash for videos, but everything else is javascript.
  3. Never use flash for navigation, not only can it leave you users without the ability to navigate the site, search engines can't read it.
  4. Flash should be used sparing, if at all. Not just because of Apple, but because it uses more memory and CPU power then normal html. Try to keep the instances of flash to 1 or 2 per page, if you need more then that re-think your design.

Some good things to use flash for:

Ok, so we have bashed flash a bit, but there are some good things to use it for.

  • Video playback. Sure other formats work, but remember the 90s and all the embed tags and the horrid mess with windows media player/quick time. 
  • Games, take a look at some flash gaming sites. It's a great language for browser based games. 

The coolest things to git 04/29/2010

Ok I like git, I love it, and I use it from 100% of my source control. Even when clients require SVN or something else I still run a git repo to help version the source, It's just better. 

Now what I am not going to do in this article is go over the basics. If your not sure what git is or why its better then the others, or why you should be using it, then I suggest you read a good git tutorial. I am instead going to tell you about the most awesome solution to the biggest problem I have ever faced with code sharing.  This is like finding out which came first the chicken or the egg, and having tangible proof to back it up.

The Problem

How do you share a code base, on a project level between 2 or more sites so that changes to one, do not have to effect, but can effect, the others sharing the code base?

Some history

Ok, enough of that on with the story. A few years back, I worked on a website. Actually several websites for one client. These websites all looked basically the same and had basically the same features, except some times a new field on a form, or a slightly different workflow. We (I was working with a team of other developers at the time.) had created a base website with the hopes that it could be our template and that we could extend it for all the other websites. Normal developer inheritance stuff. And here is where the fun started. One day we would get asked for a feature is site 1, we would dev it, deploy it and it would be loved. Some people would ask for that feature in site 2 and site 4 but the owners of site 3 feared change and didn't want  that feature. Well obviously that can't be included in the core/base without some kind of switch to turn it off. Repeat this about 900 times (this was over the several year lifespan of the product) and what you ended up with is three developers sitting around a table trying to figure out which bits of code to copy and paste into the new system to make it work the way the client wanted it.  Then several config file switches and compile time..... It was a mess. A horrid mess, and even though we rewrote the code base 5 times, we never figured out a way to get it right. Closes we ever came was Class inheritance so deep that it would make your mind spin. And even then, if someone wanted some feature from a different chain of parent/child classes, back to copy in paste. but at least this time, it was all top level copy an paste. It didn't take long before out superficial "top" classes were holding 90% of the logic and the bases classes we overloaded so much that they could almost not be there.  

The passage of time

Well, I left that job, and started my own company. I have a few plugins I use to speed up development but I have not entered into that situation where clients wanted the exact same thing but just a little different, and when I do see something like that, I know now that linking up two code base for a small amount of shared code is a disaster and I avoid it. But the original problem remained, I am just able to avoid it better. The plugins are nice but any code placed there would mean that every site using that plugin would now use the new code. That was all find and dandy up until a few months ago.

The problem again

I have a client who does affiliate marketing. They are very good at what they do and make quite a bit of money doing it. They have several site, one of the most successful is Sports Betting Professor. Recently they have started gearing up development for a new 2.0 release with members areas, better affiliate marking integration, better payouts for their marketers, the whole nine yards. They also recently launched another product, 5 Days to Freedom. Their new product attempts to show people how to be successful at affiliate marketing, and does a pretty good job. However, for me, this is where is gets bad. I get an email from one of their head guys that states that they like the features that Sports Betting Professor has and that they want to have them in 5 Days to Freedom.   Sports Betting Professor is no small project it's been in active development and usage for years now, 5 Days to Freedom is no small work on it's own ether. Now both sites need to benefit from code changes, big fixes, config changes etc. etc. but keep the ability to be two distinct websites. It's the original problem all over again. My dev-sense tells me to "share code" but my experience tells me doing so will cost my clients an enormous amount of money, and leave me hairless, and twitching in a corner somewhere. 

The Solution

This is where git comes in and saves the day. Lets skip the "how I worked it up" and get right to the solution. Again, I don't intend to tell you how to use git, you should know that already. 

  1. Make a direcory for the "core" project
  2. git init it
  3. make a change
  4. git commit that change
  5. now leave that project directory and make a new project directory
  6. git init that directory
  7. create a git branch, name it something to remind you that, this new branch contains the shared code base.
  8. add a remote "origin" to both the  core project and the project it's based off of
  9. add a "core" remote repository to the new project (the one thats going to have the core code included into it.
  10. now add a remote repository linked directly to the new core branch. (something like git remote add core git@gitserver.com:git.git)
  11. tell git what you want to pull where (git config branch.core.remote core and git config branch.core.merge master work nicely)
  12. go ahead and git pull (while your working on branch core) and your core branch will include stuff from the base project. 
  13. git checkout master then git merge core and tada your 90% there you can add new code in core to your new project with ease. 
  14. Now getting changes in the new project back to core.
  15. Limit what you push on your new branch or you will wish you never tried this. (git config remote.core.push refs/heads/core:master)
  16. now when you make a change you want to "share" with core, and thus all all branches of core, commit your changes (remember the ENTIRE COMMIT will be added to core so segment it well)
  17. git checkout core
  18. git cherry-pick master (this brings the last 1 commit back into core)
  19. git push
  20. when your in a good spot to do so you can git pull and git merge in your "sub-projects" to bring in the new code. 
  21. Don't forget to git checkout back to your working branch. 

Was that awesome or what

As I said, those looking for a step by step tutorial need to look over the git man pages and git tutorials better. For anyone that uses git on a normal basis, this should do it.

What it's not

Don't go using this trick for evil, this is not class inheritance, this is more like project level inheritance. A well structured app and code base are absolutely essential even with this method. This just allows you to have two or more sites (or anythings) with some common code and some separate code. There are lower level solutions for this such as dlls in .Net, plugins in Rails and other things if you just need to share the same functionality. But if you need to sometimes share and sometimes not, then give this a try. Also if you get into changes where site1 site2 and site4 need a feature but site3 does not. Then you can add another branch. This keeps your "features" a set of git merges and not horridly overloaded, bloated feature sets that need to be in each place, but maybe turned on and maybe turned off.

Error Codes 04/26/2010

Websites can create many different error codes. These error codes are segmented in many ways. I get asked, mostly by new clients with problem sites, what the different errors mean, and why they should care. One thing is true, the end result is the same, users aren't getting to the parts of your web site they want to. A complete list of codes can be found here, but I am going to go over the most common ones.

Success Codes

These codes indicate that everything is ok. They are returned when everything is working fine. 

  • 200 - Everything is fine
  • 202 - Accepted for processing
  • 204 - No content, Everything is fine, but I have nothing to return.

Redirection Codes

These codes should never been seen, but you might here developers or designers talking about them. 

  • 301 - Moved Permanently, it used to be here, but it is not forever over there. 
  • 302 - Moved Temporarily, it used to be here, but it might be back here again in the future. 
  • 304 - Not modified, the data is the same this time as last time, no need to re-download it.

Client Error Codes

These state that something is wrong with the browser not the site. Most of the time it's a typo in the address bar, but some times links on a back can cause these too.

  • 400 - Bad Syntax, usually a bad letter in the URL
  • 401 - unauthorized, Your not allowed to go there
  • 403 - Forbidden, You are authorized, I know who you are, but your still not allowed here.
  • 404 - Not found, I can't find what your looking for. Usually this is cause by typos in the address bar. 

Server Error Codes

These errors designate something going wrong on the server. Usually they generate a traceable exception.

  • 500 - Internal Server Error, This is the grandaddy of all errors. It means something has gone wrong and it's time to call a developer.
  • 503 - Service Unavailable, The server is busy or otherwise unable to handle the request, but if you try again in a moment it should work.

Remember

These codes are just the general ones. They are also grouped by numbers. If you see any of these you should ask your developer for help. One more time a quick run down.

  • 100 - Information 
  • 200 - Everything is fine
  • 300 - Look elsewhere
  • 400 - I have no idea what your talking about
  • 500 - Oops, the tea pot blew up.

Rails Hosting Situations 04/14/2010

Over the past few weeks I have seen a resurgence of clients asking for smaller ruby on rails websites to be hosted at less then useful shard hosting companies. Because of this I thought I would take the time to explain a little bit about hosting options and what they mean to different languages. 

Shared Hosting

This is the low man on the totem pole. Typically you share a server with 100s or 1000s of other users, you are severely restricted in what you can do, but the cost is pretty low (around $5 a month or less). The good new is that this is perfect for tiny, small, uncomplicated sites that do not receive a lot of traffic.

Ruby On Rails: For rails sites this is almost always a no-no. There are some great shared services out there for RoR sites, but you will certainly grow outside of them very quickly.  However, if you want the cheaper price and have a low amount of traffic, you could make it work. I do however recommend you go with a hosting company that specializes in rails and not one that just "supports" it. 

PHP: PHP is a very interesting situation. The shared hosts can usually run smaller PHP sites without a problem, but if you try to run a PHP Web App your in for a rather large head ache. The real problem here is it is hard to tell when you cross the line. Most php code is just html files with a bit of dynamic code in them. Real PHP applications (where the entire app is written in php) usually don't run that well on shared servers.

.NET: You can just forget about this. Don't even try it. Even if you find a company that supports it. Don't. It won't work, the framework is not designed for it.

VPS (Virtual Private Server)

VPSes are great, they are the mid range between owning your own in house server and shared hosting. Basically, you get your own server that is yours, and you can do with it what you please. The only restrictions are on CPU and Memory usage. Typically, you are expected to "Play nice" on CPU usage (don't consume 100% all the time) and use most or all of you allotted ram. On the technical side, your server is virtual and is sharing the same hardware with other people. You never see this however as you (and they) are contained inside your virtual server. Average cost of VPS servers varies but starts at around $20 a month and can grow to several hundred depending on your needs. 

Ruby on Rails: This is the holy grail of Ruby on Rails hosting. You can host your application, configure the server to do what you need, and be done with it. This is just as good as having a in house server, except you don't have to have a server in house. 

PHP: Same as Rails. Most people/sites will never find a better fit then this without a new technology being developed. 

.NET: There are some VPS companies that offer .net platforms, but .net is such a power hungry beast that the cost to you is nearly the same as dedicated servers. For that reason, I suggest staying away from VPSes for .Net.

Dedicated Hosting

Dedicated hosting is just what it sounds like, you are given a real physical machine, in someone else's data center, It's yours, and you can do with it as you like. Cost is usually much higher then the others (in the hundreds to thousands range). Today, there is not a good reason to use a dedicated host for PHP or RoR applications. If you have a .Net application then dedicated hosting could be a decent option. This is not a option that I normally recommend to anyone. If your big enough that you need dedicated machines, it's time to start looking for in house solutions. 

In house Hosting

I usually advise against in house hosting. If a company already has a data center then that is a different story, but if it is a new company or start up, there really is no reason for in house hosting under normal circumstances. Hosting your site in house means you are responsible for everything from the telco-demarcation point to the server software it's self. Normally this is not a very wise thing to do, until you are the size of Google or Amazon. Basically if you don't know what In house hosting is, then you don't need it. If your an owner or client, and want in house hosting, then you would start with hiring an IT server staff and "building" a data center. That being said, with the exception of Dedicated hosting, In house solutions are basically the only option with .Net.

What can go wrong?

If you pick the wrong level of hosting, your going to be in for a bit of a headache. You will either have a poorly preforming website, or a hosting account that you need a refund on. I strongly advise you to talk to your developer first before you make a hosting decision. If thats not possible(i.e. upgrading a current website) just be aware that changes may need to be made.

Notes on popular hosting providers:

Godaddy: Godaddy is a domain registrar, and a sub par one at that. A lot of people use them, but they value quantity over quality. I advise you to stay far away from Godaddy. For DNS registration use Enom or similar. In particular their hosting is tremendousnessly horrid, until you get into their dedicated servers (at which time it becomes passibal, but never great). There are better solutions out there, though they may come with a higher price tag. 

Hostgator: Hostgator is what I would consider a bare minimum. Their support leaves a lot to be desired, but they do try to help. If your set on using a shared server, then Hostgator is a good place to start. 

Slicehost: If you want a VPS this is the place to get it. decent prices, easy admin, best support on the entire planet (as far as hosting companies go) and they actually use their own product. I recommend this to every single client I have. they have slice sizes across the board to meet any budget or requirement.

RackSpace: Oddly enough Rackspace now owns Slicehost. I find their support to be less then that of Sliceshost's but still quite acceptable. Rackspace is more geared for dedicated hosting, and that's what I recommend them for. They are not the cheapest around but the are  the best (in my opinion).

Serverbeach: Another dedicated hosting company, stay away from these guys. In the past when I have used them, they had horrid support, and very poor quality servers. The price was very cheap however and a lot of people use them because of this. Specially for .Net hosting. 

A quick note on the notes. These are the companies that I get asked about most frequently. There are other hosting companies that do worse or better then the ones listed here, however they do not come up in conversation as often. At the same time, I understand that others may feel differently about the listed hosting providers then I do. Different experiences may have influenced their opinion in a different way then mine.  That is ok. I do not force my clients to use any particular hosting provider (unless there is a programmatic need for it i.e. Amazon S3 or EC2) and will attempt to use which ever they choose. These are simply my recommendations.

Can SPAM 03/31/2010

The CAN-SPAM act is a horridly named law that was put into place in 2003. More and more ISPs and email providers are getting strict on the rules. So I thought I would let you guys know what it means for you and how you can avoid being caught by it.

 

The Awful Name

 

When I read CAN-SPAN I read it as  the “allow to spam” act. It’s intention was more along the lines of “ditch or disallow spam”. Try to keep that in mind when trying to comply. The rules are “deny first”. So unless you meet ever single rule, you can get dinged.

 

The penalties

 

Not adhering to CAN-SPAM rules can cost you up to $1,600 an email. So if you send something to 50 people, and do it wrong, that can cost you $80,000.  Now imagine you did that to every member of your website, or all your customers, or that huge mailing list you just got.

 

Who does it apply to

 

It applies to any and ever email that is sent when the emails primary purpose is selling or advertising a good or service.  That means every email, even when your sending a single email to one of your customers just because you think they will be better served by an upgrade or downgrade.  There are no exceptions for B2B emails or emails that offer free services or goods.

 

How to comply

 

Compliance is a bit of a pain the first time you do it, but after that it’s not so bad.  Just follow these easy rules:

 

Use only valid email headers, this can sometimes be a problem if your mailing from a website or forum software directly, but most of the time this is not a problem and is automaticly taken care of by your email program. If your not sure, send your developer an email and ask them to check. It’s very easy to check.

Subject lines must reflect the content of the email. Plain and simple.

Declear the email as an ad. Nothing fancy here, but don’t try to send ad emails that don’t look like ads. Just clearly state that the email is an ad or give the pourpose for the email.

Tell the recipiants where you are located. Every email should contain your physcall address. Normally this is included in the footer of the message.

Tell the recipiants how to opt out, then honor the opt-outs. Make sure that you include some way that your recipiants can stop getting these emails, then honor the request to not receive them any more. You have 10 days to proccess their request. A return email address is usually a good way to handle small lists. Just make sure that it’s easy to find and that you honor their request. This is the big one that gets people into trouble.

Make sure that if your using a SAAS solution, or contract out your mass mails that the people your having do it are honorable. You are sill legally responcibal for the emails and their compliance.

Some tips for complaince.

 

If your using a HUGE list of thousands, then use a third party service like icontact. They handle this stuff for you.

If your using a small list of 1-100 people and just sending manually or via forums or other automated tools, test it first, and ask your self, “If I wanted to opt-out, is it clear how to, can I find the physical location easly?”

Make sure you are being honest. Clearly state that the email is an add. Make it clear. Don’t try to trick someone into clicking a link or some such, just be strait forward.

Never send the emails through your ISP with out checking with them first. This will just cause a problem for you. Make sure you contact them first with your intent. If they don’t allow that many emails (and most won’t) you can use a third party like authsmtp.  In both cases, they can help you be compliant if you need help, and will surely help make sure the headers are correct.

Never send emails from a website like a blog or forum with out checking with both the developer, and the hosting provider. Many “pre-packaged” sites have mods or plug-ins that can send large amounts of emails, but 9/10 hosting providers (myself included) will block large amounts of emails, or even disable your account.  While websites are generally allowed to send a low volume of emails (like new user sign-ups, or sales receipts), but mass mailings, even to a few hundred, could really get you in trouble.

Create an opt-out method for your users that is internet based. For small lists, “Send an email here” is good enough, but you have to be committed to reading it, and removing them from the list. For larger lists the “click this link” or “login here and un-check this box”  are good automated methods.

Always send from a real address. Don’t use a made up address like “no-reply@domain.com”. The address it’s self is fine, but the address should exist, and it should be monitored, at least a little.

Don’t purchase or rent email lists. You need to be able to prove that the people your emailing have a relationship with you. Use opt-in forms, or membership sites, customer lists, etc. It’s easy to build a list. Purchasing a list (or renting one) is a sure fire way to get in trouble.

Make sure your list is kept up to date. Don’t use a list from a product you stopped selling seven years ago.

Remind your recipients where you got their email from. Even if they just bought something last week, some people will need reminding.

Complying with the CAN-SPAM act is not too difficult, and spending a little extra time upfront to get it right is worth it. Not complying can get your domain added to a list of spammers, fines from the FTC, and other not so nice things.

New Malware Trends 03/31/2010

if you have been following Internet trends then you have surly read about Google marking the entire internet as Malware. Well, they fixed that a long time ago. But newer borwsers including both Firefox and Google Chrome are using the Google database of malware sites to pop up warning messages if you try to go to a site that contains or links to malware.  What that means to you is that if you provide or link to malware your visitors will get a very ugly and nasty message about hwo unsafe and dangerous your web site is. Most visitors will not know how to by pass this warning, and even fewer will be willing to.

 

First things first

 

Malware is not virus. It has nothing to do with viruses, other then both are bad. Malware is just bad software. Most of the time when talking about websites, it’s a cookie that is left behind with certain permissions, or an image that is loaded from a traffic monitoring server that uses that data for less then legal means.  Most of the Malware is installed by the site owner or developer without ever intending to do so.

 

What this means

 

For end consumer websites (where the visitor is doing the buying or reading), getting this message will stop most of the traffic to your site resulting in fewer sales, or less income from ads.  For SAAS websites it means that all your clients will have their traffic blocked, and they will be very angry with you, and will likely no longer be your customers. The same goes for link list providers and other directory services.

 

How to prevent

 

Prevention is obviously the best thing to do in this case. It is however very tricky and easy at the same time.

 

First make sure that you only link to quality sites with no malware on them. You can only be dinged if you link to malware sites, not if they link to you. Make sure before you include links to any site you check it thoroughly. For forums, blogs, and other consumer drive content sites, I recommend disabling automatically linking all URLS. This means the users can still type in URLs but that visitors have to copy and paste the URL into their browsers. This separation keeps you from getting dinged by a user pasting in a malware site link.

 

Second avoid including anything from a less-then-quality source that says things like “past this code on your page”. That is the number one way to get on the Malware list. A lot of these services come across are traffic watchers, Traffic boosters, or such.  Some come across as totally legitimate services like tickers, and contact forms.  The best advise I can give here is “just don’t”. Of course sometimes it’s needed for site functionality, and that’s ok, just make sure you know where it is coming from (i.e. Icontact forms are ok because Icontact is a known provider) and make sure that you keep a list of when you have made this exception so that they can be easily removed if need be.

 

Getting off the list

 

Ok, so something happened, a user posted a link, you included a counter you shouldn’t have, that last image you posted was actually hosted by someone who got dinged, or in most cases, a site you have been using for years just got added to the malware list for some reason.  Well, removing your self from the list is very simple. It involves making a google account, verifying you own the domain, removing the offending content, certifying that you did so, then waiting about 3 days.  It is a very simple thing to do, and if your already using Google analytics, your half way there.  I can help with this if need be, or most other developers can too. Removing the offending content is the hardest part, the rest is basically just paper work.  Again the best method is prevention.

Older Browsers 03/31/2010

 thought I would take a moment to comment on this as it effects my customers directly. Google announced that it would be dropping support in Google Apps for older browsers.  I have always advised my clients to make sure their sites are standards compliant and that doing so would mean that they would continue to work in future versions of browsers.  Any site that I have created will work in newer browsers without any problems. But for thoes of you with many sites or sites that have had many developers, this could be the start of a very intresting trend. There are two trends that I wish to point out.

 

Dropping of old browser support

 

While this does not mean that you can stop development for IE6 if thats what your customer base is using, it does mean that you should start, at the very least, including code for modern browsers. In time this will have a recipicating effect. As more sites move away from IE6 few people will use it, and newer browsers will be less tolorant of IE6 workarounds(taking advantage of browser bugs to get something to look right on IE6). This is very likely to mean that certian things that you have done in the past for IE6 compatability will break newer browsers.

 

The solution; If your one of my clients you already are doing it. Make sure your developer writes standards compliant code.  Stop using IE6 fixes. If your developer is not doing this, demand that they do. A quick test can be run at http://validator.w3.org/. Just make sure you ask your developer why there are errors. There may be a good reason for one or two errors.

 

Adoption of new browers

 

Dropping old browsers or course means accepting new browsers. Most new browsers have some type of mal-ware detection in it. Google and Firefox (along with many others) use a shared database of malware providers.  If your on this list, or link to someone on this list, users will get a nasty warning message saying that we website is unsafe. This is a new trend in the latest browsers and has hit a few of my clients for something very simple. For example, one of my clients got hit because they linked to an image on a site that provided malware. This got them added to the list. Removal from the malware list is very simple and easy to do, but can take 2-3 days. Image what would happen if your site was down for 3 days because you just linked in to some ad server or something completely legitimate.  The best method to protect against this is be aware. Do  not link to other untrusted sites, and make sure that your developers are not as well. Most of this stuff passes off as traffic tracking, or ad tracking. Use only respected traffic tracking providers such as Google or Yahoo. Stay away from smaller services unless they have been throughly checked out. When linking to other sites, be aware of who your linking to and know that if they provide malware, your site will be added to the list of “bad” sites because you link to them.  I will make another post about this in the near future. For now it is important to know that as older browsers are upgraded, more people will be seeing there “bad site” error messages, and the data bases of bad sites will be growing.

What is in a SLA 03/31/2010

SLA. is an acronym for service level agreement. Basically it is an agreement between a client and a provider that states that the provider will gaurentee a certian level of servce.  That being said the term can usually be very misleading.  It’s that time of year again and compnies are reviewing the “final, final, revised, final”, version of this years budget. The people in charge of picking hosting and internet providerrs and such are trying to get in their last minuet picks before that new contract is signed, and I am getting questions from small and large clients alike, asking me to decphier some of the SLAs being offered by both hosting compinies and internet providers. I thought I would take the time to provide a quick overview of how to do this and to debunk a few of the myths out there about SLAs.

 

 

 

What they give you:

 

SLAs are more like a coupon for nagging then they are an actual agreement. Typically SLAs are written so you get a discount or a service if the SLA isn’t met. They normally do not let you off the hook from a contract, and I have never seen one that promises to give you money back (doesn’t mean they don’t exist). It does however give you a good base line of what to expect, service wise, from your provider, and a good point to start being dissatisfied if something goes wrong. Again, you want to think of a SLA as a point to start harassing the sales/complaint department, rather then the deal breaker.

 

What they cover:

 

For us, SLAs cover mostly server uptime, service availability, and Internet availability. For example HostGator states, on it’s home page, “99.9% Uptime Guarantee”. ISPs for commercial use usually prove an SLA of bandwidth pipe (i.e. so slower then 5mbps). Server companies like Rapid systems provide SLAs on server availability (100% Network Uptime SLA)

 

What they don’t cover:

 

Now here’s the fun part. While the SLAs cover some things, they are in truth pretty narrow. For example, the HostGator example above measures their uptime as “The uptime of the server is defined as the reported uptime from the operating system and the Apache Web Server which may differ from the uptime reported by other individual services. (refrence)“. Basically they decided rather their hosting is up or not, if it’s not then you get a credit (on next month) not your money back. They do not let you use your own tools to do the measurement.

 

Server beach (sla details here) have a much more detailed SLA, but it is also restricted in several ways.  Timers for the hardware SLA start “within one hour following PEER 1’s receipt of Customer’s trouble ticket concerning the hardware issue and PEER 1’s identification of the failed hardware”. It also states, “The Replacement Guarantee does not include the time required to rebuild a RAID array or the reload of the operating systems and applications or changes to hardware during Maintenance, as defined below.” There are also other statements that state “PEER 1 guarantees that the PEER 1 network will be available 100% of the time, excluding Maintenance, as defined below.” And goes on to define maintenance as “ …Scheduled Maintenance or Emergency Maintenance.”

 

Again we see the scope is very narrow and only overs a very few things. It also shows that 100% uptime is not really 100%.

 

What to look for:

 

That does not mean that the SLAs are pointless. It just means you need to read them carefully and know what they are saying. The two main things to look for is how the percentage is measured (from Serverbeach: “….100% of the time in a given month”) and make sure that the time frame is normal. A daily SLA is best, but monthly is more common.

 

Also keep an out out for the excluding circumstances. Like power outages and hardware failures. Again to use ServerBeach as an example there replacement SLA is 1 hour after they figure out the problem. It could take them 6 months to figure out the issue (using an extreme example here).

 

Look for SLAs that measure simple things. And get clear definitions of words like downtime, uptime, and service. Also, if your going to look at SLAs, try to get one that give your a quality of service (like a certain speed on an internet connection) over one that just guarantees existence (your Internet will work).

 

Keep a close eye on the “what to do when stuff goes wrong” part of the SLA. If there’s an automated system for handling SLA complaints that shows that there is a large number of SLA problems being submitted (though they may not be valid). On the other hand, if there is no resolution section, it shows that the company is not serious about it’s SLA. I like to choose one that is a “call Fred, or email Lucy” situation.  At least I know that I will have someone to complain at when something goes wrong.

 

The Best SLA:

 

The best SLA I have ever seen is this one (from SliceHost);

 

 

 

Do you offer an SLA?

 

Not for Slices and here’s why: most hosting SLA agreements are just plain silly. They promise things like 99.9% uptime, but downtime excludes: scheduled maintenance, network outages, hardware failures and software trouble. Well what exactly is left to cause downtime? Here’s our SLA: we’ll do our best to keep your machines running smoothly for as long as possible and get them up ASAP should something go wrong.

 

 

 

 

 

I think that is the best SLA I have ever seen and Slice host has never let me down.

Linux v.s. Mac OS X 03/31/2010

First a couple of quick notes. I tried to be objective when doing this review but I am a huge Linux fan, I prefer that OS and so there is a chance that some of this is biased.I compared Kubuntu 9.04 and OSX 10.5.7. Neither of them are cutting edge, but they were both stable and worth looking at.

Installation

Winner: Linux

Details: Neither install was very complicated, so what it basically came down to, for me, was “How much did I have to interact?”. OS X required more interaction. There were more things to fill out. In addition, the OS X installer did not make it clear how to go about formatting and repartitioning the drive, while the Kubuntu installer made it very clear and suggested an optimum layout. OS X had extra steps revolving around the registration process and tried to get you to sign up for a mobile me account as part of the install. Kubuntu went very smoothly and basically the only thing I had to enter was my user name and password. As a bonus the installer disk also functions as a live CD letting you test out the system first. OS X lacks this feature, even though the installer appears to be running in a slim version of the OS.

Configuration

Winner: OS X

Details: After the install OS X was pretty much ready to go. You still had to configure specific applications like mail, but kmail has to be configured in Linux. In Linux however, a few things needed adjusting. Mainly enabling restricted drivers and such. Again not much difference, but this one goes to OS X because it required nothing extra, while Kubuntu required me to click two buttons and wait a few seconds.

 

Customization

Winner: Linux

Details: This was a hands down victory to Linux. OS X does not let you customize very much at all with ease. Basically you can pick your background, change some sound settings and that’s about it, without diving deep. Kubuntu on the other hand has tons of things you can customize without having to look very far. At the same time when it comes to getting your hands dirty OS X seems to want to discourage modifications while Linux encourages them. It should be said that part of the OS X “idea” is that you should not need to customize, while the Linux “idea” is customize everything even the OS it’s self.

Application Availability

Winner: OS X

Details: Sorry Linux guys, I’m a Linux guy too, but OS X can run most “Linux” software plus they have a larger range of commercial software. Granted, it’s usually difficult, at best, to get the Linux software to run on OS X, but it will run. In pure availability terms, OS X wins

Application Support

Winner: Linux

Details: OK OS X fans hear me out. Linux has a whole community of people who’s hobby is to help others get their Linux software working. Sure OS X has commercial support but commercial support sucks in comparison to open source support. With Commercial support your usually stuck waiting for a response, or they blame other software on the system. Linux support groups tend to just fix the problem and worry about blame later, though that is not always the case. In addition, with fewer people running the Linux software on a mac you can really get into “edge case” land pretty fast. Commercial software of course does not have this problem. Linux gets the win for support simply because there better at it, and there’s more people doing it (along with more venues).

Application Installation

Winner: Unknown

Details: Linux has package management systems. I prefer them. But if the application you want is not in the repo it can get complicated. OS X has an awesome installation feature but first you have to find what you want to install. Linux is better at installing stuff when you know what you want to do, and the package is in the repo. OS X is better at installing stuff with out a repo when you know what application you want. Linux is better at removing applications and their dependencies. OS X has a more intuitive ‘uninstall” feature. It’s all about preference in this one. I prefer package management, others prefer one-off installs.

Looks

Winner: OS X

Details: OS X gets the win simply because it comes all ready looking pretty nice. Linux has way way more eye candy but you have to work to turn it on.  You can make the two look identical if you like, but as stated OS X gets the win simply because it looks better at the start. If I ran OS X and Linux for 6 months each, the Linux box would look better. But right after install OS X looks better.

Community

Winner: No one

Details: This is just gonna make both sides angry. Linux has a larger, more interactive community. However there are Linux zealots that will tell you your going to hell if you don’t compile your own kernel and write all your email in hex. The OS X community is almost the exact opposite. If your not using the application of the month then your likely to get tared and feathered when you ask for help. Both can be great resources, but both can be aggravating when you just want something to work. In addition the OS ideals effect the communities strongly. Ask a Linux user for help and there likely to give you a 50 step process with 20 options along the way. Ask a OS X user for help and your likely to get “you can’t do that”, even though you really can. Both side have their pros and cons and it’s a person choice rather you use/participate in the community or not. For that reason there is no winner.

Summary

The only real diffrence between OS X and Linux is prefrence. If you want to customize your computer and such, then Linux is the move for you. If you want to have commercail applications then I would take a look at OS X. Both are extreamly easy to use and setup. I choose Linux over OS X personally because I like to make modifications and such. However I feel right at home on a OS X computer. Personally I think Linux is a stronger platform, but that really comes down to my love for Open Source software and not anything that can be measured or quantified. In reality the choice between Linux and OS X for a personal computer is limited to prefrence.

Google Voice 03/31/2010

I Finally got my Google Voice invite this morning, and I must admit it’s pretty cool. Google does a pretty good job of showing off their features at their site, so I won’t go into all of them. The important info for my customers is this. My phone number is changing. Don’t worry, the old numbers aren’t being turned off, I just want to direct my phone calls through google voice so I can use it’s features.

The new phone number is (813) 421-4338.

What features make it Google Voice good for me:

  • Better voice mail with transcription
  • The service rings multiple phones at once (in case I am not carying one, or am out of the house)
  • SIP integration. (VOIP direct integration)

What does that to you the customer:

  • As any customer of mine will tell you I answer emails pretty quick (usually in a few seconds during normal hours). This speed of reply now falls over to voicemail as well.
  • Less time waiting for call forwarding to kick in when I am not sitting at my desk in front of my business line.
  • If you are one of my clients that uses VOIP systems we can now talk direct in a more integrated fashion instead of having to use trunks on both sides to communicate over POTS just because were on different systems.

80/20 03/31/2010

So what makes a good piece of software? Where should you do your most UI tuning? How big of a server do you need? How much traffic can your application handle? Well the best answer to all of these lies with the 80/20 rule.

OK so it’s not a technical rule like “controllers should have a plural name”. But it is a good rule of thumb. There are many variations. The first time I herd it was back when I was studying for my CCNA. It was presented to me as “You will use 20% of your knowledge 80% of the time”. It holds true. Most of the time everything is a nice standard flow, and everything is going great. Its that other 20% that really causes a problem.

Let me give some examples. What makes a good piece of software? 80% of the time end users should be using 20% of your software, but the other 20% of the time, users need to be able to function as well. Where should you do your most UI tuning? 80% of your user base should be able to access the same 20% of your functoriality, without having to look for it (think of a dashboard). How big of a server do I need? 80% of the time your server should be operating at 20% capacity, 20% of the time it should be at 80% capacity.

The 80/20 rule is a great rule of thumb for doing a quick analysis of your current status on things. Lets look at the server example. If you take a look at your server stats for the last month, and 99% of the time your sitting at 0.5% capacity, the other 1% you jumped all the way up to 10%. You probably bought/leased/acquired to large a server. Time to do a full analysis to determine how you can better utilize your hardware. At the same time, if 60% of the time your running at 40% capacity, and the other 40% your running at 100% capacity, you have no room to expand. Time to price out some new equipment/optimize your utilization.

In all cases the 80/20 rule is just a measure used to determine that something else needs to be looked at. No one should use it for actual metrics. But it is an easy figure to match in your head.

Menu Accessability 03/31/2010

Today navigation is an important part of any website. Choosing a menu system can be one of the most challenging portions when your picking out your site layout. Here are a few guidelines to help you out.

Lite use of javascript

With all the different browser compatibility problems you will most likely end up using some java script, even if it’s just to emulate the hover pseudo css class. But if you are relying on javascript too much, your going to have a problem.  Don’t misunderstand, using javascript for animations and other visual effects is fine, but you should try to avoid if for core menu functions(hiding and showing menu items). Also it is much better to set css classes then element styles. Setting classes means that you can change things easier from the css file. Setting styles means editing the javascript and that is a lot more difficult.  Also try and use existing libraries like prototype and scriptaculous to keep the code reuse high and the complications down. There’s no reason you should treat your javascript code different then you do you web app code.

CSS means Cascading

Remember the C in CSS? Make heavy use of it. If your using a list based menu system, set a style on the li that contains the width and such. This will keep the amount of CSS down, which is important if you have a complicated menu.

Degradation

It is extremely important that your menu system degrade. You can’t rely on the users’ browsers to have CSS or Javascript to be enabled. You need to make sure that you menu can still function in these cases.  As a result your SEO will be improved (because search engines can read your menu to), and everyone will be able to navigate.

Images

Like javascript, a lite use of images is ok, but your display and style should not depend on them. Different browsers render images differently, and padding, margins, positioning can all be effected. Reducing the amount of images used will help reduce these problems.

Suckerfish

There are other things that make a menu system great. But most of them I see are based on, at least in part, on the suckerfish menu technique.  Take a look at the suckerfish page for examples, demos, and an overview of how it works.

New: Host Monitoring 03/31/2010

I am happy to announce that I am externalizing some of the host monitoring that I am currently doing internally on all my clients hosts. Host information about the service can be found here.

The roll out

I am currently in the process of rolling out the monitoring to all my clients. You will be notified by email when the roll out to your hosts are complete.

Costs

Like the project tracker, there are no monthly charges for host monitoring. I am waving all configuration costs as well at this time as well. You will not be charged for the service or the initial roll out configuration. Please contact me if you have any questions regarding costs for modifications to the monitoring strategy.  Of course opting out costs nothing as well.

Flash Charts and Rails 03/31/2010

I am working on a few projects that require some simple charts. Historically I have been a big supporter of JasperReports and JFreeCharts (in fact I still am). However both those tools run server side to generate the reports and charts. Sometimes you just don’t need that level of complication. If your looking for something quick to just display a basic (or compound) chart over a table, then using a flash charting tool might be the answer. I use FusionCharts. They even have some rails examples (though I don’t like them it looks like a java programmer wrote them).

Pros

  • Fast Development
  • Client side chart generation (less load on the server)
  • Animation and other pretty effects

Cons

  • Client needs flash installed
  • Only supports web pages (no exporting)
  • More data transfer then just one image

Quick Notes
As stated above, you can go along way with the flash charts if your just looking for some really basic presentation. Get to complicated though, and your going to have to use a Reporting Engine. Converting a large number of reports from a web version to a reporting engine can be expensive, and in many cases, reporting engines can’t support all the features that your used to because of the exporting they need to do. If you choose to implement flash based charts make sure that it’s not a stop gap measure, when what you really need is a full suite.

Good News
Flash charts take xml. Rails (specially restful) can send the xml to the chart with little effort. All you really have to do is format the data for the chart. There are several solutions. You can override the models .to_xml method, you can use render :text=>prepaired_xml_string, or you can use an xml builder to do what you want. I chose the 2nd option (render :text). It’s easy to implement and lets you keep your view stuff at a controller level (I know, I know, but you have to put it somewhere). Here’s what I did

Implementation

  1. Define a new format
    Mime::Type.register_alias "text/xml", :chart
  2. In your controller add in a responds_to block for the chart type
          format.chart{
            chart = ""
            for m in @cmodels
              chart << "< set name='#{m.name}' value='#{m.value}' / >"
            end
            chart << ""
            render :text=>chart.to_s
          }
  3. Then in the view, do your normal layout. But add in the chart. (I used a helper for this part)

    &nbsp;

Conclusion

That’s it. You now have a basic chart. In this example i put it on the index method, but there’s no reason you can’t place it on custom methods. I even recomend taking that controller cruft that generates the “xml” and placeing it in a helper.

Mobile Rails Dev 03/31/2010

I promise this won’t turn into an android blog, but I discovered something neat and I wanted to share it.

The goal for any mobile phone I use is to allow me to leave the office. Being a freelancer I work every day, but sometimes us developers want a social life. The real problem is when ever we go out, there’s a good chance that a client will call. Most of the time, they just need to ask a question or get some help, but every once in a while there is an emergency, that needs your attention right away. The ability to respond quickly in those circumstances can make a huge difference. No one wants to here, “I will get yo your site in 6 hours when I get home.”, when what they need is “Ok, its back up. I will look into what caused the problem A.S.A.P.

Keeping that level of customer service used to mean dragging my laptop everywhere I went. Sure SSHing to a server to fix a problem from your cell is nice, but what if you need to do something more then restarting a service. What if you need to cap deploy, or make a change then git push it.

While I had my blackberry, the solution I chose was to keep my laptop with me at all times, then I could tether when the need arose, fix the problem and be done. But this also limited where I could go.

With the G1 I can go where I please, their 3G network makes SSHing fast and with the instructions below I can even do dev from my G1. It’s of course no where near as swift as my laptop, but in those few emergency cases, it works and most importantly, I can leave my laptop at home.

Prep Work
Your going to need four things to complete this projects.

  1. A larger SD Card (I used the 4GB version of this one, you will also need a way to see it on your PC)
  2. A game (Here ya go)
  3. A linux
  4. A G1

Lets install some applications to get the Android side ready to go. Of course this is the swt I run with, you can use what you like.

  • Time Tracker
  • Task Manager for Root
  • Skype (if you use skype)
  • ConnectBot
  • Linda File Manager
  • Task Switcher
  • Terminal Emulator
  • Text Edit

Root Your Phone (Full Directions)

  1. Downgrade to RC29
  2. Gain root access using the telnetd trick
  3. Upgrade to RC33

Prepair The SD Card

  1. Change the partition type to FAT32 (some may not need this change). Make sure you change the device correctly. Also note that I am running this from my Linux box. You can format from your G1 as well.
    sudo fdisk /dev/mmcblk0
  2. Format the card. You should do this to the card rather you had to change the partition type or not. It helps remove any junk put on by the manufacturer.
     sudo mkfs.vfat -F 32 /dev/mmcblk0p1 

Prepair the phone a little

  1. Enable Wifi, it’s not really needed but it will make this a lot easier.
  2. Plug into power source, again just to make life easy.
  3. Install the applications above if you haven’t already. Most importantly the terminal editor.

Building the Debian Image

  1. get the sd card mounted on the computer again
  2. Make a 1GB disk image
    dd if=/dev/zero of=mobilerails.img bs=1024 count=1048576
     1048576+0 records in
     1048576+0 records out
     1073741824 bytes (1.1 GB) copied, 18.9066 s, 56.8 MB/
  3. get debootstrap
    sudo apt-get install debootstrap
  4. format the image
    mke2fs -F mobilerails.img
  5. mount the image
    mkdir mobrails
    sudo mount -o loop mobilerails.img mobrails/
  6. Build the boot strap
    sudo apt-get install debootstrap
    sudo debootstrap --verbose --arch armel --foreign lenny mobrails http://ftp.de.debian.org/debian
  7. Play a game until that finishes
  8. Unmount the image
    sudo umount mobrails
  9. Create the following directory structure on the root of the sdcard
    • /mobilerails
    • /mobilerails/image
    • /mobilerails/share
    • /mobilerails/bin
  10. copy the mobilerails.img to sdcard/mobilerails/image

Create the following files in /mobilerails/bin/

  • create a new file on the sd card /mobilerails/bin/fsrw.sh
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
    echo "Filesytem remounted as read/write"
    echo "Courtesy of http://www.androidfanatic.com"
    echo "Installer by Mark Walker (ghostwalker)"
    #Based on Saurik's remount.sh  - modified by Mark Walker of http://www.androidfanatic.com
  • create a new file /mobilerails/bin/install.sh
    sh fsrw.sh
    clear
    cat fsrw.sh > /data/local/bin/fsrw.sh
    cat prepsys.sh > /data/local/bin/prepsys.sh
    cat stopsys.sh > /data/local/bin/stopsys.sh
    cat entersys.sh > /data/local/bin/entersys.sh
    cat firsttime.sh > /data/local/bin/firsttime.sh
    cd /sdcard/mobilerails
    chmod 4777 *
    cd /data/local/bin/
    chmod 4777 *
    echo " "
    echo "Make sure you run firsttime AFTER you run prepsys"
    echo " "
  • create the file /mobilerails/bin/prepsys.sh
    clear
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
    echo "Android Filesytem remounted as read/write"
    export kit=/sdcard/mobilerails
    export bin=/data/local/bin
    export mnt=/data/local/mnt
    export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
    export TERM=linux
    export HOME=/root
    modprobe ext2
    mknod /dev/loop2 b 7 0
    mount -o loop,noatime $kit/image/mobilerails.img $mnt
    mount -t devpts devpts $mnt/dev/pts
    mount -t proc proc $mnt/proc
    mount -t sysfs sysfs $mnt/sys
    mount $kit/share $mnt/share -o bind
    #no idea why we need this
    sysctl -w net.ipv4.ip_forward=1
  • create sdcard/mobilerails/bin/entersys.sh
    export TERM=linux
    export mnt=/data/local/mnt
    chroot $mnt /bin/login
  • create sdcard/mobilerails/bin/stopsys.sh
    busybox umount -f /data/local/mnt/dev/pts /data/local/mnt/proc /data/local/mnt/sys /data/local/mnt/share /data/local/mnt
    busybox losetup -d /dev/block/loop2
  • create sdcard/mobilerails/bin/firsttime.sh
    export mnt=/data/local/mnt
    chroot $mnt /debootstrap/debootstrap --second-stage
    echo 'deb http://ftp.de.debian.org/debian lenny main' > $mnt/etc/apt/sources.list
    echo 'nameserver 4.2.2.2' > $mnt/etc/resolv.conf
    chroot $mnt passwd
    chroot $mnt /bin/bash

The actual Install

  1. umount the sdcard and get it back over to the G1
  2. open terminal
  3. run some commands
    cd /sdcard/mobilerails/bin
    sh install.sh
    prepsys.sh
    #fix the link up errors
    cd /data/local/mnt
    mkdir share
    mkdir dev/pts
    cd /sdcard
    stopsys.sh
  4. The last 10% of the debian install. You should now be su under the “normal” terminal. i.e. not inside debian.
    prepsys.sh
    firsttime.sh
  5. play a game
  6. When the bootstrapping is done enter a root password (just for the debain system)

Post Install System Configuration

Ok now we are at a bash prompt. We don’t want to do too much though, just get some stuff setup inside the image.

  1. First we are going to need some swap space, but we want it to exist outside our image.
    dd if=/dev/zero of=/share/swap bs=1M count=256
    mkswap /share/swap
  2. Just because your in a chroot deb environment doesn’t mean you won’t effect the android kernel. Lets get those two sharing
    rm -f /etc/mtab
    mount -t devpts devpts /dev/pts
    mount -t proc proc /proc
    mount -t sysfs sysfs /sys
    ln -s /proc/mounts /etc/mtab
  3. Now we can mount our swap image
    swapon /share/swap
  4. check and make sure we are sill sane
    mount
    free -m
  5. Ok, now lets add a normal user
    adduser coteyr
    exit
  6. Now we are back in our android environment, lets fix it so that swap is turned on and off ever time we stop and start the deb environment.
    vi /sdcard/mobilerails/bin/prepsys.sh
    #add
    chroot $mnt swapon /share/swap
    #somewhere twords the end
    vi /sdcard/mobilerails/bin/stopsys.sh
    #add
    export mnt=/data/local/mnt
    chroot $mnt swapoff /share/swap
    # at the very top
  7. Reinstall the scripts
    cd  /sdcard/mobilerails/bin/
    sh install.sh
  8. Stop the system
    stopsys.sh
  9. Make sure that the swap file exists outside the image
    cd /sdcard/mobilerails/share
    ls
  10. check that we have no left over mounts (that aren’t supposed to be there. umount them if you do)
    mount
  11. Now, just to be really nice reboot the phone and make a backup of the mobilerails directory on your computer

Now for Rails

Ok phone is back up. Next we need to get a dev enviroment up and running.

  1. Now lets get the sdcard back in the phone
  2. start up the terminal
  3. become root
    su
  4. mount the debian system
    prepsys.sh
  5. At this point the debian system is running along side the android system the android can’t really see debian and debian can’t really see the android (at least not without browsing by hand). We want to keep it this way, though there are other ways, but keeping our dev environment separate is safer. lets entersys.sh
    entersys.sh
  6. login and then the fun starts
  7. lets get us some sudo
    su
    apt-get update
    apt-get install sudo
    visudo
  8. make your changes then exit(if you don’t know how to setup sudoers read the comments in that file)
  9. lets leave root….
    exit
  10. and start installing ruby at el.
    sudo apt-get install ruby irb rdoc git-core libopenssl-ruby
  11. play your game again
  12. lets install rubygems the right way*That would be an opinion*
    wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
    tar -xzf rubygems-1.3.1.tgz
    cd rubygems-1.3.1
    sudo ruby setup.rb
    #ri and rdoc take forever so just play a game
    sudo gem1.8 install rails --no-ri --no-rdoc
  13. Next were going to want to generate some ssh keys for our git repo
    cd
    ssh-keygen
  14. get them into your repo (I will leave this step up to you, everyone has diffrent methods)
  15. Lets make our Projects directory and lets git a project
    cd
    mkdir Projects
    cd Projects
    git clone ssh://git@someserver.com/ReallyCoolProject
    cd ReallyCoolProject
    script/server
  16. now we can go over to our browser and hit localhost:3000 (you installed task switcher right?)

Final Thoughts

Editing can be done from the terminal via vi or nano or you can use one of the editors from the android side. If you use the android side you should be able to see the debian system in /data/local/mnt/.

Few quick things to remember.

  • The loop device is a bit fragel. Don’t yank out your sdcard wiout unmounting it first.
  • Make frequent backups of the mobilerails directory. It will corupt if the phone crashes(or is turned off) and it is mounted.
  • I wouldn’t run with the system prep-ed all the time because of the above problems.
  • Keep your debian system and your android system separate unless your really sure you know what your doing.
  • Protect your phone and sdcard, you just gave whoever stole your phone read and write access to your git repo
  • The system wiill run slower when your running webrick. Kill it if you don’t need it for a while.
  • Sqllite is fine, mysql would be fun (bad fun).
  • Your G1 can see that swap space, be aware of that.
  • Permissions wont copy across the two systems. Make sure that you remember that if you edit or create a file outside the debian system.
  • Your not running a VM, it’s just a chrooted environment. That means any kernel level things will be seen by everyone. Try not to insmod or such inside the image, unless you really really know what your doing.
  • If your tenminal exits, then you loose your chrooted environment. but you can just entersys.sh again.

Open Source meets clenched fist 03/31/2010

Ok, so it’s time for me to plug a new product. My beloved blackberry recently broke. The scroll ball thingy popped out. At the same time my T-Mobile contract expired. I could have gotten a new blackberry, but to be honest, blackberries don’t fit in my open source world very well. So I took a look at the G1. It’s supposed to be the most open phone on the market. Lets just mix in a review, instead of pretending were not.

Design
Pretty good. It’s a bit thicker then my old blackberry, but that gives it a very solid feel. It’s not much heaver then my blackberry and a bit less then my ipod touch. I actually like the combo usb/headphone port. Keeps the places my pocket fuzz can cause down to one spot, and the extra dongle is not much different then the 2.5 to 3.5 converters most phones have to use. The keyboard feel natural to use to me (some don’t like it) and the “hump” at the end of the phone where the track ball and buttons are, don’t impede me in anyway, it actually gives me something to hold on to. I have yet to drop this phone. They keyboard is great for my big hands. I can type faster on it then I can on my blackberry until I start mixing in special letters, and that just takes time to find where there at now.

OS
Ok, Android is the OS on the phone. It’s pretty nice. Its based (at least on my phone) on 2.6.25 Linux kernel. Theres a Java stack that everything else runs on. Development is pretty easy as most of the OS and stack are open source (certain things aren’t, shame on you Google). The market contains apps for everything and, as far as I can tell, almost every part of the OS can be replaced, that includes the Google apps. Syncing is automatic with your Google account, and Google syncs with every OS out there as far as I can tell.

Problems
Well, battery on the 3g network is awful. Maybe 4-6 hours on a full charge with full usage. Maybe a day with normal usage. Thankfully you can turn that off (use edge for normal usage but if you need something fast just bump it back on). Also theres no on screen keyboard. It makes one handed operation pretty difficult. None of the solutions in the market work for me, though chompSMS has the right idea, I just don’t sms. I haven’t figured out how to make the notifications actually notify me. They make a sound but it’s too quite. I need something loud and annoying. A college of mine used to call my phone the angry cricket. I need that back.

T-Mobile
This is actually funny. If you take a look around the net you tend to get a sense of a careful balance between the open source Android community and the provider. You “may” void your warranty if your upgrade your phone your self, but Google has the git repo right out there where every one can get to it. It looks like T-moblie is trying to push there “buy are phone” mentality using the same old trick of restricting features, but the problem is that we have the source code and we “know” what the hardware can do. If a G2 comes out any time soon, theres no hardware reason why G1 users should not get those features. And we know it. Short version, we are in a wait and see. Google is really on to something with their open source phone, but if T-Mobile pushes too far the entire product line could fail. Android can already be run on a wide variety of hardware. Most people buy the G1 cause it’s easy. If someone were to market their own hardware platform, I don’t see why that would cause any problems for the OS.
To make matters more interesting. T-Mobile isn’t going to make any money from app or ring tone sales. The market provides every application that you could want, including applications for making ring tones from your MP3s right on your phone. We will see how long that lasts. Blackberries had the same openness at the start but over time T-Mobile (and other providers) found ways to narrow that down.

Overall
I’m keeping my G1. But I haven’t built any kind of loyalty to the G1 it’s self. Having a Linux mobile device is extremely nice. I can do whatever I need right from my phone. SSH is already installed along with a file manager, and a VNC client. The only thing I haven’t found yet is a word processor. It won’t replace my laptop on trips out of town, but it already has on trips that won’t keep me away from home over night. Heck, I have already done some emergency rails development on it.

Browser
Just so I can work it back in to this blog. The browser is using WebKit (Safari and Konqueror). With a decent design you can use almost any website from your phone, no changes needed on the side of the site. If your site is a bit lacking in the design department, then it might have issues. But I tried all of my clients’ sites and they all worked 100%. None of they were designed with the G1 in mind, though they all were developed using standards.

Elements of Design 03/31/2010

Another questions that I keep getting asked; What makes a good website design? There are several answers to this question. Mostly it depends on your target and your goal. For the sake of this post were going to look at 4 different targets. First, a “landing page”. Second, a sales site. Third, a social site. Forth a “utility” site. Don’t worry if your not sure what all that means I will take the time to explain it.

Landing page
These are the one hit wonders. One page to get your point across. It doesn’t matter if it’s to sell a product or service or to inform a group of people. This type of site has 1-2 pages and is only meant to be viewed once by each end user.

The main goals of this type of site is to get the point across. Keep it short sweet and to the point. Navigation is not an issue. Spend all the time you want on looks and form. It’s most important to get your point across. Use big letters, flashy images, flare, the works. Your making a billboard for the Internet. Treat it like one. Be tacky, think Las Vegas. Keep your main points big and easy to spot. Near the top of the page. Most people won’t bother to scroll down if you can’t get them hooked before they have to use the mouse. Keep in mind that the back button is easy to find.

Sale Site

These sites have multiple pages. You want to showcase your product or service and offer a way to collect monies. The site needs to be easy to use but also a little flashy. The site it’s self reflects the your product. Keep your feature list small, use moderate amounts of bold text, but don’t make it stand out too much. An example or picture of your product never hurt, if your offering a service, list the price right out front. Qualify your potential customers. They may want your product or service very badly, but if they can’t afford it your just wasting their time and yours. Try to devote one page to pricing if you have a complicated structure, another to features. It never hurts to compare your products or services to a competitor if you think you have a better offer. Keep money collection on a separate page. Make sure that your contact or support info is right out there where people can find it. If they have a question, and can’t find it, you just lost a sale.

Navigation on these pages should standout. You want people to “poke around” and explore your site. Links in the body of the text should be used often. Horizontal navigation is a good way to accomplish this, but don’t give up the good look of your site to do it. The more links the better. Remember you want the user to “find” the other pages, but you need to make sure there easy to find. Think of hiding easter eggs for a toddler. You don’t want to really hide them, they should be able to just stumble across them.

Social Site

These sites are sites that encourage user created content, networking, or communication. The most important rule with this type of site is to keep it absolutely simple. People are there to share a quick idea, most wont want to have to figure out how to do it.

Keep your links everywhere, a top bar navigation system really works best, but combine it with a side bar as well. Keep the “content area” wide open and big. People want to be creative, let them. The site should be both simple and flashy. Use as few images as possible. You never know what content you users are going to put up. Also make sure that you work some kind of help system into your layout. You will need to provide help on every page (or at least most of them).

Utility Site

These types of sites are used repeatedly by users. Think gmail or my project tracker. You log in every day, navigate around and preform a function. Because of the repeated use its important to follow a few rules that the other site types do not have.

First, navigation needs to be exceptionally easy. Users will learn how to get to the features they use the most, but if it takes them 20 minuets to do it they will find another product. Don’t use many effects or pretty images. It might look nice while making the sale, but could you Imagen a 3 second fade in and fade out on every email you try to read. Or every time you log in having to watch a 10 second visual effect. Keep it simple. Provide user feed back for every action, if actions take more then 2 seconds to complete normally, give them a spinner or progress bar. Something to let them know the site didn’t “freeze”. With this type of site it’s ok to be ugly. Mater of fact your users will thank you for your ugliness as long as the site is fast. Look at all the “green screen” applications out there. When they were replaced with fancy GUI versions, people had a fit, be cause they had to navigate with a mouse. “Tab Tab Tab f” Didn’t work any more. The end result was the GUI app allowed for tabs or they used a terminal emulator to get back to the old application.

General Rules

Here are rules that work for all sites. Don’t use flash for anything your site depends on. Even YouTube has most everything except the videos in standard html. Adobe (owners of flash) use it sparingly. Whatever you do don’t make a “flash site”. If your whole site is in flash, a lot of people wont see it. Use the entire screen. Lots of sites use the strip down the center (or off to one side). Don’t do that. Use the users entire screen. Keep in mind that users will have different size screens. Make sure your site hits all your target resolutions. Reduce the dependency on JavaScript. Some browsers won’t do very well with it. Don’t ditch it completely, just make sure your site can function without it. Use as few images as possible. In the day of mobile computing, users on their smart phones will be visiting your site. It should work, at least a little. And laptop users that tether or go to coffee shops with bad wifi won’t want to wait 45 mins just to see your login screen.

Those are the basic concepts behind any site. The real trick is combining them to preform a function. You might have a great web app, but without a sales page it’s not going to get very far.

Lorem Ipsum 03/31/2010

I got asked the other day what Lorem Ipsum means and why I use it as a filler when I show samples of long passages in demo apps. Well that’s a good question.

Why use it

First, it’s traditional. It has been in use as filler text since the 1500s. Why should I break from that? Second, it’s the default filler text in many applications. Third, it has a nice broken up set of words and the constant to vowel ratio is pretty good (important for non-mono-spaced fonts)

What Does it mean

Well it’s not just filler text. Its actually based on a document that dates back to 45 B.C.  It is derived from  “de Finibus Bonorum et Malorum” (The Extremes of Good and Evil) by Cicero.  It’s not an exact replica. The passage I use (the most common one), the original passages, and a translation are below.

More info

More info on Lorem Ipsum can be found at http://www.lipsum.com/. There is also a generator if you need your own text. Many of the facts in this post come from that page, including the translations.

Lorem Ipsum, the common passage

“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

The orignal (sections 1.10.32 and 1.10.33 of “de Finibus Bonorum et Malorum” by Cicero

32 “Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?”

33 “At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.”

The Translation by H. Rackham (1914)

32 “But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?”

33 “On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.”

Do you need a website? 03/31/2010

Well that is a very good question, and not easily answered. First lets look at the reason websites exist. A web site’s sole purpose is either to entertain (www.kongragate.com) or to inform (www.wikipedia.com). Those are the only two things a web site can do. Rather it’s information about your favorite music (www.last.fm) or products your trying to sell (www.ebay.com), a web site must fit one of those two things. It is possible to have a cross section of both with an edutainment website, but that is pretty rare.

 

Lets look at some examples. Starting with the easiest to answer.

 

1. Your a person, who wants a personal web site. It could be to show off pictures, or to just keep in touch with friends and family. Maybe you would like to keep an online journal. The answer in this case is usually no, you do not need a website. Many services exists that will allow you to use their frame work to show off your information. Take a look at FaceBook, MySpace, and Wordpress.com. All of these have free options that allow you do create a personal landing page/web site, and share your self with the world. If for some reason these sites do not fill your needs. Then I recommend you look at prepackaged systems like Wordpress or Joomla. Many of these systems will come with enough power and function to suit your needs. They are always a good place to start with personal websites and are relatively cheap when compared to custom development. For example I run a $50 wordpress install package deal (that I frequently extend to other prebuilt systems). That $50 investment is enough to get you well on your way. There are several free themes and plugins that will allow you to customize your blog or site. You get more freedom and expansion capabilities then a FaceBook or MySpace page, but there is also a cost. I always recommend to potential customers that they try a free solution first. Worst case senario, they have a better idea of what they don’t like and what they need.

 

2. Your a group of people. Your not doing bussniess, but you need a way to keep in touch and keep the group up to date. For example game guilds, structured social groups, churches, and user groups like LUG. A Wordpress.com or FaceBook page might not bee enough for what you need. Again a great place to start is a prebuilt system. For Game Guilds I encourage clients to look around. Many games that promote guilds (MMORPGs) will have a facility for hosting a guild website. For those that don’t have that option, I recommend a Wordpress install or Joomla.  There fast simple and can be expanded later on. Depending on this size of the guild, custom integration with the game or games can be accomplished at little cost.  For church groups and social organizations, many times, if a website is needed, its for a specific list of members. If that is the case, then a Joomla or Dupral install is the way to go. If it’s more of a public message board or calendar, then MySpace or FaceBook (or other social site) would work just as well. If you looking for a group calendar then take a look at google calendar. You might be able to get everything set up for free or little cost. Basically, if security isn’t a concern, then try a social site. If it is, then host your own (just a rule of thumb).

 

3. Business to Consumer. Categorically yes. You need a site. Your customers probably won’t take you serious without one. The size and location of the site is whats in question. If your a CPA and you have all the clients you need. Then a very small single page site is perfect. Kind of like a digital business card. If you want to expand a bit or are a more public business (restaurant/bar/club) then maybe a prebuilt system is in the works. If your looking to take your business online then you may need something a bit more robust. Several business start with a wordpress install and work out from there. If you have more defined needs then custom is the way to go. There are also options available based on what your trying to do. For example salesforce.com. I recommend staying away for social sites like MySpace. Your page might sit there, but you also loose a bit of credibility.

 

4. Business to Business. This is the tricky one. In my experience, it’s 50/50. If your selling an online service then yes you will need a site. And it will need to be shiny, have lots of things that blink and all kind of goodies that your sales team can show off. If your not selling an online service, then more often then not the site either doesn’t exist, is a small extension (1-2 pages) of an existing B2C site or is a simple static landing page.  Often times a site doesn’t exist at all and your potential  clients are directed to your consumer site.  With a B2B site you really need to weigh you options. The site will be a reflection of your product/service more so then a B2C site and could end up costing you a sale. Many B2B businesses forego a site all together to avoid the risk. A good rule of thumb in this case is “if your not selling an online service then leave the website small and detached. If you are selling an online service, then the sales site should have more visible features and a better look then the product your trying to sell.”

 

In closing here are a few general guidelines. First, look at free or low cost options. Even if they don’t work they will give you a great idea about what you need. Business should look like there in business, try free or low cost options but never forget your customers can see that. If you need custom development then don’t hesitate to do it. The cost of converting an old system into a new system is much higher then just doing the new system from the start. And lastly, don’t be afraid to ask your developer for options. If they present one option it’s usually because they feel it’s the best, not because its the only option. Take their advise under consideration, but if you have an idea make sure to get it out there. A good developer will find a way to make it work. A great developer will be able to tell you why they chose their solution to present over the one you had your eye set on, giving you even more options and knowladge to choose from.

40 SEO Optimization Tips 03/31/2010

A couple questions I get asked all the time:

Why doesn’t my site show in Google?

How do I get my site a higher ranking on Google.

Well the real trick behind this is SEO (Search engine optimization). SEO has come to mean just about anything and everything that is geared towards making your site more search engine friendly, or increasing your ranking.

Here are a few tips for increasing your ranking:

 

  1. Provide quality content. Ask your self, “Am  one of the 10 best sites in my indestery?” If you answer no, then improve your site.
  2. Don’t use JavaScript drop downs, images, or image maps for navigation.
  3. Make sure that your content focuses on your keywords.
  4. Make sure that your back links come from legitimate sites that are related to you somehow. Random back links will decrees your ranking.
  5. Page rank is important but not that important. Don’t focus too much on it.
  6. The titles of your page should have a unique keyword in the title. The company name should come at the end if at all.
  7. Keep your site up to date. Switch out content on a regular basis. A blog is good for this.
  8. Make sure your back links link to your key words, not “click here”
  9. Focus on search phrases over terms. People will look for terms before they look for single words.
  10. Design your site with SEO in mind. A flashy site is often chosen over one that is SEO friendly. Search engines can not navigate things that aren’t text.
  11. Use your keywords and phrases in in the meta tags (like img alt, a title) correctly. Using them incorrectly will decrees your ranking.
  12. Check canonicalization issues (i.e. www.site.com and site.com point to the same place.)
  13. When you link to your home page just link to / not /index.html
  14. Don’t use frames or flash to deliver content. Use Ajax sparingly.
  15. For new sites get a link from another established site.
  16. Try to change content 3 times a week. Blogging is a great way to do it.
  17. When link building, think quality, not quantity. One single, good, authoritative link can do a lot more for you than a dozen poor quality links, which can actually hurt you.
  18. Use shorter copy. Get your point across but make sure you don’t repeat your self a lot. Search engines give higher rankings to pages with natural language on them, and lower rankings to pages that are chuck full of keywords.
  19. Surround links with descriptive text. Links in the middle of know where are harder for search engines to figure out.
  20. If your on a shared server make sure your not sharing with a spammer. (For example, my server is clean and I limit it to my customers so it stays clean)
  21. When you register a domain, make sure you leave all the ownership info in the open. Blocking that info could hurt your page rankings.
  22. Make sure your site is easy to use. This will help with link building.
  23. Create some out bound links. These links will encourage others to link to you.
  24. Make sure you serve quality content. Real information.
  25. Email messages should be optimized as well. Gmail for instance scans and can add page ranking based on that.
  26. You get NOTHING from paid links except a few clicks unless the links are embedded in body text and NOT obvious sponsored links.
  27. Links form .edu sites will give a nice ranking boost.
  28. Make sure your  “call to action” is clear. I.E. Buy my product today.
  29. SEO is not a one-shot process. The search landscape changes daily, so expect to work on your optimization daily.
  30. Respond to comments on your blog. Responding shows that you care about your business and will increase your ranking.
  31. If you publish RSS feeds make sure they are optimized as well.
  32. Use captions with your images, like newspapers have captions. Make sure they are keyword rich.
  33. Make sure the text surrounding your images are relevant. Ranking can be adjusted for images that are not relevant to the surrounding text.
  34. XML Site map is a bit over rated. If a search engine naturally finds your page you will get higher ranking.
  35. Links form a high ranked sites will grant you a higher page rank.
  36. Use absolute links. i.e. “/page.html” instead of “../../../page.html”
  37. Surround videos with keyword rich text. search engines use the surrounding text to decide if the video is relevant.
  38. In images that you want found use the keyword “image” or ‘picture”.
  39. Add some social content to your site, like comments, feed back, or video posts.
  40. Make sure that the server responds with a 200 OK or a 301 Moved status. Those are the best for keeping Google happy.

It’s important to note that these changes make your site search engine friendly, not marketing friendly, people friendly, or pretty. It’s up to you to decide how to maintain the balance between SEO and your other goals.

Moving to Open Source 03/31/2010

Recently a colleague of mine contacted me, saying that an associate of  his (yep friend of a friend) was trying to learn Linux, what was the best way to go about it? Because I get asked this question so often, I decided it needed an entry on my site.

So why is the article so far about Linux when the title says open source. Well, because it’s rather pointless to talk about one without the other. The open source community is different then the closed source community., and moving from Windows or Mac to Linux can be interesting if you don’t keep that in mind.

I know Linux pretty well from both the server and desktop perspective. All non-.Net code that I produce runs on Linux servers. From the desktop perspective, I only use Linux. When needed I use VirtualBox to get into a windows environment to look at web pages or develop .Net code, but other then that I’m 100% Linux. I have taught several people to use Linux and regularly provide support for clients, friends, and colleagues. Here is what I recommend for anyone trying to learn Linux.

What is open source?

Don’t worry, I’m not going to go into the fine points here. There are several articles on the net already about the differences and different flavors of open source technology. Basically open source software is software that you can freely download the source code for and make modifications to. It’s not perfect for everything but 98% of the time the software produced in this manor is superior to similar software in the closed source community (that was an opinion by the way). Most of the software that most of my clients build their sites on is open source. Rails, Java, Apache, PHP, Linux, and MySQL are all open source in one form or another.

 

Which distro?

Well I was asked Ubuntu v.s. Fedora. I chose to recommend Ubuntu. (Again opinion here) I find Ubuntu easier to maintain and use. Any Debian based system should be just about as easy, but Ubuntu has a huge community and that helps out a lot.  In server land Redhat Enterprise Linux is pretty common, but I prefer Ubuntu Server most of the time as well, unless your buying support. At the end of the day it’s 100% preference. But I do find Ubuntu really easy to use. Personally I run Kubuntu, the KDE version of Ubuntu on my  boxen and Ubuntu server on most of my web servers. In some cases RedHat Enterprise Linux, but it’s rare.

Ok, so how do I learn?

The best method I can recommend is to use it. Take all your computers and put Linux on them as the primary OS. Put windows on as a virtual machine using VirtualBox. This ensures that you will spend most of your time in Linux doing your common tasks there and only do the stuff you don’t know how to do, or that you really don’t have time to learn to do in windows. (if your a graphic artist, you might want to use VirtualBox for Photoshop in the beginning). In two weeks you will know how to do 80% of  your basic computing tasks in Linux. The other 20% will be slower to learn because it will likely be something you only do once or twice ever (i.e. setting up wireless, configuring a printer).

Um, open source?

Yeah, I’m getting to that. OK so now you have a Linux box and your sending emails and browsing the web, but you still have to use windows and VirtualBox for a lot of things. Well here’s what you do. First, make a list of all the software you had to buy. Next, add to the list any software you have to go into VirtualBox to use. Now that you have a good list, take the first item on the list and find an open source alternative. For instance if you  bought office, try OpenOffice. Install OpenOffice in Linux, and start using it. Use it for two weeks so you can get a feel for it and decide if you like it. Try this with a new piece of software every week. You shouldn’t be using more then two new pieces of software from your list at any one time. If it takes you more then two weeks to learn a piece of software then don’t start on a new one. Try to keep learning two at a time. It will keep you from becoming flustered at learning new things because you will have a week of experience on the oldest app and be in a “oh that’s cool” state  with that app. Keep in mind that the first open source alternative you try might not work for you. If your trying to replace Outlook, and try Kontact but don’t like it, try Evolution.  After a short time you will be using open source software for almost everything you do.

Keep in mind that not everything will have a working open source counterpart. Many graphic artists are trained in Photoshop and won’t find Gimp to be a suitable replacement. I still use Visual Studio 2000/5/8., and many people are so used to Quicken/Quickbooks that they won’t like moving to GnuCash. Just keep a list of the apps that there are no acceptable open source alternatives for. Look around on the web every once-in-a-while and see if someone has created one yet.

I also recommend getting involved in the community. Take some time and browse the help forums and help others out where you can. Teaching is by far the best way to learn.

I need help!

Ok, first, breath. You made a big leap. There’s (usually) no tech support number to call, if there is one there probably just going to tell you they don’t know what Linux is, or that they don’t support opening their documents in OpenOffice. That’s the bad news. The good news. Well there is a whole Internet full of information out there just waiting for you to use it.  Try Google Linux and the Ubuntu Forums to get you started. There’s help channels on irc.freenode.net. If you want commercial support, check the website of the application your using. Most offer commercial support via email or phone.

Is there a book or something?

Yep, there are several “O’Reilly books” available on Linux and open source software. Several other publishers too. Personally I don’t like them because they don’t stay current (it can be current when you buy it but 6 months later it could be out dated). But check out amazon.com and give it a try if your more comfortable.

Guru, from the other side 03/31/2010

If you have been visiting this site for a while you know that the layout has changed. I have redone the site to be more friendly and accommodating to different resolutions. In addition I changed around some of the menu structures and color schemes. I also took the time to make the project tracker resemble the main site a little more. Because of the different functions of both sites they will never match 100%, but now you get the sense that the sites are related.

 

At the same time I was redoing the site, I decided to get the logo professionally done. If you have been here in the last few days you know that the logo has been changing around a lot.  The final version is now up.

 

When looking for someone to do the logo for me, I had a few options. I have a designer on staff that could do it, I had offers from a few others I know that wanted a chance, but I decided to go with finding a pro on guru. I had never used guru before as an employer and this provided me an excellent opportunity to get some first hand knowledge from the customers point of view.

 

First, registering the project was pretty simple. I just stated what I wanted then filled out a few of the billing details. It took a while for my project to be reviewed and accepted (a process that ensures only serious projects make it to the pros to bid on), but once that happened, I had selected a pro and the project was moving forward in less the 24 hours.

 

Next, selecting a pro was pretty interesting. I had gotten 18 or so responses in the short time that I had the project open for bidding.  15 of the 18 were just copy and paste responses, so I ignored them. The other 3 were at least modified by hand a bit before they were submitted. Of the three I chose the one that had the profile and examples most like what was looking for.

 

Communication was pretty much the same as when I am the guru. Email or web form, both worked pretty well, however, the images would corrupt when I got them in the email (from guru), and I would have to download them from the website (bug on guru or my mail server). This was interesting considering I rarely send code via the web form and either give it out via the project tracker, svn, email, or just install it on my customers servers.

 

Completion of the project was pretty straight forward as well. The images were delivered in the format I requested in the project. I was asked to pay the SafePay Invoice and give feed back. And the project was done. I was able to get my new logo without spending much of my time on the project.

 

My over all experience was very positive and it has taught me a few things about offering my services on guru.

 

For my customers let me give you a few tips, as I see them at least.

 

Watch for form letters. Make sure the bid has some proof that they actually did read your project. 15 of 18 of the bids on my project were just copy and pastes. Even if the pro just restates your request, that means they read it and know the requirements.

Location is important. Of the 18 bids few were in the US. There’s nothing wrong with that, but I don’t have very good luck outsourcing overseas. Timing is odd and the conversations don’t work out very well.

Cost was surprising. The selected bid was not the cheapest but the price did play a factor. I got bids ranging from $15 to $750. Now that’s a huge range for a simple logo. Both the high end and the low end bids told me me that they really didn’t read my requirements.

Previous experience, to my surprise was not that great a factor. I did require something to look at (their portfolio) and their feedback on guru was important in making  me feel comfortable with my choice, but I didn’t sort by feedback, or their “quality score”. I did however look at the amount of money each pro had made using guru. Oddly enough, the vendors with really high numbers scared me off a little bit. I wanted more of a personal touch.

When all was said and done, I selected my pro based on a personal response, location within the U.S., an average cost, and their portfolio. I was very happy with my selection and, therefore, urge my potential customers to do the same.

The Wide Screen Web 03/31/2010

In the the day of wide screen football, HDTV, 16:9, 1080i and 720p, why hasn’t the web lived up to it’s end of the bargain? Many, many, many websites still have a static width of 800 pixels or so. That means, to those of us with wide screens or larger resolutions, that there is a narrow, vertical strip of content and most of the web page is blank. Even those of us with smaller screens and square monitors get the margins and wasted space on the left and right.

Take a look a Yahoo and then have a look at how I see it.

Example of wasted space

 

See those HUGE margins. There are 690 pixels of margin and about 945 of content. Think of the widgets or data that could be shown in that 690 pixels of empty space.

Yahoo isn’t the only one. In fact most websites have gone this route. CNNESPNMSNBC are all examples of popular sites that waste space in this manor.

 

 

So what causes this problem? Well to be honest, I don’t really know. But here are a few observations that I have made.

  • It’s so popular that people have come to expect it. My clients ask for it from time to time, stating that its what users expect to see.
  • Old or out dated sites. A lot of websites are years old and date back to before there were wide screens. This will take several years to get caught up.
  • Less with more. Some sites use it as a tool to make their site “look” like it has more content. Unfortunately it’s kind of like using double spacing or a bigger font. It might scroll more, but there’s not actually any more content.
  • Web Designers like it because it’s easy. Now I’m not talking about real web designers, I’m talking about graphic artists that have crossed over into the web world. The web is not Photoshop, but a lot of designers like to make it as close to it as possible.

So whats the fix? Well basically,  time. Several big sites have started using dynamic formats that expand out to fill your whole screen. More and more people are getting annoyed by the wasted screen space. In time, this combination will force web site owners to revisit their layouts and pick a more wide screen friendly arrangement. Other then that there’s not much to do. I recommend that everyone request their developer or designer use a wide screen friendly layout. Web pages should expand or contract to fit the current users monitor. After all, you have to support 800×600, 1680×1050, everything between and beyond.

Some examples of sites that have it right.

My personal step: To help advance the web as a whole, I have redone my site to get rid of the static width. That was just a free template any way. I went ahead and put in the work to get my site into a dynamic format. It’s still a work in progress (for example the logo is being re-done now.), but I like the overall idea.