Posts Tagged ‘probably’

Mysql-Partition Your Tables

Thursday, July 24th, 2008

Often you have a table in which only a few columns are accessed frequently. On a blog, for example, one might display entry titles in many places (e.g., a list of recent posts) but only ever display teasers or the full post bodies once on a given page. Horizontal vertical partitioning helps:
CREATE TABLE posts (
id int UNSIGNED NOT NULL AUTO_INCREMENT,
author_id int UNSIGNED NOT NULL,
title varchar(128),
created timestamp NOT NULL,
PRIMARY KEY(id)
);

CREATE TABLE posts_data (
post_id int UNSIGNED NOT NULL,
teaser text,
body text,
PRIMARY KEY(post_id)
);

The above represents a situation where one is optimizing for reading. Frequently accessed data is kept in one table while infrequently accessed data is kept in another. Since the data is now partitioned the infrequently access data takes up less memory. You can also optimize for writing: frequently changed data can be kept in one table, while infrequently changed data can be kept in another. This allows more efficient caching since MySQL no longer needs to expire the cache for data which probably hasn’t changed.

Displaying the Last Modified Date within a Web Page

Monday, July 14th, 2008

If you would like to display the last modified date on your web page, place the following code within the HTML of your web page where you would like the date to appear.

Example:

This page was last modified on: 06/18/2008 04:45:20

Last Modified HTML Code:

<script language=”Javascript”>
document.write(”This page was last modified on: ” + document.lastModified +”");
</SCRIPT>

Change the text indicated in red to whatever you’d like.

If you would like to use this JavaScript code to display your web page’s last modified date, it is probably best to place the code toward the bottom of your web page.

Using Scripts to Spice up Your Web Page

Monday, July 14th, 2008

You can use scripts within your pages to spice them up. However, although you will probably be tempted to use all the fancy techniques to create special effects, try not to go overboard. With each script or effect you add to your web page, it will take that much longer for your page to load.

Select your scripts carefully. Most browsers now support JavaScript, so using this type of script will probably be your best choice. Keep in mind, JavaScript and Java are two totally different languages and are not in any way connected.

If you must use Java on your site, use it sparingly. Java can be slow and has a tendency to crash browsers. It can also add a lot of time to your web page’s load time.
Scripts to Avoid When Designing a Professional Site

Pop up boxes asking for your visitor’s name

Disabling the browsers back button

Continuous alert messages

Scrolling messages in the status bar

Large scrolling text

Fancy cursors

Cursor trailers

Automatic transfers on mouseovers

Mouseover sounds

This list represents only a small portion of the types of scripts you should avoid. These scripts are not only very irritating, but they’re a big waste of your visitors’ time. If you want your visitors to return, use scripts that will compliment your web site.

Take the headache out of SEO

Thursday, June 26th, 2008

SEO, link building, website optimisation, article submission, directory submission, blog posting, the list goes on.

How many times have you sat at your PC and thought “OK I’m going to do some SEO for my site”6 hours later, you are still sitting there, your head hurts, your stomach is empty, and you have done nothing.

Search Engine Optimisation is a frustrating time consuming job. You can spend weeks working on SEO for your site, and your rankings are still no where near where you want them to be.

The most frustrating thing about SEO is you cannot really see the results of your efforts. It may take several weeks, or even months, before you see any change in your search engine rankings. So how do you know that what you are doing today, is going to benefit your site 3 months down the line? Well unless you are an SEO expert you don’t.

So what is the answer? Well the answer is to outsource your SEO work to someone that specializes in SEO. Would you consider rebuilding the engine on your car? No, you would probably employ a car mechanic to do it for you. So do the same with your SEO.

How do you know which SEO companies are good at SEO, and which are just good at talking? Testimonials are one way. Don’t just read the testimonials on their site, as most, if not all of them, are made up. Ask for telephone numbers of their clients and speak to them directly. Or ask them to show you results that they have achieved for their clients. If they will not give you this information just move on to someone who will.

A good SEO company will tell you exactly what they are going to do for you. They will try to explain SEO in a format that you will understand, not try to baffle you with tech speak.

Take SEO Unique for example, they are an SEO company based in London. They believe that the key to their success is customer service. They give their customers free SEO resources to help them understand what SEO is all about. They are also in the process of setting up a free SEO questions and answers section on their site.

Look for SEO companies like SEO Unique. Companies that are not afraid to explain SEO in lay mans terms. If you have a better understanding of what is involved, then you are in a better position to decide what you need. It is then down to the SEO company that you choose, to deliver the results that you are after.

Choosing an SEO company is very a difficult job, there is no doubt about that, but if you take a few of these pointers on board, then you should be better equipped to negotiate the minefield that is SEO.

The Art of Planning and Designing a Website

Saturday, June 21st, 2008

If you are building only a one or two or even three page (or personal) website, you do not really need to plan(though it would not harm to plan). But if your website contains ten plus pages, it would probably be to your advantage to plan.

What Your Visitors Want

When you visit a Web Site, you usually have a reason for going there. Even if you stumble upon that website accidentally, there is something there that grasps your attention and interests you.

Therefore, through out the whole planning process, you should consider what your visitors expect to see on your site. You should have a clear idea of which type your visitors are. For example, will they be old or young. If they are old, then you should make the design really simple and without the flashy flashy. If your target audience are kids, you could then include all the flashy flashy, without which they would not be attracted!.

So, you see, it is imperative that you have an idea of the type of your audience.

Site Organization

The most important thing in your website could be your site structure. May be, because of your clumsy structure, visitors leave your site. Therefore, it is necessary to have a structure that suits your site and is friendly for the visitors. Aww… why care about the visitors??? Because you have to! Otherwise you’ll be outta business!

There are two main types of organizational techniques, namely hierarchical and linear. Let us have a look at them now:

Hierarchical Organization

In this type of organization,all the pages (except for your home page), are grouped and are connected to the home page. The pages in the groups are connected to each other and they may be connected to the home page also, but the main page(or the home page) of that group should always be connected to the home page.

The home page is also connected to the main pages of each group and all the pages of each group are connected to the main page of that group This type of organization is suitable for websites which have a huge amount of content which can be divided into groups. The reader knows at every point his position on the website. However, it is not suitable to have too many groups as the reader may get confused.

Linear Organization

In this type of page organization, all the pages(including the homepage), are connected like the pages of a book - one page comes after another. This type of organization may be good for Do-It-Yourself type of websites, as steps often have to be followed in order. All the pages are connected in a “Back” and “Next” order. This type of page organization is good for several types of websites, but it limits the reader’s freedom of roaming around the site as he pleases. You could also add a “Home” link on every page to take the reader to the home page directly from each page.

A Mixture of Both

You could also use a mixture of both hierarchical and linear organization for your website.For example, the contents of your website could be divided into groups and the pages in each group could be connected to each other. This way, the reader would have more freedom to roam around your site.

Webbed Organization

This is another type of organization. In this type, several pages are connected to each other like a web. But too much use of this and your visitors could easily become disoriented and lost.

Navigation Tips

Navigation always will be a very important part of a website. Navigation can make or break the possibility of having more readers.

Unfortunately, navigation is the least of the worries of many webmasters. Bad navigation is also one of the main causes for declining or few visitors. Make sure you don’t fall in the trap! Do not confuse the reader with navigation

You cannot afford to lose your users in this way. You should, at every page of your website, let the user know where he or she is. One way of doing this is to use meaningful URLs. For example the URL to this tutorial is:

htmltheeasyway.com/basics/planning_and_design.shtml.

Anybody who sees this URL can tell that this page has to do something with planning and design of something. So it does not confuse the user. Now compare the above URL with this:

htmltheeasyway.com/b/122.aspx

Can you work out what the page is about?? Neither can I. Therefore, it pays to have meaningful URLs.

Another good way is to have a breadcrumb trail on the top of your pages.It is a textual representation of the site or directory structure, showing where the user currently is, so the user is not confused. We also have one on our site.

Keep it Simple

Yeah, you must keep it simple. Fancy JavaScript mouse-overs and mammoth size images only worsen the miseries of the reader! In addition, they also slow down the speed of loading, further disillusioning the user with your site.

Try to use text-links instead of images and use CSS mouseovers. CSS mouse-overs are a lot speedier than Javascript mouse-overs. Also, as much as possible, use simple text in place of images. For example, as I have done, you could use some clever bits of HTML and CSS to make simple text look like images. Look at the htmltheeasyway.com logo, for example, Using CSS, I have made it look like an image, but in reality, it is not!

Website Design

Believe me, website design can make or break a website. Too much of flash and mammoth sized images resulting in long load times and your users would rather sleep than wait for your site to load. Keep it simple and easy on the users. Here are some tips..

Page Design

When designing your pages, you should always try to make the user experience similar to the real world. For example, most languages like English are read in a left-to-right manner. So if your target audience is an English one, you should position your elements in such a way that your users do not feel much different. For example you could place the navigational menu to the top or the left of your page, etcetera.

Oh, yes, if your target audience’s language is one which is read right-to-left, such as Urdu, you could position your elements in a different manner, such as the navigation on the right, etcetera. So forget all those weird designs you have in mind and design for your target audience to make it easier for them.

One thing to remember, your visitors want to the see content that you have on offer, not to see how much you have decorated your website through flash and mouseovers and all that. Now by this I do not mean that you should not do any thing to make your site attractive, but you should try to remain in between the two extremes.

Now on to the actual design of your website’s pages. First make a vague(or as elaborate as you want) sketch on paper about what a page will basically look like. Then on a graphics program like Serif PhotoPlus, on a canvas of about 783 x 398 pixels(this is the minimum amount of free space on a 800 x 600 screen), draw the layout of your pages, with colour and all(What looks good on paper, will not necessarily look good on a computer screen, so it is best to design your site on the computer only). And then, through the help of this basic layout, begin to code your webpages.

Site Structure

The next important thing that you have to look into while designing your site is your site structure. You must decide which kind of organization to use on your site: hierarchical, linear or a mixture of both. I have explained all of these above. Before you begin on your site, you should have a clear idea on the type of structure to use. You can get a laydown on these three types above.

Some Google “Tricks” You Were NEVER Told About and Some You Probably Already Know.

Saturday, June 21st, 2008

1 Searching in a Range

So, you are searching for Sexy Singles between the age of 18 and 25 or looking for a cake which weighs between 100 and 200 pounds? Google has a way which lets you specify the range you want to find results in.

The trick is to use “..”double dotsbetween the range. For example, Cake 100..200 pound or Sexy Singles 18..25 years.

I don’t really want to give the exact query I used to test this trickI am sure some of you are reading it from workbut don’t forget to specify the unit. Google is smart but not “THAT” smart.

2 Synonym Search

Want to search for the term and its synonyms at the same time? Google makes it easier for you than you having to search every synonym individually.

The easy way that Google offers is just to add the “~” sign in front of your search term and voila!

For example if you want to search for funny pictures and its synonyms then just search for ~funny ~pictures and Google will return the results for funny picture, funny image, stupid pictures, comic image etc. Get the idea?

3 Remove Some Words

If you want to omit certain words from the search results then you can simply add the “-” sign in front of your search term.

Lets say that you search for Clinton on Google, you will get results for Bill Clinton, Hillary Clinton and even Monika Lewinsky. But if you don’t want search results for Hillary, just add - Hillary and you will see results only for Bill Clinton and Monika Lewinsky.

4 Let Google Define It

You can add “define:” in front of a word and Google will find its definitions from around the Internet. Just try searching for define:css and you will see what I mean.

5 Spelling Uncertainty? Let Google Handle it.

If you are uncertain about the spelling of a word you are searching just add the “?” sign in front of it and it will show you results for all possible word combinations. If you search sun?day, you will get results about sun earth day and the word sun-day too!

6 Get Stock Updates.

Add “stocks:” operator in front of the STOCK TICKER and Google will link to a page showing stock information for those symbols. For instance, [stocks: goog yhoo] will show information about Google and Yahoo.

Know More Google Tricks? Add em below.

Eliminate Ie’s Autocomplete Reminder

Wednesday, June 18th, 2008

AutoComplete: Some people like it, some don’t. Those who don’t like it turn it off. Those of us who turned it off are now constantly being prompted to turn it on. By now, we despise it! How do we turn it off completely, with no more pop-ups asking us to turn it on?

It does seem that Internet Explorer really wants you to use AutoComplete. On a system with AutoComplete turned off, it will prompt you from time to time, asking to turn it on again. A Registry tweak will prevent IE’s “helpful” reminders. First, close all IE windows.

1. Launch REGEDIT from the Start menu’s Run dialog.

2. Navigate to the key HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel.
Note that this key may not be present in its entirety. You may need to create the Internet Explorer and Control Panel subkeys. In the right-hand pane, look for a DWORD value named FormSuggest it will probably not be present.

3. In that case, right-click in the right-hand pane and choose New | DWORD Value from the pop-up menu. Name the new value FormSuggest. Whether you found it or created it, double-click this value and set its data to 1.

That should terminate the annoying reminder.