Paper with Built-in Magic Ink

So here’s a neat article (mirror). Apparently Xerox is creating a printer that doesn’t require ink!

The paper is coated with a coating of only a few microns. This overlay contains chemicals that are activated by a light bar in the printer or multifunction device that creates the image. … The end result is a reusable paper which feels very much like regular paper and is not at all like the older, waxy fax paper.

Initially, people would think such a technology would save millions of trees a year since paper could be literally recycled after it serves its use. I am not so sure on that since paper tends to get mangled after it leaves the printer and sits on someone’s desk for 5 minutes. Rather, I see uses in security. Sensitive data could be printed on this medium only to be wiped after it serves its purpose; whereas right now, you run the risk of paper-shredder garbage trolls. Although, I admit there are promising uses for printing agendas, memos, drafts, or other inherently temporary documents.

No ink of any kind is used in the process and the resulting printed pages do not smudge or smear when touched. The pages do degrade over time and currently can last between 16-24 hours before returning to their original blank form. … We do expect further research will be able to control how long the image lasts. You can also immediately erase the paper and use it again by applying a heat source or putting the paper right in the machine to be reprinted.

This is essentially paper that has built in magic ink.

In essence, what makes paper “secure” – in that it can’t be modified after-the-fact – is now gone. If this re-printable paper looks very similar to regular paper (which the article indicates is the goal), it can cause all sorts of problems. Nevertheless, this is a cool technology I look forward to seeing on the market.

One thing that scares me about this invention is that some types of crime become easier. Imagine signing a contract. Then someone erases all of the words on the pages you signed only to print on that paper with a traditional printer afterwards, perfectly replacing the entire contract and having your signature sitting on the dotted line. Paper enters the digital age.

This technology is about giving paper expiration dates where the content demands it, while e-paper is about making digital content more portable. This technology will compete in a whole different market than e-paper – a technology I continue to predict will become the Next Big Thing.

Microsoft Owes $1.5 Billion to MP3 Patent Holder

There’s a few big news items today (which I’m sure you’ve already read about on other sites), but the one I want to cover involves Microsoft losing a $1.5 BILLION patent lawsuit.

Alcatel-Lucent sued Microsoft over its use of the MP3 technology in Windows. Microsoft says it already paid a $16 million licensing fee to another company later bought by Alcatel-Lucent. Clearly, something went wrong. I have to wonder if this has any effect on other companies that use MP3 compression technologies (Apple). From what I gather, yes.

The company also noted that roughly half of the damages are for overseas sales of Windows, which could be affected by a separate patent case. That case, currently before the Supreme Court, deals with whether overseas sales of software products should be subject to U.S. patent law.

Should you feel sorry for Microsoft? Well, considering their net income ("profit") for 2006 was $12.6 billion — no. They can more than afford it.

Cisco VPN is the Devil!

I’m very sorry for the lack of an update yesterday. I was away from the computer. 🙂

Anyway, I spent a lot of time today trying to troubleshoot my computer at work. Here’s the breakdown:

  1. I could remote desktop anywhere just fine.
  2. I installed the Cisco VPN Client. I did not configure it.
  3. I couldn’t remote desktop anywhere!
  4. I uninstalled Cisco VPN Client.
  5. I couldn’t remote desktop anywhere!
  6. I hacked at the registry and removed any remnant of the application.
  7. I couldn’t remote desktop anywhere!
  8. Go to #6.

I never actually solved the problem. In short, don’t install that shit unless you absolutely need it.

I Googled for hours. It seems Cisco VPN Client has a tendency to break Remote Desktop, but nobody knows exactly why. And for your techies I’ll state this again: No, I never actually configured or used the client. I just installed it and it broke shit.

If you have suggestions, please let me know!

Permission Denied in the PHP Destructor and the Current Folder

I learned something new today, so I’m going to share two cool things with you.

  1. File access is screwed up during a destructor call in PHP. I will show you how to get around this.
  2. How to create a universal absolute path variable that refers to the current folder you are in.

For the application I was working on today, we needed to add logging. This was a quick and dirty log that would (append) dump whatever was on the page into a file. I was working in a framework I wrote, where each page is actually a class. Neat, but not really necessary to understand the problem.

Here’s the code:

function __destruct() {
    $handle = fopen(CURRENT FOLDER . ‘no_sync.response.log’, ‘a’);
    fwrite($handle, ‘– START — (v.’ . self::VERSION . ‘ ‘ . date(‘Y-m-d H:i:s’) . “)\n”);
    fwrite($handle, ob_get_contents() . “\n– END –\n\n\n”);
    fclose($handle);
}

Pay attention to that highlighted part and I’ll address it in a moment.

This code takes whatever is in the output buffer (which ultimately gets shown to the user) and chucks it in a file. Cool.

So how does it execute? I don’t call it explicitly. The __destruct is a special PHP function that gets automatically called when an instance of a class is about to get erased. It is rarely used by novice programmers because of its cryptic nature. But this is a good example where you might. 

Since it triggers when the class instance gets destroyed, I just need to unset the variable that contains the instance. Near the bottom of my code I added:

unset($FRAMEWORK); // my class is a property inside this variable!

And, as expected, everything worked. Yes, second try! Wait, second??

This isn’t how the code looked when I tried it the first time. That highlighted portion, “CURRENT_FOLDER”, was missing. If I’m writing to the current folder, I shouldn’t have to specify a folder path… Usually. This failed, even though the same exact code in the constructor worked fine.

It turns out that when you try to do file-stuff during the destructor, PHP is no longer in the original folder you started out in. PHP has “forgotten” where your script is and has reverted to the root folder (AKA “/” or “C:\”). This, in most systems, causes permission issues.

To get around this problem, you should be explicit about where you want to write the file. You can’t use relative paths (such as “…/logs/”). The “CURRENT_FOLDER” in my example happens to have the following value:

dirname($_SERVER[‘SCRIPT_FILENAME’]) . ‘/’

The great part about this is that it is not relative. It will be the fully qualified path to the folder the script was run from.

Note: from the command line, you should always type in the full path to the script. Failure to do so will render PHP unable to figure out an absolute path to your script. Just a tip for you people writing cron scripts. 😉

I hope that helps!

Lasik: 28 Things to Expect

Recently, I had the Lasik procedure done. My vision is great, and I am very happy I did it. If you’ve ever wondered what it’s like, here’s my everyday-Joe summary:

Preparation

  1. I went in for consultation on a Saturday. The following Saturday, I underwent surgery. This short time frame is not unusual.
  2. The first visit is a relatively thorough eye exam (air puffs and everything). Surgery day involves more eye examinations.
  3. Before the surgery, they gave me some Valium for the “anxiety.”
  4. They numb your eye using eye drops. It makes your eyes feel a little dry and uncomfortable.
  5. They also dilate your eyes using drops.

Surgery

  1. You are awake during the operation!
  2. You must keep your eye open for the entire duration of the operation, which is not difficult considering your eyes are numb.
  3. There is a dull pain when the doctor cuts your eye (yes, a human does this part). The lasers don’t hurt.
  4. When your cornea is pealed back, your vision is absolutely dismal.
  5. I keep hearing burning eye smells like squid. It did smell like burning something, but I wouldn’t say squid.
  6. It was a little difficult staring at the red dot because your vision temporarily goes black when the doctor cuts your eye. I think this was due to the pressure on the eye as he holds it down.
  7. The “laser” portion takes about 1 minute after the eye is cut open.
  8. After the lasers are done, the doctor puts your cornea flap back in place using tweezers. You’ll immediately notice a difference in your vision (it’s great!).
  9. Each eye is done one at a time. While one is being cut, the other is taped shut.
  10. The second eye hurts more than the first. The doctor even warned me. I think it’s because you know what’s coming. I was also definitely more nervous during the second eye.

After the Surgery (first two weeks)

  1. Your vision should be improved almost immediately after you walk out of the operation. Yes, you will be walking, but, no, you shouldn’t drive (see next two points).
  2. Your eyes will hurt a lot the first 48 hours. It will be a sharp burning pain like when you dip your eye in spicy sauce. You are given numbing eye drops for this (they work for about 20 minutes).
  3. Your eyes will be very dilated. Everything is vibrant, bright, and headache inducing. It was kinda cool, but it is nearly unbearable to be outside even with sunglasses.
  4. You will need to wear goggles to sleep for the first week. This sucked. Make sure you have a nice soft pillow so the goggles don’t smash into your face too hard.
  5. As soon as you get home, just go to sleep. They recommend you sleep as much as you can the day of the surgery. Sleeping is best anyway since the burning sensation will be at its worst immediately after the surgery.
  6. No, you can’t see any marks on your eyes.
  7. You are told to avoid water in your eye for the first two weeks. I accidentally tested this and got some in my eye during a shower. Yup, it burned.
  8. Your eyes will feel dry. Constantly. It is annoying. They will give you drops for this. It mostly goes away after two weeks. This will correlate with your vision quality.
  9. Your night vision will decrease, especially early on. Here’s what I observed: the dryness causes a haze, which fogs up your vision near light sources. Since light sources fuzz up your vision and mask darker areas, seeing things in the dark becomes very hard. This haze is largely unnoticeable in daylight.

After the Surgery (Long term)

  1. Your vision goes from very good to very fuzzy for the next 24 hours. This will continue, but not as erratically, over the next few weeks.
  2. You still can’t rub your eye (I am told up to 2 months).
  3. Water from showers are okay after the second week. I have not tested if I can swim yet.
  4. Follow up or corrective surgery is usually free or very (very) cheap.

Obviously this experience won’t speak for everybody. I have two friends who got Lasik. One has perfect vision and loves it. One is complaining that his vision still isn’t perfect. We all had the same doctor.

Quicker Ways to Import Data into InnoDb

For those of you who ever have to put data into MySQL database, here’s a quick little tip. If you’re importing into a table that is using the InnoDb engine (versus the MyISAM), wrap your import file in the following:

SET AUTOCOMMIT=0;
SET UNIQUE_CHECKS=0;
… SQL import statements …
SET UNIQUE_CHECKS=1;
COMMIT;

 This will significantly improve the import time (by orders of magnitude, for imports beyond tens of thousands of records).

Edit: Quick point of reference. Importing 60,000 records (simple inserts) took about 10 minutes or about 10,000 per minute. After switching this fix in, I inserted 10,000 more records in under 10 seconds (so fast, I forgot to time it).

Rebooting Your Computer with Remote Desktop

Do you use remote desktop? Have you ever had to reboot remotely? If you try to do it normally, here’s what you see:

disconnect button... where's shut down?

There’s no shut down button!

So instead, you must reboot in a more roundabout way. First, open up task manager. Can’t open it because hitting CTRL+ALT+delete opens it up on the computer you’re logging in from? Have no fear. Right click on the start bar.

open task manager from the start bar

Good. Notice the new menu item that isn’t usually there? Use it and reboot! 🙂

now you can shut down

Google Possibly 80% of the Search! Yahoo Users Do 5-10x More Queries per Search?

Yahoo, the supposed #2 search engine with a reported 23.6% market share generates less than a percent of my search traffic. This holds true for other sites that I examined. Google consistently comes out on top by an 90% margin!

Below, I have compiled a list of the top referring search engines for 10 web sites where I had log access. The results point to a shocking conclusion that Google’s true market share may be upwards of 80%!

My Blog (Michikono.com / Michiknows.com)

My blog enjoys a lot of search traffic due to the ever increasing amount of technical articles I write.

Google 98.34%
Yahoo 0.6%
Search 0.5%
Live/MSN 0.3%
AOL 0.2%

That’s no mistake. Not even a full percentage point for Yahoo. I thought, “well maybe my readers are the type that loves everything Google?” We’ll find out that my theory didn’t stand for long…

Plurker

Most of Plurker’s traffic comes from people searching for their own screen names. Thus, I figure it would be a good representation of search quality. It is also heavily optimized for search engines and has dedicated pages (with titles) for each screen name. And yet…

Google 96.0%
Yahoo 2.9%
AOL 0.5%
Ask Jeeves 0.3%

Yahoo seems to be 1/10th of where it should be.

LetsTorrent

While I only recently launched LetsTorrent, I noticed that the top spider is Yahoo Slurp (Yahoo’s spider). Surely the percentages will be right here, right? No! 

Google 98.8%
Unknown search engines 1.2%

Yahoo doesn’t even show up! But maybe the site just has no real content and thus it gets lower priority? Can we give Yahoo a break here? I would, except it does appear Yahoo has the site in its index.

GoogleLoco

After the recent GoogleTV hoax, a lot of people searched for the “Loco Google” mentioned in the video. Thus, after I created GoogleLoco, I had a big influx of search visitors looking for this hoax site. Surely those would represent some kind of proportional search traffic, right? Right?

Google 97.9%
MSN 1.1%
AltaVista 0.7%
Unknown search engines 0.3%

Nope. Yahoo doesn’t even show up. Yes, it’s in Yahoo’s index.

uQuad

uQuad has a pretty large number of sub-pages, including a restaurant directory and enjoys a large amount of search traffic.

Google 95.3%
Yahoo 2.7%
AOL 0.8%
Unknown search engines 0.7%
MSN 0.5%

…And yet it still is heavily skewed toward Google.

Second Opinion

I figured that maybe my sites are statistical anomalies. So I decided to get a second opinion since most of my sites are relatively small. Below are stats to five more (much larger) sites, none of which I operate. I won’t disclose the site names for privacy reasons. All of these sites have been around for at least a year, are optimized for search spidering, and have middle tier Page Ranks. Again, these are incoming traffic numbers from search engines for February.

A funny picture site:

Google 86.8%
MSN 6.4%
Unknown search engines 1.8%
Yahoo 1.8%
Ask Jeeves 1.6%

Web hosting service (this is the lowest of all 10):

Google 58.3%
MSN 13.8%
Yahoo 8.3%
Hotbot 5.5%
AltaVista 5.5%

Another hosting service:

Google 83.5%
Yahoo 5.4%
DMOZ 5.4%
Ask Jeeves 1.5%
MSN 1.5%

A blog:

Google 94.3%
MSN 3.7%
Unknown search engines 1.8%

A video site:

Google 80.1% (12,492 hits)
Yahoo 7.3% (1,132 hits)
MSN 5.1%
Unknown search engines 3.2%

A proxy service:

Google 90.4% (13,908 hits)
Yahoo 4% (619 hits)
MSN 2.9%
Unknown search engines 2%
AOL 0.1%

Summary of Results

Across 10 sites, The average Google share is 88.1% and the median is around 92%! 

Possible Explanation (and Why Current Search Metrics are Broken)

It perplexed me that Google is reported to have a share as low as 44%. While researching this matter, I found a blog entry with the same conclusion as me, but I then stumbled across another article that explains what’s going on. In it, the man argues a stupid, but sobering point about search stats:

Search referrals are different than number of searches performed.

For example, let’s say I am looking for GoogleLoco.com using the term “Google Loco”:

  • On Google I’ll find it on the first try (click to see why) – One search.
  • On Yahoo, I wouldn’t find it until page 5 (have fun getting there) – Five searches.

In fact, since I have no referrals from Yahoo on GoogleLoco, we might just conclude that people searched and didn’t even make it to my site!

Who else realized search engines are graded on such retarded metrics? By that logic, it’s almost in Yahoo’s interest to maintain crappy results to ensure users are trying more queries! If they improve their search relevancy, they stand to lose market share due to more people finding stuff on the first try!

Lastly, this also is telling about the number of people that use each search engine. Yahoo may have half the queries of Google, but Google is bringing 10 times more visitors! And yet, Google only has double the queries? What’s that mean? If the Google-Yahoo referrer ratio is around 10:1, then the average Yahoo visitor is doing 5x more queries than the average Google user! Of course, the scary part is that these logs indicate a ratio of more like 20:1.

This explains why I don’t know anybody that uses Yahoo.

Note: Google Image Search hits are merged with “Google.” All stats on this page was collected through Awstats. Last I checked, Awstats does not have a Google bias.

Google Patents Goes Mainstream!

There is now a Patents search (see below) on the default list of available Google searches! Patents search is still in Beta. As of writing this post, nobody else seems to have noticed this development.

This is most interesting because there are tons of other search technologies Google is working on that would seem more fit for mainstream. If Google is looking for publicity on Patents search, it is also weird that they have yet to cover this (very quiet upgrade) in their official blog.

I am surprised that the relatively new Patents search got to the coveted default search list before the more well defined secondary searches such as:

If this is some kind of power play, I’d love to hear some speculation.

patent search goes mainstream

My guess is that this is a move to better publicize the feature since it is a relatively obscure search. However, out of the billions of search queries performed on Google, is there really that many related to patents? Aside from lawyers and maybe a few entrepreneurs, who looks up patents?

Surely there are better secondary searches Google could have promoted to the front page!