Java Performance Tuning

Java(TM) - see bottom of page

|home |services |training |newsletter |tuning tips |tool reports |articles |resources |about us |site map |contact us |
Tools: | GC log analysers| Multi-tenancy tools| Books| SizeOf| Thread analysers| Heap dump analysers|

Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks! 

Training online: Concurrency, Threading, GC, Advanced Java and more ... 

Javva The Hutt August 2004

JProfiler
Get rid of your performance problems and memory leaks!

Modern Garbage Collection Tuning
Shows tuning flow chart for GC tuning


Java Performance Training Courses
COURSES AVAILABLE NOW. We can provide training courses to handle all your Java performance needs

Java Performance Tuning, 2nd ed
The classic and most comprehensive book on tuning Java

Java Performance Tuning Newsletter
Your source of Java performance news. Subscribe now!
Enter email:


Training online
Threading Essentials course


JProfiler
Get rid of your performance problems and memory leaks!


Back to newsletter 045 contents | All Javva's articles

What Price?

I came across this fascinating discussion on pricing your product by Eric Sink. It is specifically about software products, though I imagine it extends beyond that. In the section "Complaints About Price", which had me laughing out loud, he points out that whatever the price, someone complains:

If I gave the product away, someone would complain that I am making them buy more disk space to install it.
If I paid each user a hundred bucks to use my product and sent Salma Hayek in a bikini to personally install it for them, someone would complain that they prefer blondes.

This rings true to me. So how do you price your product correctly? The whole article is summarized in two lines which sounds like it gives excellent advice on optimizing your price:

In fact, if nobody is complaining about your price, then it is probably too low. The trick is to tune your pricing until the volume of the whining is just right.

Diary of a Hutt

June 16. Committees! They say a camel is a horse designed by a committee. Huh. The fact is that camels are creatures excellently adapted for their environment. My experience is that a committee given the task of designing a horse couldn't have even come up with a rocking horse, let alone a live animal! I have created a Java implementation for a commitee. It works perfectly to model committee actions, right down to the fact that if you remove some unnecessary static, they can actually complete a task.

public class Committee
{
  public static void main(String args[])
  {
    MakeADecision();
  }
//
  public static int CommitteeSize;
  public static void MakeADecision()
  {
    CommitteeSize = 2;
    for (int i = 0; i < CommitteeSize ; i++)
      new CommitteeMember();
  }
//
  //Doesn't matter who is voting or what they vote for,
  //after all this is a committee. It is only about politics.
  public static int Votes = 0;
  public synchronized static void AddVote() {Votes++;}
//
  public static boolean VotingCompleted() {return Votes == CommitteeSize;}
}
//
class CommitteeMember implements Runnable
{
  public CommitteeMember()
  {
    (new Thread(this)).start();
  }
//
  public void run()
  {
    takeMyPosition();
    System.out.println("Well, that was quicker than normal");
  }
//
  //static and void, two highly appropriate keywords
  public synchronized static void takeMyPosition()
  {
    Committee.AddVote();
    while(!Committee.VotingCompleted())
    {
      try{Thread.sleep(1000);}catch(InterruptedException e){}
    }
  }
}

BCNU

Javva The Hutt.


Back to newsletter 045 contents


Last Updated: 2024-12-27
Copyright © 2000-2024 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. JavaPerformanceTuning.com is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
URL: http://www.JavaPerformanceTuning.com/news/javvathehutt045.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us