Monthly Archives: November 2008

What goes behind the scenes when the product installer supported upgrades?

Standard

My team is building an auto update feature for one of our products and I tried to understand the concepts being upgrades using windows installer. I would go and now has more explanations to understand the task performed by the team member. Windows Installer supports three types of product upgrades: small updates, minor upgrades, and major upgrades.

A small update consists of product changes, such as hot fixes, so small that no change to the product version is necessary or desired. A minor upgrade means an update to product minor version like 1.1 to 1.2, but there are  no significant changes to the setup organization between versions. The install-time behavior of a minor upgrade is to install over the existing product. A major upgrade means an update to product minor version like 1.2 to 2.0 and  can contain significant changes to the setup architecture. The install-time behavior of a major upgrade can be to uninstall the earlier version and install the new one, or to install over the earlier version and then remove any leftover data of the previous version.

Windows Installer provides different methods for packaging upgrades, and the different options affect the way the upgrade is applied to a target system.An upgrade can be packaged for deployment to the target system as a full installation (MSI package) or Windows Installer patch file (a file with the MSP extension). when the upgrade is packaged as a full installation, it upgrades existing product if one is present, or otherwise to behave as a first-time installation. when upgrade is packaged as a Windows Installer patch file (a file with the MSP extension), it  can be used only to upgrade an existing, installed product, and cannot be used as a first-time installation. Small updates and minor upgrades are commonly packaged as patches, while major upgrades are usually packaged as full installation packages.

It’s time to relook at my spending style, you can too!

Standard

All of us in IT industry including me earned huge salaries and we thought spending is easy. I moved to the concept of spend if your family needs. With change in economy, i want to relook at my life on some of the principles I used to follow on my spending, even before economic down turn.  These can be applied by me and every one who read this.

Prioritize expenses Classify expenses as Luxury(avoidable), essential, necessity(unavoidable). Buying car is a luxury expense. Spending on mobile calls is essential expense, but we can make the call on landline and reduce the cost. Paying rent, electricity charges, income tax are necessary expenses.

Increase in number of dependents. Reduce the cost of your marriage and do not spend for luxuries after marriage. Buy a small TV, rather than Plasma TV

Payment of Loan or debt: if you are part of DINK or still single, you have money at hand and do not plan your EMI to more than 40% of an individual salaries. You may get married or there may be a kid and one of the couple would stop working and life would be tough. Increase in interest rates can also affect you badly.

Adapt to live with less money: Be ready for cut in salaries and start categorizing expenses. Go to the value for money restaurant instead of going to 5 Star restaurant

Emergencies: Be aware of emergencies like any hospitalization or aches that spoil your work productivity. Do regular exercises to keep you and your mind fit

Treat savings as expense: Please think that money you plan to save is an expense and do not reduce the savings to make sure you other expenses are met.

Make your partner/family the need for saving: Explain the family what is happening at work and what are the possible risks and how they can help you in these times. She might help you move to higher phone plan which would reduce your expenses as it provides more free calls which is what you used by your partner. She can agree to public transport, instead of sending car from work to home for her and calling car gain to pick up from work.

Watch Credit Card usage closely: Start looking close to credit card spending. identify expenses that would not have occurred if there was no credit card. if you do not pay credit card in full, start paying the credit card in full on the due date. if you already keep paying credit card in full, just for once try to clear all the dues and start fresh or use cash for a month and break the revolving credit

My thoughts on investing in mutual Funds

Standard

Lot of diversified mutual funds(mid cap or large cap) have exposure to some of the stocks from a huge set of 30 to 40 stocks. For Example, stocks like Reliance, ICICI Bank,SBI, Infosys, HDFC and Axis back are in the portfolios of most of the mutual funds. This means if these stocks crash, NAV of your mutual funds is going to come down.

The above mentioned stocks are good. But what happens when every mutual fund picks this as safe bet, in the bull market. There is demand created for these shares and the share price increases and NAV of the mutual fund increases. We look at them and pick these mutual funds. But alas picking winners consistently is not feasible for event the best of investors or mutual fund managers. Should we think that the growth seen in the mutual funds investment is  luck based? Seems so for me.

What should I check to see whether your mutual fund is performing okay?

1. I will check Cash Exposure. High Cash reserve ratio more than 5 to 10%.
2. Expert fund managers can go wrong
3. Funds have limited choices making Mutual Funds also following the herd.Hence Checking MF portfolio is a good bet
4. Looking at the performance of your fund based on past experiences may not work in your favor always

May I should start looking in to index funds now? in index funds, you get market returns for small fee and the fund manager has no choice to choose stocks and has to invest in the sensex stocks. if the index goes up, you are sure to make money and like all investments, if sense goes down, i am down too.

Windows installation and Sequences Part 2

Standard

Customization is possible at the sequence level by enabling or disabling the running of sequence. You can also insert new custom action in to sequences or change the order of execution of the actions.

To insert an action into the sequences, you can right-click the action that should precede your action and select Insert. You can also specify the type of action you want to insert (standard action, custom action,merge module action, and so forth), or specify an optional condition for the action.

For standard actions, Windows Installer typically waits for one action to complete before continuing in the sequences to the next action. One consequence of this behavior is that Windows Installer does not support performing part of a standard action, running custom code, and then completing
the standard action. For example, an installation cannot install only some files, launch a custom action, and then complete the file-transfer action. Instead, the standard InstallFiles action occurs as a
single operation, and a custom action must be called either before or after InstallFiles, but not during InstallFiles.

For a custom action, then, you must determine where it should be executed relative to other actions.A single action can be executed only once in a given subsequence, but you can schedule an action in both the UI and Execute subsequences, if necessary.You can control the behavior of a custom action that occurs in both the UI and Execute sequences using the Execution Scheduling setting: If you select Always Execute, the action is executed every time it is encountered; the option Execute Only Once executes the action only in the UI sequence for a full-UI installation, and only in the Execute sequence for a silent installation.

InstallShield provides many custom actions to enhance Windows Installer functionality, enabling support for executing SQL scripts, searching and modifying XML files, creating Web sites and virtual directories for IIS, and more.

I still need to understand the following "Windows Installer makes two passes through the Execute sequence, called immediate mode and deferred mode. Immediate mode is Windows Installer generating its internal script, and deferred mode is Windows Installer performing its internal script.". This is still not clear to me.

As Windows Installer performs system changes using standard actions, it simultaneously creates a rollback script and backs up any data the installer replaces or deletes. If the user cancels the installation during deferred execution, or if the installation fails during deferred execution, Windows Installer consults the rollback script to roll back the system to the state it was in before the installation program ran.
Changes made to the system by custom actions, however, are not logged for uninstallation. Instead, for each deferred action that modifies the target system, you should create a corresponding rollback action to undo the system changes if the installation fails or the user cancels it during deferred execution. (You will typically also need to create a corresponding uninstallation action to undo the system changes when the user uninstall’s your application.) Effectively when you write custom action make sure that  whatever additional performed by the install method  is removed completely in the uninstall method so that after uninstall the system goes back to the original state.

Windows installation and Sequences Part 1

Standard

I found a lot of  good information about windows installer in context  of install shield.  From this information set, I have captured windows installer information alone. Thanks to you install shield guys to help me have a clear understanding  about windows installer. This is theoretical concept so that people developing installers also understand the theory and not just become tool expert, without understanding of what happens under the hood. it would help to look back later in years.

A Windows Installer installation program does not contain an explicit script, but instead the installation behavior is defined by the ordering of standard and custom actions into installation sequences. The ordering of standard behavior and custom actions are represented in MSI database format. The order of actions appearing in the sequences determines the order in which your installer performs changes on the target system. An understanding of sequences and actions will help you avoid common problems with the behavior of your installation project.

Windows installer supports three type of installations normal installations, administrative installations and advertised installations. in each of the installations, each of these installation types is represented by a top-level sequence. You can inspect and manipulate these top-level sequences in the Custom Actions and reorder the execution order of Sequences. Sequences are ordered lists of actions, where an action
corresponds to one operation performed by the installation.

Each of the top-level sequences is divided into two subsequences, called the User Interface (UI) sequence and the Execute sequence.The UI sequence displays dialog boxes to the user and queries the target system, and the Execute sequence makes changes to the target system. During a silent or reduced-UI installation, only the Execute sequence is performed; during a test-mode installation, only the UI sequence is performed. (The UI sequence is sometimes called the client process, and the Execute sequence is sometimes called the server process.). The User Interface sequence and the Execute sequence run in different processes. The two processes communicate using public properties.

For a normal installation, these sequences are represented by the MSI database tables InstallUISequence and InstallExecuteSequence. (The tables used for the advertisement and administration sequences are called AdvtUISequence, AdvtExecuteSequence, AdminUISequence,
and AdminExecuteSequence.)

Each action is represented by a record in one of the sequence tables (InstallUISequence, InstallExecuteSequence, and so forth). Each record in the sequence tables contains Action,
Condition, and Sequence fields. In general, actions run in order of ascending Sequence number. (Rollback actions run in the opposite order.)

The overall flow of a typical installation is as follows:
1. Windows Installer starts the installation with the first action in the User Interface sequence with a nonnegative sequence number.
2. Actions and dialog boxes in the UI sequence are executed in ascending sequence number until the modeless SetupProgress dialog box is displayed, followed by the ExecuteAction action, which begins
the Execute sequence.
3. Next, the actions in the Execute sequence are performed in order of ascending sequence number. (As described in the following section, there are two passes through part of the Execute sequence, called immediate mode and deferred mode.)
4. When the Execute sequence is complete, control returns to the UI sequence: the SetupProgress dialog box is closed, then the appropriate “setup complete” dialog box (with a negative sequence number) is displayed.

CodeRush Xpress for C#

Standard

One of my team members Suyog shared this link and it connected me to a page with title "CodeRush Xpress for C#". These seems to provide refactoring benefits like Resharper and this integrates with Visual studio 2008 and is licensed exclusively for C# developers working in Visual Studio

Let us make use of this and write better code

How to go about with investment in Fixed Deposits

Standard

Today with sensex going down , investors are looking in to debt investment. to invest in debt related areas, investors can invest in FD in Banks, FD in NBFCs ,Company Deposits or  FMP. Please understand that income tax is not deducted at source on deposits up to Rs 5,000 and income tax shall be deducted for interest income more than Rs 5,000 in a financial year.

CRISIL rates the different agencies that accepts Deposits and the rating can be found at credit rating section. Please also understand that CRISIL rating is not guarantee, but an indication of credit worthiness of the agency.

FMPs : Please look at today’s Hindu BusinessLine article "Dealing with the FMP scare" or look for an earlier article from Shyam "Know your Fixed Maturity Plan". The main essence is that the returns on FMP is based on the markets conditions and there is no assured returns

FD in Banks:  safest. offer less return compared to NBFC FDs or Company FDs. However Deposits in banks come with a safety cushion. Deposit Insurance and Credit Guarantee Corporation (DICGC), provides deposit insurance and credit guarantee to depositors, covers all banks in India including foreign banks. All your deposits such as savings, fixed(principal and interest), current and recurring are insured. The deposits up to Rs 1 lakh are protected to save the interest of small depositors. some tips here are

  • The insurance ceiling applies separately to the different banks in which a person may have deposits. So, split deposits among various banks so that the insurance limit of Rs 1 lakh is not breached in any bank.
  • The insurance cap also applies separately to each holder of a joint account and to accounts held in the names of different members of a family. if A is account holder 1 and B is account holder 2 for FD 1 and if A is account holder 2 and B is account holder 1 for FD2, both the deposits are covered

FD in NBFCs
Their interest rates are competitive, but even higher at times than those of banks. Public deposits are unsecured and DICGC does not have deposit insurance facility for NBFC depositors. The Reserve Bank of India (RBI) does not give any guarantee for the financial soundness of NBFCs and would neither help to obtain the payments due on public deposits.

Company deposits
They give higher interest rates than banks and NBFCs.  These deposits have a higher risk of default. As they are unsecured, it is difficult recover capital if the company defaults.Spread your deposits across a large number of players and do not invest in companies with a credit rating below ‘A’.

Found The Hindu Business Line supplements informative and useful

Standard

When I was in High school , I used to read the newspaper Hindu every day and found it useful to keep myself informed. This followed till I came to Bangalore for my work. After coming to Bangalore, I started Times of India and read Hindu only on Sunday for articles  and when I was out in USA, I started also Friday Review of Hindu and Economic times for business and money markets.

I never read Hindu Business Line before that.  Thanks to Pramoth Kumar Joseph for pointing that it has good supplements. Once I started, not I have become a regular reader for the following and there are some more to cover. They cover management, life, investment and career challenges. The supplements that ii have got hooked up in the last 2 months are

  • Investment World: published every week on Sunday. has articles on investing in stock markets, realty sectors and other avenues
  • Mentor : published every week on Monday . has articles on managing things including stress, life and work
  • New Manager : published every week. has articles on people management and project management
  • Life : published every week on Friday. has articles about life, travel, books etc.

In addition every day I look for the day trading guide for tips and their views on a selected scripts on the stock market. I find their analysis very good and  provides a good outlook of where we are headed in the money markets and are very informative to make decisions or postpone decisions

Once again, kudos to Hindu Business Line for the supplements and Pramoth for pointing this to me.

8 things you never do with your kids

Standard

I read an article in Times of India about this. Some of them I was able to relate to more than just with kids. I have written each of them and start looking them from what I am doing today and how I should deal them in future.

1. Do not compare your children with their siblings. Accept that every child is different.Identify and build their strengths. I do not want to compare, but end up comparing and I need to cautiously avoid this.

2. Do not pass the buck of responsibility to your partner. It is easy to deal with bad behavior right there. Spending more time at work, I am passing buck of home to my partner which I should stop.

3. Do not try to frighten your child to get the child perform a job. Rather than talks straight to the child and tell them what it is that you want them to do. May be a Good Eye contact can help

4. Kids always do not want to left alone or abandoned. Hence never say them you would leave them, but help them to do the tasks faster.

5. Never label your child. if you label them as naughty, they start to believe that naughtiness is part of what they are and start living up to that label. Hence say " I do not like the way you are behaving." This is something I have been trying hard not to do, I have reduced, but still do labeling.

6. Never criticize their mistakes. different kids learn at different pace. Explain them what went wrong and how they could have avoided the mistake and motivate them that they can do better in future with a little more focus.

7. Never say "I wish you have never born". if you want to say, got to the next room and calm yourself. I give a lot of loose talk and the person with me is hurt and I really did not mean to say those words. I need to stop this.

8.Never say " why do you never do a thing I tell you?" instead be specific of what you want them exactly to do and explain " I would prefer that you do this way" with more body language.