Forum: Ruby Ruby newcomer

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
b.trapp (Guest)
on 2005-12-07 18:31
(Received via mailing list)
Hi all!

I'm totally new to ruby (and don't have much experience with
programming at all) and need to implement a program (for school) which
shows a solution for the nQueensProblem. It should be able to show the
solutions even if the "chessboard" is bigger than 8x8!
Can anyone give me some ideas how to get this program done quickly?

best regards Bernhard
James G. (Guest)
on 2005-12-07 18:35
(Received via mailing list)
On Dec 7, 2005, at 10:27 AM, BAT wrote:

> Can anyone give me some ideas how to get this program done quickly?

What part are you having trouble with?  Dive right in and then just
post questions here as you have them.  If you back yourself into a
corner, we'll get you out.  ;)

James Edward G. II
peter (Guest)
on 2005-12-07 18:39
(Received via mailing list)
BAT wrote:

>
>
>
>
Firstly you gain ten points for being honest and telling us that you are
asking us to do your school work.

However you loose all these points and more for not using that
indispensable programming tool...

GOOGLE

Try "n queens problem" and just remember than unless your teacher is a
complete idiot they will have done this too.
ef (Guest)
on 2005-12-07 18:47
(Received via mailing list)
On Thu, Dec 08, 2005 at 01:27:35AM +0900, BAT wrote:
> Can anyone give me some ideas how to get this program done quickly?

Asking a mailing list to do your homework for you is poor form.  I
suggest you google "n queens problem" and you'll find many good
resources.

When you have a Ruby-specific question, we'll be glad to help.

regards,
Ed
b.trapp (Guest)
on 2005-12-07 19:08
(Received via mailing list)
I'm sorry if you felt like i'm trying to get the code from you! That
wasn't the thing i was asking for!! I use to do my homework myself. I
just wanted to know which is the best way to start solving the problem
as a person without knowledge in programming.

anyway, thanks for your quick replies
leavengood (Guest)
on 2005-12-07 19:32
(Received via mailing list)
As others have said, use Google or whatever materials your teacher has
provided to get the basic algorithm for solving the problem. Then code
that algorithm in Ruby. If you look at some of the quizzes and
solutions on rubyquiz.com, you will quickly see that even simple
problems can be solved in many different ways in Ruby. It is a very
flexible language, which is why so many of us enjoy it so much.

Ryan
ruby.stuff (Guest)
on 2005-12-07 22:37
(Received via mailing list)
Paul M. (Guest)
on 2005-12-08 01:30
(Received via mailing list)
Have a look at the Ruby Q. site.

Chess Variants Quiz. Might give you some ideas.

http://rubyquiz.com/quiz35.html
http://rubyquiz.com/quiz36.html
chris (Guest)
on 2005-12-08 17:17
(Received via mailing list)
Well, it won't help you with your homework, but if you're looking for
an introduction to Ruby aimed at those with no previous experience, I
wrote this:

  http://pine.fm/LearnToProgram/

Let me know if you get stuck or anything.

:)

Chris
This topic is locked and can not be replied to.