Win a copy of Head First Android this week in the Android forum!

Neil Van Styn

+ Follow
since Jan 18, 2014
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Neil Van Styn

Yeah I'm going to have to get my hands on a copy of a good Object Oriented Programming book. To say I even have a basic grasp on the concept would be stretching the truth a bit.
7 years ago
Well, you're not wrong. But it was a good starting point I thought. I've finished it now and barely know which direction to turn, so it might not have been the "best" in retrospect.
7 years ago
I find the "Beginning Java for dummies" books good at the moment. But they only go so far. I find the light hearted approach and moving at your own pace a good way to learn, albeit slowly.
7 years ago

This was way easier:

Neil is learning lots...
7 years ago

Charles D. Ward wrote:Kudos for the Final Fantasy X references btw.

First thing that came to my mind ;-)

Probably doesn't help that I listen to this most of the time when I'm studying:

Actually it does help. It puts me in a good frame of mind to learn somehow. *zen*
7 years ago

Robert D. Smith wrote:
I will add another link or two that you might add to your reading list. The first is to the Code Conventions for Java Programming from Sun. And the second is JavaRanch Style Guide.


Brilliant, thanks very much. I'll have a read during my lunch break at work. Thanks for your time mate.
7 years ago
That's okay, I can take it. If I'd been doing this for more than a week or so I'd probably take offence. I'm flailing around in the shallow end with regards to my knowledge on the subject, so any advice/ criticism is much appreciated. I'm just a sponge here to absorb everything.

I'm kind of glad my code sucks because if that was "good code" I probably wouldn't be interested in learning Java anymore. ;-)
7 years ago

Anayonkar Shivalkar wrote:Hi Neil,

Welcome to CodeRanch!

Good to see code tags in your first post itself.

If your assignment is not specific to writing your own sorting logic, then you may take advantage of ready-made APIs provided by Java (hint: how about Collections?)

I hope this helps.

Bookmarked it, thanks. When I'm finished this book, I'll really work on taking advantage of APIs and such. Sounds like a good way to go.

Paul Clapham wrote:
As you see your version compiles and runs perfectly well, so technically there's nothing wrong with it, but it does help to write code which other Java programmers will find a little bit easier to understand.

Ah, cool I didn't pick up on that one. Will keep in mind, Cheers.
7 years ago

Michael Romero wrote:Instead of storing each character individually in their own variable I would use an array.
Then I would sort the character array from highest to lowest, there's quite a few algorithms available for sorting.
The main problem with your approach is that it will not scale very well.
What would you do if you had 20 characters? Would you write 20 else if clauses?

I see so there is a way then, good. I thought my approach was a bit tedious. I haven't gotten to arrays and such yet, getting ahead of myself it seems. Looking forward to learning about that and revising the whole thing.

Bear Bibeault wrote:
Variable names should start with lowercase. Alos avoid using variable names that are the same as other items; in this case the enum values.

Noted. I'll take that on-board as it makes good sense.

Thanks guys.
7 years ago
Hi all,

New to Programming and have always wanted to learn Java. So I've taken up Barry Burds "Java for Dummies" and am about half way through it. Loving it so far.

I just wanted to ask someone if I am on the right track though. I wrote the below just as a silly little random victory thing to test out a few things I've learnt so far. I'd like to know if its a good way to set it out? It complies and works fine etc. My concern in the way I've written it revolves around the immense use of the "else if" statements to work out who the winner is. I guess I'm wondering if there is a more efficient way of going about it. Thanks!


7 years ago