aspose file tools
The moose likes Meaningless Drivel and the fly likes Teach Yourself : Gain Performance in 1 minutes Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Other » Meaningless Drivel
Reply Bookmark "Teach Yourself : Gain Performance in 1 minutes" Watch "Teach Yourself : Gain Performance in 1 minutes" New topic
Author

Teach Yourself : Gain Performance in 1 minutes

Stevie Kaligis
Ranch Hand

Joined: Feb 04, 2001
Posts: 400
Want to gain your performance ?
Maybe... We have all been to those meetings where someone wants "more than 100%.", well here's how we do that ...
First of all, here's a little math that might prove helpful in the future.
IF :
A = 1
B = 2
C = 3
D = 4
E = 5
F = 6
G = 7
H = 8
I = 9
J = 10
K = 11
L = 12
M = 13
N = 14
O = 15
P = 16
Q = 17
R = 18
S = 19
T = 20
U = 21
V = 22
W = 23
X = 24
Y = 25
Z = 26
Then:
H A R D W O R K = 8+1+18+4+23+15+18+11 = Only 98%
K N O W L E D G E = 11+14+15+23+12+5+4+7+5 = Only 96%
A T T I T U D E = 1+20+20+9+20+21+4+5 = 100%..... This is how we achieve 100% in LIFE.
important to note is :
B U L L S H I T = 2+21+12+12+19+8+9+20 = 103%
So now we know what all those high-priced consultants, top management, and motivational speakers really mean when they want to exceed 100%!
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Stevie, you have short memory span?
This has been posted some time ago but maybe someone still might find it entertaining.
Amitabh Sharma
Ranch Hand

Joined: Oct 11, 2001
Posts: 126
heavy = 61 light = 56 weight = 72 attitude = 100 knowledge = 96 intelligence = 115 view = 59 outlook = 109 problem = 81 solution = 125 positive = 115 negative = 83 past = 56 present = 97 future = 91 JuliaRoberts = 150 RobertDeniro = 143 TomCruise = 123 OsamaBinLaden = 110 UnitedStatesOfAmerica = 228 India = 37 UnitedKingdom = 146 Germany = 83 France = 47 NewYorkCity = 168 SunMicroSystem = 213 Microsoft = 118 BillGates = 87 JAVA = 34 Sex = 48 Air = 28 Land = 31 Water = 67 Expert = 88 Idiot = 57 Radio = 47 Television = 130 doctor = 75 Engineer = 77 programmer = 124
----
do it yourself: pass words as command line arguments.

public class AlphaNum
{
public static void main (String args[])
{
for(int l =0; l < args.length; l++)
{
String []alpha={"A", "B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
int sum = 0;
String word = args[l];

for(int i = 0; i < word.length(); i++)
{
String ch = word.substring(i,i+1);
for (int k = 0; k < alpha.length; k++)
{
if(ch.equalsIgnoreCase(alpha[k]))
{
sum += k+1;
break;
}
}
}

System.out.println(args[l] + " = " + sum);
}

}

}
Ashok Mash
Ranch Hand

Joined: Oct 13, 2000
Posts: 1936
A programmer's instinct

<code>
public class AlphaNum {
public static void main (String args[]) {
if (args.length != 1) {
System.out.println("Syntax: java AlphaNum <word_to_process>");
return;
}
String m_Alphabets="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int m_Sum = 0;
int aVal = -1;
for(int i = 0; i<args[0].length(); i++) {<br /> aVal = m_Alphabets.indexOf( (""+args[0].charAt(i)).toUpperCase().charAt(0) ) + 1;<br /> if(aVal>-1) m_Sum+= aVal;
}
System.out.println(args[0] + " = " + m_Sum);
return;
}
}
</code>

Any advice?

Ashok.


[ flickr ]
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Originally posted by J Ash:
A programmer's instinct


You have a bad instinct dude. I can't even compile your program
by the way, "procrastinate" = 159 !!!
Ashok Mash
Ranch Hand

Joined: Oct 13, 2000
Posts: 1936
Yes, its time to go and
My apologies!! That was because I used HTML code../code tags. I should have used UBB CODE.. /CODE. And also I should have left a space between < and args[0].... in the code. Either UBB engine or my poor browser was misunderstanding it as a tag, I guess.

Thanks for pointing out the mistake, Mr. Numero Uno!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Teach Yourself : Gain Performance in 1 minutes
 
Similar Threads
What equals 100% in life?
passed scjp 1.4 with 98%
You want more than 100%!
The 666 Calculator - complete with Java Source
Only fun forwards for fun ...