I did not notice this earlier, and I probably should have noticed sooner. But it seems like Google is doing a few things to try to boost its Google+ product. See this image here...

SearchResults.png

Immediately, you'll notice that my Google+ profile is ranked higher than my Twitter profile, despite the fact that I interact with Twitter {psst, follow @AndyHuang} a lot more than I do on Google+, and that I rarely post to Google+. Now, as an avid web person, we know that Google value in-bound links, so several educated guesses comes up:

  • Does my Google+ profile have a lot more in-bound links than my Twitter profile? No, I don't think so.
  • Does plus.google.com receive more in-bound links than Twitter? No: Google themselves proves it otherwise: 169,000,000 Google+ vs 3,150,000,000 Twitter
  • What about page rank? plus.google.com is sitting at 8, and twitter.com is sitting at 9, according to PageRank Checker right now.
  • Keyword density? No, @AndyHuang, and even AndyHuang is mentioned much more frequently, and even in <title> tag of Twitter profile

Furthermore, if you look carefully, you will notice something they've added a while back. Near the search result for my profile, you will notice a link that says "Block all twitter.com results". This is a feature added recently, which allows people who are logged in to block unwanted results. Now, granted that same thing can be done for Google Plus profile, but look, the profile magically wraps around at a much thinner width, burying the link in the middle of cluster of text.

BlockGPlus.png

Given how I love Google products -- absolutely love Google Apps for Domain Owners, and can't find my way from home to campus without Google Maps -- I must give them the benefit of the doubt; that they are not trying to block out Twitter in favor for Google Plus, and that these are just simple coincidences. But I really hope that they hear voice of little guys like me, and either correct this problem, or become more transparent as to why this is happening, so that Twitter aren't being down-played by the search results.

Farewell Steve Jobs

| 0 Comments | 0 TrackBacks

Steve,
I may have never came in contact with you, and may never will in my life time, but your passion for your company and products have played a very big role in shaping who I am. For that, I thank you deeply for. Please know that everything you've created will continue to change the rest of the world for a long time to come. While you may not received British Knighthood, you will always be the knight in shiny armor, liberating people on the forefront of technology and innovation, and leading humanity towards a better future. Farewell, great leader. We will all miss you dearly.


Cities of Tomorrow is a section I am starting which deviates from my normal ramblings on life. This section will be some ideas I've come up with over the years about how to improve cities of, well, today. Undoubtedly, I am not the first to come up with all, or even any, of these ideas. There are other visionaries out there. I will try to cite them if I am aware of their inputs on related subjects.

First up is an old idea. But this idea keeps on coming back to my random chatter with different people. The idea is simple. Since we can do almost anything with glass these days (Gorilla Glass, for example), we can most likely make a ultra-durable glass surface which provides sufficient traction for vehicle wheels. Under this ultra0durable glass, embed LED displays, and solar panels. This offers several benefits:

  • The first obvious benefit is free energy. How much energy? Well, a city block in North America is typically 100-200m in length [1], and a residential area street is usually about 6m across (one lane [2] on each side). Solar panels have a rough dimension of 1.6m x 1m [3], so we can roughly fit 60 of them under a single block's worth of street. Each one of them is manufacture rated to be able to provide 180W (28.5V, 6.9A) at optimal performance. The energy generated can be integrated into the grid, and provide cheaper power to everyone on the block.
  • A not so obvious benefit is ability to change pavement markings without the need to re-paint the street. This is particularly useful for larger streets, or local freeways that have interchangeable lanes whose directions change depending on rush hour direction. The integrated LED display can also show simple information such as speed limit, traffic condition, detour direction, etc. Since they are sitting on top of solar panels, they wouldn't need external power source to function, too! To conserve energy, pressure sensors can be integrated at intersections, so these displays can go into sleep mode if there are no near-by vehicles.

TRON: What happened to Lora's "life's work"?

| 0 Comments | 0 TrackBacks

In the origina TRON (1982) movie, minutes before Kevin Flynn entered the digital world for the first time, Lora mentioned something about her work:
Lora: "Remember, this laser is my life's work, so don't spill anything."
Tron-Old-Laser.png
Lora's Laser in 1982

Fast forward a little, towards the end of the original movie, as well as at the beginning of TRON Legacy (2010), Kevin Flynn is portrayed as the owner of Encom. Over these last few years, Lora is most probably still working on the same technology. We are also able to catch a glimpse of the laser in a newer state in the new movie.
Tron-New-Laser.png
Lora's Laser in 2010

Since Flynn was in control of the company, and he is good friends with her, there is no reason she would have stopped working on her laser. It is also a very useful piece of technology -- imagine in directions of teleportation (scan in at one location, scan out at the destination location) or infinite storage (scan in large objects into disk storage to save physical space). So why haven't anything come from this technology? Additionally, Lora was also not mentioned or shown in the new movie. What exactly happened to her, and her work? I hope this will be answered in the bonus features section of DVD!

Optimizing SmartOptimizer

| 0 Comments | 0 TrackBacks

Sorry, couldn't wait until 1 year anniversary of last post...

I've been poking around with optimizing my sites' performance over the last few days, and found a real nice tool called SmartOptimizer. SmartOptimizer is acts as a middle-ware between your data and your webserver. When a request is made, .htaccess will pick up, and forward specific file(s) to the optimizer, particularly, images, css, and static HTMLs. This is useful because the optimizer can then compress them using gzip, cache the compressed file, add some http header information to help caching, and serve the compressed optimized file. However, using GTmetrix, I found out that some things are missing, so I decided to add some fixes.

GTmetrix suggested static content should send "Vary: Accept-Encoding" http header, because some public proxies will not cache things properly. And I've found the most effective way to add this is to add the said header in index.php like so:

Find in index.php:

PHP Code
header("Last-Modified: " . $mtimestr);
header("Cache-Control: must-revalidate");

And replace with:

PHP Code
header("Last-Modified: " . $mtimestr);
header("Vary: Accept-Encoding");
header("Cache-Control: must-revalidate");

Another recommendation made was that some files did not had a far enough future expire date. As such, I've modified my index.php to output a further expiry date for most documents. This is not required, and may cause funny caching if your static HTMLs are updated frequently. But, if you want to change it, you may do so like this:

Find in index.php:

PHP Code
if (!$settings['clientCache'] || !$settings['clientCacheCheck'] || !isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) || $_SERVER['HTTP_IF_MODIFIED_SINCE'] != $mtimestr) {

Add before it:

PHP Code
// 1 year far future expire time:
$now = time();
$mtexpirestr = gmstrftime("%a, %d %b %Y %H:%M:%S GMT", $now + 31550600);

Then, find:

PHP Code
header("Last-Modified: " . $mtimestr);
header("Cache-Control: must-revalidate");

*may be different if you did the previous modification.

Replace with:

PHP Code
header("Last-Modified: " . $mtimestr);
header("Expires: " . $mtexpirestr);
header("Cache-Control: must-revalidate");

And that should be it... You get a little bit more caching done on client's end, which hopefully in turn will save you some bandwidth, as well as offer your visitors a snappier browsing experience. Hope this helped!

Posting to blog from Windows 7

| 0 Comments | 0 TrackBacks

This is just a test to post something to blog from Windows 7.  Let’s see how butchered Microsoft’s Windows Live Writer will make this post be…  If the image is in wrong directory etc., I’ll have to edit / remove them later..

 

Windows7

 

Ah well, not too bad, I’m lazy, this will stay for now.

Snow Leopard came in the mail today (finally). Thank you Apple, for killing a small tree to deliver me one DVD. Using a box large enough to house at least 16 retail packages to ship 1 single disc to an end line consumer is definitely the right choice!! Seriously, if I'm paying you $40 for the rights to kill a tree, I better be the one doing the killing, not you!

IMG_0101.JPGIMG_0102.JPGIMG_0103.JPG

The upgrade took just about 1 hour from inserting disc to the green check mark with "Install Succeeded" text...  Maybe they could've done it faster, I don't know. But what's important is I am now on Snow Leopard.

The upgrade was, unfortunately, not quirk free.  Read on for a few problems that I encountered and how I fixed them.

URL Shortener and Base 62 Encoder / Decoder

| 2 Comments | 0 TrackBacks
I'm creating yet another URL shortener script.  Why?  Because I'm not keen on over paying for simple scripts -- because, well, I'd be over paying -- and I'm not too keen on using open source scripts -- because the more people using the same script, the more likely people will find exploits in it.  So with all that in mind, I set out to create my own script.
With the 3.0 iPhone OS, new baseband, and everything, there are several problems floating about.  First, there are a large handful of users plagued by the rapid battery drain problem.  How do you know if you have this problem?  Well, its quite simple actually.  Before upgrading to 3.0, your battery is good for 12 hours, 8 hours, whatever.  After upgrading to 3.0, it discharges even if you have the phone plugged in, and you're generally looking at no more than 3 hours idle time.  Second, if you hacktivate your iPhone, you don't get youtube and you don't get push notifications.

I've found that the battery depletion problem is usually to do with activating using an official SIM, and then hacktivating the device, because apparently it leaves some messed up APN settings on the phone.  As for the push notifications, hacktivating it directly is not going to work because you're not going to get the certificates required for push notification.

Luckily for me, having an official SIM card and a third party SIM card means I can have the best of both worlds, and not have to worry about either problems.  Unfortunately, though, it does mean restoring the phone is a bit more time consuming.

Now, I must note that this is a memo for myself, and nothing but. Don't complain if you do not have an official SIM card so you cannot get it to work. Don't ask me for my certificates, because I don't want to share my pushed email messages and risk getting banned.  With that said, let's start.

I have a NAS with four 400GB harddrives running a RAID 5 installation, which means I won't lose data on there unless two of the drives go bad. It's done through my TS-409 (shown to the right). Since I have all these space, I might as well use it to backup my MacBook regularly so I don't lose any of my important data. OS X users know, Time Machine is awesome. It helps you take hourly, daily, and weekly snapshots of your computer. But unfortunately, it only works with additional harddrives attached to the machine, OR Time Capsule on your network... right? Wrong. Today, we will sideways hack Time Machine, and make it work with your SMB (Windows) share folder.

Before you get started, counter intuitive as it may seem, please be sure to have your data backed up before proceeding. While the memo is written with the best of intentions to help people make backups, I will not be responsible for any data loss as result of you following through this memo of my. You have been warned.

Recent Assets

  • BlockGPlus.png
  • SearchResults.png