Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Tuesday, September 02, 2008

Google Chrome - First Impressions

Google has just released the first public beta version of their new web browser, named Chrome.


Having only heard rumours of this via various tech blogs and news websites only one or two days ago, I was quite surprised to see a beta released so quickly. Information that I had read about it regarding its speed, security, stability, compatibility and features were quite compelling to me.

In terms of web browser preference, I am definitely hands-down in the Mozilla Firefox 3 camp, so the fact that Google chose to use Apple's OpenSource WebKit rendering engine instead of Mozilla's arguably more tried-and-true Gecko engine seemed like a very curious decision to me.

Granted, my previous experience with WebKit based browsers was limited... I've used Apple Safari (on Macs) only a few times, and wasn't blown away by its capabilities/performance. When Apple released Safari for Windows, I decided to take a pass because it seemed somewhat bloated. In my experience, Apple is notorious for bundling unnecessary crap in their Windows software (i.e. iTunes & QuickTime for Windows), and my opinion was that their web browser didn't really offer anything new or better compared to Firefox.

I've also used briefly used Konqueror before on KDE-based Linux desktops (which uses the KHTML rendering engine -- indeed, WebKit was forked from KHTML). But just like Safari, the lack of features, compatibility and performance failed to impress.

At any rate, Google Chrome seemed to offer a web browser that hits most of the big points for me, so I decided to give it a spin. Here's my checklist, along with my personal ratings & observations:
  1. Support for contemporary and modern web standards: 4/5
    - Passes Acid1 & Acid2 tests, scores fairly well on Acid3 (slightly better than Firefox 3.0.1)
    - No major problems noticed using any of the websites that I access frequently or on a daily basis (e.g. Google, GMail, Google Reader, Windows Live Mail (Hotmail), Facebook, Slashdot, various websites that I developed, etc.)
  2. Speed: 5/5
    - Speed is one of the major talking points with Chrome, and I can confirm that it is definitely very speedy, particularly the handling of Javascript. As a test, I tried running my Stop the Clock at 1000 Google gadget. The clock incremented so fast the first time I ran it, that I didn't realize that it had already passed 1000 and had actually already stopped at its limit before I noticed.
  3. Memory optimization & efficiency: 5/5
    - When I read that Google Chrome uses separate processes for each tab & plugins instead of multiple threads, the first thing that concerned me was the amount of memory & overhead that this would require. After opening a fair number of tabs and websites I was pleasantly surprised to see how little memory each process used. System memory usage in total also appeared very reasonable.
    - Precise garbage collection works very well, and just as promised. As a matter of fact, this is something I wish Firefox had -- and could very well have soon, since Chrome is open source and some code from it is likely to end up in Firefox sooner or later.
    - Tip: Right-click the small empty area between the new tab button and the minimize button and choose the "Task manager" option to see exactly how memory is allocated by all open Chrome tabs & processes. This feature is something I like very very much.
  4. Security and Privacy protection: 4/5
    - Sandboxing seems to work properly and as expected (which it should for any respectable web browser). Google claims that their sandbox implementation reduces the likelyhood of security exploitations. Without personally performing any formal testing or source code examination however, I would just have to take Google's word for it.
    - The incognito mode -- essentially a browsing mode which allows "untracked" surfing -- is a very welcome feature. Similar features are expected to be available in the next versions of Internet Explorer and Firefox, so the fact that Google Chrome offers this now is very pleasant news. On a side note, these "private" browsing modes only prevent tracking from taking place, they are not 100% anonymous sessions since data encryption still doesn't take place unless the websites you are visiting use SSL.
    - The Google blacklist service -- similar to what Microsoft and Mozilla have done for their browsers, a blacklist service is provided by Google to protect against phishing. While not foolproof, this is a feature that has become fairly standard in modern web browsers.
    - Advanced cookie control and security policy standards such as P3P are not currently available as far as I can tell. I can't give Google Chrome full marks for this reason, but otherwise security in Chrome seems to be very good.
  5. Usability, features & bloat: 3/5
    - Chrome is meant to be a minimal, no-nonsense web browser, and it succeeds in that regard.
    - Chrome installs into the user's application data folder. There doesn't seem to be a way to change this or install it globally for all user accounts on a computer. At about 80 MB per user per installation, this seems slightly weighty. Also this makes it less likely for novice/average users to install and harder to centrally administer.
    - There doesn't seem to be any simple user interfaces for managing add-ons, extensions and updates.
  6. Developer features: 3/5
    - Javascript console & debugging features are provided and appear to be done very nicely.
    - Viewing page source is also well done.
    - Advanced developer tools (such as the Firefox Firebug extension) currently don't exist, since an addons system doesn't seem to be available at this time, and these capabilities are probably not necessary to be included as standard built-in features for all users.
  7. Cross-platform compatibility: 1/5
    - Currently only a version for Windows XP & Vista has been released. Mac & Linux versions are planned, but until then Chrome is unfortunately Windows only.
Final verdict: 25/35 = 71%

In summary, Chrome is most definitely a well built and solid web browser that is worth checking out. When Firefox 3.0 was released earlier this year, my initial thought was "this is exactly how a web browser should be built". After giving Chrome a spin however, I am equally impressed if not moreso considering it is the first public release and yet only a beta version.

Chrome still doesn't provide a lot of convenient features that I use everyday in Firefox, and currently doesn't seem to offer much in terms of add-ons & extensions. So for now, Firefox will still be my preferred everyday web browser for general use and web development. My prediction is that a lot of code will eventually be shared between Google Chrome and Mozilla browsers, so eventually we'll be seeing the best of both worlds and major improvements in both browsers, and very possibly others.

Sunday, April 06, 2008

Stop the Clock at 1000

Another Google Gadget...

I was digging around some old files on my computer and came across this little game that I whipped up back in 2004. It's loosely based on the carnival-style reflex-arcade game-of-skill of the same name (except without the ticket payouts).

In case the title isn't clear enough, the purpose of the game is to basically stop the clock when it reaches 1000... as simple as it sounds, this requires quick reflexes and a bit of luck.



Have fun!

Friday, March 21, 2008

Programmer's Calculator Google Gadget

Sometimes when I run into a coding problem in the middle of a programming project, I create a new separate file to experiment and test theoretical solutions instead of messing around with the larger project that I'm working on. I usually prefer to use JavaScript as a experimenting language because:

  • JavaScript is fast and easy to write and test.
  • It's an interpreted language so no recompiling is needed.
  • It's readily available and standard in all modern web browsers.
  • It provides a basic, but fairly good set of features that can usually be easily retranslated later to other more powerful languages.
  • It is fairly easy to debug (especially with the Javascript error console in Mozilla/Firefox browsers).
This programmer's calculator began as just that: a experimental JavaScript web page that I whipped up to test base conversions. I realized afterwards however, that there could perhaps be some practical future use...

Many programmer's calculators out there currently only handle one base at a time, and simply don't provide certain conversions such as ASCII/Unicode characters or RGB which are easy enough to implement. Also, a good amount of code in typical calculator applets/gadgets is usually dedicated to having pretty graphical user interface which frankly I think is usually entirely unnecessary for computer-based calculator applets. (You do have a real keyboard in front of you already, don't you?) For serious programming, the leaner and meaner it is, the better.

So without further ado, here it is:

Description: A programmer's calculator featuring multiple simultaneous conversions and common operations. Instantly converts between decimal, hexadecimal, binary, octal/any base between 2-36, character codes, and 24/48 bit RGB. Operations supported include Addition, subtraction, multiplication, division, and bitwise NOT, AND, OR, XOR.


Add to Google

Sunday, February 03, 2008

Rock Paper Scissors

I recently decided to start tinkering with developing for the Google Gadgets platform. Google Gadgets is a wrapper API used to create mini-applications that can be embedded into various Google services and properties such as iGoogle, Google Desktop, Orkut, Blogger, Google Page Creator, as well as web pages in general.

Here's a simple little Javascript game of Rock Paper Scissors that I wrote about 3-4 years ago (with a few updates/enhancements), and decided to make into my first Google Gadget. I haven't published it to the Google Gadgets directory yet, but you can use the add button below to add it to your iGoogle homepage.


Add to Google

Saturday, January 26, 2008

SketchUp Model Updates & Optimization

I'm a huge fan of optimization... as a programmer and web developer, improving the performance, simplifying algorithms and reducing resource utilization in my code is something that I constantly strive to do. I'm rarely satisfied by simply writing or using code that is "dirty but gets the job done".

Yesterday I made some updates to the SketchUp models of the Commodity Exchange Tower, Royal Bank Building and Winnipeg Square. Since I didn't originally create these models, they were noticeably lacking a lot of detail. The changes that were posted yesterday mainly consist of a little bit more detail enhancement... but probably a more noteworthy change in my opinion, is that the Commodity Exchange Tower model has been "optimized".

The original model actually contained a lot of detail, with hundreds, maybe thousands, of lines and faces making up the facade & windows. I shudder to think how much time and effort it must have taken to do this... unfortunately, all the extra geometry made the model swell up to a file size of 2.26 mb, or over 800 kb for the Google Earth rendition.

The updates I made were actually more of a redo -- I completely deleted all the extra geometry and created a couple of simple replacement textures for the windows and external panels. By doing this, I was able to reduce the file size to a mere 188 kb, or an impressively tiny 42 kb for the Google Earth version; a whopping 91.8% reduction for SketchUp and about 20-fold improvement for Google Earth!