Forum: Ruby Ruby newcomer

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
41a14b3581cfcdb9b710e0bc89d3a49b?d=identicon&s=25 b.trapp (Guest)
on 2005-12-07 17: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
4299e35bacef054df40583da2d51edea?d=identicon&s=25 James Gray (bbazzarrakk)
on 2005-12-07 17: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 Gray II
6d9bf78ca49a017e9e3e6b0357b6c59e?d=identicon&s=25 peter (Guest)
on 2005-12-07 17: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...


Try "n queens problem" and just remember than unless your teacher is a
complete idiot they will have done this too.
036a1b88dafaab8ffd73a8b0a74b5b38?d=identicon&s=25 ef (Guest)
on 2005-12-07 17: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

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

41a14b3581cfcdb9b710e0bc89d3a49b?d=identicon&s=25 b.trapp (Guest)
on 2005-12-07 18: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
4b174722d1b1a4bbd9672e1ab50c30a9?d=identicon&s=25 leavengood (Guest)
on 2005-12-07 18: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, 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.

74ec908585ddd288f13a9b4f5f9964ef?d=identicon&s=25 ruby.stuff (Guest)
on 2005-12-07 21:37
(Received via mailing list)
8b38c58c0926c1a4690a559466e08828?d=identicon&s=25 Paul Mcardle (paul-au)
on 2005-12-08 00:30
(Received via mailing list)
Have a look at the Ruby Quiz site.

Chess Variants Quiz. Might give you some ideas.
B464ff27d7d3b0750a7bfe2717c49d2d?d=identicon&s=25 chris (Guest)
on 2005-12-08 16: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:

Let me know if you get stuck or anything.


This topic is locked and can not be replied to.