Hey guys have been learning the basics of ruby and practicing some
simple ruby scripts. However i am looking for practice programming
questions/papers/material to test my knowledge and so that i can get
some good practice in ruby programming so that i am confident about my
basics.
Please could you’ll provide some links to sites or certain books which
have topic wise questions in ruby(for ruby scripting).
I felt the book Eloquent Ruby was a nice book to work through. It has
a small project which is used and build on throughout the book as new
concepts are learned then applied.
Thanks a lot Stu and Brandon,
Stu the link is pretty helpful and the kind of thing i was looking
for.Will check the book u recommended 2.
Brandon i had actually seen Prolog Site and coding Katas and had already
solved some of those problems but the issue was that it barely required
the use of Hashes/Classes/Methods/Modules and even if it did since im a
newbie wasnt able to get where to apply it-Hence was looking for more
ruby topic specific questions.
Your scope of thinking is too narrow. You want general problems that can
be interpreted for any language.
Not necessarily, a site focused on Ruby challenges could allow you to
upload your code and check it’s correctness. For example, rubeque.com
and rubymonk.com there are also sites like you describe which attempt to
work
for any language, such as codechef.com, but I’ve never been very happy
with
any of the ones like this that I’ve seen, they tend to favour low level
languages.
Project Euler and Rosalind are great for it, and coding Katas are some
to go on as well. Sharpen your Google Fu, it will serve you well in the
future.
Never tried Rosalind, but I’d be hesitant to recommend Project Euler.
It
will sharpen your problem solving and algorithm skills, but won’t
require
you to learn anything about Ruby beyond some basic data types and
functions. It also requires a much better understanding of mathematics
than
most people have, making many of the questions inaccessible.
On Mon, May 20, 2013 at 04:44:49AM +0900, Brandon W. wrote:
Your scope of thinking is too narrow. You want general problems that can be
interpreted for any language.
Project Euler and Rosalind are great for it, and coding Katas are some to
go on as well. Sharpen your Google Fu, it will serve you well in the
future.
I think the best approach to very early practice is to use the language
for purposes that are useful to the person wanting to practice.
Exercises, koans, and puzzles have their place, but doing administrative
scripting on Unix-like systems, simple library development to eliminate
duplicative coding for things that the programmer ends up doing over and
over again while writing other programs, and simple Web development with
eruby and very lightweight frameworks (e.g. Sinatra), are all great ways
to practice the craft at a beginner level.
Of course, some of that depends on using a Unix-like environment and
having some interest in the way things work beyond point-and-click
interfaces, so if you lack those things you may be stuck with exercises,
koans, and puzzles for a while.
On Mon, May 20, 2013 at 04:41:52AM +0900, Stu wrote:
I felt the book Eloquent Ruby was a nice book to work through. It has
a small project which is used and build on throughout the book as new
concepts are learned then applied.
I haven’t seen the “bastards book”. I’ll have to check that out.
These days, my favorites to recommend are:
either Everyday Scripting with Ruby or Eloquent Ruby (pick at least
one, maybe both)
Practical Object-Oriented Design in Ruby
Ruby Best Practices
Metaprogramming Ruby
. . . pretty much in that order, for leaning to do quality software
development in Ruby in general. There is a glut of excellent
programming books for Ruby, however; our fun little language gets well
more than its fair share of good texts.
I also generally find myself compelled to point out that for purposes of
learning to do quality software development in Ruby, everyone should
avoid The Book of Ruby. It’s awful, and I’m shocked that No Starch
Press published it.
Also I am actually practicing direct scripting in ubuntu and it is
excellent practice.
Ubuntu is a good place to start. Hit up FreeBSD once your comfortable
enough to remove the training wheels. Also I want to second Chads
recommendation of MetaProgramming Ruby. It’s does a great job
exploring the ruby object model and functional style.
@Chad P.
LOVED the book ‘Everyday Scripting with Ruby’
great book for learning both good scripting and ruby. One of the best
texts ive read and the well built exercises ensured clearing up of any
doubts or conceptual-doubts i had.
Also I am actually practicing direct scripting in ubuntu and it is
excellent practice.
Also I am actually practicing direct scripting in ubuntu and it is
excellent practice.
I’m pleased you found it helpful.
Ubuntu is a good place to start. Hit up FreeBSD once your comfortable
enough to remove the training wheels. Also I want to second Chads
recommendation of MetaProgramming Ruby. It’s does a great job
exploring the ruby object model and functional style.
FreeBSD is my favorite OS these days, so of course I’m going to agree
with you here – and “remove the training wheels” is pretty much the
point in learning Ruby where you would read Metaprogramming Ruby, too.
I think you read to much into it as it wasn’t a vs. thing. I could
have easily suggested gentoo or funtoo over ubuntu. In fact the
suggestion for BSD in general is to explore diversity and see the
contrast. Maybe in the same regard as suggesting Scheme, Smalltalk or
( awk and posix ) to the the OP to better see how Ruby’s syntax
evolved from other languages.
The idea is to recommend “software”/“thing” for use evaluation to find
the best fit for their personal taste and/or level of expertise. In no
way to “tell” them what to do. reread both your statement and mine
tell me which one comes off more or less pithy.
I have been working with BSD since the 90’s and my recommendation
didn’t come with any intentions to create a vs debate nor will it
ever. In the world of open source diversity and the freedom to choose
(with experience to know what to choose) is the sign of a master
craftsmen who, does not need to be told what to do; while
understanding the true cost of freedom with the sheer power at their
fingertips while flowing between both ruby and the shell.
Non the less good luck OP. Happy hacking and enjoy your time grokking
a great and unique language created by a programmer who truly thinks
differently and “gets” the joy of programming.
On Wed, May 29, 2013 at 1:08 PM, Brandon W. [email protected]
wrote:
I don’t see why you would suggest anything “over ubuntu”.
Learning to program (or script) with Ruby has nothing to do
with the used operating system or (even less) Linux distro.
It was brought up in conversation in regards to pedagogy in the same
respect that grokking meta-programming concepts and algorithms in
contrast to using predefined higher order methods or external library
gem which may only teach the learner domains but not computational
logic.
By suggesting anything which may provide less “training wheels” per
say I am merely recommending the OP to explore other options when they
are comfortable with these new tools and operating systems.
The idea that the learner has “freedom” to choose how they skin the
cat is essential to their exploratory growth and cognitive development
which will position them to become great programmers if they choose
that as a career.
Finally FreeBSD and DragonFlyBSD both provide an excellent exploratory
environment to learn UNIX proper with minimal hand holding hence
leaving the end user the power to build upon such skills learned
beyond programming paradigms through grokking automata in an agnostic
low-leval/high-level mental process.
You may think that operating system level programming has nothing to
do with ruby but I promise you there are many projects which focus on
using ruby for such things (portupgrade/homebrew/rake). Ruby isn’t
just for web programming and is perfectly suitable for shell
programming as well.