Posts Tagged ‘interesting’

fwrite vs fputs in php

Monday, July 14th, 2008

So far all the functions have been running fast anyway so the difference haven’t been that significant but things are starting to get interesting with the run time jumping to 20-24 microseconds to write a short string to a file.

fwrite vs fputs
fwrite: 24.9826359749 seconds
fputs: 20.1990799904 seconds
Time saved: 4.7835559845 seconds; 23.6820488199%

With a difference of over 4 microseconds you could run both fputs and floatval in the time it takes to run fwrite. The difference is over 23% which clearly makes fputs the better function. It’s shorter as well.

Accessible HTML

Tuesday, June 24th, 2008

It is easy to think that everyone has the same abilities as you do. People viewing Web pages don’t have special needs beyond seeing new information, interesting graphics, and useful effects, right? Wrong.

Lots of people with visual impairments, hearing impairments, and mobility impairments use the World Wide Web every day. While Web Designers can’t do much about the hardware that disabled people are using, we can strive to make our pages more accessible to them.

One of the easiest ways to check your page for Accessibility is to send it through the HTML checker, WebXact. WebXact checks your HTML and redisplays the page with images as annotations to help you see where your page might be inaccessible. WebXact checks both browser compatibility problems and disability access problems.

Here are some of the common errors and how to fix them:

* Missing alternative text description
Don’t forget the alternative text in your <img> tags. This helps people who use screen readers know what the images are, it is also useful for people who view the Web with images off

* Page does not have a noframes version
Include a <noframes> version of your framed pages on the top level frameset. A page with a completely replicated noframes version is more accessible than a noframes version that simply suggests the viewer get a different browser.

* Missing alternative text descriptions for image maps
Put an alt=”text” in your HTML area tags For example:

<area shape=rect coords=0,0,10,10 href=”example.htm” alt=”example”>

This helps people with screen readers know where the image map will take them.

* No text only links for image heavy pages
It is a nice touch to add links to text-only versions of your pages. These pages often load faster and when it is text only there is little problem for screen readers.

* No descriptive text for audio files and movie files
While audio files improve the Web experience for blind people, they are inaccessible for deaf people. The reverse is true for movie files. When there is descriptive text for these types of files, they make the page more accessible to more people.

20 Rare Questions for Google Search and SEO Tip

Thursday, June 19th, 2008

Do you ever wonder who the smartest search gurus are? Udi is one of them, and the article from Popular Mechanics covers some great strategic issues on Google and it’s search strategy. What makes Google different, and powerful? To read the full article, you can always go to the link above, below are some quesitons I found interesting:

What makes Google philosophically different from all the other search engines? What is Google searching for that others aren’t?
I don’t think it’s about philosophy. It’s about getting people what they need, and about getting the results to be as accurate and fast as possible. We’re innovating, and concentrating just on the relevancy of results. Last year we made over 450 improvements to the algorithm.

There have been a lot of fads in search of late, such as Human Assisted Search and contextual search. Do those get folded into search as a whole? What are real trends in search and what are fluff?
So let me first tell you about Google. At Google we do not manually change results. For example, if we find for a particular query that result No. 4 should be result No. 1, we do not have the capability to manually change it. We made that decision not to put that capability in the algorithm—we have to go and actually change the algorithm. That is, we have to find what weakness in the algorithm caused that result and find a general solution to that, evaluate whether a general solution really works and if it’s better, and then launch a general solution. That makes the process slower, but it puts a lot more discipline on us and makes it more unbiased.

Whether it’s at Google or not, is there a market for human-assisted search, or is that something different?
I think that the general issue is, how do you get more input from people? How do you get people to contribute more information, more content? Search is about getting lots of signals and putting them all together. The art of ranking is, how do you collect lots of signals then put them together? Signals from people are the best signals. We have several tools—and we’re going to launch many more—that will encourage people to contribute more. This does not necessarily mean one should then create the search results manually.

I’ll give you an example of something that came last week. We were evaluating a certain algorithm that adds diversity to the result. We did live experiments, which means we launched the algorithm to a very small percentage of users and then see how that compares to the result without the algorithm. One of the queries that made a difference: The query was, New York Times address. And you would think you’d understand the query, and the first result right there on the snippet gives you The New York Times. It turns out that’s not what the user was looking for. They were looking for an address given out by a New York Times reporter the day before. And because of this diversity and because of our emphasis on freshness and highlighting fresh results, that particular address appeared somewhere in the results, and that’s what the user wanted—that’s what they went to and got the result. That was something that surprised even us. You don’t think that when someone searches for New York Times address that they’re not looking for the address. Language is like that. Intention can be ambiguous.

Putting privacy aside, to what extent does finding a profile of somebody help search?
Currently, if you allow us to keep your Web history, we will improve your search. By the way, if you do this, you can always go back and remove what you want to remove or remove the whole thing or revoke that permission. But it improves search in two ways. One is, we will tune the result for you slightly. We’re not going to change the whole page—we might change position 5 to position 3 here and there, but we’ll use whatever we can from your previous searches to adapt the current search to you. The second is, we allow you to search within your Web history, which can also be very useful. You may remember something you did three months ago and you don’t remember exactly how you did it.

Could that theoretically extend back forever in time? Is there a limit to how far back something like that could extend arbitrarily, or is there a useful limit?
When we look at the personal search algorithm, obviously time gets into it. As far as you’re concerned, if you want us to keep this, it’s up to you.

Is there a literally a slider of some sort where you say, 1 month, 3 months, etc.?
I don’t believe we do that, but that’s something we can consider if that’s a big issue. I don’t think it’s a big issue. I think it’s better to keep because you might need something from two years ago.

While we’re talking on the subject of personalization, a colleague of mine said that search as you know it is falling to the wayside and changing dramatically as social networking comes into play—trending toward this MySpace-Facebook model where people look to their friends or their community as the take-off point. Do you see that as a bona fide trend? And, if so, does search become less important?
Search has always been about people. It’s not an abstract thing. It’s not a formula. It’s about getting people what they need. The art of ranking is one of taking lots of signals and putting them together. Signals from your friends are better signals, stronger signals. On the other hand, many searches are long-tail kinds of searches. If you’re looking for what movies to see tonight, your friend can probably give you the best information. If you’re looking for the address of the business, the Web as a whole can give you better information. If you’re looking for something obscure about anything, again the web can give you much better information. It depends on the type of search you do—and how to take all those signals and put them together.

SEO Tip #10 is use keywords in your blogs title. We wrote about being news worthy a few days ago. Make sure your Keywords are in your blogs title, as that is what will be mixed in to the Google Search results. Google has been doing that in a few months, but now the news sections are getting even higher. Have you noticed my handle on our blogging and social networking area? It’s “News”, and you should always try to be newsworth, make sure you read that blog I wrote a few weeks ago.