Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!

Peter Rooke

+ Follow
since Oct 21, 2004
Peter likes ...
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
Forum Moderator
Peter Rooke currently moderates these forums:
Newcastle Upon Tyne, England, United Kingdom
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Peter Rooke

When demand in the job market picks up again it would be good if you could say "I studied for (and passed) these certifications during the pandemic".    

Truth is that the computing industry is constantly evolving (or is that revolving) so keeping up to date is just part of the job, and indeed, a good habit to develop.  Any candidate that can demonstrate this will gain an advantage during recruitment.    

Welcome to the machine ;-)
2 weeks ago
Just seen this posted somewhere else.  I've not tried it (yet) but it seems someone has created a docker image and even given instructions on how to use X forwarding to access the GUI.  

The git repository is here;

No idea how any of this this would effect any licensing agreement.  
4 weeks ago

But welsh is something what looks like not really belong to central continental europe.

- as its older than any of those fancy new speaking tongues from over the sea.  
Here's "Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch" featured in a you tube clip of weather forecast on the day it was not raining
1 month ago
It's always entertaining when english speaking folk from other countries arrive in UK towns that have their own dialect/accent.  Even better are conference video calls with a whole host of regional variations.        

I'ld suspect a long list of random dialect words would make pretty strong password and add then add two factor authentication.    
1 month ago
The issue is possibly the code as after so many years I just can't see it being very maintainable.  Somehow I would also expect any documentation will be out of date, so it would be a case of learning the domain knowledge as well.  Since its a structured "military" procedural language that featured the GOSUB and also the dreaded GOTO instructions, code could be quite nasty.    See Candy Grammar  Object Oriented COBOL was a thing, even with CORBA IDL integration mappings, but I'm not sure why!

The problem with having an obscure skill set is that you are limited as to where you work.  I've even known companies use this to try and ensure that developers do not leave.  The talented ones do anyway.  
A few years back I removed all the obscure languages from my profiles, as I never really wanted to see another Informix 4GL/Powerbuilder/ProIV project again.  The [contract] rates where never that good since legacy code is often found in legacy companies.          
2 months ago
I suspect the BeanFactoryPostProcessor interface is what your are looking for.  
Not sure why you would want to extend the actual framework itself, but it is possible.  

2 months ago

a Welsh word that translates roughly as "St Mary's Church in the Hollow of the White Hazel near a Rapid Whirlpool and the Church of St. Tysilio near the Red Cave".

I've never been there.
3 months ago

                    CREATORS ADMIT Java, Java Enterprise HOAX

   In an announcement that has stunned the computer industry, James Gosling,
   Mike Sheridan, and Patrick Naughton admitted that the Java Enterprise and
   Java programming language created by them is an elaborate April Fools prank
   kept alive for over 20 years. Speaking during a recent Software Development
   conference, Gosling revealed the following:

   "In 1991, Sun Microsystems had just terminated their work with the
   32-bit SPARC-V7/SPARCstation project. I had just started
   working with an early release of C++ from Bjarne Stroustrup's
   university labs in Denmark and we were impressed with its elegant
   simplicity and power.

   Mike had just finished reading 'Bored of the Rings', a
   hilarious National Lampoon parody of the great Tolkien 'Lord of the
   Rings' trilogy. As a lark, we decided to do parodies of the Mircosoft
   Foundation Classes (MFC) and C++.  Mike and I were responsible for the
   programming environment. We looked at the C++ language and designed the new
   language to be as complex and cryptic as possible to maximise casual users'
   frustration levels, calling it D-- as a parody of C++, as well as other more
   risque allusions. Then Dennis and Brian worked on a truly warped
   version of D--, called 'Oak'. When we found others were actually
   trying to create real programs with Oak, we quickly added additional
   cryptic features and evolved into 'Green' and finally 'Java'. We stopped
   when we got a clean compile with the following encapsulation:

   myPanel.add(getMyButton()); private JButton getMyButton() { return myButton; }

   To think that modern programmers would try to use a language that
   allowed such a statement was beyond our comprehension!  We actually
   thought of selling this to the Soviets to set their computer science
   progress back 20 or more years. Imagine our surprise when Oracle and
   other US corporations actually began trying to use Java and then J2EE!
   It has taken them 20 years to develop enough expertise to generate even
   marginally useful applications using this 1990's technological parody,
   but we are impressed with the tenacity (if not common sense) of the
   general Java and JEE programmer. In any event, Mike, Patrick and I have
   been working exclusively in C++ on the Apple Macintosh for the past
   few years and feel really guilty about the chaos, confusion and truly
   bad programming that have resulted from our silly prank so long ago."

   Major Java and JEE vendors and customers, including Oracle, and the
   Eclipse Foundation, have refused comment at this time.
   Microsoft limited, a leading vendor of Windows and cloud services,
   including the popular .NET, and C# stated they had suspected this for a number
   of years and would continue to enhance their products and halt further
   efforts to develop Java. An IBM spokesman broke into uncontrolled laughter
   and had to postpone a hastily convened news conference concerning the fate
   of Kubernetes technologies, merely stating 'Virtual Machines will be available Real
   Soon Now'.  In a cryptic statement, Professor Stroustrup the father of C++,
   merely stated that P. T. Barnum was correct.

   In a related late-breaking story, usually reliable sources are stating
   that a similar confession may be forthcoming from Oracle concerning the
   latest cloud based offerings.  And Microsoft spokesman have begun denying that
   the latest Windows product is an internal prank gone awry.

   With apologies to original joke publisher and author; Computerworld and Bernard L. Hayes
Good reference when looking for online man pages.  I like how the various options and/or flags are also searchable;

Explain Shell

Oh!  Disclaimer, the first search example given is a fork bomb which will overwhelm and potentially crash most linux/unix operating systems.    
3 months ago
I've no idea about this book "Professional Java for Web Applications", but you should be aware that Spring has had some fundamental changes since 2005.  Most notably the original versions used XML to configure bean factories.  The latest versions prefer that Java configuration and/or component scanning is used.    

Have you considered looking at the spring documentation, since its free?  Core Spring Framework Documentation
4 months ago
Texas has good food; steaks but I'm not too sure about the beer.  Belgium and maybe Yorkshire for the beer, but not steaks!  
4 months ago

Yesterday I looked out of the window and saw something.  I then glanced at my watch and noticed two things;

1) it was three minutes past eight
2) what I had just seen through the window was written on my watch

What had I seen?  

The watch said 20:03, which when read sideways spells MOON.  

Here's another;

Last night I wrote down the numbers from one to ninety nine.  I then rearranged them into alphabetical order, which number did not move?

In case anyone is clever (or mad) enough the book is here;  Puzzle Book

4 months ago
Are these two annotations related in any way?  I'm really not familiar with @JSonAlias but after a quick web search it appears to be a way of using different names for attributes when deserialising JSON data.

@JsonAlias annotation (since version 2.9) can be used to define one or more alternative names for a property which should be mapped during deserialisation.

In spring the @Profile annotation is used within Java configuration to include [inject] POJO's for different configuration(s) in order to facilitate testing.  Typically you would have different sets of configuration for different environments.  Typically this could be for development, integration testing, UAT/OAT, and live environments.    

Not really sure what technology you are using "multiple incoming response"?  Would it not be better to just deal with each type of request/response individually, putting common business logic into small reusable POJO's?    
4 months ago
Oh - I happen to have a whole unread book of spook puzzles that seem to require some rather odd thinking to solve.  Here's an example;

Yesterday I looked out of the window and saw something.  I then glanced at my watch and noticed two things;

1) it was three minutes past eight
2) what I had just seen through the window was written on my watch

What had I seen?

Annoying thing is I once interviewed for a local developer job which I felt I had a good chance of getting, since I had the technical knowledge and domain knowledge (finance and derivative trading).  Only problem is I was not asked any technical questions, they just kept asking me strange and odd puzzle questions.  Found it annoying and was not really interested in them after that experience.  I do hear that they struggle to find people!    
4 months ago
Not really sure as to what you want to achieve but maybe cryptographic hashing would help?  You should note that this is not encryption followed by decryption, as hashing is a one way function meaning its easy to encrypt but then very difficult to find the original string (decrypt).    

I'll take a wild guess that you maybe want to store passwords that are secure?  If so then you can create a hash of the password string which can be stored safely without any fear that the actual password will ever be found (hacked).  Its just a simple process to compare the hash of a user provided string (at user login authentication) with the stored hash.  If correct they will match exactly.  
However what you cannot do is discover the original password from the hashed value, since then you are trying to break the one way function.

Java Password Hashing
5 months ago