Visual Diff Tools for Developers

Diff Merge

Diff Merge

Diff Merge is a great tool for any developer for Diffing and merging code. I have used it and found it to be in dispensable.

I would strongly recommend this tool. The company behind the tool is SourceGear, they are generous to distribute this gem for no cost to developers :). They also have other useful tools FORTRESS and VAULT, check it out at their website – @

Feature Highlights for time challenged :

  • Diff  Graphically shows the changes between two files. Includes intra-line highlighting and full support for editing.
  • Merge  Graphically shows the changes between 3 files. Allows automatic merging (when safe to do so) and full control over editing the resulting file.
  • Folder Diff  Performs a side-by-side comparison of 2 folders, showing which files are only present in one file or the other, as well as file pairs which are identical or different.
  • Windows Explorer Integration. Right-click on any two files in Windows Explorer to diff them immediately.
  • Configurable. Rulesets and options provide for customized appearance and behavior.
  • International. Compatible with 42 different character encodings.
  • Cross-platform. Identical feature set on Windows, Mac OS X, and Unix.

Leave a comment

Filed under Power Tools

Ember Quick Start

Installing Ember: 

  1. Install HomeBrew or NPM :
    1. HomeBrew: ruby -e “$(curl -fsSL”
    2. NPM:

      sudo PATH=”$PATH:/usr/local/bin” /usr/local/bin/npm npm install npm@latest -g

  2. Install Node:
  3. Install Ember:

    sudo PATH=”$PATH:/usr/local/bin” /usr/local/bin/npm install -g ember-cli@2.17

  4. Run Ember test server to test if it works: change to ember_kickstart folder and run

    sudo PATH=”$PATH:/usr/local/bin” /usr/local/lib/node_modules/ember-cli/bin/ember serve

Leave a comment

Filed under frontend

Testing Websites on Webpage test

1. Open your website with logged in experience. Look at network waterfall, copy text of cookie from the base page request headers.
2. Save the following as a file (update it to use your assigned website instead of
tr ‘;’ ‘\n’ | awk ‘{print “setCookie\t\t”, $1}’;
echo “navigate
3. In shell, run:
echo “<copied cookie from step 1>” | sh
4. Copy output and paste in the script section of, make sure you mark script is sensitive, then run the test

Leave a comment

Filed under Uncategorized

Using ADB commands to work with android apps

//start the app
adb shell am start -n
//send to background
adb shell am start
//kill the app
adb shell am force-stop

Leave a comment

Filed under Android

Test DOC


Leave a comment

Filed under Uncategorized

Memory Mapped Files in Java

Important Facts about Memory Mapped files in Java – thanks to Java Revisited @ Blogspot

  1. Java supports Memory mapped IO with java.nio package.
  2. Memory mapped files is used in performance sensitive application, e.g. high frequency electronic trading platforms.
  3. By using memory mapped IO, you can load portion of large files in memory.
  4. Memory mapped file can result in page fault if requested page is not in memory.
  5. Ability to map a region of file in memory depends on addressable size of memory. In a 32 bit machine, you cannot access beyond 4GB or 2^32.
  6. Memory mapped IO is much faster than Stream IO in Java.
  7. Memory used to load File is outside of Java heap and reside on shared memory which allows two different processes to access File.
  8. Reading and writing on memory mapped file is done by operating system, so even if your Java program crashes after putting content into memory, it will make to File until OS is fine.
  9. Prefer Direct Byte buffer over Non Direct Buffer for faster performance.
  10. Don’t call MappedByteBuffer.force() method too often, this method is meant to force operating system to write content of memory into disk, So if you call force() method each time you write into memory mapped file, you will not see true benefit of using mapped byte buffer, instead it will be similar to disk IO.
  11. In case of power failure or host failure, there is slim chance that content of memory mapped file is not written into disk, which means you could lose critical data.

Leave a comment

Filed under Java

The Core of Microprocessors

Most modern computers today operate with multiple processors and the processor in-turn have multiple cores. Below is a breakdown of the architecture of a modern computer / processor. I took these notes so that it’s easy for me to understand and I hope it helps others.

Motherboards have  sockets that can fit Microprocessors  ( usually 2 )

Each Microprocessor has multiple computing components, which are actual independent central processing units also known as “Cores” ( usually 6 per socket ) . These cores share some computing functions like floating point calculations, while performing integer calculations independently.

Intel introduced the concept of Hyper-Threading. For each processor core that is physically present, the operating system addresses two virtual or logical cores, and shares the workload between them when possible.  ( usually there are 2 Hyper-Threads per core ).

When you issue the command like “procinfo” to list the number of CPU’s in a server (Linux/Unix ) . The number of CPU might be misleading as the command identifies each Hyper-Thread as a core. Hence A server with 2 sockets and 6 core processor in each socket will be reported to have 24 CPU’s. This is correct from OS perspective as OS treats each Hyper-Thread as a CPU.

Depending on the hardware architecture there can be multiple levels of caches based. The block diagram below describes the association of cache/memory  to processing units in a server.



Leave a comment

Filed under Hardware, JVM, Linux

Linux Performance Analysis & Tools

Leave a comment

Filed under performance