Code profiling is a form of dynamic program (code) analysis to investigate the program’s behavior during execution. It is usually done to determine sections of code that can be optimized – to increase overall speed & reduce resource requirements. Code profiler can come in several varieties – from those that measure the frequency & duration of function calls to others that track memory usage. An emulator for micro-processor code (that simulates the processor’s instruction set) is also a type of profiler that measures behavior for the entire execution cycle – invocation to termination.
I first heard of code profiling in the context of reverse engineering software architectures. Often it may so happen that applications with very little documentation are to be enhanced or re-engineered. One way to understand is by analyzing code, which can be a tedious process. Such static program analysis may yield incomplete understanding as the polymorphic calls can’t be determined until run-time. A code profiler determines polymorphic function calls and identifies overloads used during execution which helps establish relationships between classes & components that can be used to reveal the underlying software architecture, if not for a specific pattern.

Amazing Comments In Source Code by Developers
As I was getting over Monday blues, Aditya Tripathi sent this funny-yet-realistic! I’m sure this will get every dev-devil laughing with delight; reminiscing the KLOC written with cryptic comments or nothing at all. Here you go, the best code comments seen in source code…!
//When I wrote this, only God and I understood what I was doing
//Now, God only knows
/*
* You may think you know what the following code does.
* But you dont. Trust me.
* Fiddle with it, and youll spend many a sleepless
* night cursing the moment you thought youd be clever
* enough to “optimize” the code below.
* Now close this file and go play with something else.
*/ View full article »