Monday, December 26, 2005

Tool of the Day: TestDisk (Partition Recovery)

This is an excellent utility to recover lost paritions. It is an OpenSource software and is licensed under the GNU Public License. I strongly recommend the newbies to run this utility in log/debug mode and send the output to experts or forum for recovery instructions.

Tip of the Day: Improve your screen readability on XP

Have you ever wondered why you prefer to print and read from papers rather than screen directly?The answer is that the fonts appearing on the screen are not sharp & clear as the printed material. Microsoft has attempted to resolve this pain of customers through ClearType. I think they did really well. See it yourself to believe it. The improvement is very impressive in LCD. I personally don't see much in the CRT. You can enable ClearType on XP using the following web interface.

http://www.microsoft.com/typography/cleartype/tuner/Step1.aspx


Note:
1. Use IE instead of firefox as this enabling is based on ActiveX control.
2. After this, increase your screen resolution and see that now you'll be comfortable with larger resolutions. I use (1400 x 1050) than (1280 x 1024) when ClearType is enabled. Saves lot of scrolling & tabbing.

Tuesday, December 06, 2005

Topic of the Day: Why functions

Functions are the basic building blocks of programming either be procedural or object oriented.
We all know to write functions possibly in every language we learn (
How?) C,C++,Java,C#,PL/SQL,JavaScript,VBScript,Python etc., There are several different opinions/reasons/views on why use functions. A common notion among most developers are that functions improves reusability (technically speaking it is ability to use in multiple programs) but it is not just that.My introspective view reveals the following (for Why?)

  1. Readability: Simplifies my program by substituting a complex set of commands (instructions or statements) with English words (call instruction - name of function). Eg: Sum(100,200)
  2. Reusability: Eliminates repetitive code (redundancy) within the program. Program becomes smaller.
  3. Testability: Simplifies unit testing.
  4. Stability: Well unit tested functions leads to a stable program.
  5. Extensibility: Easier to add new features as the program is now smaller,readable,testable & stable. This apart from the fact whether the new extension uses the existing functions or not.
  6. Maintainability: Stable & extensible programs are easier to maintain.
  7. Productivity: Easier maintainable programs increases our (Developer's) productivity.
  8. Technicality: Information hiding or better execution (say recursive). This is more of When? to write functions.
So next time you write a bunch of statements (code) think whether writing them as a function solves even any one of the above top 3 reasons & if so then write them as functions.

May be I'll write samples to substantiate this introspection of mine over this week end.

Monday, December 05, 2005

Tool of the Day: PrintKey2000

A good tool for taking screen shots either entire screen or portion of it. It also allows to save in several different file formats. There are options to edit the picture for size,color,rotation etc., which are very cool of a freeware program. Note: Only PrintKey2000 is free, newer versions are NOT.

Tip of the Day: DOS can also be colorful

Yeah you read it right. For Windows XP & 2000 users, the DOS windows foreground & background colors can be changed. Please note the following special behavoir: When you specify only one color it is meant for foreground. When you specify 2 colors, first is for background & second is for foreground.

Example: Changing the foreground color to Light Aqua (B).
This is my favourite
c:>color B


Example:Changing the background color to Red (4) and background color to Light Aqua (B).
C:>color 4B

Work with some color in life...

Tuesday, November 22, 2005

Topic of the Day: Hidden powers of copy command

Though we everyone knows the purpose of copy command there is one more function in it which we overlook. It is the power to append files. This function comes handy in several situations specifically for ad-hoc purposes. Here is how..


  1. Scenario: Append content of file 2 to file 1.
    Example: Copy file1+file2
  2. Scenario: Merge two files to form a new file
    Example: Copy file1+file2 file3
Note: This above solution could be applied to any files (text,doc,xml etc.,)

Tip of the Day: Display DOS names of file/directories

Current windows OS versions allow long names for files & directories. Batch file operations which are based on DOS do need 8.3 format file or directory names to work with. To retrieve the short name (aka DOS name)of such files or directories use the following dir command.

C:>DIR /X

Displays the name of the file or directories in 8.3 format.

Tool of the Day: Firefox

A tool that I use everyday in my life. Here is why with some hows


  1. Free.
    Yes its right you don't need to pay for such an safe,secure & efficient browsing tool.
  2. Safe & Secure
    When I use the "e" icon on my desktop I get to have the malicious spware & adware from around the world.Some don't go away no matter what you do. Even latest & popular MS AntiSpyware Beta or Spybot can't. Firefox is the only solution for safe & secure browsing.I've been using this tool without even a single spyware infection on my desktop for the past 1-1.5 years.I spearhead this tool's use even among non-developer community.
  3. Usability - Efficient browsing

    1. Tabbed Browsing
      View more than one web page in a single window with this time saving feature.Behavior customizable via Tools->Options->Advanced menu.
    2. Autocompletion
      Stores the information entered on web-forms & search bar to make fillin g out forms & searching faster.Customizable via Tools->Privacy menu.
    3. Password Manager
      Stores the login information so that you don't need to re-enter.You can set master password & also view the saved password.Use this feature only on your desktop.For "e" we need third party tools for this purpose. Its free here.
    4. Customizable Search
      You can add search engines to customize the search toolbar behavior. Very useful & time-saving feature. I use wikipedia & encarta dictionary via this.
    5. Text Zooming
      To make pages with small text easier to read.Use Ctrl++,Ctrl--
    6. Bookmarks
      A powerful feature to add bookmarks to the toolbar. You can group them in a folder. Later you can open all bookmarked site under a folder in tab. Very efficient browsing.

  4. Hassle-Free Downloading
    Files you download are saved automatically to the specified directory.Downloads could be paused & continued later.
  5. For Web-Monkey's
    Comes with a standard set of developer tools including a powerful JavaScript and CSS error/warning console, and an optional Document Inspector that gives detailed insight about your pages.

Monday, November 21, 2005

Tool of the Day: TextPad

A tool that I use everyday in my life. Here is why:

  1. Free
    Yeah we everyone like this.
  2. Cross-platform:
    You can create files for use in PC/UNIX. Comes very handy when you are not dexterous in Unix editing tools.It says it supports Mac but i never used this OS so can't comment on it.
  3. Block Select Mode
    You can select portions of the data in the file that you need.
  4. Find-in-files
    A very handy feature.Search for a string in files under a particular directory. You can limit the search to particular file type & also extend the search within sub-folders.
  5. Regular/Replacement Expression Support:
    A programmer's haven. You can use limited but still extensive regular expressions in your search & replace operations. Combined with Find-in-files this is the most powerful developer's util. A very handy tool for engineers dealing with ad-hoc formatting of data in files.
  6. Use as editor for C/C++/Java
    Comes default with document classes & works with compilers of C/C++/Java. A very handy tool for beginners to focus more on learning these languages & its associated concept and avoids getting distracted with learning any new IDE at the same time. I consider this as a Big plus. Like many IDE it also supports workspace. Its worth mentioning the support for HTML too.
  7. Multiple Documents
    I consider this as an usability. Work with multiple documents in a single window with each file opened in a tab. Supports file comparisons too.
  8. Performance
    The program is very stable & has better performance than conventional editors
Note: This program is accessible via the right-click context menu of a file.

Tip of the Day: Improve the power of Window's Explorer Right Click Context Menu

Open Command Prompt in Directory


Would'nt it be efficient to open command prompt on right click of a folder?? It's a time saver when I need to run scripts under a particular directory.Here is how:

  1. Windows GUI method (Easy)
    * Open up windows explorer
    * Tools -> Folder Options.
    * File Types Tab
    * Select the Folder file type
    * Click Advanced
    * Click New
    * For the Action type what ever you want the context menu to display, I used Command Prompt.
    * For the Application used to perform the action use c:\windows\system32\cmd.exe (note on win2k you will want to specify the winnt directory instead of the windows directory)

  2. Manual method
    (Caution: This requires editing your registry. If you are not familiar with registry editing, this isn't for you... so use the Windows GUI method above)
    1. Open regedit
    2. Navigate to HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell
    3. Create a new key called Command Prompt
    4. Your default value should be Command Prompt Here
    5. Create a new key called Command under the Command Prompt key
    6. Your default value should be cmd.exe /k pushd %L
You can use any of these above methods to customize the windows right click context menu associated with folder or file types.