Total Pageviews

Friday, March 18, 2011

Data Strctures are Pillars of Software Structure

With "ನಮ್ಮMETRO" and many Flyover work to make signal free ring road on-going at many places in Bengaluru, I see lots of pillars all around the city. Here is how they kind of inspired me.  

Many modern day structures strength relies on its pillars. Pillars also are designed keeping the scalability that might be desired in the future. Once the right pillars are in place rest of construction work comes up real fast. Mistake in choice of pillars can also prove fatal. Once committed its tough add or change these. Any such attempts also affect the beauty of building. Structure will not look coherent.

On the same lines data structures form the pillar and beam of the Software structure. Good data structure extend the life of the software. They also make it easy to weather the changes without collapsing.

Invest time to build good quality data structures and they will help tremendously at the later point. Have sound philosophy that relates well the problem at hand and/or uses some standard data structure concepts.

Poor data structures will be tougher to debug, difficult or impossible to extend.

Friday, March 4, 2011

ಉಡುಪಿಯ ಕಂಡಿರಾ ಉಡುಪಿಯ ಕೃಷ್ಣನ ಕಂಡಿರಾ...


ಈ ವಿಷಯ ಬರೆಯಲಾಸಾಧ್ಯ. ಆದರೂ ಭಕ್ತರಿಗೆ ಉಪಯೋಗವಾಗುವ ವಿಷಯವಾದ್ದರಿಂದ ನನಗೆ ತಿಳಿದಷ್ಟು ಬರೆಯುತ್ತಿದ್ದೇನೆ.

ಉಡುಪಿ ಶ್ರೀ ಕೃಷ್ಣನಿಗೆ ಉಡುಪಿ ಶ್ರೀ ಕೃಷ್ಣನೇ ಸಾಟಿ. ಆತ ನಿಂತ ಬಗೆ ಅಖೀಲಾಂಡ ಕೋಟಿ ಬ್ರಹ್ಮಾಂಡದ ನಾಯಕ ಎಂಬ ಪದಕ್ಕೆ ಮೂರ್ತಿ ಸ್ವರೂಪ ಕೊಟ್ಟ ಹಾಗಿದೆ. ಆಚಾರ್ಯ ಮಧ್ವ ಕರಾರ್ಚಿತ್ ಉಡುಪಿಯ ಶ್ರೀ ಕೃಷ್ಣನ ಇತಿಹಾಸ ಬಲ್ಲವರಿಗೆ, ಆತನ ನೋಡುವ ಬಯಕೆ.

ಒಮ್ಮೆ ನೋಡಿದವರಿಗೆ ಪ್ರತಿದಿನ ದರ್ಶನದ ಬಯಕೆ. ಆದರೆ ಲೌಕಿಕದಲ್ಲಿ ಸಿಲುಕಿ ಪ್ರಪಂಚದ ವಿವಿದೆಡೆ ತಮ್ಮ ಕರ್ಮ ಭೂಮಿ ಕಂಡು ಕೊಂಡಿರುವರಿಗೆ ಅದು ಆಸಾಧ್ಯವಾದ ಮಾತು.

ಸಧ್ಯದ ಪರ್ಯಾಯ ನಿರ್ವಹಿಸುತ್ತಿರುವ ಅಷ್ಟ ಮಠಗಳಲ್ಲಿ ಒಂದಾದ ಶಿರೂರ್ ಮಠದ ಪ್ರಯತ್ನ ಅತ್ಯಂತ ಶ್ಲಾಘನೀಯ. ಶ್ರೀ ಶ್ರೀ ೧೦೦೮ ಲಕ್ಷ್ಮೀವರ ತೀರ್ಥರ ಮಾರ್ಗದರ್ಶನದಲ್ಲಿ ಪ್ರತಿದಿನದ ಪೂಜೆಯ ಭಾವಚಿತ್ರ ಹಾಗೂ ದೃಶ್ಯಾವಳಿಗಳು ಅಂತರಜಾಲದಲ್ಲಿ ತುಂಬಾ ಚೆನ್ನಾಗಿ ಮೂಡಿ ಬಂದಿವೆ. ಗುಣಮಟ್ಟ ಕೂಡ ಅತ್ಯುತ್ತಮವಾಗಿದೆ.

ಶಿರೂರ್ ಮಠಧ ತಂಡಕ್ಕೆ ಅಭಿನಂದನೆಗಳು ಹಾಗೂ ಧನ್ಯವಾದಗಳು.

ಭಕ್ತರೆಲ್ಲರೂ ಕಣ್ಣು ತುಂಬಾ ನೋಡಿ ಆನಂದಿಸಿ.  ಉಡುಪಿ ಶ್ರೀ ಕೃಷ್ಣನ ಕೃಪೆ ನಮ್ಮೆಲ್ಲರ ಮೇಲಾಗಲಿ.

ಜಾಲತಾಣ ವಿಳಾಸ : http://udupishiroormutt.in/shiroor/


|| ಶ್ರೀ ಮುಖ್ಯ ಪ್ರಾಣಾಂತರ್ಗತ ಉಡುಪಿ ಶ್ರೀ ಕೃಷ್ಣಾರ್ಪಣಮಸ್ತು ||

Friday, February 18, 2011

ಶ್ರೀ ಶ್ರೀ ೧೦೦೮ ಸತ್ಯಾತ್ಮ ತೀರ್ಥರು ನೀಡಿದ ಸಂದೇಶ - ತಿರುಕೊಯಿಲುರ್ ೨೦೧೧

ಪ್ರತಿ ದಿನ ಇಷ್ಟಾದರೂ  ಮಾಡುತ್ತೇನೆ ಎಂಬ ಸಂಕಲ್ಪವನ್ನು ಮಾಡಿ :

೧. ವಿಷ್ಣು ಸಹಸ್ರ ನಾಮ

೨. ಗೀತೆಯ ಒಂದು ಅಧ್ಯಾಯ [೧೦ ವಿಭೂತಿ, ೧೧ ವಿಶ್ವ]

೩. ಭಾಗವತದ ೧ ಶ್ಲೋಕ [೧೦ ನೇ ಅಧ್ಯಾಯ]
ಇದರಿಂದ ಗುರುಗಳ ಸಮಾಗಮವಾಗಿ ಮೋಕ್ಷಕ್ಕೆ ದಾರಿಯಾಗುತ್ತದೆ.

ವೀಶೇಷ ವೈಶಿಷ್ಟ ಇರುವ ಯಾವುದೇ ವಸ್ತು ಅಥವಾ ವ್ಯಕ್ತಿಯಲ್ಲಿ ಹೆಚ್ಚಾದ ದೇವರ ಸನ್ನಿಧಾನ ಇದೆ ಎಂಬ ಅನುಸಂಧಾನ ಇರಬೇಕು.

Sunday, January 16, 2011

Art movies and Programming

I was reading weekly suppliment of Local news paper Vijay Karnataka. Article by N. Manu Chakravarthy about Art Cinema.

I want to first quote few lines of translation from this article. "Its about duo of Girish Kasaravalli and Ramchandra. These two have made some artistic kannada movies. Starting from Ghata Shraddha to last one Gulabi Talkies. While Girish Kasaravalli did the concept, script creation and direction, Ramchandra did the camera work. Thier creative abilities complemented each other.

Kannda literature's various stages, dimensions and critique traditions were very closely known by Girish. While Ramachndra always gave appropriate symobilm or icons for manifestation of Girish's ideology with his camera work.  This did touch audience and helped them experience and internalize the message.

The point that really caught my attention is about their work. It said " This is the way technique and ideology should unite. This symbolizes the creativity of director and cameraman".

Well let me swicth gears. From psycology point of view programming is one of the abstract and complex task that humans do among many. In my view writing programs is no different than making a beautiful art movie.  Lets see how ?  A movie is one of medium to convery the thought process.

A Successful movie making has four primary ingriedients. Director with concept, symbols to execute concept like actors, places etc and camerma man who can capture this expression. Success of it depends on final component the audience.

Now lets come to programming. We have problem. A solution with sound philopshy behind it. Programming language as symbol to depict the solution. Programmer using the programming language to express it. Who is the audience its programmer itself over period of time or worse another programmer who takes over the code. Note that its possible in the programming world that director, camera man and audience can be same programmer.

A successful program is not only the one that does what it is suppose to do and does not do what it is not suppose to do but  also the one that can weather the enhacements and fixes yet remain young and beautiful. Like a brand new one.

I want to tackle one tough question here with this article. I have seen many times, mainly from young programmers. They always ask well this programming construct and putting this piece of code in some other module will also do the job. Then why not do it ? At times its difficult to answer.

Yes it will work but specific program construct usage and specific place to put the code is like work of camera man who is giving the expression to ideology. Unless this is done right, it wont be the true unification of "technique and ideology". When its not, it wont reach out the audience. Unless it reaches out it, it wont remain new and young. It might even die.

To close, I would like to quote  Abelson & Sussman, Structure and Interpretation of Computer Programs
""Programs must be written for people to read, and only incidentally for machines to execute."

Saturday, January 15, 2011

Message of Veda - Hari Sarvottama and Vayu Jevottama

Understanding the scriptures of Veda, upanishad, Ramayana, Mahabharat, Bhagavata or purana's is no easy task as we all know.


Even more danger lies in mis-understanding them without the help of right Guru.

Just wanted to high light one point that I had heard during the Pravachana from Sri SatyatmaTeertharu. All these scriptures have one intent that is tell about the Hari Sarvottamtva and Vayu Jevottamtva.

At any point one sees the anything that does not align with this in the scriptures way to resolve it is:

1. If it stating something opposing the Hari Savottamtva or Vayu Jevottamtva then treat it as done for the Aasura mohana (confuse the evil forces, demons)

2. If the same event is quoted little differently in different scriptures like places, persons or time change etc then treat it as would have happened in different Kalpa's.

I dont know for sure but Kalpa is time for one complete cycle of Bramhanda coming in to existence and getting destroyed.

There have been several kalpa's and all the main Eeethehas[History] repeats itself.

Creation of Bramhanda during every Kalpa is compared to tree and Bhagavanta himself acts as a seed for it. As quoted in the Bhagvad geeta 7.10 Sloka. There is also term Avyakruta named for the seed. Seed has this property that it leads to tree of the same type.

If you look at the VishnuSahasraNama one could identify the Avyakruta.

I wonder in our Mother earth the seed and trees are here to tell us about his leela of creation of the universe.

If you see any mistakes in my understanding please let me know.

Shri Krishnarapanamastu.

Friday, December 31, 2010

Constrained random verification[CRV] - How to design and execute

Targeted to audience who are looking to understand the bigger picture and typically would lead the verification project that intends to use the CRV. Coveres how to go about designing the CRV TB and execute & track it.

Introduction : What is verification ?

DUTs from verification point of view can be treated as a transfer function. If DUT has some configurable parameters that can be thought as variables that go in to making the transfer function. Whole DUT operation can be thought as system that translates the inputs to outputs based on the transfer function.

Now if we apply this to real scenario, On power up we configure the parameters of DUT. Thereon provide different types of inputs DUT. Using the trnsfer function predict the output and compare with the actual output provided by DUT.

Constrained random verification environment: System Spec re-orientation

No, i am not going to sell CRV methodology in this article. I am going to talk how do you go about building one.

Unfortunately most DUTs that get verified cannot be catpured as precise mathematical transfer function. If it can be, even partially then to that extent it can be verified using the formal techniques.

The ones where its not possible to capture the transfer function we rely on the constrained random approach.

In constrained random verification, following steps are to be followed:

1. Identify the variables in the configurable parameters and their allowed values

2. Identify the variables in input and possible values these variables can take.

3. Based on #1 and #2 how the output can be defined

Any DUT specification can come in the form standard specifications and internal architecture specification.

In order to build the TB micro-architecture for CRV capture information from system specification in the three groups noted above.

DUT might be processing single stream of inputs or multi stream. Multi Stream may be due to real multiple physical interfaces or logical support for multiple data streams on single physical interface.

Constrained random verification[CRV] environment: TB architecture

Once you have these details time to get into TB architecture.

Because of several pre-defined methodologies its very easy to get grocery list of components required in the TB. Dont fall into the trap of just creating quick grocery list. Using that as reference crate the schedules and todo lists based on this grocery list alone. This might get you started but would be absolute useless in real execution. You would end up incorrectly estimating timelines and resources.

You need to have the good understanding the system you are going to verify. Methodology driven component list is just guidance. Now under the light of CRV and system specification you can go build the similar todo list. This will be more accurate reflecting the relevant list for this project.

All the system configuration parameters should be captured in a global config. This config should typically hold both the system parameters and state of the system as well. Plan on passing this config object to all the components of the system. Since they need to work based on this.

If there are multiple physical interfaces a generator for each would be a good choice. Single physical interface having multiple logical stream can still be a single generator.

Based on the level of abstraction at which the data transaction is being created decides the number of transactors below it to process it. Dont make a single transactor overly complicated. if the abstraction is higher plan for layered transactors approach.

I am not going to talk much about the bus functional models for the interface. This is different game.

Based on the information in group #3 plan for a score board. This is vital component of the CRV system. Dont make mistake of dumping all the checks in the scoreboard. Limit it to data integrity checks, rest of the checks can be put it in other transactors where it makes more sense.

Design the end of test very carefully. This is equally important.

Constrained random verification : Functional Coverage myth

Well we have Test Bench and now we are starting to execute. What you need to take it to closure.

Typically one more mistake that's being done is overloading functional coverage for everything.

Verification should drive coverage for most part than being driven by it. In order for this to happen effectively you need to have 3 sheets to track the overall constrained random methodology based verification project.

1. Infrastructure Tracker: Based on TB architecture capture the infrastructure todo items. This can capture TB type(if multiple TB's), broad feature group(transactions, interrupts, configuration etc), general component(generators, data, xactors etc), actual name of component, one line about the feature(granular the better). Add owners and status.

2. Prioritized feature list: Order in which different features to be enabled, support exists in TB, Enabled in verification, coverage enabled.

3. Coverage tracker: Various functional coverage. Coverage should again be grouped feature based.

For every week based on the Prioritized feature list[#2] decide the list of features to be enabled. Based on the list decide the infrastructure items[#1] that need to be implemented. After features are implemented and enabled track the coverage[#3].

Good luck and Happy new year 2011 !

Thursday, September 30, 2010

Hazards of Copy/Paste

Copy/Paste is way of coding for many. Copy/Paste can be from websites or another source within company or project. I am not talking about that.

While you write code there are many times you have to repeat some things with slight changes. What you do is simply copy/paste. These are cases that you cannot get to write as subroutine. What happens is if the slight change is required at multiple places its quite likely that you may forget at one place. One's attention is lesser while one is doing copy/paste of code than while one is writing.

Now starts the most dangerous phase. This program since it does not have syntax issues will compile nicely(or will have same syntax error at two places :-)). Well as it goes in programming world its not as much about the programming as it is about debugging. Nightmare starts once you run the program. It will result is some unexpected signature. Since the context of your debug might be totally focused on the conceptual change you have done, you might have tough time getting to the bug that creep in due to copy/paste.

Time saved during copy/paste you might end up paying in the ugly debug which will take far longer time. Unless you are highly diligent and can maintain most of the time its not worth copy/paste small chunks of the code. Better write them again. It will not only reduce silly bugs but also improve the familiarity with the language.

Say No to small copy/paste and even when you have to do pay full attention as if you are writing it fresh. You cannot take it easy, Be Alert !