Posts Tagged ‘understand’

Mysql-Understand your engines

Thursday, July 24th, 2008

MySQL has two primary storange engines: MyISAM and InnoDB. Each has its own performance characteristics and considerations. In the broadest sense MyISAM is good for read-heavy data and InnoDB is good for write-heavy data, though there are cases where the opposite is true. The biggest gotcha is how the two differ with respect to the COUNT function.

MyISAM keeps an internal cache of table meta-data like the number of rows. This means that, generally, COUNT(*) incurs no additional cost for a well-structured query. InnoDB, however, has no such cache. For a concrete example, let’s say we’re trying to paginate a query. If you have a query SELECT * FROM users LIMIT 5,10, let’s say, running SELECT COUNT(*) FROM users LIMIT 5,10 is essentially free with MyISAM but takes the same amount of time as the first query with InnoDB. MySQL has a SQL_CALC_FOUND_ROWS option which tells InnoDB to calculate the number of rows as it runs the query, which can then be retreived by executing SELECT FOUND_ROWS(). This is very MySQL-specific, but can be necessary in certain situations, particularly if you use InnoDB for its other features (e.g., row-level locking, stored procedures, etc.).

The JavaScript language

Wednesday, July 16th, 2008

JavaScript is not a programming language in strict sense. Instead, it is a scripting language because it uses the browser to do the dirty work. If you command an image to be replaced by another one, JavaScript tells the browser to go do it. Because the browser actually does the work, you only need to pull some strings by writing some relatively easy lines of code. That’s what makes JavaScript an easy language to start with.

But don’t be fooled by some beginner’s luck: JavaScript can be pretty difficult, too. First of all, despite its simple appearance it is a full fledged programming language: it is possible to write quite complex programs in JavaScript. This is rarely necessary when dealing with web pages, but it is possible. This means that there are some complex programming structures that you’ll only understand after protracted studies.

Secondly, and more importantly, there are the browser differences. Though modern web browsers all support JavaScript, there is no sacred law that says they should support exactly the same JavaScript. A large part of this site is devoted to exploring and explaining these browser differences and finding ways to cope with them.

So basic JavaScript is easy to learn, but when you start writing advanced scripts browser differences (and occasionally syntactic problems) will creep up.

Search Engine Optimization-Searching by Means of Search Engines

Tuesday, July 15th, 2008

This is where things start to get complicated.
Search engines are trickier than they look!  You’ll discover this the first time you enter a query on C++, the programming language.  At least of the Web search engines will essentially say, “Huh?”

C++ is not a word.  It’s a letter followed by two characters that might, depending on the index, be regarded merely as punctuation.  Many text search engines have trouble handling input of this type.  Many don’t deal too well with numbers, either.  So much for “007,” “R2D2,”or “Catch-22.”

Important Note:  This problem is no longer as bad as it used to be.  I’m now finding relevant hits for C++ on a majority of search engines sites.

Here’s another example of a text string search engines hate:  To be or not to be.  Just about anyone who finished junior high school will be able to tell you where the phrase comes from and (possibly!) what it means.  But some search engines choke because all the words in the phrase are stop words–i.e., unimportant words too short and too common to be considered relevant strings on which to search.   However, if you enclose the query in quotation marks, forcing the search engine to find the words, “to be or not to be” in that precise order, most search engines can  recognize the phrase as a famous quotation from Hamlet.

Let’s take a less obvious example.  Suppose you’re a fan of murder mysteries and you want to search the Web for the home pages of all your favorite authors in that genre.  If you simply enter the words “mystery” and “writer,” most search engines will return hyperlinks to all Web documents that contain the word “mystery” or the word, “writer.”  This will probably include hundreds–or even thousands–of URLs, most of which will have no relevance to your search. If you enter the words as a phrase, however, you stand a better chance of getting some good hits.

However, as search technology advances, this is not as much of a problem as it was a couple of years ago. Many search engines will now automatically apply the “adjacency” operator when responding to a two-word query. This means that they will indeed look for documents in which your two words appear next to each other.

If you understand how search engines organize information and run queries, you can maximize your chances of getting hits on URLs that matter.

PHP:Write Clean Logic Statements

Monday, June 30th, 2008

Example 1: Unclean Conditional Logic

<?php
if($userLoggedIn) {
// Hundreds of lines of code
}else{
exit();
}
?>

The above statement seems straight forward, but it’s flawed for the reason that the developer is giving this conditional block too much responsibility. I know that might sound a little weird, but stay with me.

The type of conditional organization above makes for unnecessarily complex code to both interpret and maintain. A brace that’s paired with a control structure hundreds of lines above it won’t always be intuitive for developers to locate. I prefer the style of conditional logic in example 1.2, which inversely solves the previous example. Let’s take a look.

Example 2: Clean Conditional Logic

<?php

if(!$userLoggedIn) {
exit();

}

// Hundreds of lines of code

?>

This conditional statement is more concise and easier to understand. Instead of stating: “if my condition is met, perform hundreds of operations, else exit the script”, it’s saying “if my condition is not met, exit the script. Otherwise, I don’t care about what happens after that. I am only concerned with stopping execution”. So, by doing this, you’ve limited the operations that a given control structure has been tasked with, and that will help other developers quickly understand your code.

The VERY SHORT SEO Check List

Thursday, June 26th, 2008

There are many great SEO check lists out there but they are sometimes a little long and confusing. Here’s a concise SEO check list.

Research your market and understand what people are searching for.
Write content that matches your research.
Build your site using clean code and well tagged content.
Ask for and try to attract relevant links.

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.

Search engines (on sites) don’t work

Wednesday, June 25th, 2008

If a user doesn’t click on the Search button, they are 50% more likely to find the information they are looking for than if they do. This is disconcerting until you think about how most search engines handle searches and results:

  • Many sites have several different search engines for the Web site.
    These may be intuitive to the Web designer, but often the user doesn’t know what the difference is (or even perceive that there is a difference).
  • Users don’t know what they are going to get when they search.
    They may be getting a list of pages on this site, the Web as a whole, a sub-set of this site, or something completely different.
  • Results were confusing and hard to understand
    Often the search results were something apparently unrelated to what the reader searched on. Or, there was no text to clarify the search results, simply the title or file name.

7 Skills of Highly Effective Freelance Graphics and Web Designers

Saturday, June 21st, 2008

1. Adobe Photoshop - The ability to use and understand the basics of pixel based photo manipulation. The best Photoshop experts are constantly learning and experimenting through online tutorials, books and seminars. This is the grand daddy of them all. Make it a goal to spend X amount of time each week learning a new technique.

Test: Can you do complex selections via the selection tool? Are you accomplished with layers? Do you understand how to use adjustment layers, masks and channels? Can you remove blemishes, “scratches” and color correct

2. Adobe Illustrator - The ability to use and understand vector based graphics. This program is essential to creating crisp, clean artwork. You will need this program for logo/identity creation, poster work and even some print work. The program can be a bit tricky to learn but worth all and any aggravation to learn it.

Test: Do you understand the concept of bezier curves? Can you convert a bitmap image to a vector graphic? Have you mastered multi-step gradients? Do you know how to create graphic images with text?

3. Adobe InDesign or Quark Express - The ability to use a page layout program. This program is fundamental to any print work. Whether you are creating books, magazines, brochures, sell sheets or advertisements you will need to possess the skills of a high-end layout program.

Test: Do you understand the concept of Master Pages? Would you be able to set up a 32 page catalog? Do you have an understanding of how to control text with images? i.e.; how to flow text in and around images. Do you have basic knowledge of offset printing and pre-press processes? Hint: if not, schedule a visit to a fairly large local printer and ask if you can be shown their process AND bring a list of a questions.

4. Flash - The ability to use and understand this motion-based juggernaut. Flash is now the most widely deployed video platform on the Internet. Flash Player is installed on nearly twice as many desktops and devices as any other video player. As the web becomes more and more video-based having a solid knowledge of Flash, In my opinion, is one of the most important programs to learn.

Test: Can you create a simple animation? Do you understand the concept of keyframes? Do you know how to incorporate a Flash movie into a web page? Do you understand the power of interactivity and user interface design?

5. Understand Typography One of the most “overlooked” design skills today is knowledge of Typographic design. It is one of the tell-tale signs between a good and excellent designer. Our business is all about communication and if type is not clear, appropriate or well designed the design is seriously compromised.

Test: Do you have a font management system installed on your computer? Have you recently read (or revisited) some of the classic type books? Are you up-to-speed on typographic standards? Do you know the difference between True Type, PostScript and OpenType fonts? Do you have a font reference guide resource book in your studio?

6. Idea Generation In the design business it is critical to have a method of idea generation. Why? Some of the best designers in the world are paid the most money not because they know Photoshop of Flash better than you do but because they have the ability to consistently come up with new and innovative ideas that make their clients serious money.

Test: What methods do you use to generate ideas? Do you know how other innovative thinkers come up with their brilliant ideas? How often to you read (in general) so as to have myriad references and viewpoints to call upon? What do you do when your idea well has gone dry?

7. Building a Network To be successful in area of life you need the help and support of others. This is especially important for designers who need to spend much of their time in their studios/offices. Building a network of trusted confidants and friends will pay off in more ways than you know.

Test: How often do you attend networking events or seminars? Have you made a list of 5 influential people that could help your career? Do you have some sort of system for capturing and entering your new contacts information? What can you do this week to open and expand your network? Have you sought out a successful mentor?

BONUS SKILL #8. General Business Skills You do not have to be a genius at business but you DO need to know basic business skills, like; sales, marketing, accounting, tax strategies, database management, etc. This tends to be one myth that designers rather not deal with. If you are marketing your own design firm or you are a freelancer the sooner you learn your business is NOT graphic design but the advertising and marketing business you will be light years ahead of your competition.

Test: Do you know the basic outline of a sales call? What new marketing strategies have you learned/implemented? When was the last time you wrote a hand-written thank you note or sent a surprise gift to a client?

Are You Scaring Away Visitors to Your Website?

Saturday, June 21st, 2008

For most small businesses, the goal of having a web site is to attract customers, gather leads, and convert sales. But is that what YOUR web site is doing? When you get it right, web visitors have a valuable experience and clearly understand how your product or service fulfills their needs. Get it wrong and you could be sending web traffic and potential business right to your competitor’s door! Here are some common web site mistakes that can scare away visitors and hurt your bottom line:

- Too many choices – When you give your visitors too many options, it can become overwhelming, making them less likely to make any decision at all. All options are not equally important, so be careful to present your information in an organized, logical way that is easy to understand.

Editor’s Note – Please read this article I had written on another website.

- Non-relevant web site content – Be sure that the content on your site is focused on delivering your main marketing message. You are the expert on your business, so you already know what information customers need in order to make a decision. Extra information that doesn’t promote or support your message doesn’t belong on your web site.

- Unprofessional web design – The way your web site looks and functions speaks volumes about your business, even if it is unintentional. If your web site has poor layout, broken or missing links, outdated information, or looks unprofessional, your visitors will have a negative impression of your company, regardless of how great your business may be.

- Red flags – Most web users today have a healthy skepticism when they visit web sites, so make sure you show them immediately that your company is legitimate. Provide detailed contact information that includes your physical mailing address, phone number, contact names, and email addresses so visitors know your business can be trusted.

- Asking for too much information – When visitors want to make a purchase, sign up for your mailing list, or request information from your web site, what kind of a form will they be faced with? Make sure you ask only for the information that you absolutely need, and don’t try to gather too much information at once. Instead, keep the form short and simple, and then follow up later to gather any additional customer information that you may need.
Lauren Hobson is the Editor of Biz Talk Newsletter, a free monthly publication designed to provide small businesses and non-profits with tips and techniques to help them make the most of their web sites and marketing efforts without spending a lot of money. Biz Talk is published by Five Sparrows, LLC.

Google Health

Friday, June 20th, 2008

Now I think this is a bit silly, it feels as if though Google is taking over every aspect of the average man’s life. I can understand them dominating the advertising and search engine area of the internet, but a line should be drawn! Now they have released a new program entering into healthcare, Google Health, which allows you to input your details regarding your health and medication and get responses regarding diet and such.

It does seem to be a service that would benefit many people, but the problem lies with the fact that it is mostly automated responses from a computer, and not an actual physical analysis done by a doctor (one of the points stated by the U.S. Health Care System). Google responded by saying that people should benefit from as much information as they can, and this also solves the problem of having to move your medical history from one state to another. Furthermore, it seems that they are also getting support from the Bush administration since they support the push to electronically handling hospital/health records.