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|

Our valued sponsors who help make this site possible
Site24x7: Java Method-Level Tracing into Transactions @ $12/Month/JVM. Sign Up! 

New Relic: Try free w/ production profiling and get a free shirt! 

Javva The Hutt January 29th, 2003

JProfiler
Get rid of your performance problems and memory leaks!

jKool for DevOps
Light up your Apps & get a cool t-shirt


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:


Site24x7
Site24x7: Java Method-Level Tracing into Transactions @ $12/Month/JVM. Sign Up!

New Relic
New Relic: Try free w/ production profiling and get a free shirt!


JProfiler
Get rid of your performance problems and memory leaks!

jKool for DevOps
Light up your Apps & get a cool t-shirt


Back to newsletter 026 contents | All Javva's articles

Efficient password checking

The following fictional interchange DID NOT TAKE PLACE. Anyone suggesting otherwise is completely incorrect, I deny any possibility that I did not make this up.

Joe: Hey Bob, have you got that password checking routine? You need to speed it up and get all the extra conditions by twelve or you lose your bonus.

Bob: Goddammit I know. This is driving me crazy. They want it faster and it has to support all these other damn systems. I've pretty much done them, but I'm having trouble with the MIT realm. It's got these freaky conditions if you try to change your password and it's driving me nuts trying to deal with them.

Joe: Why don't you just stick in the nutter test. You know, the one that no one will hit. It'll satisfy the functional requirements, and if anyone ever hits hit, we can always issue a patch. It's not like this is open source, no one will ever get to see the code.

Bob: You know, you're right. Who the hell logs onto an MIT realm anyway! Let's see ... if you try to change your password, I'll set it to output this stupid error message. That's what I call efficient. This is the fastest password check in the world!

I repeat, this interchange is entirely fictional and has no relationship whatsoever to the Microsoft Windows error message Your Password Must Be at Least 18770 Characters and Cannot Repeat Any of Your Previous 30689 Passwords. Why I'm sure that type of error could be produced in any system. In fact, here is a Java implementation:

public boolean checkNewPasswordIsValid(String password)
    throws InvalidPasswordException
{
  throw new InvalidPasswordException(
      "Your Password Must Be at Least 18770 Characters and "
        + "Cannot Repeat Any of Your Previous 30689 Passwords");
}

Diary of a Hutt

December 4. Well, well, well. All that seemingly pointless and annoying explaining about how Java is perfectly fast enough has brought some unexpected rewards. My section is now becoming a real department and not just a group under HasntGotAClue. Actually, my line management isn't changing, but I'm getting a promotion and some actual dweebs to push around. Yes! Power at last! It's not officially official yet, but we've talked the talk, and cleared the low hanging fruit and ... in case you didn't realize I've been surfing for managerial speak. I don't think I've quite got the knack yet but, hey, its only a matter of finding half a dozen really thin books on how to be a manager. I'm going to try and express myself using real-world concepts, but right know I'm facing a rain dance of rubber-volcanic proportions (the source for these last few can be found here).

December 11. Things are firming. Boris will be my first disciple. Not great material, but good enough. I made a bid for Weevil too. Didn't mention it to him of course, but I can't think of anything funnier than having Weevil under me. For a couple of months, that is, until I have to can him for something or other. But I suspect it's not going to happen. Not as long as Weevil can still breathe.

December 17. Little bastard Weevil can still throw spanners even in his current mostly ignored state. He practically burst a blood vessel when he heard about my proposed group, and then I could swear something popped when he found out about me trying to co-opt him. I saw him having lunch with HasntGotAClue and I didn't even know that people had veins in that part of their face! But by the end of the day the little twerp was smiling away, and I found out the next day that somehow he had screwed things up. I don't know how, but I do know that now I'm having to justify the internal Java performance group as a separate enity when a few days ago it was a done deal.

December 18. Still no freebies. I've dropped hints to each of the J2EE monitor salesmen that the other has given me a mug, but they seem to be too dense to get it. I've decided not to close this quarter. But first I'm going to bring them both to the edge. I'll try to see if they have veins in the same places as Weevil. Think of it as a modern experiment in physical anatomy.

December 18, pm. I made appointments for each of them for Friday, but I'm starting my holiday then, so I won't be here. Boris is going to see them. He has no authority to do anything, but given that he thinks he's Gods gift, he won't let them know that. I imagine they'll have to justify their products from scratch. Knowing Boris, he'll make them think that they have to get him on their side or they haven't got a hope.

December 30. Frantic calls from the salesmen. "Oh dear, I was really intending to sign today", (yeah sure), "but we're having an emergency on the server", (the office couldn't be quieter), "and I'll be too busy all day. Sorry. Call me next week." Boy, these guys are too amateurish. They were dropping the price on the phone, and they both sent me nice presents, bottle of wine and a mug. My freebies at last! Don't you love the end of the quarter. What a great time to buy something. Or not. Well, there's always another quarter. My budget transfers. I bet they didn't even make their quotas this quarter. Still, if you don't want that kind of pressure, you shouldn't be a salesman.

BCNU

Javva The Hutt.


Back to newsletter 026 contents


Last Updated: 2017-04-01
Copyright © 2000-2017 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/javvathehutt026.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us