Thursday, July 28, 2016

Tuesday, July 26, 2016

Math Base - Linear Vs Exponential function

Q: What is the difference between linear & exponential function?
A:  If rate of growth is absolute number per unit time then it is linear wherein if it follows some ratio then it is exponential.
Ex: A person sends email on day 1 to 5 and asks those 5 to forward the same their 5 friends...
On day 1 = 5 emails sent
On day 2 = 5*5 emails sent
On day 3 = 25 * 5 sent
.
.
Here the mail sent in exponential fashion as the ration between any 2 consecutive time frame is same. Here it is 5 (125/5 = 25/5...)

Wednesday, June 1, 2016

Programming Quotes

“The more you watch (or listen) to expert examples, the better you can become. The less exposure you have to experts or results of expert work, the less likely you are to develop expert skills.”

“ Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ” - Martin Fowler

“ First, solve the problem. Then, write the code. ” - John Johnson




“ When someone says, "I want a programming language in which I need only say what I want done," give him a lollipop. ” - Alan Perlis


“ Any code of your own that you haven't looked at for six or more months might as well have been written by someone else. ” - Eagleson's law

“ Walking on water and developing software from a specification are easy if both are frozen. ” 
- Edward V Berard









Thursday, March 10, 2016

Things must be considered when launching process(exe) from other process

You might have used CreateProcess() API when ever you want to launch child process from main process. But how about the settings of parent process reflecting to child process?

If you don't want your current directory not to be inherited to child then make sure you pass appropriate path to it, explicitly. Otherwise, your child App may fail to perform expected functionality.

If you need your child process to get the similar current directory of parent then just pass lpCurrentDirectory = NULL in this API


CreateProcess API, Windows


Here is the CreateProcess API's parameters:

// Start the child process.
if (!CreateProcess(
strAppFullPath,  // No module name (use command line). Must send param
NULL, // Command line
NULL,               // Process handle not inheritable
NULL,               // Thread handle not inheritable
TRUE,               // Set handle inheritance to FALSE
0,                    // No creation flags
NULL,               // Use parent's environment block
                strAppDir,         // Pass child process specific current directory
&si,         // Pointer to STARTUPINFO structure. Must send parameter
&pi) // Pointer to PROCESS_INFORMATION structure - Must send param
)
{

Current directory is not always the Application directory!

When you happen to get the application directory then it is good practice to use appropriate call for that: Say, GetApplicationFilePath();

Instead if you try GetCurrentDirectory() then there would be chance that your current directory not equals to ApplicationDirectory. This is because form the App, any functionality could change the CurrentDirectory().

WPF Resources

Monday, February 22, 2016

100 Most Influenced Technical books for Software Dev.

100 Most Influenced Technical books for software developer by stack overflow:

http://www.cspray.net/my.so-archive/100-most-influential-programming-books.html

C# Resources

C++ Vs C#

C++ used to be most powerful object oriented programming language. It has been widely used in many enterprise applications, operating system implementation and system software development. It is very neat and crispy and having strength of pointers.

C# is derived by inheriting C++ power + VB productivity. It’s smart framework (.NET) enables multi programming development, garbage collection & inter-operability. It also converted every programming building blocks as objects to ease programming. It also provides sophisticated interfaces to deal with complex data structures and data base(LINQ). Because of all above reasons, C# is becoming most favorite software developer language now.


Here are list of my observation regarding C# with respect to C++:



Windows Productivity Tips