wood burning stoves*
The moose likes Cattle Drive and the fly likes new to Cattle Drive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "new to Cattle Drive" Watch "new to Cattle Drive" New topic
Author

new to Cattle Drive

kamilla miesak
Ranch Hand

Joined: Mar 06, 2001
Posts: 30
Hello to All,
Well, now I see that Cattle Drive experience will be tougher than I originally thought. I was triumphant when I made Java 1a to work in few minutes, but it turned out that 'making things work' is not the only goal around here . So right now I'm working on my first revision, and I'm struggling! Also, if I have a question re: e-mail and revision - do I reply in e-mail, or post my question on this forum?
Thanks!
Kamilla
Connie Boyd
Ranch Hand

Joined: Feb 22, 2001
Posts: 73
Hi Kamilla!
Welcome to JavaRanch!
As far as asking questions, you should post them in the forum. It will help you fulfill your posting requirements and if any of us can answer your questions it will relieve some of the burden on the nitpickers.
Have fun!
kamilla miesak
Ranch Hand

Joined: Mar 06, 2001
Posts: 30
ok, so why having 100 array dereferences and 100 string concatenations when doing System.out.print within a 'for loop' creates a burden on the program? Can anyone give me a clearer picture?
Thanks a lot.
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
It is an issue of optimization. When you do string concetenation you are creating a lot of unnecessary strings in memory. Strings are immutable, so each time you create a new one, you are creating more items in memory. If there is a way for you not to create all these extra strings, then you should do that.
Same for arrays. If there is a way where you don't have to look up an item in an array inside of a loop, then you should do that.
Bill
Michael Pearson
Ranch Hand

Joined: Mar 11, 2001
Posts: 351
I remember my first real good teacher of code. He was a grizzled, stern professor at Purdue University. All of our assignments were graded based on 3 things: (1) functionality, (2) efficiency, and (3) style.
The JavaRanch reminds me of the lessons I learned years ago. I'm grateful for the refresher course in real world programming while learning Java.
When programming anything it is important to do it well. By learning the "gotchas" and avoiding them society benefits with greater efficiency. In an age of bloated code I for one hope to do my part by trying to continuously improve my coding techniques.
Mike
[This message has been edited by Michael Pearson (edited March 24, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: new to Cattle Drive