Quantcast
Channel: Supreme Debugging
Browsing latest articles
Browse All 13 View Live

[Windows Programming] : Exception Generation during process creation or...

Problem Description During my windows porting activity (Existing code base in *ix - CPP programming language) I came across a very strange problem The project code bases uses many system command for...

View Article


Win32 Env variable Pitfall of mismatching SetEnvironmentVariable and getEnv

Problem DescriptionBelow article will give a brief introduction on environment variables and one strange (for a Unix programmer) behavior in WIN32. i.e getEnv() does not retrieve some environment...

View Article


C++ Static data member variable and its initialization

QuestionWith regard to static data member initialization, as we are all aware of the syntax used in c++, a sample example is provided below class Account {    public:        static double rate() {...

View Article

[C++] Additional parenthesis are always safe! Really?

BackgroundIn general, a programmer would be advised to provide additional parenthesis in the code "when in doubts" with a presumption that it is safe. We will see on example here on how in certain...

View Article

Image may be NSFW.
Clik here to view.

Static/global variable and shared library behaviour

[Note : This would be a very long discussion and reader would need considerable amount of time to complete the reading]Problem DescriptionLet's take an example of a class having a static variable or a...

View Article


Image may be NSFW.
Clik here to view.

How to use linux perf tool and save dollars

When does this tool help me? Ask yourself if you have any of the following problemDoes you application built on linux run slow? And want to find out the reason?Do you want to be cost-effective and...

View Article

How to find which flavor and which version of JDK do I have on my Ubuntu

Command to find the file containing the jdk information Command:file `which java javac` Output:~/ $ file `which java javac` /usr/bin/java: symbolic link to `/etc/alternatives/java' /usr/bin/javac:...

View Article

Image may be NSFW.
Clik here to view.

SBT run/test for every edit automatically

What is it about? Imagine you have to do huge number of smaller edits to your source code in scala and verify the output. Most of the time, in other languages especially, you end up doing lots of...

View Article


Image may be NSFW.
Clik here to view.

How to find linux kernel version in your distros

How do you find the linux kernel version you are running? Run the below command to find out the Linux kernel version.uname -r In my distros, I get the below response~/ $ uname -r 3.13.0-142-generic ~/...

View Article


Image may be NSFW.
Clik here to view.

How to use linux perf tools and save dollars - Part 2

Flame Graph - Introduction In our previous discussion (I strongly recommend to go through the linked blog), we have seen how in real world, linux perf tool would be helpful in writing a very well...

View Article

Python name guard and its importance

Why do we need "__main__" guard in python code? We all have seen code where we have protected the python code with "__main__" guard. Why do we need this? take a look at below explanation File -...

View Article

Use of __repr__ in python

Problem Statement How many times you are in the process of debugging/ printing/logging your python objects for a critical issue analysis, and you find output which is very obscure??? Quiet...

View Article

Image may be NSFW.
Clik here to view.

Numpy array append and performance issues

Issue Assume you need to add 100 elements in the numpy array, the initial intuition is to run-down the loop construct and append the element to the array. However, this would be a grave mistake...

View Article

Browsing latest articles
Browse All 13 View Live