Wednesday, 4 December 2013

Don't let the code drag your mind

Don't let the source code drag your mind. The master of your mind is yourself. Use the domain and system interaction knowledge to find out what you want to know about the new system.

Monday, 7 October 2013

Group Leadership( From Wiki)



According to the National School Boards Association (USA):[74]
These Group Leaderships or Leadership Teams have specific characteristics:
Characteristics of a Team
  • There must be an awareness of unity on the part of all its members.
  • There must be interpersonal relationship. Members must have a chance to contribute, and learn from and work with others.
  • The members must have the ability to act together toward a common goal.
Ten characteristics of well-functioning teams:
  • Purpose: Members proudly share a sense of why the team exists and are invested in accomplishing its mission and goals.
  • Priorities: Members know what needs to be done next, by whom, and by when to achieve team goals.
  • Roles: Members know their roles in getting tasks done and when to allow a more skillful member to do a certain task.
  • Decisions: Authority and decision-making lines are clearly understood.
  • Conflict: Conflict is dealt with openly and is considered important to decision-making and personal growth.
  • Personal traits: members feel their unique personalities are appreciated and well utilized.
  • Norms: Group norms for working together are set and seen as standards for every one in the groups.
  • Effectiveness: Members find team meetings efficient and productive and look forward to this time together.
  • Success: Members know clearly when the team has met with success and share in this equally and proudly.
  • Training: Opportunities for feedback and updating skills are provided and taken advantage of by team members.

Saturday, 13 July 2013

Some good study material link about JMS/ActiveMQ(Chinese)

http://www.360doc.com/content/10/0913/14/2795334_53325069.shtml
 http://blog.csdn.net/wangdongsong1229/article/details/8219536

What I tried is,
1. cd $ACTIVE_MQ$/example/
2. ant producer
3. ant consumer

4. Then try the configuration by different values
    <property name="topic" value="false" />
    <property name="durable" value="true" />
in build.xml.

5. Check the status in MQ by http://localhost:8161/admin/.
 

Friday, 12 July 2013

Some Thoughts about New Feature Integration

Now I am working on new features implementation based on existing system. How to reduce the impact on the system?

Just thinking of SOA, How about defining the services provided in the running system? And then considering the interaction between the new features and the services?

Based on this, you view your system as a service provider. If the service is not declared clearly, then add them.

After this, go through the scenarios by the messaging flow and enhance the flow progressively. 

The idea above is, talking about high level design. The next thing is, to decide the implementation. I find the common practice is to have a messaging mechanism. It is quite natural to map to service request and response. It will become powerful enough to implement most of the complex logic if providing timing functionality.

Within the process level, the new features can use a queue and a frequent checking to communicate with the services. The checking can be put either in a standalone thread or in the main loop.

Within the system level, the new features can communicate with other components in the same system by network/share memory, so call inter-process communication. The exchanged information is embedded in the messages.

Overall, the idea is simple. Define the services you are relying on. Based on them, check the communication flows whether it can accomplish the domain logic you want. The rest just to decide how the interactions are passed through.

Monday, 8 July 2013

Training Program Design

It is quite interesting in considering a training as a project.

It needs a clear scope; Break the tasks into a more clear sub tasks; Define the performing time, review time and make evaluation plan.

Thursday, 4 July 2013

Some useful Python function in daily work

It is a very good script language and I start to learn it for system integration purpose. For example, packaging automation, system administration and process monitoring.

Below are some useful functions for memo: 

1. Parameter checking:

if(len(sys.argv) != 2):
        print 'COMMAND: ERROR'
        sys.exit(1)
sys.argv[1]

2. File existence

if(os.path.exists(path) == False):
        print "ERROR: %s doesn't exist." %(path)
        sys.exit(1)

3. System Call

os.system("cd " + path + "; cvs update -d -P; cd -;")

if(subprocess.call(["tar", "-czvf", tar_package, "sys", "app"]) != 0):
        print "ERROR: fail to tar the package %s" %(tar_package)
        sys.exit(1)

It seems subprocess is preferable due to portability.



4. Print

print 'copy %s to %s' %(src, dest)

5. File Copy

shutil.copy2(src, dest)

6. Variable Declaration

dev_path = '../..'

7. Environment Variable

os.environ['PLATFORM']

8. File Path Join

os.path.join(path, os.environ['PLATFORM'], "binary")

9. Find file Name with Pattern
files = glob.glob(os.path.join(gui + '/resource/') + '*.' + format)
        for file in files:
                shutil.copy(file, target_resource)

10. File System Visit Support
It is a very good design to make it flexible to define customized operations on folder.

def remove_CVS(arg, dirname, names):
        (head, tail) = os.path.split(dirname)
        if(tail == "CVS"):
                shutil.rmtree(dirname)
                print "%s is removed. " %(dirname)

os.path.walk(package_sys, remove_CVS, "")




Saturday, 15 June 2013

Find the product position in the market

1. Understand the market and devise some dimensions;
2. To reduce the dimension, stat analysis can be used to form a simpler matrix like
             Principal Components Analysis
             Factor Analysis Method;
3. find out the product position from the matrix.