Thursday, July 23, 2009

Magical Behavior of Microsft Products

Today morning I received one of those another forwarded mails telling me of all those crazy magical things that Microsoft products do, and which no one from Microsoft including Bill Gates (as claimed in the email) is able to explain.

Without wasting a minute let's take a look at the magic and the magic behind it ;)

Magic #1: An Indian found that nobody can create a FOLDER anywhere on the Computer which can be named as "CON". This is something funny and inexplicable. At Microsoft the whole Team, couldn't answer why this happened! TRY IT NOW, IT WILL NOT CREATE A "CON" FOLDER
Magic Behind: First, why do every Indian has to proclaim that it was discovered by an Indian? Is it some sort of egoistic game we all are playing in this world?

Leave it, anyways, the reason one cannot create a folder called CON is because CON is a special redirect for CONsole (meaning Monitor output, in general). You can use CON along with pipes to redirect the output streams to monitor, say in case it was going to a printer. Hence, the observed behavior. It is analogous to something like you won't use the variable *sin* in a trigonometric equation, or you can't use an *if* as a variable in a programming language.


Magic #2: For those of you using Windows, do the following:
1) Open an empty notepad file
2) Type "Bush hid the facts" (without the quotes)
3) Save it as whatever you want.
4) Close it, and re-open it.
Noticed the weird bug? No one can explain!
Magic Behind: This is simply an encoding issue. When notepad opens a file it tries to identify the file type encoding, and because of a bug where the characters form a particular pattern make notepad believe it is Chinese, it seems to us as if everything disappeared. Save the file in UTF-8/16 and everyhting would work fine. Open the file in Wordpad/Notepad++ etc and you can see the original text. For more details read the following Wikipedia page: Bush hid the facts


Magic #3: Again this is something funny and can't be explained. At Microsoft the whole Team, including Bill Gates, couldn't answer why this happened! It was discovered by another Indian. Try it out yourself. Open Microsoft Word and type =rand (200, 99) And then press ENTER And see the magic.

Magic Behind: Oh gosh... another Indian thing. I am upset.

On a serious note, this is nether a bug nor an easter egg in Microsoft word. This is a feature developed specifically on the request of users. This is a functionality that Microsoft provides. Don't believe me, well, read this Microsoft Support page. rand(p,l) is a special command you issue to Word to insert sample text in the localized language of the OS. This helps content editors, localization testers, and others a lot.

If only people could stop boasting about things done by Indians. I am proud to be an Indian, but not the one's as these.

Thursday, May 21, 2009

Synergy - One keyboard/mouse for multiple computers

Many of us use multiple computers at work, most probably, a laptop and the desktop. And most of the time we find ourselves wondering as to why the cursor isn't moving with the mouse, only to realize that we were using the wrong keyboard/mouse combination. Sounds familiar, huh? I have been irritated by this a lot in the past, and recently, I discovered this magical tool which left me cursing as to why I didn't discover it earlier.

Synergy, an open source tool that seems to be doing magic. In its own words,
Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It's intended for users with multiple computers on their desk since each system uses its own monitor(s).

Yes, it really does that. In reality, as soon as I configured this tool, this is the first post I am making using the other screen and smiling :) Configuration in super easy - it was over under 2 minutes and now I have the pleasure of cleaning up my office desk of all those useless wires. I can now only have multiple screens with a single pair of keyboard and mouse and work seamlessly. How easy, isn't it?

Another major power of the tool is to bring the universal clipboard into existence. You want to copy from one computer to another, simply, copy from the screen of the first, move keyboard to second, and paste. Voilla - its simpler than buying an ice-cream. Enjoy!!!

Are you left gasping for more? Here it comes... Screensaver's on all computers are in sync. They start at the same time and end at the same time. Amazing - yes atleast for me.

In anticipation that some fellow world citizen might easy his/her pain with this tool. Hail Synergy, Hail the power of Open-Source!!!

Friday, May 15, 2009

New York Times launches Times Reader 2.0

New York Times released a Times Reader which makes reading online newspaper fun and exciting. Times Reader enables a user to read New York Times without a web browser. This might not look like a big change considering the fact that NYT is already available on web via a browser, but, the sparkling difference is the compelling and commanding interface. And yes, for those who might not have picked it up, Times Reader is a desktop application. Yes, it is !!!

Times Reader makes reading news worthy as the interface is built specifically for the purpose. Again there is no need to wait for page refreshes to get updates, Times Reader would itself refresh the contents continually, without any user input. It keeps displaying the last updated time in the top right corner, can browse through pages, and user clicks for details on a story take them directly with a nice transition effect, creating that Wow effect.

Here is what I saw on my first run,


Try it and let the world know of your opinion.

Unlike its predecessor, Times Reader 2.0 is built over Adobe AIR technology which enables it over Windows, Macintosh and your favorite flavor of Linux, as opposed to the earlier WPF version that was restricted to Windows.

I wish something similar is developed by the 'Times of India', for they already have an e-paper edition which kind of sucks. Rise India, leverage technology to show prowess to the world.

Sunday, February 1, 2009

Power of Civil Engineering

The power to observe, perceive and act has elevated man into a class of his own. This god gifted ability has led him to cause change within and around himself.

Change - as they say is the only thing that is permanent. This unquenched thirst for change is the sole spark that drives one to create the world around into a home fit for coexistence of all.

God being the master sculptor has provided all the sources and amenities but in cocooned state. The power to reach out, to metamorphose the resources into useful, fruitful and healthful objects has been bestowed upon only a privileged few.

The air we breathe, the water we drink, the roads we drive on, the bridges we cross, the home we all so love, the life we live, the environment we value is all indebted to those pioneers and fore runners who have exhausted their all for changing just mere existence to living.

Today the life we live is due to the dream that an engineer had seen. The dream to create fire, to make a wheel, to build a house, to cultivate a field, to raise a family is all an engineers vision.

What he dares to dream is unheard of, what he imagines and hopes to achieve is beyond ones wildest imaginations. The engineer who builds a wheel for transport, needs a road for plying. The one who invents electricity, needs transmission setup. He who casts metals for mankind needs a refinery to be set up. From telephone signals to Information Technology laying and setting is a prerequisite.

The water we use for our fields, the electricity harnessed by dams, the bridges bridging our gap, the solid foundations upon which you make your home, the mighty walls that withstand the nuclear reactions, the laying of cables over and below the mother earth, are all conceived by none but one and that one is none but a CIVIL ENGINEER.

Remember, all seven wonders of the world, are civil engineering marvels.
PS: This is in response to an IT Manager's question on me being a Civil Engineer by choice.

Saturday, October 18, 2008

Url based Tile name Controller

Tiles, a framework that is used extensively for templating in Java based web applications. Spring Framework, a dependency injection container that makes configuration easier. There are several controllers available in the Spring framework which makes mapping static JSP/JSF pages directly to the URI's without writing boiler plate code. But in most of the cases, we use Tiles for a templating. What to do in such a case? There is no single controller that would help us map URI's to a tilename. Here is what I came up... A simple controller that would directly map a URI to a tilename and forward the request out.

A typical usage example is as under,

<bean name="urlTilenameController" class="org.springframework.web.servlet.mvc.UrlTilenameViewController" >  
<property name="indexTile" value=".homePage" />
<property name="toLowercase" value="true" />
<property name="stripAfterLastDot" value="true" />
<property name="insertStartingDot" value="true" />
</bean>
The parameters should be self explanatory. In case you would like to know more on this, feel free to contact me.

Hope this helps. Keep Walking!
package org.springframework.web.servlet.mvc;

import java.io.File;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
* TODO: type comment.
*
* @author Sandeep on Sep 25, 2008 @ 9:29:54 PM
*
*/
public class UrlTilenameViewController extends AbstractUrlViewController {

private static final Log log = LogFactory.getLog(UrlTilenameViewController.class);

private String indexTile;

private boolean toLowercase;

private boolean stripAfterLastDot;

private boolean insertStartingDot;

/**
* @param request
* @return
* @see org.springframework.web.servlet.mvc.AbstractUrlViewController#getViewNameForRequest(javax.servlet.http.HttpServletRequest)
*/
@Override
protected String getViewNameForRequest(HttpServletRequest request) {
String uri = extractOperableUrl(request);
String tileName = getViewNameForUrlPath(uri);

if(log.isDebugEnabled()) {
log.debug("uri " + uri + " converted to tilename " + tileName);
}

return tileName;
}

protected String extractOperableUrl(HttpServletRequest request) {
String uri = request.getRequestURI();
ServletContext context = request.getSession().getServletContext();
File rootFile = new File(context.getRealPath ("/"));
String rootContext = rootFile.getName() + "/";

if(log.isDebugEnabled()) {
log.debug("Request uri received is " + uri + " in the application context " + rootContext);
}

if(uri.startsWith("/")) {
uri = uri.substring(1);
}
if(uri.startsWith(rootContext)) {
uri = uri.substring(rootContext.length());
}

return uri;
}

protected String getViewNameForUrlPath(String uri) {
if(uri == null || "".equals(uri)) {
return this.indexTile;
}
uri = uri.replaceAll("/", ".");
if(this.toLowercase) {
uri = uri.toLowerCase();
}
if(this.stripAfterLastDot) {
int index = uri.lastIndexOf(".");
if(index != -1) {
uri = uri.substring(0, index);
}
}
if(this.insertStartingDot) {
uri = "." + uri;
}
return uri;
}

/** Returns the indexTile.
* @return the indexTile.
*/
public String getIndexTile() {
return indexTile;
}

/** Sets the indexTile to the specified value.
* @param indexTile indexTile to set.
*/
public void setIndexTile(String indexTile) {
this.indexTile = indexTile;
}

/** Returns the toLowercase.
* @return the toLowercase.
*/
public boolean isToLowercase() {
return toLowercase;
}

/** Sets the toLowercase to the specified value.
* @param toLowercase toLowercase to set.
*/
public void setToLowercase(boolean toLowercase) {
this.toLowercase = toLowercase;
}

/** Returns the stripAfterLastDot.
* @return the stripAfterLastDot.
*/
public boolean isStripAfterLastDot() {
return stripAfterLastDot;
}

/** Sets the stripAfterLastDot to the specified value.
* @param stripAfterLastDot stripAfterLastDot to set.
*/
public void setStripAfterLastDot(boolean stripAfterLastDot) {
this.stripAfterLastDot = stripAfterLastDot;
}

/** Returns the insertStartingDot.
* @return the insertStartingDot.
*/
public boolean isInsertStartingDot() {
return insertStartingDot;
}

/** Sets the insertStartingDot to the specified value.
* @param insertStartingDot insertStartingDot to set.
*/
public void setInsertStartingDot(boolean insertStartingDot) {
this.insertStartingDot = insertStartingDot;
}
}

Thursday, September 4, 2008

Google Chrome!

As with any other computer geek, I was amongst the downloader's of the new Google Open Source Browser, Chrome! Downloading and installing it was a breeze, just a couple of minutes. Upon the first start, as with Mozilla Firefox, it asked whether to import data from the current Internet Explorer. Hehe, I don't know why all browsers target IE as their arch-rival.

The first instant liking was its icon and the comic strip that accompanied the Google Chrome launch. For those of you, who didn't had a chance to go through the making of Chrome, here it is. The strip actually explains the theory why the concept of a new browser originated. And they explain really well, keeping the reader tied and wanting for more.

Anyways, Chrome looks much like the Mozilla Firefox and takes its base from it (I think). The icons, the loading style, the address bar etc. match very closely with FireFox 3.0 But the best part was the reading pane area - its so much large. The tab bar has been merged with the window title bar, and with just the address bar beneath, the whole of the rest screen is available to the user for working.

At first look, you notice that the tab window has shifted to the title bar. Nice idea - why do we need a title bar in an application when we have the whole application on screen, and in-focus. Cool! The animations while opening new tabs, resizing windows, and closing tabs just adds more funk and UI-appeal to Chrome! Must say, Google has the best UI and Usability analysts.

A new tab displays some of the most frequently sites as tiles alongwith the last snapshot, which is ultra-cool. In a fraction of second I could locate my favorite site and a click brought me to it. Amazing!

Another sparkling feature, is the introduction of application short-cuts. I tried that with GMail, and yes, it looks amazing. You have a window with GMail running, without anything else except the title bar, like a desktop application. Ummm.... is Google planning to venture into bringing everything to the desktop ;) Well, that would be a boon for all users from countries where the broadband penetration is still a dream.

The popup blocker displays a notification as a hovering window on the bottom right, and the connection information comes as notifications on bottom left, fulfilling the task bar's functionality. Infact, this adds to the beauty of Chrome, adding more space, and removing information which a normal internet user is least bothered of.

Two features introduced in Chrome, would instantly draw a huge fans base amongst the developers. One is the 'View Source Code' - just right click on any page and it shows you the source code of the page. So, whats new? Well, the source code is syntax highlighted, color-coded and line numbered. Also, you have an option to view the source code of an inline frame, which I haven't seen in IE, FF or Safari, except with usage of plugins. I personally am not very comfortable using plugins!

Another is the introduction of Javascript Console. At first look, it seems like a normal console, but upon exploring further its almost a FireBug in place. Whats more is the concept where you can actually see the files being downloaded for a page in a timeline, and optimize your code accordingly. Is this a competition to YSlow! ;)

Yet, there were a few disappointments. While opening MS Exchange 2000, I could not view my inbox, the frame had the whole source code, but I guess there is a problem with the rendering engine. Second, the browser crashes if the internet connection breaks and you try and close it down. But, with the current version as 0.2 and Chrome in beta, its a long journey ahead. I am sure by the time Chrome comes of age, it would be a mature and robust browser taking on IE one-on-one, and is gonna change and shape the future of web.

Keep Walking, Chrome!/p>

Monday, August 4, 2008

Presentations: Spring Framework

I have just finished updating the Spring Presentations for Version 2.5 and am happy to announce that they are now available in the public domain. You may know more and download the presentations from here. There are two presentations covering the Basics and the Enterprise Service Abstractions.

An online preview would be available shortly.

Hope this helps!

Windows Vista and its damn updates!

For millions of users like me, Windows comes as the default operating system which we get familiar and acquainted with. To use it on your computer becomes more of a standard than a choice, for computer manufacturers don't offer much systems on other OS platforms, and Apple tends to be too costlier.

On the same lines when I was looking for a laptop last year, I settled for a DELL machine with Windows Vista Home Premium pre-loaded. But today, I realize what a big mistake I made. Don't worry - not on the part of choosing DELL, but picking up Windows Vista.

Today morning, Windows downloaded and installed an update and then forced me to restart my computer, without any choice, when I did not wanted to. Then it took almost 15 minutes to shut down. At restart it showed me those ugly screens of loading registry entries and files. The screen displayed Installing updates 1 of 3 (0% complete), and then it took another 70 minutes to see the login screen. Once iI authenticated my credentials it took another 15 minutes to load. Now this was frustrating, even after seeing the desktop I could not start any application, and even shut down again. I had already lost 100 minutes of my time, because Windows had installed some silly update which may be I didn't need.

When my patience left, I did a force shutdown and then a cold start. But to add insult to injury, things remained the same. Another 40 minutes, and I had to cold start my system in safe mode. Thank God, it was not slow this time and in couple of minutes I was to the admin console. Upon looking up for updates that were installed recently, I found the culprit.

Windows Desktop Search 4.0 installed on 4 August 2008. Damn hell, why did Microsoft installed a search system by default on my machine. I don't need and I hate desktop search softwares for the reason that they make the performance of the machines pathetic. It took me no time to click on the Uninstall button and then restart. Adding weird faces to the injury and insult, it has already been 90 minutes and my system still waits at the screen Configuring updates: 3 of 3 (0% complete).

If only I could get a chance to speak to the Windows Development Team, I would take the opportunity to let them know that their thinking of doing everything on their own creates life's miserable for users like me.

I already have lost more than 180 minutes (3 hours) of my time due to this and still counting.... :(

Readers, if you could point me to a link where I can file this as a bug, please do let me know, I am more than eager to kick their a**.

Monday, July 14, 2008

Blogger and My Blog List widget

A friend of mine was trying to add my blog using the recently released, My Blog List widget, in Blogger. But, an error was being thrown saying no feeds could be detected for the blog. When I gotta know of this I was surprised and a bit upset. One, for my blog could not be added to a blog roll and second, I would not be getting more visitors, doh!

Another worry was to analyze the cause behind it. as I tried it myself and with a few hits and trials, I came to the conclusion that FeedBurner is the culprit here. When you are redirecting all your feed viewers to FeedBurner using the Blogger's internal setting, the blog feeds are not discovered by the widget. I am not sure what causes this to happen. But, there is a workaround for all,

Just use the complete blogger feed URL for such blogs. For example, if you are looking to add this blog to your list, instead of saying http://azcarya.blogspot.com say, http://poetinside.blogspot.com/feeds/posts/default. Just add /feeds/posts/default to the end of all Blogger blogs and you should be able to get it through.

Hope this helps.
Keep Walking!

Greeting Grammar!

Do you feel there is something wrong is saying, "Hi Sandeep". If you DO NOT I would suggest you to read this particular post by Bob, Greeting Grammar, which is definitely an eye opener. Its an amazing post which reminds me of my grade school classes. Gosh, if only I had paid some heed to my teachers. :)

Keep Walking, friends!