Funny Linux Commands to bring a smile

I found these commands quite funny, haven’t tried them yet. Downloading Ubuntu, will try soon 🙂


Format Decimal Datatype with Commas in T-SQL

Note: This is approach is actually NOT recommended. Better idea would be to do all the formatting on UI.

Ever fall into a situation where a column is a Decimal, and you want the output to have a comma after every three digits?
T-SQL’s CONVERT function can do it for you. The syntax of the function is:
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )

Here, we will be utilizing the power of the last parameter style. The style can be set to the following three values, when converting money datatype into a character datatype:

0 – No commas and only 2 decimal points
1 – Commas every 3 digits, and only 2 decimal points
2 – No command, and 4 decimal points.

Now since, the datatype stored in the table is actually decimal, we first need to convert it into money, and then convert it into varchar or char.

select convert(varchar(50),convert(money,'54120000.2154'),1)

The result would be:

-------------------- 54,120,000.22 (1 row(s) affected) Simple. Isn’t it?

Why I Love and Why I Hate Google Crome

First things first. This blog was Posted on: 04 Sep, 2008
Everything has changed since then.

After Google launched the beta of its browser Chrome, I started exploring it. I was in love with it within minutes. Gmail was opening faster than Outlook, and so were other site. However, by the evening, I started disliking it as well. Its become a kind of love-hate relationship.

Here I am trying to put rationally why I love it and why I hate it.

Why I am in love with Chrome

Its Fast

The first thing, it is blazingly fast. The difference is visible. Working with JavaScript intensive sites like Gmail is especially a great experience. As I mentioned earlier, the time to open emails and going back to inbox seems actually faster than Outlook. (I do not want to talk about Lotus Notes, that I HAVE to use at work. Anyone who has worked with it, know how painfully resource hungry Lotus Notes is.)

Other sites open fast too. Moreover, the difference is visible. You do not need a specialized test to see it. If you think a proper test is needed, see this page, which has run a early performance test and is wayyyyyy better than IE7 and much better than any competition.

Dragging dropping tabs

Dragging out a tab to form a new window, and then draggin it back to the orginal window is so much fun. I don’t know if I will ever use this feature. But its definitely good 🙂

Keyboard shortcuts

Chrome has some interesting Keyboard Shortcuts. Below is few of my favorite. The one I like most is CTRL + K. It puts a ? in the address bar and then you just start type what you want to search using your default search engine.

You can get a full list here.

  • Ctrl+N — Open a new window
  • Ctrl+Shift+N — Open a new window in incognito mode
  • Ctrl+T — Open a new tab
  • Ctrl+Shift+T — Reopen the last tab you’‘ve closed. Google Chrome remembers the last 10 tabs you’‘ve closed.
  • Ctrl+1 through Ctrl+8 — Switch to the tab at the specified position number. The number you press represents a position on the tab strip.
  • Ctrl+9 — Switch to the last tab
  • Ctrl+Tab or Ctrl+PgDown — Switch to the next tab
  • Ctrl+Shift+Tab orCtrl+PgUp — Switch to the previous tab
  • Alt+Home — Open your homepage
  • Type a web address, then pressAlt+Enter — Open your web address in a new tab
  • Shift+Escape — View the Task manager
  • Ctrl+G or F3 — Find next match for your input in the find-in-page box
  • Ctrl+Shift+G or Shift+F3 — Find previous match for your input in the find-in-page box
  • Ctrl+U — View source

Task Manager

I have a bad (?) habit of keeping 20-30 tabs open at once in FireFox. (I cant think of doing this in IE for the obvious reasons.) It does happen sometimes that because of one bad performing page, my whole session is gone. The Session Restore works most of times, but sometimes it does not.

With Chrome, you have process isolation for each tab. Therefore, if one tab dies, only that tab dies. The other tabs are safe. Really a welcoming feature!

Another useful thing that comes with it, is the Task Manager. Chrome has its own task manager so you can see how each tab and each plug-in is working. Cool!


Bookmarklets is one interesting thing, that you should give it a try. These small JavaScript, saved as favorites, do things like changing page color, resizing window to a specified size, searching the selected word in dictionary, and may other interesting things.

Something off topic, the web application I work on has a page with lots of question, where you have to answer No to all the question before you can proceed further. It would of use practically, but during the development, I just need to say No to all. I wrote a simple script to answer No to all these question and saved it as a bookmarklet. Works great for my whole team.

Coming back to the point, these Bookmarklets are IE specific, and do not work in FireFox. However, they do work in Chrome. Means one thing to mean, Chrome has better support for the Javascript.

Why I hate Chrome

Organizing Bookmarks

The fist bad thing is no easy way to organize bookmarks. It imported my FireFox and IE bookmarks very easily, but it put all FireFox bookmarks in one ugly folder. The only way to organize is to drag and drop.

No RSS Feeds

It has no support for RSS feeds. Firefox and even IE handle RSS feeds. When RSS feeds are becoming so popular, I do not believe how Google could ignore handling RSS feeds. If you click on RSS link, all you will see the content XML, without formatting, filling your screen. Ugly!

As expected after experiencing the RSS torture, XML files do not open. IE and FireFox handle them so well.

Bad RAM management

If you leave Chrome open for while, go to some other application, and come back, the tabs have been erased from the RAM. The result is that when you go to a tab, you see a blank screen and then the content starts to appear. This happens when my Laptop has 2 GB of RAM.

Missing Keyboard Shortcuts

There is no keyboard shortcut to append .org or .net. Opera and FireFox have it since long.

I am sure that there will be more things showing themselves as I continue using it. Until then, I am going back to use it. Post in the comments what you think.