Monday, August 31, 2009

Reading about XFS file system + AVL tree algo

XFS file system uses Journal file systems approach. Journal approach allows XFS to keep file consistent even in the event of crash...
The main approach is to write all file update related operation in a circular buffer (Journal)... This journal will never be read during normal file read operations. If system crashes then we can use that jorunal memory to keep file system consistent.

Second, AVL tree came into existance because in case of sorted data insertion in Binary search tree, it takes O(N) time... so balanced search tree approach was used so that O(logn) time insertion can be done...

SJ

Friday, August 28, 2009

List of some paper that i read recently.....

Related prof. jon weissman research:

Resource Bundles: Using aggregation for statistical wide-area resource discovery and allocation

SIP-based Voip traffic behavious profiling and its applications

Practical techniques for eliminating storage of Deleted Data

Exploiting Heterogenity for collecive data downloading in volunteer based networks

Adaptive reputation-based scheduling on unreliable distributed infrastructure

Ridge: Combining reliability and performance in open grid platforms

Exploiting the throughput-fairness tradeoff of dealine scheduling oin heterogenous computing envieonments

Co-designing the failure analysis and monitoring of large scale systems

Thursday, August 27, 2009

Times now...

Presently i am facing the most exciting , challenging and uncertain phase of my career...
In order to follow the heart, i am killing my opportunities, ignoring avenues...
Lost in thoughts and time, i am


Will complete it later...

Sunday, August 23, 2009

KMP, Boyce moor and brute force

I was revising my concept on these algorithm....
Once i was master of algo but after staying out of touch lately, i feel my algorithm skills have gone blunt....
here i jump back...
KMP:
Practical Use: In reading data from network streams and large files...
More fruitful when alphabates are small...
It is claimed to be faster if mismatch occurs later in the series...
Prefix-suffix approach. Each alphabate of pattern to be searched is just traversed once.

Boyce moor:
Practical Use: Faster when alphabates are large and slow when alphabates are small...
Back-traversal based appraoch.

Brute force:
Practical Use: Poor for binary usage...
just O(n*m) solution...

Rabin carp:
Practical Use: Hashing function based approach...
Efficiency depends on hash functions quality...

Tuesday, August 18, 2009

This is my favorite read...

http://intellibriefs.blogspot.com/2007/06/indian-intelligence-another-sneak-peek.html

Indian Intelligence...

Wednesday, August 12, 2009

Java vs C++ .. for programmers

http://www.javacoffeebreak.com/articles/thinkinginjava/comparingc++andjava.html

This site lists detailed differences between java and c++

Footbal game design in Java

Classes:

public class Player{

/**
Personal Information
*/
protected String _name;
protected String _address;
protected String _bloodGroup;
protected String _age;
protected String _sex;

/**
Game related Information
*/
protected Team _team;
protected Position _position;
protected Vector neighborList;


}


public class ball{
protected Position _position;
protected Player _possesion;

public void kickBall(force x, angle y){

}

public void changePosition(position x, position y){
// move from position x to position y
}

public void drawTrajectory(){

}

public boolean isGoal(){

}

public boolean isValidGoal(){

}

public void pass(Player x, Player Y){

}

}

Think more on the API's of this game.

When to use b tree and when b+ tree

B trees are specifically used when we need to seek the data... In case of b trees, frequently seeked data can be moved up in the tree so that next time less number of access or look ups would be required.

B+ trees are used when we need to do full scan. Some other advantage of B+ trees is that high fanout, less seeks required as more pointers are available for data lookup which is in contrast to B tree where intermediate nodes stores data values which waste the look up pointer space.

In B+ tree, leaf nodes are connected as linked list which makes it easier to traverse.
Also in B+ tree, depth of the tree is small and a uniform implementation can be achieved as non-leaf nodes acts as indexes and leaf nodes acts as data holder...

Practically... indexes can be placed in the cache while actual data can be placed in the hard disk.

For detailed analysis:
http://stackoverflow.com/questions/870218/b-trees-b-trees-difference

Also look into wikipedia articles on addition, deletion of nodes...

Static binding vs Dynamic biding..

http://geekexplains.blogspot.com/2008/06/dynamic-binding-vs-static-binding-in.html

This page explains the difference of static binding and dynamic binding in java...
To summarize:
All the instance method calls are resolved at runtime so that is dynamic binding.
All the static method calls are resolved at compile time so it is static binding.

As the static methods are resolved at the compile time so it is not possible to override them.
As java does not allow polymorphism so all the member functions are resolved at compile time only.

Similarly private methods are resolved at compile time only as they are never inherited..

Friday, August 7, 2009

JSP notes

Just now i cam across few of good JSP tags:

1.
2.
3. <%@ errorpage=pagename />
4. <%@ iserrorpage>

This page explains the basics of main jsp tags:
http://www.geocities.com/srcsinc/java/java_tutorials/jsp_tutorials/jsp_tutorial_6.html

Using log4J class in your code...

This page describe th importance and usage of log4J library.
It's a strong library with wonderful utility like logging levels and logging inside threads...

http://www.avajava.com/tutorials/lessons/what-is-log4j-and-how-do-i-use-it.html?page=2

Read this page for more details..

Tuesday, August 4, 2009

Make your code rebust and professional

I learned about how to divide code into components and how thinking little before coding helps in good design and fast work.

Using logger module and using separate error module in the system helps in making code good.
Use a file like errorConstants and define all the error messages in a hashmap.

Define this hashmap as a static object. Declare a custom exception and define some constructor

To be completed later....