Monthly Archives: July 2017

Symbol Tables In Compiler Design

A compiler from the user’s perspective is a software that reads input source files and compiles them. The output of the compiler is usually one main executable file and some auxiliary files. The compiler should be fast and should generate optimized code.

But for the compiler designer a compiler is a beautiful balance between data structures and algorithms. Both are needed to quickly scan source files, to parse the tokens, to generate intermediate code, to optimize it and to link modules. Each compiler stage needs the data in some format. Even highly optimized algorithm would be inefficient if the data would not be stored efficiently. One of the most important data structures in every compiler is symbol table.

Symbol table is a special data structure that holds all symbols, from identifiers to internally generated nodes. Compiler symbol table must contain data structures that will hold string values for symbol names, integer values for data pointers, bit values for boolean flags and fields for special purposes. The organization of the symbol table must be such that it is possible to quickly search for a symbol, to quickly move to the next one. to easily add a new symbol at any position, to easily move data from one place to another and not to use much memory. When you try to combine all the requirements you will find that it is not so easy to decide in which form the data should be stored. One of the compromises is to use different symbol tables for different kind of data.

For example, the symbol table that stores the identifiers needs to efficiently store strings of variable length with associated attributes. One of the functions most frequently called during the scanning of the source file is to check whether the identifier is already in the symbol table. The brute force method to check all identifiers would be very inefficient. Therefore, a better method has to be found. A common approach is to use hash tables. There is a hash function that for each identifier calculates some integer value. This value should only depend on the identifier name. This value needs to be power of 2 and few bits is enough. For each hash value there is a separate linked list of identifiers. So the hash function determines in which list the identifier will be stored. This way we can minimize the search count.

Another example is symbol table that, for example, holds the nodes of program control flow. You need to be able to quickly move in both directions starting from any node. This requirement implies use of two-way linked lists.

The best way to learn about symbol tables, hash functions, linked lists and algorithms is to examine the code of some compiler. You will need some time to become familiar with the functions and the data used but then you will have an overview of the whole picture. Every compiler is a symphony of data structures and algorithms.

SEO by Design

SEO: Optimizing Sites for Search Engines

SEO means Search Engine Optimization. All successful websites are “optimized” to help search engines find your site and for the searchers to want to come to you. If your site has been built with SEO in mind, the search engines will find your site, you will make page one and the searchers will click the link to your website.

SEO is Easy

So, want to “optimize” a web site to be search engine and visitor friendly. GREAT IDEA! If you can keep the searcher in mind in every aspect of building a website, you can climb the ranks of the search engines quickly and easily. If you follow the steps listed here, you can build a web site that is traffic driven and search engine optimized.

SEO Takes Patience

Of course, if everyone used good SEO, we all would have a 100,000 (or better) ranked web site. It takes time, patience and, above all, perseverance. Here we will try to help you to not get overwhelmed by the process. Take it one step at a time and don’t get ahead of yourself. Website development involves a lot of steps and you don’t want to take shortcuts to building your e-business.

Questions You Need to Answer

As your own “website builder”, you have found the inspiration for your e-commerce website, here are the steps in the design process:

Develop a Concept: How are you going to serve your visitors’ needs?

Compile a Keyword List: These searched terms are essential content to get your traffic.

Blueprint your Site: Make it logical and flowing from general to specific needs.

Decide on a URL: This rose HAS to be named well.

Monetization: How are you going to make money?

SEO is Service

Before we begin, we all know that everyone searching the internet has one thing in common: they want information. Therefore, serving your visitors the information they want is the best way to make them stay. By giving them the knowledge they desire we gain trust and respect. Wouldn’t you like to have someone you respect and trust in all your business dealings? So would they.

SEO is a Virtue…

If taking the time for good SEO isn’t your “cup of tea,” then you can try other avenues of designing an e-commerce website. Even so, You’ll still want to structure your site so it flows smoothly from point to logical point,

Let’s get started.

Developing a Keyword List

Blueprinting Your Site

Don’t be Pushy

When designing a website, remember that it all flows downhill.   As the visitors go from top (your home page) to the bottom (asking for the money), they develop trust and respect for you. Never be pushy. A great web site design will lead the customer to understanding the processes, and consistently make low-pressure offers of your services.

Help Your Readers

Your home page will have general information about your business, and will only offer answers to questions they might have. Help them understand what’s involved and let them decide where they need to go from there. Here’s where you point them to more solutions in other places in your website. These are your “tier 2” pages.

Example: I want to sell stone tipped spears and arrows to hunters. “Stone Tools” or “Hunting Tools” might be my main concept for the home page. I will only discuss general information here, and only about why stone tipped tools are better than wooden tipped. Most of the links on this page will be aimed at getting the visitors to find complete answers to questions they might have (found elsewhere in my site).

Proper Links

In tier 2, you will have a number of pages, all of them logically divided into categories.  These should answer needs, explain processes, or describe aspects of quality in your products and services. Links from here will usually be to other areas of interest or, if necessary, explain in more detail certain aspects of your business.

Example: My Stone-Tipped Spear and Arrow business “tier 2” sites would be on how to make your own arrow heads, shafts, spears and spear points. Of course, I remind the visitors constantly that it takes practice to produce quality tools, and let them know I can provide these services to them. My links here will be to my supplier’s pages for straight, durable shafts or, perhaps, tools needed to make your own spears or arrows.

In Depth Information…

The last tier you should need in a simple web design will be tier 3, where you take a visitor through some in-depth processes. These aren’t always necessary, and can be excellent places to put more monetization links and tools.

In my tier 3, I explain to my visitor the processes involved with straightening the shafts as well as where to find the best sources for the wood and stone. Most clients won’t get this far, but it is there for those who want to learn. Of course, I offer to take the work out of the process and repeatedly offer them my arrow and spear shafts.

Decide on a URL

Search Engine Optimization begins with a keyword-based URL. The search engines “see” the web address first, and having a name that’s relevant to your marketing concept will cause you to get a higher rank than, say “Alphabet-Sales.com”. The search engines (as well as the visitors) won’t have a clue about what your site is about, and many will just pass it by. Since this aspect of web design is so critical, choose your website URL carefully. It should be short, relevant and, if multiple words are used, separate the words with hyphens. 2-3 words is best.

Almost Done:

The last thing you’ll need to do is make sure all your metadata is in place.  Make sure your page titles, page descriptions and alt text tags are relevant to each page, use a couple of keywords in them, and are written in a manner that encourages further reading. 

That’s All There is!

Once you have this all these basic SEO steps in place, all you’ll need to do is generate some great content for your site and have laid out in appealing ways and filled with keywords that are about your industry.  Google now claims to index the entire internet every day (as of July 2009), so your site will probably be indexed within 24 hours.  If you did your job well, your site should jump in rankings within 1-2 weeks of completion.

Still Not performing Well?

I suggest a third party evaluate your site by getting an SEO Visitor Impact Analysis done, then applying what the professional recommends.

Good luck!

Color Help: Color Theory and Design Psychology

Color theory is an entire science unto itself, and to get a full picture of how it all works, I’d suggest picking up a few art books. In this article, however, we’re going to take a brief look at the essentials of color theory, in light of the concepts of Design Psychology. we’ll first list a term, and then offer a short summary of how the term relates to Design Psychology.

Hue

The base name of a color without any white, gray, or black added. The terms hue and color are interchangeable.

Color wheel

A color wheel contains twelve colors, based on primitive pigments. The three primary colors are red, blue, and yellow. Three secondary colors (composed of combinations of the three primary colors) follow: red and blue make purple; red and yellow make orange; yellow and blue make green. Six tertiary colors (comprised of combinations of primary and secondary colors) form the remainder of the color wheel: yellow-orange, red-orange, violet, blue-green, and yellow-green. Black is the total absence of color and white is the reflection of all colors.

Value or Lightness

This denotes the degree of lightness or darkness of a hue, in relation to pure white or black.

Intensity, Saturation, or Croma:

This term describes the degree of purity of a hue as compared to neutral gray of the same value. This is the freedom from added white or gray; how bright or dull a color appears in relation to the basic hue.

Shades

These are deep tones, in which black is added to a color.

Tints

These are pastels, in which white is added to a color.

Tone

Adding gray of the same value to a hue or adding its complement creates a tone.

Saturation

The intensity or depth of color, such as dark or light.

Monochromatic Color Schemes

This term is used to describe rooms with only tints and shades of the same color. Neutral color schemes are usually monochromatic.

Analogous, Side-by-Side, or Related Color Schemes

These rooms use adjacent colors to the principal color on the color wheel. This is considered a friendly scheme, because the colors blend well and create a soft effect.

Complementary or Opposite Color Schemes

Rooms that use colors from opposite sides of the color wheel. This is considered to be a power and action scheme.

Triad

Consists of three colors, spaced an equal distance apart on the color wheel. Triad color schemes can potentially cause glaring and confusing feelings when all the colors are intense.

Tetrad

Consists of four colors, spaced an equal distance apart on the color wheel. Tetrad color schemes create interesting effects because of the potential variety available. They are best when two colors dominate.

Topographical Color Schemes

These schemes contain colors from nature, such as rocks, earth, sky, sea, and plants.

Floral Color Schemes

These schemes use brilliant or pastel colors found in plants and flowers.

Colorways

Fabrics and wallpapers come in different combinations of colors, or colorways. A fabric pattern will have several selections of colorways to choose from. A pattern may be available in colorways of: yellow, blue and green, red, blue and green; or purple, burgundy and blue.

Visual Vibration

This occurs when neighboring colors appear to clash and vibrate in our vision, creating a dizzying effect that adds to nervousness and tiredness.

Cusp Colors

These are colors on the edge of two colors that take on different values under different lighting situations, such as, dark blue/purple (periwinkle), orange/red (terra-cotta reds), and blue/greens (teal). Periwinkle may appear more purple than dark blue at night or under different lighting systems.

Simple Color

This is a true color, without additive colors, such as sky blue, grass green, or apple red. A simple color is a pure color.

Complex Color

This is a combination of colors, such as silvery blue, or lichen (grayish green-brown). A complex color is a color that requires a long description, such as “sort of a grayish-blue with a hint of pink.”

Palette

The entire range of colors used in a design project.

These are the basic terms used to describe color schemes within the concepts of Design Psychology. Learning them is the first step toward creating dynamic spaces for both the interior and exterior of your home.

(c) Copyright 2004, Jeanette J. Fisher. All rights reserved.