• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Externalizing strings

 
Krzysiek Hycnar
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • 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
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • 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
 
Lara McCarver
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Ta Ri Ki Sun
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic