Thursday, June 28, 2007

Bye Bye Beagle

That is what hundreds of Linux users will be saying as they download Google's latest masterpiece, Google Desktop for Linux.

Get it now before all the geeks flood their servers ....
http://desktop.google.com/linux/

Tuesday, June 26, 2007

Addicted to Ice Tea

Yes, I will admit it, I am addicted .... addicted to iced tea.

What's worse, it's not your regular P20 ($0.50) iced tea. In fact a large cup costs about 5 times as much but, I dare say, it tastes as good as it is expensive.

I am biased towards the Southern Blend Iced Tea served at the Coffee Bean and Tea Leaf which I frequent quite often since I fell in love with the exquisite drink. I've always thought that I was a Starbucks Frapuccino guy but when it's scorching hot and you're parched, a frapuccino isn't exactly the kind of beverage that will quench your thirst.


05272007179

Wednesday, June 20, 2007

HELP : Link texts gone on Safari Beta on windows

Update : Safari doesn't work on Windows 2003 Server. Although the installer won't complain that you're installing it on an unsupported OS, you will end up with the problems below if you do try it out.

It seems I can truly forego buying that Macbook Pro I've been drooling over because Safari is finally available for Windows. I promptly downloaded the setup file from apple.com and went thru the rudimentary install.

Lo and behold Apple's start page on Safari.



However, when I visited my favorite search engine Google, I see this ....



I tried to edit the font preferences but they're all blanked out. Clicking "Select" allows me to select a font but nothing shows up on the textboxes after making the selection.



Any help or hint will be most appreciated :-)

Blogger "Tagalized"

I guess it was only a matter of time, it first happened to "Anime" and "Korea Novelas" on TV, and now Blogger too.

I logged in to my Blogger dashboard today to find "tagalog" as the language used on the dashboard. I'm sure the Japanese and Chinese will cheer to see dashboard scribbled in their local dialect but I doubt that Filipinos will find it an improvement. That's just my opinion though.

Friday, June 15, 2007

Quirksmode and Strict Mode

Being a back end developer for the longest time, I never really bothered myself with web browser standards. Not until recently.

I've been into Web 2.0 a lot where the development is more on the front end. I've come to realize how front end web developers are completely at the mercy of web browsers and the stubborn adamant companies who make them.

If you find yourself working on the front end of web development a lot, I encourage you to not only know the standards (yes, we do have standards, that's what the W3C is for) but to also know and understand the quirks of the most popular browsers around.

I guess nobody is perfect, the newer version of Internet Explorer for instance tried to be more standards compliant but have fallen quite short.

Click the title link above to learn about quirks mode and strict mode. May it help you keep your hair on your head and most importantly your sanity.

Wednesday, June 13, 2007

Monday, June 11, 2007

Apollo is now AIR

The Ajaxian reports that Adobe Apollo has graduated from Alpha and is now in beta with a fresh new name .... AIR (Apollo Integrated Runtime)

What makes Apollo, I mean AIR, such a promising product is that it allows web developers to enter the realm of desktop development. Well, it's not like web developers don't know a thing or two about desktop application development, as a matter of fact, I'm quite sure that many web developers, specially the older ones (cough!cough!), came from a desktop application development background.

AIR allows developers to leverage knowledge acquired during web development to develop desktop applications. It may not be exciting for the old timers but the new kids on the block that were born to, live with and breath the web have a cause to smile.

Just between you and me, Apollo is a way cooler name :-)

Friday, June 08, 2007

VMWare Fusion and Unity

If this ain't a compelling enough reason to get a Mac, I don't know what is ...



Furthermore, unlike Parallels, Fusion is free. I hope it stays that way.

Thursday, June 07, 2007

Alternative Uses for the Google Gears WorkerPool Module

Last week I described how the Local Server module from Google Gears can help speed up loading time of subpages.

I had another brain storm today and it involved using the WorkerPool API to improve interactivity within a website. It's not uncommon for front end developers to use a technique called polling to do such things as real time popup notification or instant chat messages.

My idea is to use the workerpool instead of polling.

Interesting, but is it feasible and worthwhile ?

To be feasible, you'll need people to have gears installed, otherwise your app won't work, unless of course you degrade gracefully in its absence.

To be worthwhile there has to be some advantage in using the workerpool as opposed to polling.

Tuesday, June 05, 2007

Santa Rosa MacBook Pros : Is it time to switch religions ? ?

Within minutes of reading the Engadget and Gizmodo feeds from google reader about the apple store being down in anticipation of an update, I went to Apple.com and sure enough, I see two giant images of the new MacBook Pros on the frontpage.

Oh how I wish they'd just put "Santa Rosa" in there somewhere. I had to navigate all the way to this page and read about the 800Mhz frontside bus before I could confirm that these are indeed Santa Rosa based laptops.

My old trustee IBM bit the dust a few months back and went to laptop heaven. The shop I went to tells me that unless there's some sentimental value in bringing it back to life, I'd be better off buying a new one.

I've been a windows and linux user for as long as I can remember, frankly, buying a laptop with a different OS, even if it's unix based, is scary, specially if it's worth $1999 and up :-)

However, I have to admit both bootcamp and parallels (coherence mode) are tipping the scales in favor of a new Mac. Another problem is that by the time they get to Philippine shores, there'll be new portables to drool over ... and then the cycle continues ...

Which in itself is a good thing because it means I don't need a laptop, at least not yet, otherwise, I would've snapped up one as fast as I got my desktop.

Web 2.0 for a cellphone ?

I signed up for alpha testing a new (I guess, locally developed) web 2.0 site (ala friendster).

I'm just as curious as Yuga is as to how a Web 2.0 site will be able to promote mobile phones.
Will the site be viewable in one form or another in the cellphone ?
Will the site provide some sort of special service that users of this new mobile phone can use ?
Also, I would be very interested to find out if they used some sort of development or ajax framework.

I guess I'll find out when I see it.

Monday, June 04, 2007

Debugging javascript with debugger

Aside from console.log, there is another javascript command that is available that has been immensely helpful in diagnosing javascript code

It's called "debugger".

Just place that command anywhere in your javascript code. When your page loads, execution will stop on the line where you placed debugger. This works on ...
  • Firefox with firebug installed
  • Internet Explorer with the Script Debugger installed

var myvar="this is myvar";
// execution stops here and the debugger window appears
debugger;
alert(myvar);

Saturday, June 02, 2007

Speeding up loading time by using Google Gears' LocalServer module

When I visited the Google Gear's developer site and read about the LocalServer module, the first thing that popped into my head was that it could be useful for speeding up our web applications.

I think the web application I am developing right now isn't ready to become an offline web app at least not yet. But when I read the following statement from the Google Gear developer site, I knew instantly that we can indeed use it to help speed up loading time and to acquire slightly better level of control over the user experience when using the web application.

***
The LocalServer always serves a cached resource when the conditions are met, regardless of the network connection. The URLs contained in a store are eligible for local serving without requiring the application to open the store.
***

This basically means that the Google Gear Local Server, using the ManagedResourceStore
  • intercepts all HTTP/HTTPS requests to a resource (be it an image, style sheet or javascript file),
  • checks if it is a captured resource and
  • serve the resource file from the LocalServer if it is found to be a captured resource,
and it does this whether the user's computer can access the server or not.

It can be akin to a local proxy server that caches resource files. The difference is that the store resides on the user's PC and not on a separate machine and our web application has control over the cached resources thru a couple of lines of javascript and a manifests file.

The manifests file has a JSON data structure with the list of resources to cache in the LocalServer and a version string. This version string is used to determine if the resources in the LocalServer should be updated.

{
"betaManifestVersion": 1,
"version": "6",
"entries": [
{ "url": "/resources/ajaxhelper/gears/gears_init.js"},
{ "url": "/resources/acs-subsite/core.js"},
{ "url": "/resources/ajaxhelper/yui-ext/yui-ext.js"},
{ "url": "/resources/ajaxhelper/ext/adapter/yui/ext-yui-adapter.js"},
{ "url": "/resources/ajaxhelper/ext/ext-all.js"},
{ "url": "/resources/ajaxhelper/ext/ext2-all.js"},
{ "url": "/resources/acs-templating/ajax-list.js"),
{ "url": "/resources/ajaxhelper/ext/resources/css/ext-all.css"},
{ "url": "/resources/ajaxhelper/ext/resources/css/ytheme-green.css"},
{ "url": "/resources/capital-projects/controlpanel/cp.css"},
{ "url": "/resources/jobs-db/controlpanel/cp.css"},
{ "url": "/resources/acs-templating/lists.css"},
{ "url": "/resources/style.css"},
{ "url": "/resources/acs-subsite/old-ui-master.css"}
]
}

contents of a sample manifests file

The lines of javascript will be responsible for
  • capturing the resource files into the LocalServer
  • checking for updates
  • updating the captured resource files
Notice that javascript is not needed to tell the browser to use the LocalServer each time a page is loaded, this is done automatically for you by Google Gears without using any additional javasript aside from the first one that instantiates the store and captures the resuource files.



<script src="/resources/ajaxhelper/gears/gears_init.js"></script>
<script>
if (!window.google || !google.gears) {
// console.log("google gears not installed");
} else {
// console.log("installed");

// initialize some variables
var STORE_NAME="csm_store"
var MANIFEST_FILENAME="csm-gears_manifest.json"

// instantiate google gears
try {
var localServer = google.gears.factory.create("beta.localserver","1.0");
} catch(e) {
// user denied access to google gears
}
if (typeof(localServer) == "object") {
var store = localServer.createManagedStore(STORE_NAME);
store.manifestUrl = "/"+MANIFEST_FILENAME;

// check for changes and capture files
store.checkForUpdate();

// notification for debugging only
/*
var timerId = window.setInterval(function() {
// When the currentVersion property has a value, all of the resources
// listed in the manifest file for that version are captured. There is
// an open bug to surface this state change as an event.
if (store.currentVersion) {
window.clearInterval(timerId);
console.log("Using store version: " +store.currentVersion);
} else if (store.updateStatus == 3) {
console.log("Error: " + store.lastErrorMessage);
}
}, 500);
*/
}
}
</script>


The above script, which is partially lifted from this tutorial, is placed on the landing page of the web site or web application. It loads up the entries from the manifest file into the LocalServer.

This is done only after checking that Google Gears is installed and will not need to be done again until any of the files in the manifest entries change, at which time changing the version string in the manifest file, and rerunning the javascript above will force Google Gears to recapture the files into the local store.

The script also tries to be unobtrusive. It doesn't alert the user that it's trying to use Google Gears and fails gracefully if it isn't installed.

If Google Gears is installed, the user will need to give explicit permission to the page for it to be able to use Google Gears.

gears-security

Although this is an interesting idea, I have yet to do benchmarks to determine how much of a speed improvement can be derived from this. As far as my preliminary testing goes I seem to get perceivably faster response times if the bigger javascript and css files are cached in the LocalServer.