ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Base Conversion from Decimal to Octal and likewise

Post new topic  Reply to topic Goto page Previous  1, 2
 Base Conversion from Decimal to Octal and likewise « View previous topic :: View next topic » 
Author Message
Aldrine
PostPosted: Wed Jul 27, 2011 2:31 am    Post subject: Reply with quote

Novice

Joined: 25 Jul 2011
Posts: 22
Location: India

Vitor wrote:
kimbert wrote:
it is not wise to *ban* either ESQL or Java. It is OK to state that one or other is the preferred language on your site, as long as exception are allowed.




You can also mention that this one exception to an ESQL-only rule is a very stable piece of code with clearly defined & documentable inputs and output & very low levels of ongoing development and maintenance. So it's a good candidate for the one piece of surviving Java that sits in a corner & no-one on site understands how it works.

Unlike (pulling an example out of thin air) the entire error handling and retry logic built into all of the flows which is a problem if it's written in Java with no documentation apart from a few comments in the code and you then downsize everybody on site who knows Java with no notice, no warning and no handover!


Thank you folks for your valuable input;
I agree with Vitor, that usage of well documented code is needed for better maintainability and scalability.

The usage of ESQL vs Java is purely for the choosing of future development or Migration (I hope there is no axing of people onsite).

I have decided to settle for ESQL (to the most possible things which could be implemented from algorithms without taking nitty gritty details) and to use Java for things which isn't too easy to convert to ESQL like maintaining a Hash Table and so on...

Can someone let me know if there is any oher optimised way for Base Conversion? If there is one better that the code i have given earlier.
_________________
--
Aldrine Einsteen
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jul 27, 2011 4:02 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Can someone let me know if there is any oher optimised way for Base Conversion? If there is one better that the code i have given earlier.
I suspect that your code could be made a little simpler. For instance:
- I'm not sure why you need to work with negative numbers throughout.
- You don't need all of the alphabet unless you need to support some *really* strange radixes. The common ones are 2,8,10,16 and 64.
You technique could be extended to support base64, but ESQL has functions for that. So I suggest that you stick at 16.

I suspect that you could get away with a small set of radix-specific ESQL functions, rather than trying to solve the general problem. But I still think Java is the correct solution for this.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Base Conversion from Decimal to Octal and likewise
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.