Saturday, March 21, 2009

Chrome Experiments

If you ever wondered how fast Google Chrome's V8 JavaScript engine is, you have to look no further. The recently launched ChomeExperiments.com has a number of computationally intensive demos written in JavaScript which will let you compare Chrome's JavaScript performance with that of your favourite browsers.

I tried out Monster on Firefox 2, Safari 3.1.1, and Google Chrome 0.4.154.


A Bit About Monster



Monster is 3D demo which uses the HTML Canvas element to render 3D animations. It starts with a square which morphs into a rotating cube which morphs into a sphere which morphs into a rotating "Monster".



Firefox 2.0.0


I wanted to see how well Monster performed in Firefox 2. Firefox showed a lot of promise as the initial square morphed to a cube and then a sphere. However, my optimism was short lived as the sphere morphed to a "Monster" and the rendering went from frames-per-second to seconds-per-frame. Saying "the demo did not perform well" would be a huge understatement.


Safari 3.1.1


The demo started a little slowly under Safari. After my experience running Monster under Firefox 2 I was expecting even less from Safari. But Safari surprised me by maintaining a low, but consistent, frame rate throughout the demo. The experience did not seem to degrade as the polygon count of the demo increased. Having said that, the performance was far from fluid.


Google Chrome


I had been disappointed by both Firefox 2 and Safari. I had seen the video clip, but I could not help wondering if it was something with the machine I was using. I fired up Chrome 0.4.154 which I had downloaded shortly after Chrome was launched. I waited as the square turned into a cube and then into a sphere and then into the "Monster" without skipping a beat.


Internet Explorer 6


We all know that Internet Explorer 6 does not have support for the HTML Canvas element, but I launched Monster in it just for the fun of it. The result? A JavaScript error. Enough said about IE!!!


Final Thoughts...


I knew Chrome was ahead of the pack in terms of JavaScript performance, but I had not realize by how much until I did a side-by-side comparison with the aforementioned browsers. I also need to try this Demo using Firefox 3, Safari 4, Internet Explorer 7, Internet Explorer 8, and Opera, but that will have to wait for now.


Sunday, August 3, 2008

"Really Achieving Your Childhood Dreams" by Dr. Randy Pausch

Carnegie Mellon Professor Randy Pausch (Oct. 23, 1960 - July 25, 2008) gave his last lecture at the university Sept. 18, 2007, before a packed McConomy Auditorium. In his moving presentation, "Really Achieving Your Childhood Dreams," Pausch talked about his lessons learned and gave advice to students on how to achieve their own career and personal goals. For more, visit www.cmu.edu/randyslecture.






Randy Pausch's Web Site:
http://download.srv.cs.cmu.edu/~pausch/

This video can be found at:
http://www.youtube.com/watch?v=ji5_MqicxSo


CNN article:
http://www.cnn.com/2008/SHOWBIZ/books/07/25/obit.pausch/index.html

Friday, February 29, 2008

WPM: How Fast Can You Really Type?

I recently read a job application form that contained a rather interesting question. The question read "Typing Speed (WPM):". Now this would be a perfectly normal question if the job application was for a secretary or typist position, but the job in question was actually for a software engineering position.

I have been touch-typing (yes, all ten fingers--not just the two index fingers) since I was about 10 years old, and I must say that I can type rather quickly. But I have never actually measured my typing speed in terms of words-per-minute (WPM). So I decided to fire up a Linux console and find out once and for all.

The method I used is actually very simple.

  1. Type a bunch of words in the console
  2. Find out how many words I typed
  3. Find out how long it took me to type those words
  4. Use those two figures to compute my typing speed in words-per-minute

Here is what I did:

time cat | wc -w
The quick brown fox jumped over the lazy dog's head
[^D]



10

real 0m9.113s
user 0m0.008s
sys 0m0.000s


For those of you who are new to the Linux console, this is what is happening in the above chain of commands:

  • The cat command captures whatever you type at the keyboard until you type Ctrl+D.
  • This text is then "piped" to the wc (Word Count) command. The -w option tells wc to return the number of words in the text piped to it.
  • The above mentioned commands are executed through the time command which measures how much time it took to execute those commands. What is of interest is the first line with the "real"time required to execute.


Computing the Words-per-Minute



The output of the chain of commands (also known as a "pipeline") tells us the two things we need to compute my typing speed: The number of words I typed and the time it took me to type them. Here's some simple math:

In 9.113 seconds I typed 10 words
So in 1 second I could type 10/9.113 words
So in 60 seconds (1 minute) I could type 60*10/9.113

Therefore my typing speed is 65.84 words per minute


Improving the Accuracy


You can only get a rough idea of your typing speed if you type in only 10 words. To get an accurate idea of your typing speed you should try entering a paragraph or two (or more) of text and using the above formula to compute the speed.

Characters-per-Minute


If you want to compute the number of characters you can type in a minute, you should use the wc command's -c switch instead of -w.

Saturday, February 16, 2008

Difficulties with MS Word Files on GNU/Linux

I have been using Linux as my primary desktop (as apposed to server) operating system for quite sometime. However, I have always had access to a Windows machine whenever I was *required* to produce Microsoft Word or PowerPoint documents.

Things have changed a little bit since then. Now all the computers I have access to run Linux. But the *need* for Word documents has not completely gone away. Please don't misunderstand me. I am all for open document formats. In fact, I use them whenever I can. However, when a document is being sent to another party who insists on using Microsoft Word format documents and nothing else (not even Adobe PDF), things begin to get annoying. Free tools like AbiWord and OpenOffice Writer are very good substitutes for MS Word and I often get away with generating documents using one of them. The problem arises when I have to edit and return a document that has already been created with the latest version of MS Word. No matter how good AbiWord and OpenOffice Writer are, and believe me they are quite good with a lot of development effort behind them, they are still not (in my humble opinion) 100% compatible with MS Word. I have come to realize this the hard way when a couple of documents generated using MS Word, possibly the latest flavor, have not come out as expected once they were edited using either of these tools.

The article We Can Put an End to Word Attachments by Richard Stallman explains some of the problems behind widespread use of closed and restrictive file formats such as MS Word, and what we can do to limit their influence on our everyday electronic document interchanges.


Links
* Requires X11 under Mac OS X

Tuesday, October 23, 2007

Useful Windows Keyboard Shortcuts

Most people new to using Microsoft Windows (and computers in general) do not seem to realize that tasks that can be accomplished using multiple mouse clicks can also be accomplished using a keystroke combinations. Here are some helpful keyboard shortcuts that would reduce the number of mouse clicks you need to make when using MS Windows and Windows applications. This information has been gathered from various resources, including Microsoft knowledge base articles and help documents.

NOTE: Some of these shortcuts may have changed in MS Windows Vista.

Windows System Key Combinations
F1: Help
CTRL+ESC: Open Start menu
ALT+TAB: Switch between open programs
ALT+F4: Quit program
SHIFT+DELETE: Delete item permanently


Windows Program Key Combinations
The keyboard shortcuts listed below are standard for all Microsoft text (Notepad) editors and word-processors (Wordpad, MS Word) as well as non-Microsoft word processors (OpenOffice Writer).

CTRL+C: Copy
CTRL+X: Cut
CTRL+V: Paste
CTRL+Z: Undo
CTRL+B: Bold
CTRL+U: Underline
CTRL+I: Italic


Mouse click/keyboard Modifier Combinations for Shell Objects
SHIFT+right click: Displays a shortcut menu containing alternative commands
SHIFT+double click: Runs the alternate default command (the second item on the menu)
ALT+double click: Displays properties
SHIFT+DELETE: Deletes an item immediately without placing it in the Recycle Bin


General Keyboard-Only Commands
F1: Starts Windows Help
F10: Activates menu bar options
SHIFT+F10 Opens a shortcut menu for the selected item (this is the same as right-clicking an object
CTRL+ESC: Opens the Start menu (use the ARROW keys to select an item)
CTRL+ESC or ESC: Selects the Start button (press TAB to select the taskbar, or press SHIFT+F10 for a context menu)
ALT+DOWN ARROW: Opens a drop-down list box
ALT+TAB: Switch to another running program (hold down the ALT key and then press the TAB key to view the task-switching window)
SHIFT: Press and hold down the SHIFT key while you insert a CD-ROM to bypass the automatic-run feature
ALT+SPACE: Displays the main window's System menu (from the System menu, you can restore, move, resize, minimize, maximize, or close the wi
ndow)
ALT+- (ALT+hyphen): Displays the Multiple Document Interface (MDI) child window's System menu (from the MDI child window's System menu, you can restore, move, resize, minimize, maximize, or close the child window)
CTRL+TAB: Switch to the next child window of a Multiple Document Interface (MDI) program
ALT+underlined letter in menu: Opens the menu
ALT+F4: Closes the current window
CTRL+F4: Closes the current Multiple Document Interface (MDI) window
ALT+F6: Switch between multiple windows in the same program (for example, when the Notepad Find dialog box is displayed, ALT+F6 switches be tween the Find dialog box and the main Notepad window)


Shell Objects and General Folder/Windows Explorer Shortcuts
For a selected object:

F2: Rename object
F3: Find all files
CTRL+X: Cut
CTRL+C: Copy
CTRL+V: Paste
SHIFT+DELETE: Delete selection immediately, without moving the item to the Recycle Bin
ALT+ENTER: Open the properties for the selected object

To copy a file
Press and hold down the CTRL key while you drag the file to another folder.
To create a shortcut Press and hold down CTRL+SHIFT while you drag a file to the desktop or a folder.


General Folder/Shortcut Control
F4: Selects the Go To A Different Folder box and moves down the entries in the box (if the toolbar is active in Windows Explorer)
F5: Refreshes the current window.
F6: Moves among panes in Windows Explorer
CTRL+G: Opens the Go To Folder tool (in Windows 95 Windows Explorer only)
CTRL+Z: Undo the last command
CTRL+A: Select all the items in the current window
BACKSPACE: Switch to the parent folder
SHIFT+click+Close button: For folders, close the current folder plus all parent folders


References:
http://support.microsoft.com/kb/126449