Tuesday, June 21, 2011

How to import an Excel file into SQL Server 2005 using Integration Services

Integration Services, which replaces Data Transformation Services (DTS) in SQL Server 2005, is a wonderful tool for extracting, transforming, and loading data. Common uses for Integration Services include: loading data into the database; changing data into to or out from your relational database structures; loading your data warehouse data; and taking data out of your database and moving it to other databases or types of storage. This article describes how you can use the new features of SQL Server 2005 Integration Services (SSIS) to load an Excel file into your database.
Note: There are several wizards that come with SQL Server Management Studio to aid you in the import and export of data into and out of your database. I will not look at those wizards; I will focus on how you can build a package from scratch so that you don’t have to rely on the wizards.
To begin the process, I open SQL Server Business Intelligence (BI) Development Studio, a front-end tool that is installed when you install SQL Server 2005. The BI Development Studio is a scaled down version of Visual Studio. Then I select New Integration Services Project and give the project a name. See image 1.
Image1:

When the project opens, you will see an environment that may look familiar to you if you have used SQL Server DTS; some of the items of the toolbox are the same. For the purposes of this project, I am interested in dragging the Data Flow task item from the toolbar into the Control Flow tab. (The idea of a Data Flow task is one of the major differences between DTS and SSIS packages. In an SSIS package, you can control the manner in which your package logic flows inside of the Control Flow tab. When you need to manage the data aspects of your project, you will use the Data Flow task. You can have several different Data Flow tasks in your project — all of which will reside inside the Control Flow tab.) See image 2.
image 2.

Double-click the Data Flow task that you have dragged onto the Control Flow tab. The available options in the Toolbar have changed; I now have available Data Flow Sources, Data Flow Destinations, and Data Flow Transformations. Since I am going to import an Excel file into the database, I will drag the Excel Source item from the Toolbar onto the screen. See image 3.
image 3
The Excel Source item represents an Excel file that I will import from somewhere on my network. Now I need somewhere to put the data. Since my plan is to put the data into the database, I will need a Data Flow Destination. For the purposes of this example, I will choose SQL Server Destination from the Data Flow Destination portion of the toolbar and drag it onto my Data Flow tab. See image 4.
image 4
To designate which Excel file I want to import, I double-click the Excel Source item that I moved onto the screen. From there, I find the Excel file on the network that I want to import. See image5.
image5
I also need to designate the sheet from the Excel file that I want to import, along with the columns from the sheet that I want to use. image 6 and 7 depict these options.
image 6
image 7
Now that I have defined my Excel source, I need to define my SQL Server destination. Before doing that, I need to indicate the Data Flow Path from the Excel file to the SQL Server destination; this will allow me to use the structure of the data defined in the Excel Source to model my SQL Server table that I will import the data into. To do this, I click the Excel Source item and drag the green arrow onto the SQL Server Destination item. See image 8.
image 8
To define the database server and database to import the data, double-click the SQL Server Destination item. I will define the server in which I will import the data, along with the database that the data will reside. See image 9.
image 9
I also need to define the table that I will insert the Excel data into. I will create a new table named SalesHistoryExcelData. See image 10.
image 10
Under the Mappings section, I define the relationship between the Input Columns (the Excel data) and the Destination Columns (my new SQL Server table). See image 11.
image 11
Once I successfully define the inputs and outputs, my screen will look like the one below. All I need to do now is run the package and import the data into the new table by clicking the green arrow in the top-middle of the screen, which executes my package. See image 12.
image 12
Image 13 shows that my package has successfully executed and that 30,000 records from my Excel Source item have been transferred to my SQL Server destination.
image 13
Sample Excel file is image14

Wednesday, May 25, 2011

Intel i3 vs. Quad Core - Processors ?

i7 = 4 physical cores / 8 threads (Operating system reads 8 cores)
i5 = 4 physical cores / 4 threads (Operating system reads 4 cores)
[dual core] i5 = 2 physical cores / 4 threads (Operating system reads 4 cores) (like an i3 but faster graphics)
i3 = 2 physical cores / 4 threads (Operating system reads 4 cores)
Qxxxx series = 4 physical cores / 4 threads (Operating system reads 4 cores)
Exxxx series = 2 physical cores / 2 threads (Operating system reads 2 cores)


Physical cores are actual 'real' cores. Threads are how many ways the data is transferred. Generally the number of cores match the number of threads but Intel's new i3/i5/i7 series have different amount of threads and cores which is called Hyper threading (typically two threads per core)
The new iX series are better because they run cooler, use 32nm, better memory latency and of course, hyper threading.
Different programs use different amounts of cores so depending on what you use, the performance will be different. If you use a program with multicore then the i7 will be faster, even if it has a slower GHz because of its 4 cores plus hyper threading (8 threads total)
Personally, I would get the i3 if you don't use any hardcore programs like Adobe Suite, or something like that.
By the way, the new i3's and dual core i5's have graphics chips built in to them. The quad core i5 and i7 do not have onboard graphics.

Tuesday, May 24, 2011

Resume tips for experienced IT pros

You’re an experienced IT professional. You’ve been around the block and done it all. You think your resume is packed full with great stuff because years ago, you read all the articles on how to build the perfect resume and you’ve been following most of that advice ever since. Any employer should take one look at your resume and hire you on the spot, right?
That’s what I used to think too. I’m not a resume expert, but I thought I had a killer resume. Then, three potential clients in three month’s time nixed me because they thought I was “light” in areas where I was actually a specialist.
If that isn’t a wake-up call, I don’t know what is. So I called a close friend of mine, who is an IT manager at a large company. He knows my abilities, he’s an IT geek at heart, and he’s seen a ton of resumes. He looked at my resume and said, “Yep, I’d have thrown it right in the trash.” I called a couple more friends in similar positions. “It could use some improvement,” one of them told me. Ouch. At least they were honest. Basically, I had a resume that would sell me as an administrator or engineer, but not as an architect or consultant, which was the type of work I was looking for.

I began gathering comments and suggestions from these guys and completely rebuilt my resume from scratch. What I learned in this process is that building a resume for experienced IT professionals who want to land higher-level IT jobs is quite different from building the average resume to land entry-level administrator jobs.
I am going to share eight resume tips that sum up what I have learned.

Resume pointers

Most of the standard rules for building a resume still apply: Make sure you have a readable format, proofread for spelling and grammar errors, keep it simple, etc. However, experienced IT pros need to follow some more specialized guidelines. A few of these tips may actually contradict your previous notions of what to include (and exclude) on your resume. They certainly contradicted mine.
  • Keep your list of “core skills” short and sweet. When you’ve worked with a lot of different technologies, you want to show the world all you’ve done. However, having a long list of core skills actually gives the impression that you know only a little bit about most of those things and that you’re a generalist, not the specialist that the potential client/employer needs. Keep this list to a handful of key skills or possibly eliminate the list altogether.
  • Don’t list certification exams. At the very least, minimize the impact of this list. The average IT pro might want to list exams passed to build up a resume, but for the IT veteran, this actually marginalizes real-world experience and accomplishments.
  • Quantify projects and results. For example, if you do an Active Directory implementation, specify how many sites, domains, and servers were involved. If you design an e-commerce system, specify the increased percentage of sales that resulted from the project. Tell the potential client/employer exactly how you helped a previous company that you worked for.
  • Bullets, bullets, bullets. Don’t use paragraph style writing to describe your projects, tasks, and duties. Bullet-point every major accomplishment or project and leave out the minor things. (Your resume is already going to be too big anyway.)
  • Include examples of work, if possible. For instance, maybe you’ve written articles for an online magazine, or perhaps you built an e-commerce site. Include links to pertinent examples so potential clients/employers can see firsthand what you do.
  • Highlight major accomplishments. If you’re a high-tech consultant, you may have a lot of smaller projects and clients. Maybe you were hired as a “grunt” for a couple of short-term assignments but had a major project last year. You can’t exclude the small stuff, or potential clients/employers will question what you’ve been doing. But you can minimize the impact by focusing attention on the bigger things. Some ways of doing this include using a slightly larger font, boldface, or italics, or even drawing a thin border around the major accomplishments. But don’t go overboard-subtlety is still key.
  • Seek advice from actual managers. Recruiters, agents, brokers, and human resource personnel are all different from managers. Managers want to see results, and they usually know how to spot a weak candidate. If managers think your resume reflects someone who can’t do the job, you’ll never get anywhere. Run your resume by some managers you know and have them critique it for you.
  • Know when to stop. If you list all your experience from all the jobs, contracts, or projects you’ve handled, your resume will be more like a book. Find a place to stop listing your experience. If you feel you must at least acknowledge previous experience, try making a separate section and just bullet-point where you worked and what your title/function was. Of course, you’ll usually want to do this only for the less-accomplished jobs that you don’t want to highlight on your resume.

Monday, May 23, 2011

10 things you can do to conserve Internet bandwidth

As organizations move more and more services to the cloud, it is becoming increasingly important to make efficient use of the available Internet bandwidth. Here are a few techniques you can use to conserve Internet bandwidth in your own organization.

1: Block access to content-streaming Web sites

If your organization allows employees to use the Internet for personal use, the first thing you should do is block access to streaming media sites, such as Netflix, YouTube, and MetaCafe. Playing the occasional YouTube video probably isn’t going to have a crippling effect on your Internet connection, but streaming videos do consume more bandwidth than many other Web-based services.

2: Throttle cloud backup applications

If you’re backing up your data to the cloud, check to see whether your backup application has a throttling mechanism. An unthrottled cloud backup solution will consume as much bandwidth as it can. This might not be a big deal if you’re backing up small files (such as Microsoft Office documents) throughout the day. But when you first begin backing up data to the cloud, an initial backup must be created. I have seen this process last for months, and if left unchecked, it can have a major impact on your Internet bandwidth.

3: Limit your use of VoIP

VoIP is another bandwidth-intensive protocol. If you plan to use VoIP, you might implement a policy stating that phones are to be used for business calls only. While I will be the first to admit that employees sometimes need to make calls that aren’t specifically related to work, almost everyone has a cell phone these days, so limiting the office phones to business use only shouldn’t be a big deal.

4: Use a proxy cache

A proxy cache can help limit the amount of traffic created by Web browsers. The basic idea is that when a user visits a Web site, the contents of the page are cached on a proxy server. The next time that person visits that Web page, the content does not have to be downloaded because it already exists in the cache. Using a proxy cache not only saves bandwidth, but it can give users the illusion that your Internet connection is much faster than it really is.

5: Centralize application updates

Today, almost every application is designed to download periodic updates over the Internet. You can save a lot of bandwidth by centralizing the update process. For example, rather than let every PC in your office connect to the Microsoft Update Service, you should set up a WSUS server to download all the updates and then make them available to the individual PCs. That way, the same updates aren’t being downloaded over and over again.

6: Use hosted filtering

If you operate your own mail servers in-house, a great way to save bandwidth is to take advantage of hosted filtering. With hosted filtering, your MX record points to a cloud server rather than to your mail server. This server receives all the mail that’s destined for your organization. The server filters out any spam or messages containing malware. The remaining messages are forwarded to your organization. You can save a lot of bandwidth (and mail server resources) because your organization is no longer receiving spam.

7: Identify your heaviest users

In any organization, there will be some users who use the Internet more heavily than others. It’s a good idea to identify your heaviest users and to determine what they are doing that’s causing them to consume so much bandwidth. I have seen real-world situations in which a user was operating peer-to-peer file-sharing software even though the administrator thought that the users’ desktops were locked down to make it impossible for anyone to do so.

8: Aggressively scan for malware

Malware can rob your organization of a tremendous amount of bandwidth by turning PCs into bots. Be aggressive in your efforts to keep the desktops on your network clean. 

9: Use QoS to reserve bandwidth

QoS stands for quality of service. It is a bandwidth reservation mechanism that was first introduced in Windows 2000, and it’s still around today. If you have applications that require a specific amount of bandwidth (such as a video conferencing application), you can configure QoS to reserve the required bandwidth for that application. The bandwidth reservation is in effect only when the application is actively being used. At other times, the bandwidth that is reserved for the application is available for other uses.

10: Make sure you’re getting the bandwidth you’re paying for

A lot of factors affect Internet bandwidth, so you can’t expect to connect to every Web site at your connection’s maximum speed. Even so, your Internet connection should deliver performance that is reasonably close to what you are paying for. I haven’t ever seen a situation in which an ISP intentionally gave someone a slower connection than they were paying for, but I have seen plenty of situations in which a connection was shared between multiple subscribers. In the case of a shared connection, a neighbor’s online activity can directly affect your available bandwidth. If your Internet connection isn’t as fast as it should be, talk to your ISP and find out if your connection is shared. You might pay a bit more for a non-shared connection, but the extra cost may be worth it.

Tuesday, April 19, 2011

10 challenges facing IT

T is always facing challenges. Some of these challenges have slowly changed over time, but many of them are perennial offenders. How will IT meet these challenges today and in the near future? Where do they rank in order of importance at the company where you work? Note: This article is also available as a PDF download.

1: Customer service

IT suffers from a bad reputation when it comes to satisfying customer needs. Unfortunately, it is often well deserved. Too many times, the work is done incorrectly or not to the customer’s requirements — and it is the customer who ultimately determines what is good customer service and what is not. My dad recently needed a new hard drive installed and he asked to have his personal Quicken files removed from the old drive. He received the computer with a new drive and a hefty service fee but without the critical files he asked for. It left me wondering what type of computer repair shop couldn’t accomplish my dad’s simple request.
Corporate IT has similar challenges with its customer service. There may be a lot of truth to the statement “The customer needs to be told what they want.” However, the tone of the “recommendation” by the computer expert often comes across as arrogant. The customer may be ignorant but they are rarely stupid — and they don’t like being treated as such. A little better bedside manner offering education and choice is far preferable to a simple “you need this” approach to customer service.

Challenge #1: Improve customer service by listening to and meeting the client’s needs. Make customer service job number one.

2: Human resources

Burnout is an ever increasing concern as budgets become tighter and workloads increase. Creative ways need to be found to reduce stress and revitalize tired workers. More vacation time, sabbaticals, temporarily reduced responsibilities — anything that can give the IT professional a break should be considered. This might seem costly, but losing a valued employee due to burnout can be far more costly. It has always bothered me when I or a fellow workmate requested a transfer only to have the request ignored or denied, seemingly without any thoughtful consideration. Organizational structures are not conducive to employee sharing and growth. Managers just don’t want to give up a key member of their staff. The truly exceptional companies find ways to maximize their employees’ full potential. After all, what is a company if not its people and their skills?
Challenge #2: Develop creative ways to minimize stress, satisfy employee needs, and match corporate needs to employee goals.

3: Productivity

First came the mainframes, then the minicomputers, PCs, and the Internet. Each was a tremendous technological leap that greatly increased user productivity. What will be the next great productivity innovation? The cloud? Mobile computing? Can these technologies deliver real, significant productivity gains? The law of unintended consequences warns that issues will arise with the introduction of any new technology. To name a few, security and privacy for cloud services and increased stress and burnout for employees tethered to mobile devices 24×7. Until these concerns are resolved, any productivity gains must be carefully weighed against the negatives before mainstream adoption. Challenge #3: Make the best use of new technologies like cloud and mobile computing but search out additional ways to increase productivity.

4: Complexity

If you look at the progression of software from the introduction of the IBM PC to today’s systems, one obvious trend is irrefutable: The IT world has gotten increasingly complex. The complexity is rapidly reaching a point of critical mass, where one single developer can no longer know everything needed to be proficient at his or her job. Because of this, teamwork is more important than ever. Forget KISS — it’s a complex world and it is getting more complicated every day. Challenge #4: Manage and tame the complexity beast.

5: Obsolescence

Everything from the PC you are using to the skills needed to perform your job seem to become obsolete in three to five years. As costs continue to be scrutinized, IT needs to find a way to reduce the costs of obsolescence. Expect Microsoft to continue the trend of planned obsolescence as it adheres to a regular release cycle. But upgrading to every new release of Windows may be one of the first costs to go. It is getting harder for companies to justify the costs without real documented productivity increases. Obsolescence poses another problem: Which development software will still be around 10 years from now? Pick the wrong horse and you may be faced with the same challenge as those who were still supporting OS/2 in the late 1990s. OS/2 experts were as rare as original IBM PCs by then, but IBM was more than willing to help — for a considerable price.
Challenge #5: Increase the productive life of systems, software, and equipment.

6: Budgets

Meeting budget constraints is tough even in the best of times. It is especially challenging during hard times. Most IT budgets are expected to grow in 2011, but they continue to be tight. The growth of cloud computing and mobile technology will require more attention and resources. Managers will be faced with the tough decisions of how best to meet existing budget needs while still planning for the future. Challenge #6: Accomplish more with budgets similar to last year.

7: Marketing/public relations

Aside from a handful of tech companies like Apple and Google, IT suffers from a poor public relations image. It may be an honest assessment for Microsoft CEO Steve Ballmer to state, “If people want to wait they really can. But I’d definitely deploy Vista.” But when a statement like that leads to headlines like “Ballmer says it’s okay to skip Windows Vista,” you have a problem. Analytical thinkers make poor marketers. Hiring a PR firm can be well worth the expense, but even then a nasty faux pas can occur. South By SouthWest Interactive engaged Ink PR to meet its marketing needs. Ink PR came up with this speaker’s tip for South By SouthWest Interactive ’s green rooms: “A speech should be like a woman’s skirt: long enough to cover the topic, yet short enough to be interesting.” It has been said that any publicity is good publicity. But ask South By SouthWest Interactive if it thinks Ink PR’s marketing gaffe was good for its corporate image.
Challenge #7: If you don’t have the expertise, hire marketing and PR experts who can get it right.

8: Multinational operations

The global economy is upon us. It is increasingly common to find offices and data centers in countries halfway around the world. And with this transition come a number of challenges. Travel, language, and time zone differences are all issues that must be addressed. But far and away the greatest challenge will likely be overcoming the cultural differences and changing the “us versus them” mindset. Emotions run high for those who have been affected by outsourcing. Salary differences between countries can lead to resentment. Both are difficult people problems to solve. Challenge #8: Instill a culture of teamwork among international team members with diverse backgrounds and varying ethnicities.

9: The mobile generation

In 10 high-tech gadgets I can live without, I noted my dislike for mobile devices. I didn’t like the electronic leashes that constantly tied me to work when I needed some downtime. The mobile generation appears to be poised to overtake the PC generation as users spend more time using their mobile devices. However, a caveat should be included in any discussion of the onset of the mobile generation. Any productivity gains achieved using mobile technology in the workplace may be more than offset by the additional burdens placed on the IT workforce during nonworking hours. Challenge #9: Make use of mobile technology without tearing down the virtual wall between work and family and leisure time.

10: Data storage and retrieval

It is not obvious since most data needs are short-term, but there is trouble lurking in those data archives. Perhaps you are an unknowing victim of this silent crisis in the making. If you have important files on those old 5 1/4-inch floppies and you need to go back and retrieve one, you may be out of luck. Chances are that that the data is no longer readable and the device you need to read the media has long since been tossed into the trash bin. Or, as in my case, turning on the old antique microcomputer to read my single-sided, single-density floppies might lead to a fire and the quick end of your weekend data retrieval project. As our data ages, it needs to be continually transferred to fresh media. The problem is bit rot, and it happens with every type of media, from disk drives to DVDs. Shelf life varies by media type and manufacturer. Magnetic tape is claimed to be the best, with a shelf life of up to 30 years in optimal conditions, but even it eventually succumbs to the ravages of time.
Challenge #10: Determine what data, if any, is susceptible to bit rot and transfer to new media before it becomes a problem.

The bottom line

Throughout this article, I have written about IT as if it were some amorphous creature existing out there, somewhere. It’s not. IT is you. You will have to address these challenges, and that can be a daunting task. But what can you do personally? IT has met challenges like these in the past and it has been the creative, out-of-the-box thinkers who have been most successful. New ways of doing business will be required. You can be part of this change by doing your job to the best of your ability. You can also recognize how your job can be changed to meet these challenges, no matter how small the part you may play — and that can make a big difference company-wide. Answering the following questions will assist in finding ways that you can help.
  • What can you do to:
  • Improve your customer service?
  • Reduce employee stress?
  • Increase your productivity?
  • Simplify your job?
  • Make your tools useful longer?
  • Lower costs to meet budgets?
  • Improve client relationships?
  • Work better with international peers?
  • Follow reasonable corporate mobile device use?
  • Prevent data loss due to bit rot?
Turning each of these challenges into opportunities is the hallmark of the most successful companies. Meeting these challenges is what will eventually separate the winners from the losers.

Saturday, April 16, 2011

Install the Hyper-V Manager feature in Windows Server 2008 R2

The Hyper-V Manager feature can be installed on any Windows Server 2008 system. If the Hyper-V Server is Hyper-V 2008 R2, I recommend only attempting to manage that class of hypervisor on Windows Server 2008 R2 systems.
When it comes to deploying Hyper-V servers, there are two main options: install the standalone Hyper-V hypervisor or add the Hyper-V feature to a supported Windows Server 2008 R2 server. I’m going to take the separation approach as I venture into Hyper-V and use the standalone Hyper-V hypervisor instead of the full installation of Windows Server 2008 R2 and adding the Hyper-V role.
The Hyper-V standalone install is a single-purpose, standalone distribution. It loosely resembles Windows Server Core, and can be plugged into all of the management frameworks, including Group Policy, PowerShell, Hyper-V Manager, System Center Virtual Machine Manager (SCVMM), and Remote Management.
The Hyper-V Manager tool is the simplest way to manage a Hyper-V host, and it can be added to any server system. To add Hyper-V Manager, open Server Manager and navigate to the Features section (Figure A).
Figure A


Click the image to enlarge.
Once the feature is installed, Hyper-V Manager will be available in the Administrative Tools area of the Start Menu. From there, the first step is to connect to a remote server. Figure B shows Hyper-V Manager connected to two Hyper-V servers. Figure B


Click the image to enlarge.
Before you can create virtual machines on the Hyper-V hosts enumerated in Hyper-V Manager, the host networking will need to be configured. Hyper-V supports three types of networks: External, Internal, and Private. These networks loosely equate to bridged, NAT, and host-only network modes from other hypervisors, respectively. The network for the host is created as shown in Figure C. This environment does not have a VLAN tag in use, but the Configuration tab is available.
Figure C


Click the image to enlarge.
Be sure to use a dedicated network interface for the Hyper-V networking configuration. You will find that the connection of the Hyper-V Server is removed in favor of this configuration entered for the guest virtual machine networks. Because of this the Allow Management Operating System To Share This Adapter should be unchecked. Now Hyper-V Manager is ready to deploy virtual machines.

Thursday, April 14, 2011

Understand Intel's new server processor numbering scheme


Intel has once again decided to change the numbering scheme for its new Xeon-based processors. If you’re familiar with Intel’s Core i3, i5, i7 processor lines, you’ll recognize that the company uses similar numbering for the Xeon server processors.
Figure A is an example of Xeon processor numbering. Below the image, I explain the various elements in the numbering scheme.
Figure A

Brand: For the purposes of server processors, this will be Intel Xeon processor and simply identifies the overall brand - Xeon.
Product line:
Wayness, maximum CPUs in a node: How many sockets are supported in systems housing this processor? In this case, a single socket is supported.
Socket type: The socket type field identifies the capabilities of the processor socket type, such as memory speeds and other items tied to the socket. The higher this number (I assume it ranges from 1 to 9), the more capabilities inherent in the socket type.
Processor SKU: This is the processor part number. In my limited review of Intel’s current part numbers and the processor SKU field, it looks like Intel is being mostly consistent in part number with regard to clock speeds — at least within each product line. Here’s a look at what I’ve pieced together for the current line of E7 offerings. The E3 line carries different values. Because there is not official guidance from Intel that this field will be consistent, take this information for what it’s worth.

  • 03. 1733 MHz frequency/2400 MHz bus.
  • 07. 1867 MHz frequency/2400 MHz bus.
  • 20. 2000 MHz frequency/2900 MHz bus.
  • 30. 2133 MHz frequency/3200 MHz bus.
  • 37. 2667 MHz frequency/3200 MHz bus.
  • 50. 2000 MHz frequency/3200 MHz bus.
  • 60. 2267 MHz frequency/3200 MHz bus.
  • 67. 2133 MHz frequency/3200 MHz bus.
  • 70. 2400 MHz frequency/3200 MHz bus.
Power usage: In Figure A, you saw that the example has an L in the power usage area; this denotes that the part in question is a low power processor. When there is no L here, it’s not a low power processor.
Version: As new versions of a process are released, you’ll see this field populated with v2, v3, and so on. For a processor’s initial release, this field is blank; there is no v1 denotation.

Tips for optimizing your web images

There are several image editing and manipulation tools, programs, and applications available for web and graphic designers, and you probably already have your favorite “prepare for publication” imaging tool in place. This will not be a discussion on the various editing tools themselves, but will concentrate on the best practices and techniques for optimizing your images and graphics on the web.
For a quick example before I get into the whys and hows for optimizing images on the web, take a look at the two images below, and without taking a peek at their properties, notice similarities and differences when comparing them to one another (click on images for full-size).

Figure A


Figure B

Figure A is saved as a .jpg image with a baseline standard format at maximum quality, and is 514KB in file size at 800px wide. At a dial-up 56.6Kbps Internet access speed it would take approximately 90 seconds for this image to be rendered fully on the browser screen. My apologies for those of you who are using dial-up for your Internet access.
Figure B is the same image saved as a .jpg, however, with the format set to progressive with 5 scans, and the quality set to low, and it comes in at just 59KB in file size at 800px wide. At dial-up 56.6Kbps speed this image, would take just about 8 seconds to render fully.

What differences do you notice with the two images? Colors, load times, quality, these are all factors to consider when optimizing your web images. I kept the image pixel sizes consistent for this comparison; however, to fully optimize this image, I could have reduced the pixel width and that would have reduced its web page load impact in addition to the other optimizing factors.

Why optimize web images?

What are the motivating factors that direct our attention to obtain the most favorable web images? Several reasons for optimizing your web images include: Bandwidth and throughput: We all know that bandwidth has been a buzzword for many years now, and getting your web documents to render as fast as possible in users’ browsers means keeping your graphic and image file size to a minimum. The challenge becomes maintaining a high quality graphic while keeping a lean file size; the balance of these two elements is key to optimizing your web images.
Data storage and space: While data storage space and servers become less expensive every year, it is still prudent to limit your image size. As sites grow they typically show a steady growth in the number of images. For example, a particular image directory for a sub-section of a Federal agency Intranet site that I maintain includes 18 sub-directories with 360 images, combining for a total 24MB of storage space, and for an average of 69KB per image, that is actually considered to be slightly on the heavy side for a typical optimized web image.
Reduced costs: Optimized images add up to less server and storage space requirements, less bandwidth and throughput requirements, and therefore reduced hosting costs, especially when using a third-party ISP or Internet network solution provider.
User experience: The visitor enjoys a better experience when page load times are minimal; nothing irritates the guest more than having to wait for image-heavy web documents to load in the browser. Optimized images help keep the load times to within seconds.

Tips for optimizing your web images

Image file formats: The rules about file formats vary between organizations, each web development house typically has a specific guideline. Here are three file types that are suited for the web.
  • GIF: The .gif file format is really a bitmap consisting of a grid made of pixel squares, including transparency pixels with up to 256 colors, and data about every pixel is saved. It is a great file type for saving graphics, charts, bullet points, icons, buttons, and textual details.
  • JPEG: Although, the general rule that many follow is to reserve the .jpg file type for images, and .gif file type for graphics, charts, etc., I would apply the .jpg file type as a rule of thumb if your web site leans toward high end photography galleries, or other high quality graphic designs. This file type is good for saving images with millions of colors, including graphics with a variety of shades and gradients. Just note that typically the .jpg file type images are much larger and take longer to load. However, most image editing tools allow you to select the file compression for .jpg. For example, you can choose Maximum, Very High, High, Medium, and Low, so you do have some control over the ultimate file size. To test the image, be sure to save it under several compression settings and then test them for quality rendering and load times. Balancing quality, compression, and load times can be a judgment call depending on the particular image and the web document it is called within.
  • PNG: The .png image file type was developed in answer to the .gif patented file type, and while it can display a larger range of colors than the .gif, it does typically result in a larger file size. Many use the .png file format very effectively for buttons and icons, which are usually small pixel dimensions anyway, so they are not so large when utilized in that fashion. A typical 16×16 pixel .png icon will weigh in between 1KB and 4KB, or a 48×48 button at between 3KB and 7KB, so when utilized in this fashion they are optimal. For any .png image over a dimension of 200 pixels you start to see much higher file sizes.
Saving images for the web: Here are several rules of thumb for saving your optimized images for the web.
  • Make sure you have saved a copy of the image as a lossless version, meaning that you can come back and edit it again later if needed. For example, .raw, .tiff, .png, .psd file formats to name a few. Especially if several layers have been added to the image or graphic file, you never know when the customer will want to change a word here or a graphic element there, even after it has been up on your site for some time.
  • If it is a photograph, then select .jpg file format to save the final image. Remember to test several quality and compression settings until you get the perfect balance between quality and load times. If your image editing tool allows the “progressive” setting use that as it will allow the image to “blur” or display gradually as it is rendered on the web instead of line by line. The load time is not improved with the progressive setting, however it does give the image a softer look and feel when rendering on screen.
  • If your .jpg image is to be used as a background on the web document then use the Medium or Low compression setting. Otherwise for displayed images keep the compression at High.
  • If you have the option to adjust the image “quality” then use the settings to make the appropriate change; again, remember to strike a balance between acceptable quality and suitable file size.
File sizes: Depending on the use of the image follow these guidelines for optimal file size:
  • For background images try to keep the file size around or below10KB.
  • For banners or header images a file size up to 60KB is acceptable.
  • For high end photographs try to keep them to within 100KB at an absolute maximum.

Wednesday, April 13, 2011

Super Bull Gives You Wings (Updated)

Cafe Pyala: Super Bull Gives You Wings (Updated): "First things first: apologies to all for the disappearing act. (For those who actually noticed, a silent note of appreciation.) Had been awa..."