Brittany Taylor

Greenhorn
+ Follow
since Sep 30, 2019
Brittany likes ...
Java Linux Python
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
5
Given in last 30 days
5
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Brittany Taylor

Liutauras Vilda wrote:Brittany Taylor, welcome to the Ranch.

Few comments on naming.

1. Class names supposed to start with an upper case. So in your case that would be PhraseOmatic.

2. When you declare an array, do not name the variable which includes something sounding like List (i.e. wordsList). List is an interface in Java, or simply think - yet another data type. So to eliminate confusion for your code reader whether it is actually an array or list, find some other variable name which tells the same, just does not include this detail.

Now that you have something more meaningful, look how the process of building the phrase become more exciting:

This is really how the sentences are being built, isn't it? out of nouns, adjectives, verbs...



Thank you for the information . The naming conventions are old habits, I'll do what I can to make them more standard. In terms of using the term 'List' in my variables, I was just copying the book, though I did not know about the List interface in Java, so I am glad to know that to kill any bad habits early on and appreciate the tip. I can see your point on using descriptive names as well, to help with recalling what each list functions for.

Junilu Lacar wrote:...is not much different from the prior Thinking in Java books.


That's good to know. Won't have to shell as much money if I go to buy that one in a while after working through Head First. I feel like I could get through it, but it'd take a bit more for me to grasp the concepts without a prior foundation. Might try a few chapters to see how I do, though. Sometimes a book can suprise you if you click with the author's writing style and tone.
2 weeks ago

Campbell Ritchie wrote: I liked the 2006 edition, but didn't like the more recent Java8 edition, however. You will find TIJ moves much faster than HFJ and goes to a much more advanced level.



What didn't you like about the more recent version, if you don't mind my asking?

But I definitely got the impression that TIJ was well written and had good info, but I felt like if I didnt go into the intermediate stuff of that book without at least a small foundation I'd have a harder time clicking the concepts together. Could be just that I am over-thinking the issue,  too lol.
2 weeks ago
I really appreciate the warm welcome and help! I had to go to my 9-5, so I didn't want to reply until I had a chance to try what was suggested .

Carey Brown wrote:Lists should be enclosed in braces {...} and not parenthesis (...)


This fixed it! Thanks, looks like it was the preferable user typing error compared to me not installing my dependencies in Linux right... whew!

Junilu Lacar wrote:Have you been taught how about methods yet? ... I'm not clear on what you mean by "let the program word-wrap" and "not do it for the IDE" -- ... IDEs like Eclipse and IntelliJ IDEA ...


Not too much on the methods, no. I have fiddled with Java in the past but never in advanced enough of a way to draw from that knowledge now with confidence or from memory.  I was floating between coding languages for longer than I should have been. Was going to go C# before Java, but Java is easier to set up across all of my platforms so Java it is lol. Plus, Java and C# have plenty in common if I want to actually jump from Java over at a later time once I've learned enough to be proficient.
For the word-wrap portion, with some coffee to help me think I can see that I misunderstood the quote out of the book to mean not to hit return while defining any statements, but it really just meant not to hit return in the middle of a String. Which... duh I should have been able to piece that together hahaha. I'm going to blame the evening pre-Monday blues for that one :P.
That stuff is good to know about with the editors, though, I do appreciate that information. VS Code has been good to me in formatting thankfully, but I'll keep that in mind if I want to move to a different IDE to try it out at some point.

It's really rad that I ended up on one of the author's site without intending to, though! Is she still active here? And despite this book being Java 5.0 (and the most current edition that I'm aware of) compared to the Java 12 that is out now, I still don't see a book as highly recommended for learning the stepping stones of a language. Props for that! I debated between this one and Thinking in Java, but that seemed a bit dense for hopping back into the learning game. I took a break from coding for school relating to medical coding, but now that I'm working in that field now and out of school I figured it was time to start learning the coding I'm more interested in.
2 weeks ago
Hi there, I'm new here but joined because everyone seems nice and knowledgeable.

I'm trying to learn Java, so I have started working through the Head First Java book and came to the Phrase O' Matic program. I've seen posts on here about this program, but not for my specific issue.
Google searches didn't bring up my specific problem, or clues enough for me to problem-solve on my own, either. I apologize if I missed something in my search since yesturday, but I did try to find this before posting.
Following is the code, written just as it is in the book, sans returns since I was under the impression that you are supposed to let the program word-wrap and not do it for the IDE in Java (please correct me if I'm wrong ).



This code gives me these errors:




I honestly have no clue what I am doing wrong, and I don't know what identifier is needed, nor why it is expecting ')' in odd places. I am running VS Code on Linux Mint, if that helps as well. I have the JDE from Oracle installed as well as Mono.
Thanks in advance for any advice you can give as to where I went wrong! If this seems to be a duplicate thread because I missed something, please feel free to let me know and direct me to the thread, as I didn't see it on my first stroll through the search.
2 weeks ago