Tuesday, September 25, 2007

Consumer JRE Design

Sun announced in JavaOne 2007 about consumer JRE. The expected size of consumer JRE would be 4MB to 7 MB. This small size would make JRE easily downloadable over network very fast and JRE start-up time would be very quick. If you wonder about design of consumer JRE, have a look at design of “Tamarin”. After all, sun is trying to replicate the success of adobe flash runtime. “Tamarin” is a runtime (written in C++) for compiled JavaScript byte-code and it is the core of flash runtime.

(Java script is compiled to byte-code by action script compiler, the compiler is written in Java)

Posted by selvan at 9:53 PM 0 comments  

Friday, January 05, 2007

Little Stories

Two people lost in the forest

Two people went into the forest and were lost. As they wandered around, they came face to face with a bear. One of them started putting on his running shoes. The other told him “There is no use wearing your running shoes. You can’t outrun the bear.” The person putting on the shoes told him “I don’t have to outrun the bear. All that I need to do is outrun you!”

Moral of the story is that if you are not prepared ahead of time, your competition will succeed and you will get eaten!!

Spirit of Delta

In 1981, the US was in a deep recession and Delta airlines was suffering financially. On the birthday of Delta airlines in 1981, a few airhostesses wondered why Delta airlines was giving them a present rather than them giving Delta a present as is customary when it is somebody’s birthday. They continued to discuss this for several days and finally came up with an idea. They visited a senior executive of Delta airlines and said they had decided to present a Boeing 767 aircraft to Delta for its birthday. The executive thanked them and said that he will keep it on his desk. They pointed out to him that it was a real Boeing 767 they were talking about. The executive pointed out that it costs several hundred million dollars. The airhostesses said they understood how much it costs. After a few months they had only raised a few tens of thousands of dollars. But as other people heard about this, the excitement picked on and a large number of Delta employees took a pay cut to contribute to this endeavor and on Delta’s birthday in 1982, presented a brand new Boeing 767, the first in Delta’s fleet. This aircraft is named the “Spirit of Delta” and it continues to fly the skies today.

Blue Jay and Robin

In UK before World War II, the milk delivery service used to drop off milk bottles at the doorstep at dawn. Before the customer picked up the milk bottle, the two bird species Blue Jay and Robin were busy drinking the milk. They especially liked the cream at the top. To prevent the birds from drinking milk, the milk company covered the bottles with thin metal foils. For a short while the birds struggled. Finally a few Blue Jays’ and a few Robins’ figured out how to open the metal foil and drink the milk. Research by University of California Berkeley Prof. of zoology shows however that Blue Jay and Robin exhibited different knowledge sharing behavior. The Blue Jay went around town telling every Blue Jay how to open the metal foil and drink milk. The few Robins' who discovered the secret kept it to themselves. The result now is that, the Blue Jay still thrives and the Robin is almost a perished species.

The learning is that - If the employees at our competitors have a culture where they share knowledge freely and we do not, the competitor will thrive and we will perish.

Anomaly in Office Supplies

An intelligent accountant at a company had figured out an anomaly in the office supplies purchasing pattern. He brought it to the attention of the CEO. He told the CEO “After a lot of research, I have found that the amount of office supplies purchased during the time the school starts is much higher than during the rest of the year. This means that many employees are taking office supplies to give to their children for the school year. I hence suggest that we should carefully control the issue of office supplies to prevent this from happening.” The CEO reflected on this for a minute and then called the office supplies purchasing group “During the month of August, when the school starts, make sure that you buy the best quality office supplies – I want the children of our employees to get the best!”

Tasty Fish

A consulting company was asked to study the reason for deep sea fish not tasting as good as the near shore fish and to recommend ways to make it tastier. After a detailed study, the consulting company figured out that the reason for the short coming was that the deep sea fish stayed in a container in the trawler where they became sluggish as they did not move very much. So the trick to making the fish tastier was to keep these fish active when they are in the container. The consulting company designed an expensive propeller to create turbulence in the container, to keep the fish active before the trawler reached the port. Some of the fishing boats were fitted with the expensive propeller but others found it too expensive. So the consulting company was again engaged to identify ways of reducing the cost of the propeller by 10% to increase the adoption of the propeller. The consultant was sitting on the trawler in deep sea looking into the ocean wondering how he will reduce the price of the propeller by 10%. The deck swab cleaning the deck observed that the consultant was in deep thought and asked if he can help. The consultant told him that the problem was complex and he doesn’t think the janitor can help him, but however narrated the problem. The janitor said “But if you want to get the fish active, why do you need an expensive propeller. Just put a baby shark in the container and it will keep the fish running.” By adopting this idea, the cost of keeping the fish active came down from an expensive propeller to a baby shark which cost a few dollars! The learning is that innovation doesn’t happen only in the R&D labs.

Every person has the capacity to innovate and the person closest to the problem is the most likely to come up with innovative solutions.

Posted by selvan at 2:03 AM 0 comments  

Saturday, December 02, 2006

Impact of Spring 2.0 on Offshore Delivery Model

Recently, i was developing frame work based on Spring 2.0. I couldn't resist my alacrity of excitement with Spring 2.0 and its impact on current onsite-offshore business model of executing software projects.

If your project is totally independent of all other components in infrastructure (ie, it is not consuming any data from existing system), you will gain code elegance, productivity, testability and manageability directly by using spring. If your project depends on existing infrastructure components, you not only gain above aspects but you will also gain from pluggable, hook based architecture deign with DI/IoC. Intrested in detailed answer?.

Typical Onsite-Offshore Execution Issues

Infrastructure issues. Eventhough onsite DB infrastructure can be replicated at Offshore (with data masking techniques), it is not possible to replicate service components exist in onsite at offshore. For example, many services available at onsite that were created with many years effort, can't be easily ported to offshore infrastructure.

Performance issues. As service components can't be ported to offshore, typically, development at offshore will be done with dummy skeletons. These skeletons will have same method signatures, but with dummy behavior to assist code execution at offshore

Collaboration issues. When development work span across both onsite and offshore, we need to spend more effort on collaboration, than actual development work. If your team is going to be more than 25 people, you can expect nothing but hell !!!.

Team moral. Do you think this is HR issue? Rethink again !!. Most of conflicts among team member arise from finger pointing each other when things didn't work. This is Inverse of Tragedy of commons, ie, these is no one exist to take ownership !!! ( Of course, PL/PM is the responsible from management point of view )

Delivery deadline. Most of fixed price projects suffer from schedule slippage. You may be knowing that the bigest time consuming part of the project development (apart from design) is not developing it, but unit-testing, deployment, integration, integration testing, stress testing. Did any project proposal have taken server deployment time (server configuration of your component, server stop, server start etc) part of schedule? Nope !!!. You may never find any such project !!!. If you are developing web based project, you would have realised how many times you have to strat-debug-remove cache-stop-repeat and time consumed by it.

I have realsied that effect of above factors can be minimized to large extent when we use Spring 2.0 and JDK 1.5, particularly if you are providing solution based on J2EE.

Best of Luck !!!

Posted by selvan at 3:51 PM 0 comments  

Sunday, November 26, 2006

Occam's razor

All things being equal, the simplest solution tends to be the best one. In other words, when multiple competing theories are equal in other respects, the principle recommends selecting the theory that introduces the fewest assumptions and postulates the fewest hypothetical entities.


Posted by selvan at 8:12 PM 0 comments  

Saturday, November 18, 2006

Leader vs Manager
  • Creates a new order - Maintains existing order
  • Defines risks - De-risks
  • Opportunity focused - Resource focused
  • Comfort in ambiguity - Comfort in clarity
  • Opportunity centric - Constraint centric
  • Big-picture oriented - Detail oriented
  • Innovative - Adaptive

PS : I have red above points from Subroto Bagchi's (COO of Mintree Consulting) presentation

Posted by selvan at 7:07 AM 0 comments  

Sunday, October 15, 2006

Fun Probability

1) It is known that family A has 2 children. One of the children is female. What is the probability that the other child is male?

The correct answer is 2/3.Since one of the children is female, the
possible arrangements of children is {(male,female) ,(female, male),
(female,female) }. Among 3 of them, there are 2 arrangements that
gives the other child is male. So the probability of the other child
is male is 2/3

Posted by selvan at 7:09 PM 0 comments  

The Mythical Man-Month

Whenever a product's development schedule is slipping badly and there is a crisis meeting of the programming team, the term "mythical man-month" is likely to be bandied about. There will be many sighs and exchanges of knowing looks and pointing of fingers and tasks assigned and subsequent exchanges of memoranda and Highly Significant Position Papers. But it's a safe bet that hardly anyone at the meeting will have actually read "The Mythical Man-Month" by Frederick P. Brooks Jr. or know exactly what it talks about -- the book, and its author, have acquired a certain mythic status of their own.

So what is a mythical man-month anyway? Consider a moderately complex software application from the early microcomputer era, such as the primordial version of Lotus 1-2-3, Ashton-Tate dBASE, or Wordstar. Assume that such a program might take one very smart, highly-motivated, expert programmer approximately a year to design, code, debug, and document. In other words, 12 man-months. Imagine that market pressures are such that we want to get the program finished in a month, rather than a year. What is the solution? You might say, "get 12 experienced coders, divide up the work, let them all flog away for one month, and the problem will be solved. It's still 12 man-months, right?"

Alas, time cannot be warped so easily. Dr. Brooks observed, while he was managing the development of Operating System/360 (OS/360) in the early 1960's, that man-months are not -- so to speak -- factorable, associative, or commutative. 1 programmer * 12 months does not equal 12 programmers * 1 month. The performance of programming teams, in other words, does not "scale" in a linear fashion any more than the performance of multi-processor computer systems. He found, in fact, that when you throw additional programmers at a project that is late, you are only likely to make it more late. The way to get a project back on schedule is to remove promised-but-not-yet-completed features, rather than multiplying worker bees.
When you stop to think about it, this phenomenon is easy to understand. There is an inescapable overhead to yoking up programmers in parallel. The members of the team must "waste time" attending meetings, drafting project plans, exchanging EMAIL, negotiating interfaces, enduring performance reviews, and so on. In any team of more than a few people, at least one member will be dedicated to "supervising" the others, while another member will be dedicated to housekeeping functions such as managing builds, updating Gantt charts, and coordinating everyone's calendar. At Microsoft, there will be at least one team member that just designs T-shirts for the rest of the team to wear. And as the team grows, there is a combinatorial explosion such that the percentage of effort devoted to communication and administration becomes larger and larger.

The Mythical Man-Month
Assigning more programmers to a project running behind schedule will make it even later, due to the time required for the new programmers to learn about the project, and the increased communications overhead. When N people have to communicate among themselves (without a hierarchy), as N increases, their output M decreases and can even become negative (i.e. the total work remaining at the end of a day is greater than the total work that had been remaining at the beginning of that day, such as when many bugs are created).
  • Group Intercommunication Formula: n(n − 1) / 2
  • Example: 50 developers -> 50(50 − 1) / 2 = 1225 units of effort (hour/week/month) spent in communication
The Second-system effect
The second system an engineer designs is the most dangerous system he will ever design, since it will be disastrously overdesigned. Thus, when embarking upon a new project, a project manager should ask for a chief architect who has designed at least two systems.
Progress Tracking
Question: How does a large software project get to be one year late? Answer: One day at a time! Incremental slippages on many fronts eventually accumulate to produce a large overall delay. Continued attention to meeting small individual milestones is required at each level of management.
Conceptual Integrity
In order to make a user-friendly system, the system must have conceptual integrity, which can only be achieved by separating architecture from implementation. A single chief architect (or a small number of architects), acting on the user's behalf, decides what goes in the system and what stays out. A "super cool" idea by someone may not be included if it does not fit seamlessly with the overall system design. In fact, to ensure a user-friendly system, a system may deliberately provide fewer features than it is capable of. The point is that if a system is too complicated to use, then many of its features will go unused because no one has the time to learn how to use them.
The Manual
What the chief architect produces are written specifications for the system in the form of the manual. It describes the external specifications of the system in detail, i.e., everything that the user sees. The manual can be altered as feedback comes in from the implementation teams and the users.
The Pilot System
When designing a new kind of system, a team will design a throw-away system (whether it intends to or not). This system acts as a pilot plant that will reveal techniques which will subsequently cause a complete redesign of the system. This second smarter system should be the one delivered to the customer, since delivery of the pilot system would cause nothing but agony to the customer, and possibly ruin the system's reputation and maybe even the company's.
Formal Documents
Every project manager must create a small core set of formal documents which acts as the roadmap as to what the project objectives are, how they are to be achieved, who is going to achieve them, when they are going to be achieved, and how much they are going to cost. These documents may also reveal inconsistencies that are otherwise hard to see.
Project Estimation
When estimating project times, it should be remembered that compilers are three times as hard to write as application programs. And systems programs are three times as hard to write as compilers. And the use of a suitable high-level language may dramatically improve programmer productivity. Also, it should be kept in mind how much of the work week will actually be spent on technical issues rather than administrative ones or other non-technical ones, such as meetings or sick leaves.
Communication
In order to avoid disaster, all the teams working on a project should remain in contact with each other in as many ways as possible (e-mail, phone, meetings, memos etc.) Instead of assuming something, the implementer should instead ask the architects to clarify their intent on a feature he is implementing, before proceeding with an assumption that might very well be completely incorrect.
The Surgical Team
Much as a surgical team during surgery is led by one surgeon performing the most critical work himself while directing his team to assist with or overtake less critical parts, it seems reasonable to have a "good" programmer develop critical system components while the rest of a team provides what is needed at the right time. Additionally, Brooks muses that "good" programmers are generally 5-10 times as productive as mediocre ones.
Code Freeze and System Versioning
Software is invisible. Therefore, many things only become apparent once a certain amount of work has been done on a new system, allowing a user to experience it. This experience will yield insights, which will change a user's needs or the perception of the user's needs. The system will therefore need to be changed in order to fulfill the changed requirements of the user. This can only occur up to a certain point, otherwise the system may never be completed. At a certain date, no more changes would be allowed to the system and the code would be frozen. All requests for changes will be delayed until the next version of the system.
Specialized Tools
Instead of every programmer having his own special set of tools, each team should have a designated tool-maker that may create tools which are highly customized for the job that team is doing, e.g., a code generator tool that spits out code based on a specification. In addition, system-wide tools should be built by a common tools team, overseen by the project manager.
Lowering Software Development Costs
There are two techniques for lowering software development costs that Brooks writes about :
  • Implementers may be hired only after the architecture of the system has been completed (a step that may take several months, during which time prematurely-hired implementers may have nothing to do).
  • Another technique Brooks mentions is not to develop software at all, but to simply buy it "off the shelf" when possible.

Posted by selvan at 1:26 PM 0 comments  

Saturday, August 26, 2006

Pluto no longer a planet
The recent popular scientific news in paper/in media is "Pluto no longer consider as planet". This is not only scientific news, but also great news for entertainment. Wondering how?

Here it is, Think about alien exist in Pluto.

Scenario 1: Alien at Pluto is technologically advanced than us (humans on earth)
As alien at Pluto is technologically advanced, they will find us before we find them and land on earth before we land on Pluto. Alien came to know that, we no longer recognized Pluto as planet. What would happen to us on earth?. I leave it to your imagination.

Scenario 2: We are technologically advanced than alien at Pluto
We land on Pluto before thay land on earth. We got new bunch of slaves to work on earth alongside software developers!!!. The god and government of Pluto has to agree with earth's superpower (Ancient times Rome, Mediaeval UK, Currently US, may be changed later in date) else we will accuse them of having WSD (Weapon of Space Destruction) and wage a war. On winning war, setup trial court in Pluto and broadcast the trail in earth as a new TV serial / daily entertainment news

What's more?
  1. I am not sure what would be the impact on Indian astrology.
  2. What will happen to software companies / products that have Pluto as part of their name?
  3. Who will be answerable to students who were punished by their physics teacher for not remembering Pluto as planet?

Post me if you have any great ideas on this topic !!!

Posted by selvan at 11:00 AM 0 comments