Getting started with Ruby (noob confusion)

Hi everyone!

As the title suggests, I’m new to Ruby (and programming in general), and
am feeling a bit
overwhelmed by the complexities. (However, I must say that Ruby is one
of the few languages
I’d dare to describe as “easy to swallow”.) At the moment, I’m not sure
what to do first. I’ve
downloaded the latest stable build, and am really anxious to make
something happen. My
momentary interest lies primarily in developing simple Windows GUI apps,
and I’ve found that
I’ll require some external tools for said tasks. My last attempt at
coding was with the VB
Express kit (which I eventually removed, due to it’s bloated feel), so
Ruby’s requirement of
external software was a surprise (hey, like I said, I’m new to this, so
don’t come down on me
too hard).

Anyhow, after realizing this, I went on a treasure hunt of sorts, for a
GUI toolkit. I’ve
selected foxGUIb for the job. According to the site, it requires FXRuby,
so I guess my first
question is, is FXRuby included in the current stable Ruby distro, or do
I need to download
it? I did a search, and found several “fxruby” type files on my comp
with the “gem” extension.
(BTW… what the heck are "gems? LOL) I have a bunch of other questions
as well (unrelated to
FXRuby), but I’ll get into those later. Right now, I just need an
itemized list of EVERYTHING
I’ll need to get going.

A few of the projects I have in mind:

A snazzy, skinable web browser with ftp capabilities built-in (among
other things)
An instant messenger
Newsreader
Mail client

As you can see, just very basic stuff.

My complaint with most coding tutorials out there, is their focus on
elaborate methods that
most regular people will never require. I don’t need to build a
chemist’s widget for solving
complex mathematical equations… just nifty little web apps with some
cool features.

If anybody can help me through my journey of Ruby discovery, it would be
much appreciated. : )

PS Something I’ve been wondering for a while; need I be proficient in
math to develop the type
of apps I have in mind? I’m just horrible with numbers. I feel like this
particular weakness
may hamper my dreams of programming.

Nunya Business wrote:

Anyhow, after realizing this, I went on a treasure hunt of sorts, for a
GUI toolkit. I’ve
selected foxGUIb for the job. According to the site, it requires FXRuby,
so I guess my first
question is, is FXRuby included in the current stable Ruby distro, or do
I need to download
it?

If you want to avoid all that hassle, download and learn python. It
comes with the relatively easy to learn Tkinter gui toolkit.

As the title suggests, I’m new to Ruby (and programming in general), and
am feeling a bit
overwhelmed by the complexities.
A few of the projects I have in mind:

A snazzy, skinable web browser with ftp capabilities built-in (among
other things)
An instant messenger
Newsreader
Mail client

As you can see, just very basic stuff.

lol. Ok.

PS Something I’ve been wondering for a while; need I be proficient in
math to develop the type
of apps I have in mind? I’m just horrible with numbers. I feel like this
particular weakness
may hamper my dreams of programming.

Most programs require a facility with numbers. Of course, you don’t
need to understand calculus to read and write to a file. Gui
programming is a more advanced topic in most languages, although some
toolkits make it relatively easy.

Nunya Business wrote:

momentary interest lies primarily in developing simple Windows GUI apps,
GUI toolkit. I’ve
I’ll need to get going.

PS Something I’ve been wondering for a while; need I be proficient in
math to develop the type
of apps I have in mind? I’m just horrible with numbers. I feel like this
particular weakness
may hamper my dreams of programming.

First, welcome to Ruby!

Hmmm…well, I would say that the applications you’ve listed are far
from simple. In fact, they’re quite ambitious for somebody who is new to
programming. (Not to mention, sorta redundant. Why bother to write
applications for which there are already many very good - as well as
free - examples to choose from?)

If I were in your shoes, I’d postpone the whole GUI app goal for a bit
and concentrate on simple applications that run on the command line and
simply print text.

Check out Peter C.'s Beginning_Ruby
[http://www.amazon.com/Beginning-Ruby-Novice-Professional/dp/1590597664].
He has some very entertaining examples that you can work through while
learning programming and Ruby.

Regarding RubyGems: http://docs.rubygems.org/

Good luck!

7stud – wrote:

If you want to avoid all that hassle, download and learn python. It
comes with the relatively easy to learn Tkinter gui toolkit.

Tk can be used with Ruby, as well. Oh, and I’ve heard bad things about
Python, so no thanks.

Nunya Business wrote:

7stud – wrote:

If you want to avoid all that hassle, download and learn python. It
comes with the relatively easy to learn Tkinter gui toolkit.

Tk can be used with Ruby, as well. Oh, and I’ve heard bad things about
Python, so no thanks.

Yes, python is 10 times as fast as Ruby, uses less memory, is more human
readable, has better libraries, is at least as fast to develop with, has
a more active community, and is worthy enough to be used by companies
such as google. Run away.

7stud – wrote:

Nunya Business wrote:

7stud – wrote:

If you want to avoid all that hassle, download and learn python. It
comes with the relatively easy to learn Tkinter gui toolkit.

Tk can be used with Ruby, as well. Oh, and I’ve heard bad things about
Python, so no thanks.

Yes, python is 10 times as fast as Ruby, uses less memory, is more human
readable, has better libraries, is at least as fast to develop with, has
a more active community, and is worthy enough to be used by companies
such as google. Run away.

laugh

Somebody made a comment regarding the Python community and their
attitude problems, on a Ruby site. Thank you for confirming his
assertions. : )

Also, if you’re such a fan of Python, what are you doing here?

Nunya Business wrote:

Tk can be used with Ruby, as well.

require ‘tk’

root = TkRoot.new {title “Test”}

TkLabel.new(root) do
text “Hello, World!”
pack(‘padx’ => 15, ‘pady’ => 15, ‘side’ => ‘left’)
end

Tk.mainloop

dyld: NSLinkModule() error
dyld: Library not loaded: /usr/X11R6/lib/libX11.6.dylib
Referenced from: /usr/lib/ruby/1.8/universal-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap

7stud – wrote:

Nunya Business wrote:

Tk can be used with Ruby, as well.

require ‘tk’

root = TkRoot.new {title “Test”}

TkLabel.new(root) do
text “Hello, World!”
pack(‘padx’ => 15, ‘pady’ => 15, ‘side’ => ‘left’)
end

Tk.mainloop

dyld: NSLinkModule() error
dyld: Library not loaded: /usr/X11R6/lib/libX11.6.dylib
Referenced from: /usr/lib/ruby/1.8/universal-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap

points What’s that? ^ LOL

http://ruby.about.com/od/desktop/p/ruby_tk.htm

Tim H. wrote:

First, welcome to Ruby!

Hmmm…well, I would say that the applications you’ve listed are far
from simple. In fact, they’re quite ambitious for somebody who is new to
programming. (Not to mention, sorta redundant. Why bother to write
applications for which there are already many very good - as well as
free - examples to choose from?)

Well, I want to make my own. My interest in programming was sparked by
the lack of features that I would like to see in the above-mentioned
apps.

If I were in your shoes, I’d postpone the whole GUI app goal for a bit
and concentrate on simple applications that run on the command line and
simply print text.

Yuck. Such progs serve no purpose to me. Anybody can make a console read
text back to them. I want to make something useful.

Check out Peter C.'s Beginning_Ruby
[http://www.amazon.com/Beginning-Ruby-Novice-Professional/dp/1590597664].
He has some very entertaining examples that you can work through while
learning programming and Ruby.

I’ve been reading some stuff. On a side note, It’s my opinion that
examining source code helps, too. I’d like to find some apps similar to
what I have in mind, that are built in Ruby, and examine their code, but
I have yet to find any.

Regarding RubyGems: http://docs.rubygems.org/

Good luck!

Thanks.

Tim H. wrote:

Nunya Business wrote:

Well, I want to make my own. My interest in programming was sparked by

Regarding RubyGems: http://docs.rubygems.org/

Good luck!

Thanks.

Hmmm…well, there’s some good advice in this thread:
http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/253f91456dde8b75/0eb460a545554d24?q=need+serious+help&lnk=ol&

The OP presented himself as a novice seeking advice but turned out to be
a troll. Nevertheless some very talented and sincere Ruby-ists responded
with their best advice. Of course, the OP ended up making a fool of
himself, but you can ignore that.

Good luck!

That thread is as humorous as it is informative. Thank you.
I noticed mention of Chris P., whose material I’ve recently
discovered.

7stud – wrote:

A snazzy, skinable web browser with ftp capabilities built-in (among

need to understand calculus to read and write to a file. Gui
programming is a more advanced topic in most languages, although some
toolkits make it relatively easy.

Or you can try WideStudio that makes many things much easier for you.
You can do drag-and-drop design for the GUI and set attributes in the
tool itself for the basic stuff - like where to display a button, what
text to put in it, etc. Then, you can directly hook up which function
to be called when someone clicks on the button.

more details at: www.widestudio.org

Cheers
Mohit.

Nunya Business wrote:

Well, I want to make my own. My interest in programming was sparked by

Regarding RubyGems: http://docs.rubygems.org/

Good luck!

Thanks.

Hmmm…well, there’s some good advice in this thread:
http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/253f91456dde8b75/0eb460a545554d24?q=need+serious+help&lnk=ol&

The OP presented himself as a novice seeking advice but turned out to be
a troll. Nevertheless some very talented and sincere Ruby-ists responded
with their best advice. Of course, the OP ended up making a fool of
himself, but you can ignore that.

Good luck!

It’s sad to have to say this, but you really do have to get a good
deal of knowledge to build something like a web browser.
Web browsers are simple on the surface, but internally quite complex
and over all pretty amazing.

But lofty goals are good!
aim for them!

Python’s not bad, but a lot of the books on Python are not great
reading. Ruby books mostly are good reading. Seems like the joy of
Ruby comes through in the writing.
The trouble you may eventually run into, is that there are lots of
good Ruby books, but many topics are not covered deeply in any of
them yet. GUI stuff is one of those topics that always gets a brief
intro and not much else. Ruby books have been pouring out this year
and most seem to sell well, so hopefully more specific topics will
start appearing in print over the next year…!

I too recommend Peter C.'s book as a great book for a well
rounded Ruby beginning. Good stuff.

In general though, Python and Ruby are just a lot alike and very
different. Try both! Use both or the one you like best, or the one
that suits your needs best.

One thing I can say about learning Ruby though, it will help you
learn to program and learn to program better by focusing on what
matters and not on low level details. Then later, if you want to do
stuff in C / C++ / Objective-C or some other lower level language,
your mind will already know how to build the program and you can
focus on learning those harder low-level things.

Nunya Business wrote:

Tim H. wrote:

If I were in your shoes, I’d postpone the whole GUI app goal for a bit
and concentrate on simple applications that run on the command line and
simply print text.

Yuck. Such progs serve no purpose to me. Anybody can make a console read
text back to them. I want to make something useful.

I hope you didn’t intend this statement to be as insulting as it might
sound
to someone who spends most of his time writing command line apps.
I just want to say that as someone who often has more open
screen-windows than
X-windows, I know a lot of command line apps that are insanely useful.

Nunya Business wrote:

A few of the projects I have in mind:

A snazzy, skinable web browser with ftp capabilities built-in (among
other things)
An instant messenger
Newsreader
Mail client

As you can see, just very basic stuff.

Consider for a moment why you want to write those apps: I guess it’s
because
none of the exisiting ones has all the features that you want or because
the
existing ones have too many bugs.
Now consider how many people use those programs and how many people
work (and get paid to work) on these programs and ask yourself: why are
those programs still not perfect? Answer: because they are not basic
stuff.
Far from it.

PS Something I’ve been wondering for a while; need I be proficient in
math to develop the type of apps I have in mind?

A firm understanding of maths certainly helps. Especially when it comes
to
designing effective algorithms and such.

I’m just horrible with numbers. I feel like this particular weakness
may hamper my dreams of programming.

You certainly don’t need to be good with numbers to be good programmer.
You don’t need to be good with numbers to be a good mathematician
either.
I know people who are very good at maths and use a calculator for things
like 7+6.

HTH,
Sebastian

On Sun, 2007-09-23 at 08:41 +0900, 7stud – wrote:

text "Hello, World!"

Trace/BPT trap
I must admit, I’ve never used Tk with Ruby before. I use Ubuntu, so I
install the libtk-ruby package, enter your code as you write above, and
voila!

Sounds like your OS’ problem, not Ruby’s. Take it up with the vendor!

Arlen

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs