Archive for the 'Software Tips + More' Category

XHTML – Kicking And Screaming Into The Future

Tuesday, January 5th, 2010

XHTML, the standard, was first released back in 2000. Roughly five years later we begin to see major websites revised to use this standard. Even the favorite whipping boy of standards-compliance punditry, Microsoft, presents their primary homepages, msn.com and microsoft.com in XHTML. Standards compliant XHTML sites are still the minority. The reason is simple. When the W3C released the new standard, the rest of the web running on HTML did not cease to function. Nor will the rest of the web, written in various flavors of HTML, cease to function any time soon. Without any pressing need to conform to the new standard, designers continue to use old, familiar methods. These methods will perform in any modern browser, so why bother switching?

These sentiments are similar to ones I experienced. A kind of “if it’s not broke, don’t fix it” mentality sets in. Whether HTML was “broken” or not is a different argument. To the casual Internet user, their standards are fairly direct. If a site displays without noticeable error and functions to their satisfaction, these standards are met. Whatever additional steps the browser took to make such display possible is irrelevant to most users. This kind of mentality is difficult to overcome in designers accustomed to their old methods.

Technical obstacles to adopting XHTML may be quite steep as well, especially as regards large, existing websites with complex scripting. Yet the time may eventually come where yesterday’s “tried and true” HTML is little more than an ancient language, unable to be interpreted by modern electronic devices. Whether one agrees with the direction the W3C takes in the development of HTML is irrelevant, you are just along for the ride. With some perseverance, getting the hang of XHTML is possible. In form, it is not as different from HTML as Japanese is from English. Knowing HTML grants a basic knowledge of the language, it simply becomes a matter of learning a particular dialect. Even an original nay-sayer such as myself managed to do it.

Benefits of XHTML
There are 2 primary benefits to using XHTML. First is the strict nature of valid XHTML documents. “Valid” documents contain no errors. Documents with no errors can be parsed more easily by a browser. Though the time saved is, admittedly, negligible from the human user’s point of view, there is a greater efficiency to the browser’s performance. Most modern browsers will function well in what’s usually referred to as “quirks” mode, where, in the absence of any on-page information about the kind of HTML they are reading, present a “best guess” rendering of a page. The quirks mode will also forgive many errors in the HTML. Modern browsers installed on your home computer have the luxury of size and power to deal with these errors. When browser technology makes the leap to other appliances it may not have the size and power to be so forgiving. This is where the strict, valid documents demanded by the XHTML standard become important.

The second benefit is in the code itself, which is cleaner and more compact than common, “table” based layout in HTML. Though XHTML retains table functionality, the standard makes clear tables are not to be used for page layout or anything other than displaying data in a tabular format. This is generally the primary obstacle most designers have with moving to XHTML. The manner in which many designers have come to rely on to layout and organize their pages is now taboo. Simple visual inspection of XHTML code reveals how light and efficient it is in comparison to a table based HTML layout. XTHML makes use of Cascading Style Sheets (CSS), which, when called externally, remove virtually all styling information from the XHTML document itself. This creates a document focused solely on content.

XHTML makes use of “div” tags to define content areas. How these “divisions” are displayed is controlled by CSS. This is known as CSS-P, or CSS Positioning. Trading in “table” tags for “divs” can be tough. Learning a new way of accomplishing an already familiar task is generally difficult. Like learning to use a different design program or image editor, frustration can be constant. Looking at “divs” as a kind of table cell might be helpful, though they are not entirely equivalent. As required by the XHTML standard, always make sure there is a DOCTYPE definition at the top of the document. This is not only required by the standard, but it will force Internet Explorer 6, currently the most common browser, to enter its “standards compliance” mode. IE6 and Firefox, both operating in standards compliance mode will display XHTML in much the same way. Not identical, but far better than IE6 operating in quirks mode. Learning how to iron out the final differences between displays is the final obstacle and can require a bit of tweaking in the CSS.

Clean code has multiple benefits. It creates a smaller page size which, over time, can save costs associated with transfer usage. Though the size difference may appear small, for someone running a highly trafficked site, even saving a few kilobytes of size can make a big difference. Further, some believe search engines may look more kindly on standards complaint pages. This is only a theory, though. In a general sense, any page modification that makes the content easier to reach and higher in the code is considered wise. Search engines, so it is believed, prefer to reach content quickly, and give greater weight to the first content they encounter. Using XHTML and “div” layout allows designers to accomplish this task more easily.

Conclusions
XHTML is the current standard set by the W3C. The W3C continues development of XHTML, and XHTML 2.0 will replace the current standard in the future. Learning and using XHTML today will help designers prepare for tomorrow. Valid XTHML produces no errors that might slow down a browser, and the code produced is clean and efficient. This saves in file size and helps designers better accomplish their search engine optimization goals. Learning XHTML is primarily about learning a new way to lay out pages. Though frustrating at first, the long term benefits far outweigh any initial inconvenience.

Eric Lester worked in the IT industry for 5 years, acquiring knowledge of hosting, website design, before serving for 4 years as the webmaster for Apollo Hosting, www.apollohosting.com. Apollo Hosting provides website hosting, ecommerce hosting, vps hosting, and web design services to a wide range of customers.

Making a 3 Column Fluid Layout With CSS

Friday, May 1st, 2009

3 Column CSS Layouts always seem to be the most sought-after by web designers. To create a layout with three columns, including two fixed width sidebars and a fluid center and not using tables seems to be, as A List Apart’s Matthew Levine put it, The Holy Grail in his article on this.

While I was looking over the article, I thought I could make it easier for you, the common web designer to do it easier and without so many browser hacks. So spawned this tutorial. In this tutorial, you will be creating a valid XHTML 1.1 Strict and valid CSS layout with three columns, and no IE, Firefox, or other browser hacks.

The finished layout can be found here.

Basics

So to start, we need to define the basic page.


This should all be very basic. The doctype will be XHTML 1.1, and the rest should be obvious.

The first thing we will be doing is modifying the basic styles. In between the

tags, add:

* { margin:0; padding:0; } BODY { background-color:#651; }

* { margin:0; padding:0; } means that all elements will have an initial margin and padding of 0. This ensures that the layout will fit the page fully. Without having a margin and padding of 0 on the body, there would be a space all the way around the layout. BODY { background-color:#651; } sets the background color.

The Header

The next thing that most websites have now is a header. It seems to be a staple for websites, to have your saying and website name in a header at the top. So we’ll go ahead and create that.

So to create the header, the style will be an id with two rules.

#header { background-color:#BFAC60; padding:.5em; }

This has a background color of kind of a darker gold. And you should add some padding to create some readability.

The HTML is just as easy.

It’s a simple

element with an id of header. Notice we did not have to add another rule for the header (h1). We already said in our first rule that all elements have 0 margin and padding, which is my pet peeve with headers. And that’s a very easy header. It extends across the browser page.

The Columns

Now we get to the fun part. To actually make the columns.

Float Left
Center Content

The HTML is very simplistic. Three divs. One with an id of left, one with an id of right, and one with an id of center. This makes it so much easier to manage for you than crazy wrappers and everything.

The CSS, however, is still very easy.

#left { float:left; width:200px; padding:.5em; background-color:#dc8; } #right { float:right; width:200px; padding:.5em; background-color:#dda } #center { margin-right:215px; margin-left:215px; padding:.5em; background-color:#eec; }

Allright. We’re going to use floats for this layout. Floats in CSS force an element to either the left or the right. Here we must make the floats go above the actual center. We can’t make the divs in order of left, center, right, or right, center, left. It must be left, right ( or right, left) then center. The reason is that floats will be forced to its side, and if it’s in the wrong order, it’ll either come before or after it’s supposed to.

Anyways, #left will float left. We’re going to make it have a width of 200 pixels. Why? It’s a good width. Why not? Then we have the simple padding of .5em, and a yellowish background color. #Right will be exactly the same, except it will float to the right.

Center is a bit different. For the center div, you must define the margins for both the left and the right, or else it will either be forced to another line, or force another div to another line. But after that, the padding is still .5em and we have another light gold-ish yellow background color. You can also notice that you don’t need to define a width. It already will adjust to the width of the browser and leave room for the sidebars with the margins.

The Footer

If you’ve previewed your layout, it will be very, very messed up. And this can all be fixed with one simple div which must have clear:both. Which leads us to another trend: a footer. Most websites now have a footer at the bottom which gives some kind of info and maybe some contact info, or some links, etc. Your footer will serve two purposes: the most important is to fix the layout, and the second is to give that info.

Using float:left or float:right in layouts always gives some problems unless it is cleared. What the clear:both means is that the floats and the layout will be forced to the bottom, which fixes most problems with this. The footer CSS is as follows:

#footer { clear:both; background-color:#CCC08F; padding:.5em; }

That’s it. It’s the same as the header basically, except it has a clear:both statement to fix the layout. And you can probably figure out the HTML:

It’s that easy.

The only thing that could make this better, is to make the links fit in a bit more with the color scheme.

a { color:#807859; text-decoration:none; } a:hover { text-decoration:underline; }

Makes it a nice goldish color. Kind of like the Epiphone.

And that covers exactly how to make a great 3 column fluid width layout with relative ease.

The finished page is:


Float Left
Center Content

Continued…

You can extend this to make a two column layout by simply removing one of the two divs (either #left or #right). By leaving #center and just taking out the corresponding margin, it will instantly make it a 2 column layout. Good job!

Barcoding for Microsoft Dynamics GP/Great Plains – Customization Review

Wednesday, February 11th, 2009

As we see ERP system are implemented in the companies, where it must be tightly integrated with existing or legacy system, automate warehousing, shipping & receiving operations, bar code scanners (Symbol wireless and stand alone) inventory order fulfillment. One of the directions is so-called supply chain management implementation (Radio Beacon, for example), integrated with Microsoft Great Plains. Another solution, which should be cheaper and fit for mid-size warehousing operations – use third party custom modules for Microsoft Dynamics GP as well as have customization partner to tune custom piece for your unique warehousing operations. In this small article we will give you an overview of light barcoding functionality, available for Great Plains.

• Sales Order Processing (SOP) custom logic. Barcode scanning is in general similar to entering characters from the keyboard itself, and it is natural to improve SOP logic to automate such processes as order fulfillment or shipping. In this case you should be able to invoice more than it was ordered, for instance. Simple Great Plains prompt screen should just let you decide if you would like to overship or not.

• Barcode – Item number. You should probably be able to have these two coexist in parallel – we suggest the association to be stored in custom table.

• Serial/Lot Number. We often see the need to associate lot number with the specific large unit of measure, like roll (of cloth/fabric), having slightly variable number of yards or meters each new time (having new lot number or serial number). The variable length must be associated with the lot number in parallel with standard unit of measure logic

• Technology. The customization technology for Microsoft Dynamics GP is still the same as it was 5-10 years ago – Microsoft Dexterity or former Great Plains Dexterity. Customization exists in the form of chunk (file with .CNK extension), which is integrated with Great Plains workstation the first time you launch the application and then becomes custom dictionary file (DYNAMICS.DIC is core functionality, CUSTOM.DIC is your customization dictionary for example). Dexterity uses scanscript coding and has Microsoft Dexterity IDE. In some cases you can extend Dexterity customization with SQL stored procedures, VBA scripting with Microsoft Great Plains Modifier (DYNAMICS.VBA), but the Dexterity is still preferable, if we are talking about standard Great Plains client application. If you plan to deploy web interface, you should consider newer technologies, such as eConnect.

• SQL Tables. In the case of SOP you deal with SOP10100 – Sales Document Header, SOP10200 – Sales Document Lines, plus you need to read IV00101 – Inventory Item Master and IV00102 – Item QTY Master tables

• Microsoft RMS Integration. If you sell on the retail level and would like the transactions to be consolidated into Great Plains – you need Microsoft Dynamics GP – MS RMS Integration module. In our case we have it for AR/SOP/POP level, then you post transactions in Great Plains and have them come through the whole way up to GL

Give us a call 1-866-528-0577 or help@albaspectrum.com if you need additional information or directions.

Andrew Karasev is technical consultant at Alba Spectrum Technologies ( http://www.albaspectrum.com http://www.greatplains.com.mx http://www.enterlogix.com.br ), serving clients in Illinois, California, Texas, New York, Florida, Louisiana, Georgia, New Jersey, Washington, Pennsylvania, Ohio, Michigan, Wisconsin, Arizona, Nevada, and having locations in Brazil, Colombia, Chile, Argentina, Germany, Mexico

Paint Shop Pro 9 On Review

Tuesday, December 23rd, 2008

Do you want to create an artistic version of your photo? How about a program that allows you to undo individual steps that you applied on the image without affecting all other steps?

Paint Shop Pro 9 introduces two special effects filters, the Displacement Map and the Radial Blur. The Displacement Map is a tool for creating 2D and 3D surface distortions while the Radial Blur is used for creating blur effects including spin, twist and zoom. With the Print Layout dialog, you will be able to add freeform text captions and title to your photo layouts using the Text Options. The new Text tool options allow you to create vertical text and render small font sizes. For polygons and star shapes, you can use the new Symmetric Shape tool that’s customizable.

Paint Shop Pro introduces another tool for digital camera users, the Info palette. This palette is designed to show the EXIF data that digital cameras automatically store with their images. Examples of which are aperture and exposure. Paint Shop Pro 9 contains features to support unprocessed raw sensor data that are captured by advanced cameras. It also allows you to set customized white balance and exposure, as well as sharpening of settings for import.

You can now easily undo any individual editing step in a document’s history through the use of the Powerful Selective Undo. The History palette lists all the commands that you applied on the image. You can undo specific steps without affecting subsequent actions.

The latest Paint Shop Pro features new enhanced filters. It has Digital Camera Noise Removal, which not only scans photos it also eliminates image noise introduced at the sensor while intelligently preserving image textures. Its Chromatic Aberration Removal removes undesirable coloured glow around images caused by digital cameras. It contains a Fill Flash Filter that corrects the underexposure of shadows and Backlighting Filter compensates for overexposed areas.

Not only does this software handle existing photos, it can also create images from scratch in both bitmap and vector format. It also has Rectangle and Oval tools. The Pen tool in this version is a lot simpler.

The new Art Media tool is a realistic art-based functionality that contains tools including Oil Brush, Palette Knife, Chalk, Pastel, Crayons, Colored Pencil and Marker. This tool features a traditional-style Mixer that’s just like those traditional artist’s tools. You can add, mix and sample your paint on an off-canvas area using the new dockable palette. You can also convert photos to an artistic version by setting the colour to Trace, it automatically samples the underlying colour.

However, working with this software requires longer time, but you can be assured of great results. It can convert average photos to outstanding shots with eye-popping quality and clarity.

About The Author
Blur Loterina
You may wonder why I write articles. Besides from the fact that it’s my job, I used to write short stories when I was younger. I think it would be helpful if I said I’m a big fan of Zach de la Rocha and Rage Against the Machine. This would explain my own views about a lot of things. Their songs were about national issues, politics and human rights. They support the American Indian Movement and Che Guevara, the face you see on t-shirts. Not that it concerns me. I only like their music and idealism.
I’m not an artist, I’m not a poet. I just love writing anything I want. I wasn’t born a genius, I just want to know and understand something I don’t. I like to find the difference between similar things. It’s like counting birthmarks on each identical twin.
For additional information and comments about the article you may log on to http://www.printingquotesonline.com

Bookkeeping Scares Me!

Tuesday, October 14th, 2008

Does the thought of bookkeeping scare you? Do you dread sitting down at your computer and entering all your receipts, deposits, and making sure everything is documented right for taxes? Never fear, there is a new, more affordable solution to having your bookkeeping done. Two words-Virtual Assistant. The industry of virtual assistance is relatively new, though the concept has been around for some time. With the age of computers, it has made the opportunity for small business owners to outsource their bookkeeping (and administrative tasks-but that is another article) to a qualified individual. This saves time, headache, and the possibility of error. How does this work? Below are some of your questions answered by several experienced Virtual Assistants (VAs).

Is a Virtual Assistant the same as a CPA?

No. Usually a Virtual Assistant will work along side of your CPA. Depending on your Virtual Assistant and their experience, they will handle the daily accounting needs all the way to filing your taxes. Many Virtual Assistants will work with your CPA to be sure your books are in correct order. A Virtual Assistant who is just your bookkeeper will make sure the company is set up correctly (working with your CPA) and entries are posted correctly. A CPA will do the sales, unemployment taxes, and payroll IF the Virtual Assistant is not qualified. Cheryl Almstrom of Effective Office Services once calculated with one client she had cut his bookkeeping costs by 75% over his previous accountant. By finding the right Virtual Assistant, to meet your needs, there can be a tremendous amount of money saved.

Education

The Virtual Assistants who donated their time and information to this article had a vast amount of experience and training. Some had learned “on the job” bookkeeping, while others had courses and degrees. Some had been doing bookkeeping from a couple years to twenty years. All are dedicated to making sure your books are kept up to date.

Sharing Information with your Virtual Assistant

The wonderful thing about the technology today, is that you don’t ever have to leave your office to get your bookkeeping done. You can choose to enter your information into a spreadsheet set up by your Virtual Assistant (and then email a copy), fax over all the information needed, send everything postal mail, or have your Virtual Assistant pick up and drop off your reports. You can even have the Virtual Assistant work on your computer without having to be in your office with secure online software. Some clients give the Virtual Assistant access to their accounts online to check and balance. It is what you feel comfortable doing and what works best for you and your Virtual Assistant.

You can have your Virtual Assistant print out reports and fax or email them to you. You can keep a copy of the updated file on your desktop by having them send you the file. Depending on how you and your Virtual Assistant set up your relationship, there a multitude of ways to keep you up to date on your books.

Software

The wonderful news is that you, as the client, wouldn’t even need bookkeeping software. Many of the vas I spoke with use QuickBooks, Quicken, and Excel (to name a few). Virtual Assistants have the software on their own computer, and can do your bookkeeping using that software.

The beauty of having a Virtual Assistant is exactly what it says-they are virtual. You don’t have to hire an in-house bookkeeper and provide the space or equipment. Additionally, Virtual Assistants only charge for the time they work. There are no breaks or having to find work for them to fill their hours. A Virtual Assistant can take away the stress and time of doing the books, and allow you to focus on your business.

If you feel you would like to explore the possibility of having a Virtual Assistant work with you on your bookkeeping (or other administrative tasks), you will find a list of all the Virtual Assistants who contributed to this article at this link http://www.jerpat.org/moretime4u/articles/bookkeepers.htm.

An additional article with more information on bookkeeping can be found at http://www.jerpat.org/moretime4u/doyouresist.htm.

About The Author
Patty Benton is the owner of JERPAT Virtual Assistants and JERPAT Web Designs, www.moretime4u.org, which provides affordable administrative and web design support to coaches, small businesses, religious organizations, and realtors. Additionally, Patty is a coach for new entreprenauers interested in venturing into the virtual assistance industry. She has developed a program that is affordable for all. Visit her coaching site at www.jerpat.org/CHome.html for program details and great business resources.
© 2005 JERPAT Virtual Assistants
You have permission to reprint this article electronically or in print, as long as the text and byline remain unedited. A courtesy copy of your publication would be appreciated.

How to Crop Your Wrong-Sized PDF Pages

Monday, October 13th, 2008

Disasters happen.

Imagine you have finished a 900-page PDF document and you realize that the left margin should’ve been 0.5 inches smaller. Oops!

No cause for fear and trembling though. It’s actually very easy to take care of this vexing problem if you own a copy of the Acrobat Professional, or the “writer” version of the Acrobat as opposed to the freely downloadable “reader” version.

Open your mis-formatted PDF document in Acrobat Professional and follow these steps:

1) Select Document > Crop Pages from the main menu to display the Crop Pages dialog box.

2) Select the LEFT margin and enter 0.5 by making sure that the Unit is in inches.

3) Select ALL for the Page Range.

4) Click OK, and you are done.

You can also select to change only a certain range of pages by entering the page Numbers in the From and To fields.

You can further specify if you want those changes only in ODD or EVEN numbered pages (within the specified range) by selecting the appropriate option from the APPLY TO drop-down list.

You can always cancel your margin changes by clicking the Set to Zero button.

And by selecting the Constrain Proportions check-box you can adjust all 4 margins simultaneously, by the same amount.

Ugur Akinci, Ph.D. is a Creative Copywriter, Editor, an experienced and award-winning Technical Communicator specializing in fundraising packages, direct sales copy, web content, press releases. movie reviews and hi-tech documentation.

He has worked as a Technical Writer for Fortune 100 companies for the last 7 years.

You can reach him at writer111@gmail.com for a FREE consultation on all your copywriting needs or visit his official web site http://www.writer111.com

The Dictionary Object….Please Consider.

Sunday, October 12th, 2008

Okay, I’ll admit I’m a bit of a fan of the Array. You either love or hate an Array. People who dislike the Array will often opt for a Collection instead. Other languages do provide a really cool object called a Dictionary or Hash Table. This is like a Collection that behaves like a Collection combined with an Array with some extra handy methods. VBA does not have this but VBScript does provide a Dictionary object, which is cool, and we can make use of this object within our VBA environment. To build a dictionary object do the following:

Dim my_dictionary as Object
Set my_dictionary = CreateObject(“Scripting.Dictionary”)

Voila! We have a dictionary. What can we do with it? We can add items, check for the existence of items, return an array of keys, return an array of items, set how a dictionary compares keys and get the count and so on. An example:

‘First create the Dictionary Object
Dim my_dictionary as Object
Set my_dictionary = CreateObject(“Scripting.Dictionary”)

‘When adding an object or value to a dictionary you put the key first and the actual value or object second. The key is mandatory and you cannot add items without it.
my_dictionary.Add “Key 1″, “Value 1″
my_dictionary.Add “Key 2″, “Value 2″
my_dictionary.Add “Key 3″, “Value 3″
my_dictionary.Add “Key 4″, “Value 4″

So now we’ve added four values to the dictionary. Let’s do some things we cannot do cleanly or at all with a Collection. Say we want to replace “Value 3″ with the name “Zebra”. Too easy!

my_dictionary.Item(“Key 3″) = “Zebra”

You couldn’t do that with a collection! In a collection you would have to remove one item and add another, thus losing the order or your items. A dictionary behaves like an Array in this respect. What if we were not sure there was a key called “Key 3″ within the dictionary and wanted to avoid an error. Again, easy, we just use the Exists method of the dictionary object:

if my_dictionary.Exists(“Key 3″) then
my_dictionary.Item(“Key 3″) = “Zebra”
else
my_dictionary.Add “Key 3″, “Zebra”
end if

We might want to know how many items are in the dictionary, just use the Count method which is the same as the one in a collection.

MsgBox my_dictionary.Count

If you want to iterate through the items in a dictionary, you can’t use an integer counter as you would an Array or Collection but you can use two methods to do so:

‘You can just grab the items from the dictionary like so:
Dim items as Variant
items = my_dictionary.Items

‘Iterate through the array of items. These items can include objects aswell.
Dim separate_item as Variant
For Each separate_item in items
MsgBox separate_item
Next separate_item

‘Or you can extract the keys and iterate through the items (which is another advantage over a Collection that does not give you it’s keys or let you know what they are)
Dim keys as Variant
keys = my_dictionary.Keys

‘Iterate through the array of items. These items can include objects aswell.
Dim key as Variant
For Each key in keys
MsgBox my_dictionary.Item(key)
Next key

Too easy! To remove an item or all items you can use Remove and RemoveAll respectively:

my_dictionary.Remove(“Key 2″)

Or

my_dictionary.RemoveAll

These are the basics. I’ll look at the CompareMode method in un minuto. The Dictionary object is a real advantage when we need to build a Collection of Collections or a Class Collection. For example; say we had to collect data on spys and their current missions. Usually we would have to create a Class Object called Spy and hold a Private or Public Collection within the class to which we would add their missions. One class too many (A Collection is a Class)! Let’s use a Dictionary instead…

Dim my_dictionary As Object
Dim missions As Collection
Dim spy_name As String
Dim keys, key As Variant
Set my_dictionary = CreateObject(“Scripting.Dictionary”)

‘Add three lots of spies.
Set missions = New Collection
spy_name = “Alexander Poligraphovich”
missions.Add “Vladivostok”
missions.Add “Ukraine”
missions.Add “Beijing”
my_dictionary.Add spy_name, missions

spy_name = “Mohammed Ramadan”
Set missions = New Collection
missions.Add “Munich”
missions.Add “Tehran”
missions.Add “Sydney”
my_dictionary.Add spy_name, missions

spy_name = “Sri FitzPatrick”
Set missions = New Collection
missions.Add “Dublin”
missions.Add “San Francisco”
my_dictionary.Add spy_name, missions

keys = my_dictionary.Keys
For Each key In Keys
MsgBox key & vbCrLf & _
my_dictionary(key).item(1) & vbCrLf & _
my_dictionary(key).item(2) & vbCrLf & _
my_dictionary(key).item(3)
Next key

The CompareMode method lets you set how the dictionary compares it’s keys when looking for duplicates etc. There are four compare modes vbBinaryCompare, vbTextCompare, vbDatabaseCompare (for MS Access only) and vbUseCompareOption (which uses the setting in the Option Compare statement at the top of a module). How can we use this? Say we add two values with the Keys of monkey and MONKEY’ one in all lowercase and the other in all uppercase.

my_dictionary.Add “monkey”, “Giraffe”
my_dictionary.Add “MONKEY”, “Elephant”
MsgBox my_dictionary.Count

The MsgBox will show an item count of 2, because the two keys are essentially different. The dictionary is performing a binary comparison upon the keys so you can add more than one ‘monkey’ as long as they have some difference in character case. What if we wanted the word monkey in all of it’s forms to be compared by name and not content? In other words we don’t want more than one ‘monkey’ in the dictionary. We use CompareMode vbTextCompare:

my_dictionary.CompareMode = vbTextCompare
my_dictionary.Add “monkey”, “Giraffe”
my_dictionary.Add “MONKEY”, “Elephant”
MsgBox my_dictionary.Count

On this example we don’t even get to the Msgbox, instead we get an error stating “This Key is already associated with an element of this collection.”. This stops two keys being added that have the same name. vbBinaryCompare behaves the same way as the first example does (it is the default) and vbDatabaseCompare….Well I read what it did once and never had to remember it again! You can find explanations for these, albeit very succinct, within the MS Help in Access, or better still Google it.

Hopefully this gives you an extra tool alongside the Collection or Array and some ideas on future use. A Dictionary makes code structure cleaner and more humanly understandable. This VBScript tool will really pay dividends.

Duane Hennessy
Senior Software Engineer and Systems Architect.
Bandicoot Software
Tropical Queensland, Australia
(ABN: 33 682 969 957)

Why recode the wheel?
http://www.bandicootsoftware.com.au

Moderator of http://groups.yahoo.com/group/AccessDevelopers

Windows Stability

Saturday, October 11th, 2008

A few words about MS Windows stability. To those with home computers this may be less of an issue but for people whose livelihoods depend on their PC’s and the programs that run on them, there are some lessons to be learned. I would like to point out a few of the most important things you can do to keep your computers up and running.

To begin with, there are 3 applications you must have that provide the foundation for a stable Windows system. The first is a virus scanner. Viruses present a threat to just about any device that has software installed on it, including cell phones. Viruses can be transmitted through email, software programs, surfing the Internet, sharing information with other users through diskettes, zip disks, tapes, etc. Many of the early viruses were spread by Eastern Bloc countries and countries behind the now defunct Iron Curtain. Wouldn’t surprise me if this becomes a popular venue for terrorists.

Ever notice your Internet browser slowing down, or strange icons appearing on your desktop, or maybe your browser’s home page has changed and you can’t change it back. These are all indications that you have been the victim of spyware/adware. These are insidious little programs that get installed on your system by hackers and advertising companies through emails, software and music downloads, Instant Messaging and Internet browsing. This is such a big problem that Dell reports that nearly 20% of their tech. support calls involves Spyware/adware.
The third application and your first line of defense is a firewall which can consist of hardware, software or both that sits between your computer and the “outside” world, whether it’s the Internet, Intranet or a network. If you have Windows XP you already have that as an option and it is automatically implemented. (Make sure you have ServicePack 2 installed, which insures it is properly implemented) For those of you with previous versions of Windows there are software programs you can either download for free or purchase that will accomplish the same thing.

The next thing you can do is perform periodic maintenance. This can prevent many problems, especially over time. The good news is that you don’t have to purchase or install anything because Windows comes standard with some of these tools. Go to Accessories > System tools. There you will find Disk Cleanup and Disk defragmenter. These are two applications that can go a long way towards keeping your system healthy. Depending on how you use your system, you should perform these at least once per month.

There is another thing you can do that is even overlooked by many computer “specialists”. DO NOT load an application or program on your Windows system unless you absolutely need it. The more applications you load on your system the more you destabilize Windows. Even if you install a program and then immediately uninstall it, there are still remnants of it that linger on your system and can act like a time bomb. I am a firm believer in the KISS (Keep it simple, stupid) method when it comes to Windows. And this includes those “helpful” desktop utility programs that purport to add, “much needed capability” to your system.

Another thing you can do for your Windows is to periodically update your systems. Microsoft provides updates on their website not only for Windows, but also for their applications as well. You can setup your system to automatically perform updates but this is a double-edged sword. I’ve seen cases where someone sits down in front of their computer in the morning and found their system totally corrupt after having been automatically updated while they slept. Some would argue that this may have been caused by a system that was already marginal to begin with, but I prefer to perform the updates manually. But however you do it, this is a very important process that should not be neglected.

The last point I would like to make concerning Windows stability addresses the hardware that your Windows is installed on. I am a firm believer in keeping your PC on ALL the time. Assuming it is protected from electrical anomalies with surge protectors and Uninterruptible Power Supplies and also assuming that you have the requisite security systems in place, you will find that your hardware lasts longer, including your hard drive if you keep your system on. Some will argue that newer technologies suggest that you should turn them off at night but my experience has proven otherwise. A classic example is a light bulb…it is much more likely to fail when you turn it on rather then when it is being used. This has to do with the initial surge of current your light bulb (system) encounters when power is first applied.

For the last twenty years I have been the service manager and later the lead engineer for the top computer dealer in my area and I also spent nine years as a manager, network administrator and helpdesk administrator for several Fortune 500 companies. For more information on this and related subjects, check out http://www.savemoneycomputersoftwarehardware.com