Micro-ISV.asia

Wednesday, 11 August 2010

New Site Design to Fit Modern Monitors and Browsers

Filed under: Just Great Software — Jan Goyvaerts @ 11:22

Last month I created a new design for just-great-software.com and the releated product sites. The refreshed design was long overdue. Though the content of the Just Great Software product sites was regularly updated as product updates were released, the design hadn’t changed since 2002. 8 years is a long time on the Internet.

The key difference between the old and new designs is that the old design flowed the text to fill up the full browser width, while the new design uses a fixed width. In 2002 common screen resolutions were 800×600, 1024×768, and 1280×1024. With such low resolutions, you want to make sure your site uses all available space. Letting the text flow was good practice back then.

Today “full HD” is all the rage. Common resolutions range from 1280×800 to 1920×1200. If you allow the text on your site to take up the full width, your visitors will end up with extremely long lines if they have their browser maximized on a full HD screen. Such long lines are hard to read.

So I’ve changed the just-great-software.com design to always use the same number of horizontal pixels to display its content. If the browser is narrower, the user will have to scroll. If the browser is wider, the extra space is filled with a background image.

This is common practice today. But there are two things to consider. First, how wide do you make the site’s content? If you make it too wide, users with lower resolution screens have to scroll horizontally, which is very annoying. If you make it too narrow, you’re wasting space that could have been put to use to put more text above the fold (i.e. visible without scrolling down).

I decided a width of 920 pixels is just right. The text still fits even on older 1024×768 screens. More importantly, on the increasingly common 1980×1200 and 1980×1080 resolutions, 920 pixels fits exactly when the browser takes up half the screen and the vertical scroll bar is visible. In Windows 7 you can easily make the browser (or any other window) take up half the screen by holding down the Windows key and then pressing the left or right arrow key. I find this a very comfortable way to browse the web. It keeps the line length manageable on sites that don’t use a fixed width design. I do this with two monitors, so I can have four web pages visible at the same time.

Another important change since 2002 is the way that browsers zoom web pages. In 2002, browsers did not really zoom. They made the font larger or smaller. Images and other graphical elements did not change. This made it difficult to design pixel-perfect web sites. If you style sheets to set the font sizes in pixels, your site looks good, but the user cannot change the font size at all. If you set font sizes using em or percentages, you can’t predict the font size or how the text will flow. If you wanted your users to be able to change the font size, you had little choice but to let the text flow freely instead of designing your site for a specific width (which didn’t scale with the font).

Fortunately, all modern browsers now have real zoom features that scale everything, including images. So using pixel sizes to position and size everything, including text, is the way to go today. If the text is too small or too large, the user can zoom the entire site in our out.

Sunday, 14 February 2010

DataHand for Programmers

Filed under: Hardware & Gadgets — Jan Goyvaerts @ 16:56

The DataHand for Sale Again article I wrote over a year ago is still getting comments. Time for an update. A few months after I wrote that article, datahand.com announced they were out of stock again. That notice stayed up all year. Since a few weeks the site indicates they again have a limited number of Pro II units for sale. The price is still $995. My article from last year still sums up my opinion on the price: get one while you can.

The new units have a USB connection instead of two PS/2 connections (keyboard + mouse). That means you don’t have to buy a PS/2-to-USB adapter if your computer doesn’t have PS/2 ports any more.

Somebody asked me if the DataHand’s use of separate modes for cursor navigation, function keys, numbers and punctuation don’t make programming difficult. While it certainly takes some getting used to, I can easily argue the opposite. If you had learned to type on a DataHand instead of on a traditional keyboard, you’d throw a fit if you had to switch.

When I want to type in numbers, why would I want to reach away from the home row to the top row, or all the way to the numeric keypad, when I could just press down my right thumb? When I want to type symbols and brackets, why would I want to reach away from the home row while also holding down Shift when I could just press down my right thumb? When I want to move the cursor, why would I want to move my right hand away from the home row to the arrow keys when I can just flip the right thumb up key? When I want to use the function keys, why would I want to move my hands away from the home row all the way to the top of the keyboard? And when I want to go back to typing, why do I have to move my hands back to the home row when I could have just kept them there and flipped the left thumb up key?

Programming with the DataHand is more convenient than with a regular keyboard, because you can keep your hands on the home row just like you were taught when you learned to touch type. All of the DataHand’s keys are on its home row. Of course, it’ll take some time to unlearn the bad habits you’ve picked up when you became a programmer and needed to type far more punctuation than your school teacher could have imagined.

The DataHand’s modes are absolute. There is a specific key to access each mode. That key always activates its mode, regardless of the mode you’re in. So you never need to look at the unit to check your mode. Just push the button.

The only exception is Caps Lock, which is a toggle just like on a traditional keyboard. But the DataHand makes Caps Lock unneccesary. Simply push down your left thumb slightly to hold down Shift. You can then type in any text in all caps without straining your pinky or any other finger.

At the end of the day my speed at editing source code with the DataHand is about the same as it was when I used a regular keyboard, before I started to suffer from RSI. But when RSI kicked in, I had to pace myself on the regular keyboard to be able to continue typing at all. With the DataHand, I don’t worry about RSI any more.

Tuesday, 9 February 2010

Make Backups on External Hard Disks

Filed under: Hardware & Gadgets — Jan Goyvaerts @ 19:43

In my previous post I discussed how to organize data between an SSD and HDD. Though that implies two drives inside your PC, or two sets of drives if one SSD and one HDD don’t offer enough space, a proper data management plan for a workstation requires four drives. The internal SSD and HDD I discussed yesterday, an external backup disk I mentioned briefly, and the remote backup.

Hard disks have come down in price so much that it’s cheaper to back up data to hard disks than to optical media. It’s also much more convenient to organize everything on a big hard disk than to sift through piles of optical disks that may or may not still be readable. The back up hard disk gets used every day, so if it fails you know you need a new one right now. The only thing I still burn to DVD are operating system images that need to be bootable.

The backup drive should be an exteral HDD or an interal model that slides in and out of a SATA bay. I like to use a USB model to back up files because I can connect that to my laptop in case my desktop PC kicks the bucket.

It’s important that the backup drive is removed from the PC after you’ve made the backup. If your PC gets fried by lighting, fire, or superheated coffee, you don’t want your backup to die with the original. Put the backup in a different room, or take it home and put it under your pillow. You don’t want the backup to be stolen along with your PC.

The 4th hard disk is the off-site backup. The purpose of the off-site backup is to safeguard against total disaster, such as the building with your PC and your backup disk going up in smoke. The idea is to always have at least one backup that is not physically near the original data. So the external hard disk with your daily backup doesn’t count, because it’s connected to your PC while you’re making the backup. Having two external disks would work if you rotate them and one of them is always in a differrent building than your PC.

For my own off-site backup I installed a NAS (network attached storage device) on a relative’s home network. It’s actually off-continent. Being an expat in a country where immigration rules change with the season, I want a backup that protects against political risk. Not that I’ve ever had or expect any problems. Risk is irrelevant when storage is 10 cents per gigabyte.

Every day I backup up new files to the NAS via FTP. I don’t transfer operating system images, virtual machine images, and files that I’ll be deleting within the week anyway. That would all take too long on my ADSL line with 512K upload. Having to reinstall Windows is not the end of the world. I’ll likely need a new PC anyway if I ever have to recover using the off-site backup.

I prefer to maintain my own NAS rather than use an online service. If I ever need the off-site backup, it’s going to be because of a catastrophe like my house going up in smoke with computers and backups in it. Having to download a few hundred gigabytes of backup files would simply take too long. It’s faster and cheaper to have my relatives clone the backup disk using the empty second drive bay in the NAS and mail the clone by courier.

Monday, 8 February 2010

Organizing Your Data Between an SSD and HDD

Filed under: Hardware & Gadgets — Jan Goyvaerts @ 19:43

In the past, when hard disks were relatively expensive, the best advice was usually to buy the biggest disk you could afford. Larger disks tended to offer a lower cost per megabyte (!), except perhaps for the largest model. Though that disk would seem to offer a lot of space, you’d run out of space around the time your PC was heading for obsolescense.

When hard disks came down in price and a the difference between a hundred gigabytes more or less became pocket change, the advice was to put your operating system on a separate spindle (hard disk). Hard disks have become the bottleneck in PC performance, and seek time is the bottleneck in hard disk performance. Desktop operating systems assume hard disks respond “instantly”. When accessing the disk, the operating system waits however long it takes for the disk to respond. That’s why Windows grids to a halt when an application is furiously reading from or writing to disk. By installing Windows (and its swap file) on one disk and saving your data files on another disk your applications are less likely to tie up the operating system drive and thus Windows itself. This is particularly good advice when working with virtual machines. You don’t want two or more instances of Windows to compete for attention from the same disk.

Today we’re starting to measure hard disks in terabytes. A 2 TB model comes in at about $200, or 10 cents per gigabyte. Solid state drives (flash drives or SSDs) have come of age as well. A 250 GB drive like I recently installed costs about $750 or 3 dollars per gigabyte. That makes the SSD thirty times more expensive than the HDD. (I’ve rounded prices and capacities to get whole numbers. Prices change every day anyway.) That means that unless you’re storing very little data or don’t care about how much money you’re spending, you’ll be using both SSD and HDD drives in the near future.

Since SSD drives don’t have spindles or any other mechanical parts, they have virtually no seek time. So the old advice of putting your OS on a separate drive no longer applies. The OS goes onto your SSD together with everything else that you need fast access to. In my case, that means everything I use when developing software. That includes VMware and all its virtual machines, so all running virtual machines benefit from the SSD’s speed. It also includes temporary files, such as Lightroom’s cache folder.

I have split my 256 GB SSD into two partitions. The reason for this is not speed but backup strategy. I’ve allocated 50 GB to the boot partition with Windows 7 and all applications. I back this up by making an image of the partition to an external hard disk. I do this when I’ve installed new software and I’m happy with the configuration. This gives me a point to go back to if the operating system or an important application gets messed up in the future. The remaining 200 GB is the data partition which I back up daily by synchronizing it with an external hard disk. Version histories are stored on both the SSD and the external backup. The Just Great Software applications and their source code don’t take up that much space. So I put all of it on the SSD for convenience.

The second drive in my PC is a 500 GB mechanical hard disk that I’ve been using for some time. This disk stores my photographs, music files, applications I’ve purchased and other downloads, and more random stuff that takes up lots of space but isn’t important to my day-to-day work. This stuff also gets backed up by synchronizing it with an external hard disk.

To budget all this, get the biggest SSD you can afford. If you can only afford 64 GB, that’s way better than nothing. Install the OS on it and fill it with the files you work with most often. You can split a 64 GB drive into two 32 GB partitions just fine. If you have more files than the SSD holds, put the remainder on a mechanical hard disk.

Don’t fill the SSD completely. Leave about 10% to 20% free space so the drive’s wear-leveling algorithm has room to move things around as blocks are erased. SSDs cannot overwrite data. They need to erase it first, usually in blocks of 1 MB. TRIM support in Windows 7 and new SSDs allows the drive to be proactive about erasing unused space. But that only works if there actually is unused space. The free space also gives you headroom for larger temporary files.

« Previous PageNext Page »