# Thomas Whalen

Ranch Hand
since Aug 26, 2001
For More
Cows and Likes
Cows
0
In last 30 days
0
Total given
0
Likes
0
0
Total given
0
Given in last 30 days
0
Scavenger Hunt
Ranch Hand Scavenger Hunt
Greenhorn Scavenger Hunt

## Recent posts by Thomas Whalen

Originally posted by Smita Chopra:

Thanks for you input.

But what if second..third...tenth person comes and asks for a ticket. You'll have to see which all seats have been filled. Of the vacant seats you'll have to look for consecutive seats. If consecutive seats are not available you'll have to assign them dispersed seats and update your list of filled seats.
Thanks

In that case, you take what I've already done and then while you're looping through each row, you check for consecutive numbers like this:

If NumberOfTicketsRequested <=5 then
...Loop through row
......If seat[row][seat] is vacant then
.........If seat[row][seat - 1] is vacant then
............counterConsecutive++
.........End if
......End if
...End loop

If counterConsecutive >= NumberOfTicketsRequested then
...// find a way to identify the first seat found in a string of consecutive vacant seats found
End If
17 years ago
I'm only a mere beginner, but...why are you getting questions in a job interview (I thought only highly qualified Java programmers got interviews anymore) and asking them in a beginner forum? :-) I don't mean to sound rude, just not sure where you're coming from on this (other than not being able to come up with some logic in the way of syntax to explain this problem). Honestly, it feels to me like there is either some information missing in that problem, or it's a very simple piece of logic all wrapped up in a rather terse "story", LOL Here is what I *think* is being asked:

If personA asks for tickets, then
...Ask personA for number of tickets being requested
...Get number of tickets
...If number of tickets is greater than five then
......Reject ticket request
...Else
......Loop through each row
.........If number of available seats is >= than request then
............Fill seats in that row equal to request
...............Set number of seats available minus request
.........End If
......End Loop
...End If
End If

Am I understanding the problem correctly?
17 years ago
Hey Nancy. I really appreciate this. I can't begin to tell you how many times I've bounced back and forth between programming languages (maybe programming wasn't meant to be for me), but I am back again from Visual Basic (gave up on it because I didn't feel like hacking a silly work-around just so I could load up a main form without a click event being registered on a radio button) to Java. My own experience tells me that each time you're somehow a step ahead of the last time, regardless of forgotten syntax :-) My email address is 'thewhalens@linuxmail.org'. I will reveal my postal address there, just because "you never know...". Again, thank you VERY much!

Thomas
17 years ago
Hi, I'm asking for assistance in obtaining a cd with the latest J2SDK on it. I'm on a dial-up internet connection, and can _not_ successfully download the J2SDK (for WindowsXP). Would someone be so kind as to snail-mail me a cd with the J2SDK and latest Java Documentation? Please PM if you can help me out with this. I'm trying to write some OOTP (Out Of The Park) utilities for the game on WindowsXP. Thanks much!
17 years ago
There are lots of game-specific questions that could be asked Artificial Intelligence, tile management, game loops, patterns.
19 years ago
I think that post counts result in nothing but senseless posts.
19 years ago
Mainly the reason I am learning Java is that I want to write games using Java. There aren't many good books on Java game programming, and there don't seem to be a lot of good resources on this topic. Would you guys consider adding such a forum? I think that Java would be an "excellent" language to write games in, in terms of AI and modularity. Any opinions on this, or am I the only around here who would love such a thing?
19 years ago
I'm enjoying the Head First Java book, too, Ralph. Right now I'm in the Interfaces section, and honestly am getting bored with it. I'm really wanting to write graphically-based stuff, such as that TankWars game I've been wanting to write for months. Knowing how short my attention span is, if I can just hang on for another 100 pages, I'll get into GUI-based stuff I am wondering why the Listener interfaces weren't talked about much in the book, as I feel that the mouse and keyboard are the interaction orginates in games. Maybe it's all just hidden in the book
19 years ago
Kathy and Bert,
You two have my total support. Never in my life have I met two authors who were this sincere about the quality of a book they wrote. I will be asking Amazon (this was my first purchase from Amazon, I don't even know how to begin asking for a refund on a debit card purchase) for a refund, and if they don't comply I'll take you on your offer to replace the book with a corrected version. Right now I feel very badly for bringing up something that apparently is old news, and in no way do I feel authoriative that you replied so quickly and sincerely to me. Are you and Bert going to continue writing books in this style? I am one fan that hopes you do! Have a great weeken!
19 years ago
Kathy, I do not want to hurt anyone's feelings. I think, that aside from the buggy index in the back of the book, and the frustration that I went through on that particular problem only to find out that I wasted my time, it is a superb book. Please realize that I am not one to stay angry for long, my wife couldn't have put up with me this long.
Being one that has taken a long, on-again-off-again path toward learning how to program, I am very excited to have wrote my own Paper-Rock-Scissors program. Right now it's just a console-based program, but the book is written well enough and excitingly enough that I have not felt compelled to just go diving into the GUI stuff. The one great thing about your book is that you have convinced me that the nuances and mechanices of Java (and programming in general) are far more important than how-to-write-a-GUI-program!
I know that the above mentioned program is nothing to brag about, it is my intention to let any newbie to programming that is looking to learn from a book on how to program in Java, that this book will present the language in a fun light. In short, if I can learn from this book, I feel anyone else can.
Again, as I stated in my first thread about this book (in the other forum, before the thread got moved) I think two components of a prgramming book MUST be correct: (1) printed code and (2) index of book. Otherwise, though I do not believe that this book is deserving of a 10-star rating as Sheriff Paul gave it over on Amazon, I do think it's a small pale of frustrations from being one.
Something that I have been thinking about, as I have been reading this book, is this. You all definitely present your book as being humorous and fun to read, but it worries me that at some point you're going to run into a wall with brainstorming ideas for your unique style of writing programming books. How in the world do you manage to overcome this, keep things fresh, and have you worried that at some point you will just be rehashing the same ol' jokes?
19 years ago
Thanks for your help I'll be heading over to that thread. I don't think it is unrealistic at ALL to expect printed code to compile. Poor grammar I can live with, but a sloppy index and incorrect code I can not. I paid for the book to learn how to program, not to bang my head for an hour then turn to the next page to find out I just wasted my time. Again,thanks for the help!
19 years ago
I won't mention the names of the authors of this book, for one of them founded this site. However, I will say that the grammar in this book is often incorrect, the jokes at times are sometimes offensive, but the WORST part of this book is that the program code is inaccurate. What has finally burned my buttons about this book is the "Code Magnets" section on page 157. The line:

SHOULD be:

Furthermore, MANY of the references in the index section of the book are incorrect (as in references not being on the same page the book says they are). How could the authors of this book do such a bad job of making sure that at least the code compiles and that the references in the index section of the book are correct?
I will ask for a refund from Amazon (not likely to get it). If I get my refund I will consider purchasing books in the future with this author's (actually either of the two) name on it. If I don't, then I will put up a negative review of the book on Amazon. For the most part this book has been a good one, but it is stuff such as I mentioned above that are inexcusable.
If I have my account on this site banned/cancelled, that is fine. To each his own. At the moment I feel like I have been ripped off, as I don't make much money, so going out and buying other books to supplement this one is not a feasible option.
Have a nice day!
NOTE: in the code above, the '&;;' is because this site wouldn't let me post '<;' as part of my code
[ November 21, 2003: Message edited by: Thomas Whalen ]
[ November 21, 2003: Message edited by: Thomas Whalen ]
19 years ago
Hi Lisa,
Is this a homework assignment you are working on? You mentioned that you did not understand an array concept you were trying to apply, and indicated that you don't know how to show the user an input box in a loop. I strongly suggest that you practice on using arrays and loops, before you tackle Object Oriented Programming concepts.
The things I mentioned will pop up all over the place when you are working with OOP, and it will be assumed that you have the necessary programming fundamentals background before tackling OOP. Please don't take my suggestions the wrong way, I just don't want to see you struggle more than you have to
Thank you,
Thomas
19 years ago
Thanks for the replies
I tried my best to convince everyone that I'm a newbie, so no, writing a tutorial on writing games using Java is not something I can do at the moment. If I could, I would be glad to do it. If no one here is programming games, how might I find a forum here for game programming? I haven't seen one, the last time I checked.
Marilyn: I think I'll check out the Cattle Drive.
www.topcoder.com is not for newbies, IMO. I've looked at their example problems at the lowest level (worth the fewest points), and none of them I had the experience in Java to program. That, or my college isn't giving us adequate exposure to programming in the classes.
20 years ago
You said the program asks the user to enter a number " > " 10, yet you entered 10 :? Are you trying to test your program for mischievous users? It also seems like you want to take a number and get all of the even integers up to that number and all the odd integers up to that number. Is that what you are looking for? Please let me try an example, and see if it helps you.
20 years ago