Auto-Format your Code in Visual Studio

Friday, July 18, 2008

Many a times we often come across unformatted code, which is almost impossible to understand. For instance, some lines of code may be indented properly while others might not be. Visual Studio provides a great feature for auto-formatting your unformatted code. Just press Ctrl+K followed by Ctrl+D and voila the code is now in a well-indented, easy to understand format. It works for markup code like HTML, XML etc. as well as for language codes such as C# and VB.

If you have code like this:

<table><tr><td>val1</td><td>val2</td></tr></table>

It can be auto-formatted to:


<table>
<tr>
<td>
val1</td>
<td>
val2</td>
</tr>
</table>

So, next time you copy some code from the net you can easily reformat it by using the key combination. Alternately, you can also use Ctrl+K followed by Ctrl+F.

Using Public Computers Securely

Wednesday, July 09, 2008

If you are using a public computer, the chances are high that your personal information might be at risk. There is a probability that a key-logger might be installed on the machine. Key-loggers are programs, normally used for malicious intends, which log each key stroke of the keyboard. For instance, if you open your computer and type in a url and then enter your username and password, all these would be stored in a special file generated by the key-logger. These programs run in hidden mode and you won’t be able to realize that they are working behind your normal applications.

So, how do you protect your information from these malicious spywares? A nice way would be to confuse the person reading your personal information. Here are a few tips you might want to follow:

  • Before entering a URL, open the drop down list of a browser to see if the website is present. Open the website by clicking it. That ways, the key-logger won’t be able to record the website you are browsing.
  • Don’t enter your username, password, credit card numbers or any other secure information directly on the text boxes provided for these. Instead, open a notepad file and type some random text. Between this random text put your passwords or other information split into multiple parts. Now copy-paste these parts of your information on the website. It would be almost impossible for the person reading the key-logger file to decode any of your information from this file.
  • A number of banking websites, like icicibank.com and hdfcbank.com have introduced the concepts of virtual keyboards. These also allow a sound level of protection as you need to select your password by selecting the alphabets using the mouse buttons. Always use them for enhanced security.
Following these tips can prevent you from potential threats of identity thefts. A little extra effort is certainly worth the extra protection you get.

P.S.: Public computers still don’t provide a very high security level. There might be machines which are monitored through virtual networks and video recording of your sessions could be made easily. So, always try to avoid sharing your private information on these systems.

New URL and a New Design

Sunday, July 06, 2008

I have moved my blog from gsmodi.blogspot.com to blog.gsmodi.com. The blog has been redesigned to give it a great new look and feel.


» » »


Both these changes were awaited from a long time. I had wished to change my blog domain from a long time. The new domain sounds much better and syncs with my website: www.gsmodi.com. The blogging platform remains the same, ie blogger. I had thought about changing it to wordpress, but blogger allowed complete redirection of my old posts to the new custom domain.

The blog design needed a makeover from a long time. The new design is a 3 column layout which caters to the more common larger screen sizes. I found this layout here. A number of modifications have been made to the layout to make it look better.

Apart from these, a number of new things have been added to the blog:
  • E-mail subscription option from feedburner.
  • Custom search engine from Google.
  • A favicon for associating an icon with the bookmarks.
  • The new subscription widget from Blogger.
  • Social bookmarking and other sharing button from ShareThis.
  • Tag (Label) cloud whose code can be found here.
Do give your feedback about the new layout and these exciting features.