• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Externalizing strings

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I've been revising the source code in my SCJD project again, and was thinking about externalizing string. Hmmm... does it make sense for that project, isn't it overkill?? Or maybe it would be a nice thing to mention in choices.txt in a kind of "future improvements" topic?? What do you think??

Take Care
Krzysiek
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Krzysiek,

What do you mean by "externalizing Strings"? Are you talking about putting your Strings into a bundle for internationalization? Or something else?

(If you are looking at internationalization, I think it is really nice, but beyond specifications - so you wont get extra marks for it. But it would be good to mention that you thought of it in your design choices document.

Regards, Andrew
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since there is a database-related requirement about "8-bit US-ASCII", I am not certain that it truly makes sense to externalize strings. If the requirements specified ISO-Latin, it might be a different story...
 
Krzysiek Hycnar
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Ok, this is my fault I was not specific enough. By externalizing strings I mean what Andrew said - putting the strings that are normally hardcoded into a bundle that is located in one place and it's easily replaceable with another set. This is just a temptation, and I know I won't be given extra score for that, so I think this is one of this kind of temptations I will resist

BTW. I thought "externalizing strings" is quite common notion, but hmmm... maybe I'm to much tied to the eclipse IDE that provides that facility.

Take Care
Krzysiek
 
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Krzysiek Hycnar:
- putting the strings that are normally hardcoded



Strings are never "normally hardcoded"

I dunno if those got me any extra points but it's force of habit.
 
Krzysiek Hycnar
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Haha nice shot !! It's not a good practice to hardcode them, but I bet most of us do it

Krzysiek
reply
    Bookmark Topic Watch Topic
  • New Topic