How to Move Outlook Data to a New Computer

Motivation:

You need to move Outlook data and settings from an old computer to a new computer.

Solution:

1. On the destination (new) computer:

    • Type Control Panel in Search box.
    • Click on Control Panel.
    • Select Large icons for View by.
    • Click Mail (32-bit).
    • Click Add. Set Profile Name = Outlook.
    • Follow the instructions to setup an account.

2. On the source (old) computer:

    • Open Outlook.
    • On the File menu, click Data File Management.
    • Click the data file that you want to compact, and then click Settings.
    • Click Compact Now.
    • Close Outlook.

3. Copy and overwrite all the contents of %USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook to the destination computer. Create the Outlook folder if it does not exist.

4. Copy and overwrite all the contents of %USERPROFILE%\Application Data\Microsoft\Outlook to the destination computer. Create the Outlook folder if it does not exist.

5. Open Outlook in the destination computer.

Note: If you are using POP3 protocol then all the messages will be re-downloaded again once. If this is true for you then

    • Let Outlook finish downloading the messages, then
    • Click on Unread Mail folder below the Search Folders,
    • Select all the messages,
    • Press Shift, right click and click Delete to permanently delete them all.

 

How to Remove Caches and Temporary Files in Windows

Motivation:

You may want to remove caches to update an application status or fix some issues.
You may need to remove temporary files to get some more free disk space.

Solution:

Try clearing files and folders in the directories below.

  • %USERPROFILE%\AppData\Local\Temp
  • C:\Windows\Temp
  • C:\Users\All Users\Package Cache
  • C:\Windows\SoftwareDistribution\Download
  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

Sometimes you may get permission error when deleting files or folders. If this is true then try the following command before deleting these files and folders.

takeown /f C:\Users\All Users\Package Cache /r /d y
icacls C:\Users\All Users\Package Cache /grant administrators:F /t

How to Quickly and Confidently Read Code?

Motivation:

You need to read existing source code to add your feature or fix a bug or to replicate its functions in another language or system.

Solution:
  1. Try building and running the code without any modification.
  2. Try building and running the code with your inputs.
  3. Try modifying or adding simple UI elements without touching the business logic or data layer.
  4. Try writing a unit test for a function.
  5. Try changing a variable name and make sure that the change does not break anything.
  6. Try changing a package or module name and make sure that that the change does not break anything.
  7. Try breaking a long method to smaller ones.
  8. Try breaking a large object or file to smaller ones.
  9. Try replacing an algorithm with with a better one.
  10. Try replacing an old component with a newer or better one.
  11. If you get an error when making the changes above then try showing the error on client side.
  12. If you cannot show the error on client side then try identifying the logic flow of the code related to the error, debug information, and learn about new terminologies or concepts in the code.

Example:

const maskPhone = (val) => {
    const x = val.replace(/\D+/g, '').match(/(\d{0,3})(\d{0,3})(\d{0,4})/);
    return !x[2] ? x[1] : `(${x[1]}) ${x[2]}` + (x[3] ? `-${x[3]}` : ``);
};
export { maskPhone }

If you are not sure about what the JavaScript code above does then try to learn

Another example:

<div class="container">
    <iframe class="responsive-iframe" src="https://www.youtube.com/embed/u9Dg-g7t2l4"></iframe>
</div>
.container {  
    position: relative;  
    overflow: hidden;  
    width: 100%;  
    padding-top: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
}
/* Style the iframe to fit in the container div with full height and width */
.responsive-iframe {  
    position: absolute;  
    top: 0;  
    left: 0;  
    bottom: 0;  
    right: 0;  
    width: 100%;  
    height: 100%;
}

If you are not sure about what the HTML and CSS code above  do then try to learn

  • how many ways an element can be placed in a web page (a document),
  • what is the position relationship between an element and its parent,
  • what is the position relationship between an element and its siblings,
  • what is the position relationship between an element and the document root, and
  • what position: relative , position: absolute , overflow: hidden do.