Monday, August 19, 2013

Starting all over again

I have grown bulky in all possible ways; body, cost of living etc, but I always wanted to be nimble. Health is not in it's best condition. Gone off road from what I wanted to be, some part of it is intentional, most of it is unwanted consequence of my deeds. Life values are diluted, again some changes are intentional and most are changed because, I was afraid to be rejected(not liked) by people. Other major reason is my laziness.

I'm not expecting to be a superman overnight, however want to put things in right direction, right from now. I'll still do mistakes, but it should be only because of my inability, not because I'm afraid.

Following things should be achieved in 200days, i.e by Friday, March 7, 2014

  1. Good Health condition, No Sick Leave.
  2. Reduced cost of living, Credit Card Free life.
  3. Math, Probability & Statistics refreshed.

Saturday, November 24, 2012

JVM Memory management: Garbage Collection



Most of the questions related to memory would have been answered by the image above. There are two and only two major partitions in JVM memory, Heap and Non-Heap. All the other type of memory space or pools we have heard belong to either of these two. Java specification does not enforce any specific implementation of memory, it depends on JVM implementation. The JVM of Oracle is named HotSpot.


Young Generation:
Here garbage collection is frequent and less expensive.
Eden Space: Initially all objects created here.
Survivor space: Contains objects that survived garbage collection in Eden Space

Old Generation:
Here garbage collection is less frequent and expensive.
Tenured Space: The objects survived the garbage collection get moved here.
PermGen: Contains meta data of the virtual machine, class and method objects.

Garbage Collector:
It is a low priority daemon thread. It frees memory of any object that is not reachable from a live thread. We can suggest JVM to do garbage collection by calling Runtime.getRuntime().gc() or System.gc() which internally calls Runtime.getRuntime().gc(). Runtime is singleton. We can configure type of garbage collector to be used by passing command line arguments to JVM. For more details on garbage collection http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html 

To configure stack memory  -Xss1m
To configure heap memory  -Xmx512m -XX:MaxPermSize=256m



Sunday, August 26, 2012

Advantage of distraction


Mid term exam is approaching, I need an excuse to procrastinate studying. I wanted a countdown timer that shows me how much time left for preparation and how many hours required per day. I could not find easily, so made a small HTML5 gadget. It works offline, and only offline as of now.

 Advantage of distraction is that I learned how to make the HTML5 gadget work offline. Also how to make a windows sidebar gadget, as the initial ideas was to make a windows gadget.

Here is how to develop a Windows sidebar gadget. http://msdn.microsoft.com/en-us/library/windows/desktop/bb456468%28v=vs.85%29.aspx

It's easy to make a web page work offline. Below is the code, write that in the page you want to make work offline.

<html manifest="cache-manifest">

Now create the manifest file with name "cache-manifest" and write the below code in it

CACHE MANIFEST
page1.html
my-script.js


And finally how to write HTML code inside a blog post :)

Wednesday, June 13, 2012

Insights of Snap Judgement

Taking decisions involving emotions is like solving an open ended problem, in either case we don't get a logical concrete solution. I feel avoiding such situations are almost impossible. Most of the time this involves snap judgement without much details of the context. Psychologists working on subconscious mind say somehow brain got a system developed to function in such situations and we should not interfere with that. As  Malcolm Gladwell has written in his book Blink "Introspection destroys the ability to solve insight problems. Introspection messes up with our reactions." It's simple we can not always rationalize and explain our feelings. e.g Why we are attracted to someone, why we  like certain food etc.

The system in brain is reliable most of the time but not always, such error are called Warren Harding Error. One more example is  http://en.wikipedia.org/wiki/Amadou_Diallo_shooting. A different flavor of this error is volume of info may always not help, best example is divorce, despite the fact that people collect lot of fact on  their spouse.

Difficulty here is, when, what and how much info to collect. Even if want, it may not be possible all the time because of time constraint and complexity of understanding the opponents intention.

Conclusion:
Need to rely on the system brain already has. The core of that system is Implicit Association, so we can work on this, read more, observe more, listen carefully..........

Saturday, April 7, 2012

Rethinking Think and Grow Rich

Any theory or opinion works only with specific audience and in particular context. Vision, recognition of problem, decision making skill etc are important for doing business. Think and Grow Rich says experts are in every corner of the world use them instead of being one more expert. First need to decide if you want to be an expert or someone you use the experts.

Wednesday, September 28, 2011

My Logger is ready to use

This is your personal assistant and stays online 24x7x365.

My Logger(mylogger@followinstinct.com) is ready to use. It is a chat bot that you can add to your gmail or any XMPP based mail account. Once your account is active, you can save info with a tag and can retrieve it later by tag. IM is the simplest way to access and store information.

Signup Instructions:
  1. Invite mylogger@followinstinct.com to your chat account. It can be gmail or any XMPP based account. Thats it, you don't need to install any software or do any registration..
After your account is active. Instruction to use the application:
  1. To save data see the below example
    movie: Inception
    Here movie is the tag and Inception is the info to be saved. You can add any number of info to a single tag.
  2. To retrieve data by tag see the below example
    L movie
    Here you will get all the info associated wit the tag 'movie'.
  3. To retrieve all info irrespective of tag see below example
    L
    Yes, just l. It will list all the information you have saved.
  4. To retrieve all tags
    tags
  5. To remove the last information you entered
    undo
    You can keep doing undo any number of times, there is no limitation. Be warned there is NO REDO.
This project is not complete. Please send me your comments and suggestions at support@followinstinct.com.

Wednesday, July 20, 2011

Consequence is consistent with cause, no matter what!

Consequence is consistent with cause, no matter what! This is known to everyone, still I feel like repeating. What we are now is result of what we think, what we read, what see, whom we speak, whom we work with, the events we involved with and so on, which includes the entire world directly or indirectly. When the whole world is contributing towards us, what we need to do? Just manage where you want to get involved directly and where indirectly, because priority matters which in turn is outsourcing.

This is gist of 2 books I have read long back Outliers By Malcom Gladwell and Think and Grow Rich by Napoleon Hill

Sunday, June 26, 2011

Artifact creator, maven command generator

I have written this program for my own requirement. I feel it is a generic one. I have written a test program for adding a new feature, now I want to add that feature to my real application. I need to find what are the additional jars used, and create pom dependencies. This programs takes 2 required parameters and 1 optional parameter. Click here to download.

Parameter list
  1. Source1: Path to lib folder of the test program(required).
  2. Source2: Path to lib folder of the real program(required).
  3. Pom: Path where the output will be printed(optional), output can be seen from console.
Features
  1. List of jars available with same version.
  2. List of jars available with different version.
  3. Maven command for installing the new jars into maven repository.
Here is the command to use this program

java -jar artifact-creator-0.5.jar -s1 /path/of/lib/folder/of/test/program -s2 /path/of/lib/folder/of/real/program -pom /path/of/file/where/output/printed/optional

Sunday, June 19, 2011

Logic and Observation both are important

Most of the time decision can be of two types "Logic Lead" and "Observation Lead". Logic lead decision making is internal and based on the facts/information someone already know. Where as sometimes we don't need to think so much to conclude a decision rather need to observe the context and even the question carefully to get the answer.

In logic lead decision making the biggest mistake someone can do is ignoring to consider the targeted audience, after all audience is who evaluates the quality of your decision. But decision maker is solely responsible for the longterm effect of the decision be it good or bad.

Sunday, October 10, 2010

Robot movie: A prototype of future AI

I watched the movie Robot and liked it. Here I'm talking about the creative part of the movie, neither concerned about the story of movie nor even the way the actors played their role. The movie can be used as a prototype for the AI projects.

I love programming and Cognitive & Brain Sciences are my passions. Neuron schema of a AI project can be the combination of both. This is first time I'm searching for AI related programming, not aware of any such open source projects, hope will find some interesting projects, Please post links in comment if you find any such projects.

I need a robot which reads books, learn new things, make summary of books, answer questions. Even if not all books it should be about to read programming & business books, the books I mostly read.

I don't want it to write program and take my job away, don't have a girlfriend so no worry of losing that :)

Monday, July 26, 2010

Which is strong is not flexible.

Being flexible does not help always. Thinking as if Kisor became so pessimist, not exactly I'm just making an adjustment in the trade-off point. I decided to be little rigid to make myself more efficient and make better use of resources. Here I remember one more point; people feel you are important when you reject them rather when you accept. A better trade-off between flexibility and rigidity is needed when you are going to lead/manage people, because the decision affects all the people in team not just you. The common goal is always more important than any individual contributor.

I have recently read two books FIRE SOMEONE TODAY and iCon which advocates this kind of philosophy.

Wednesday, February 17, 2010

"Inline decision making" is unproductive

"Inline decision making" is a new phrase but self explaining, does not need further explanation. And this is the reason for my countless pending projects. Measuring the performance, progress and return on investment etc are good, when under certain limit, these will help in planing and making decisions to reach the deadline with available resource and time. Its better to have some milestones to, that will give opportunities for faultfinding and decision making. Act for the sake of service without consideration for the results as Bhagavad Gita says, however forgetting about the milestones and deadline will send us back to the age of Bhagavad Gita, be careful. I was a bit addicted to plan for the result, and did not do anything except procrastinating, finding reason for delay and planing again, this was an infinite loop, now I terminated it abruptly.

Sunday, October 25, 2009

Fixed Record file parser

/**
* This functions takes one line of fixed record file as sting and returns
* array of fields
*
* @author Kisor Biswal
* @param string
* @return
*/
private String[] splitter(String string) {
// Lets get the string by space
String[] subStrings = string.split(" ");
// Oh we have to consider the the spaces inside, Okay no problem we will
// joint these back
List finalResult = new ArrayList();
List tempStrings = new ArrayList();
boolean isFirst = false;
for (String s : subStrings) {
// Do the string contain double quote?
if (s.contains("\"")) {
// Yes, Lets check if first time
if (!isFirst) {
// Yes, add the sting to temp list and go ahead
tempStrings.add(s);
isFirst = true;
} else {
// No, Ok now time to concatenate all temp strings and
// append to final result list
tempStrings.add(s);
StringBuffer buffer = new StringBuffer();
for (String ts : tempStrings) {
buffer.append(ts);
// Put space back
if (!ts.endsWith("\"")) {
buffer.append(" ");
}
}
finalResult.add(buffer.toString().replace("\"", ""));
// Now just toggle the

isFirst = false;

}

} else if (isFirst) {
// Yes, add the sting to temp list and go ahead
tempStrings.add(s);
} else {
finalResult.add(s);
}

}
return finalResult.toArray(new String[finalResult.size()]);
}

Friday, August 21, 2009

PWC6033: Unable to compile class for JSP

Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:105)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:924)


org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP


at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:107)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:280)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:347)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:400)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:477)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:371)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:268)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at org.mortbay.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

SOLUTION worked for me

adding tools.jar(/usr/lib/jvm/java-6-sun-1.6.0.14/lib/tools.jar) to class path.

Saturday, August 15, 2009

I was scared of mask wearing people, Swine Flu

desease swine, influenza A, i'm not infected....Image by Dan Queiroz via Flickr

Today morning I read about swine flu from my most trusted source information wikipedia. What understood is, swine flu is not that much dangerous as I have perceived. The normal good health habits can bit the flu easily. Even if someone is infected it can be cured.
Yesterday I was going to Paradise circle in a cab from Dr. A.S Rao Nagar, near Nadermet a group of people get into the same cab. I was scared of them as they were following everything whatever I have read in newspaper, wearing mask and drinking water frequently. They all belong to same family; children, father and mother. First I thought better to get down and go by hiring an auto, later I thought its better to ask them. So I asked "Are you all scared of swine flu or......?". The answer was "its better to be proactive, right?". This gave me enough confidence to not to get down from the cab, still I was worried and was trying to breath fresh air from the window. Came back by auto to avoid mask wearing people :).

Reblog this post [with Zemanta]

Thursday, July 23, 2009

Programming is not mere use of left brain

The human brainImage via Wikipedia
Few months back I have seen the video "A Whole New Mind: Why Right-brainers Will Rule the Future" of Daniel H. Pink. Where he professes why Right-brainers Will Rule the Future. Everything he told made sense to me, everything was logical. Mostly he is talking about outsourcing from US to ASIA, in these outsourced works programming was also included. But after seeing the programing language Scala and Lift framework I felt like programming is not mere use of left brain. As far as I understand programming needs "A whole brain" neither left nor right brain can help alone. Sometimes after getting frustrated by trying to solve a problem sequentially and logically, we find the solution by thinking in random with no logic.
So we should give a chance to right brain when the problem is taking longer than usual time. And should think beyond the existing technologies to solve the problems we have, at least once a week if more is not feasible.

Reblog this post [with Zemanta]

Sunday, June 14, 2009

Zemanta plugin

Pretty girlImage by Ed Yourdon via Flickr

Today I came across the plugin zemanta. First I thought how can it help me in writing but it did. Suppose here I'll write I bought a domain from dreamhost hosting provider, then I dont need to give the link to dreamhost, zemanta is smart enought to put that link. Also it claims it can help in composing emails, I have not used yet. Not only it suggest links but also suggests images, let me try writing pretty girl :). Got some images to choose from. But it recognize only popular words, here it wont put a link to my website even if I write the full url including http; http://kisor.vimukti.com.

In single sentence I liked it!

Oh it made me edit the post to write that, it writes the CSS also, see how the image is aligned. I promise I did not do anything in CSS.

Reblog this post [with Zemanta]

Monday, April 6, 2009

Practice makes DMA of Skills

What I mean by knowledge is understanding and remembering how things work, practice is process of finding the most efficient(the efficient way is not same for all)way of using the acquired knowledge. Skill is the perfect blend of knowledge and practice. During the process of acquiring a new skill our brain uses all most all of neurons and create new connections between the neurons, consequently we feel so busy and cant do anything simultaneously. But practice make everything simple, which decreases the number of neurons used for doing a particular task. As we master the skill, number of neurons used decreases and released neurons can be used for some other task. Once something is practiced perfectly it works like DMA without active involvement of brain. Without involvement of brain it will be faster.

Thursday, February 5, 2009

Escaping escalates problems

Never neglect a mistake. You may escape from the problem when you noticed it first time, because it is not grown to such a extent that will scare you. But I'm sure, later you will not be happy because you managed to escape from the problem, rather you'll repent because you gave a chance to the problem to grow beyond your ability to manage. Everything is predictable up-to the extent of requirement. Now I'm writing this because, the mistake I did today afternoon gave me an opportunity and enough time to write, now time is 1.59am:).

Learning from mistakes is good, but learning to avoid mistake is better.