Month: November 2012

No. of Step Calculation in an Algorithm

No. of Step Calculation in an Algorithm

There was a time when the processor were just starting to explore their potential. Then code optimization made a huge difference in the performance of the code. But, today most programmers take the optimization for granted as the compilers are smarter and the processors run like they have fire on their ass. But, to be …

+ Read More

Random Access Machine

Random Access Machine

In order to judge the performance of an algorithm, there exists a mental mathematical model. This mental mathematical model helps us to ensure the stability and high performance of algorithms. Also, one could compare two algorithms using this model. Mathematical Model: Random Access Machine. This model consists of a processor and memory. Designing algorithms for …

+ Read More

Some Terms Every Programmer Must Know

Some Terms Every Programmer Must Know

The Problem: The problem is a specification of valid input and the acceptable output for each valid input. Input Instance: The inputs which fall in the set of valid inputs according to the problem. Size of Input Instance: The memory/storage space needed to represent the input instance. e.g. In Euclidean GCD example, the size of …

+ Read More

Greatest Common Divisor: Euclid Style

Greatest Common Divisor: Euclid Style

Euclid out of nowhere proposed this algorithm which calculates the greatest common divisor of two numbers. The simplest way of calculating the GCD is probably the simple prime factorization method. But, Euclid was no common chap. He devised a way which calculates the GCD recursively. The idea was to simplify the problem each time, preserving …

+ Read More

Programming and Mathematics

Programming and Mathematics

The fact is that programming and mathematics go hand in hand. Working for a service company has made me lame with my programming skills. Its sad but true that, my brain now doesn’t relax enough to work for self improvement. Although late in life, but I have understood that every computer science student is supposed …

+ Read More

Death Note, The Movie

Death Note, The Movie

To begin with, lemme just state that I found nothing spectacular about the movie. However, the story line was intriguing and that is why the movie would appeal to any Indian viewer, as they aren’t used to such different stories. I’ve noticed that the asian movies(actually the eastern asia) are heavenly influenced by their folk …

+ Read More

Logging in an application

Logging in an application

Why file logs over database logs? Why do we even need logs, when we have databases? Databases are cool for storage of data. But as far as log performance is concerned, log files are far better than databases. They prevent databases from getting heavier than they already are, reduce http requests. Also read/write is much …

+ Read More

LDAP Timestamp

LDAP Timestamp

The unix/epox timestamp is not used by the active directories. Instead the number of ticks from 1st Jan 1601 is used.  CAUTION: the number of ticks is not really in milliseconds, in fact 1 millisecond = 10000 ticks. Now, how to covert no of ticks to a human readable date. The difference between the two …

+ Read More