Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #2689 > unrolled thread

Ruby for beginners (was: Re: Hello)

Started byPhillip Gawlowski <cmdjackryan@googlemail.com>
First post2011-04-12 10:30 -0500
Last post2011-04-13 20:57 -0500
Articles 9 on this page of 29 — 10 participants

Back to article view | Back to comp.lang.ruby


Contents

  Ruby for beginners (was: Re: Hello) Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-12 10:30 -0500
    Re: Ruby for beginners (was: Re: Hello) Josh Cheek <josh.cheek@gmail.com> - 2011-04-12 12:32 -0500
    Re: Ruby for beginners (was: Re: Hello) andrew mcelroy <sophrinix@gmail.com> - 2011-04-12 12:48 -0500
      Re: Ruby for beginners (was: Re: Hello) Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-12 13:59 -0500
        Re: Ruby for beginners (was: Re: Hello) Vincent Manis <vmanis@telus.net> - 2011-04-12 20:30 -0500
          Re: Ruby for beginners (was: Re: Hello) Stu <stu@rubyprogrammer.net> - 2011-04-12 22:23 -0500
            Re: Ruby for beginners (was: Re: Hello) Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-13 04:08 -0500
              Re: Ruby for beginners (was: Re: Hello) Stu <stu@rubyprogrammer.net> - 2011-04-14 23:01 -0500
          Re: Ruby for beginners (was: Re: Hello) Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-13 04:05 -0500
          Re: Ruby for beginners (was: Re: Hello) jake kaiden <jakekaiden@yahoo.com> - 2011-04-13 07:41 -0500
          Re: Ruby for beginners (was: Re: Hello) Josh Cheek <josh.cheek@gmail.com> - 2011-04-13 07:59 -0500
            Re: Ruby for beginners (was: Re: Hello) Vincent Manis <vmanis@telus.net> - 2011-04-13 09:48 -0500
              Re: Ruby for beginners (was: Re: Hello) Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-13 10:03 -0500
                Re: Ruby for beginners (was: Re: Hello) Vincent Manis <vmanis@telus.net> - 2011-04-13 20:35 -0500
                  Re: Ruby for beginners (was: Re: Hello) Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-14 09:26 -0500
                    Re: Ruby for beginners (was: Re: Hello) Jim Maher <jdmaher@jdmaher.com> - 2011-04-14 10:28 -0500
                      Re: Ruby for beginners (was: Re: Hello) Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-14 10:42 -0500
                    Re: Ruby for beginners (was: Re: Hello) Adam Madrigal <ajmxt9@hotmail.com> - 2011-04-14 10:29 -0500
                    Re: Ruby for beginners (was: Re: Hello) Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-14 11:45 -0500
                      Re: Ruby for beginners (was: Re: Hello) Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-14 14:33 -0500
                        Re: Ruby for beginners (was: Re: Hello) Vincent Manis <vmanis@telus.net> - 2011-04-14 16:43 -0500
                          Re: Ruby for beginners (was: Re: Hello) Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-14 17:12 -0500
                            Re: Ruby for beginners (was: Re: Hello) Vincent Manis <vmanis@telus.net> - 2011-04-14 18:03 -0500
                Re: Ruby for beginners (was: Re: Hello) Charles Oliver Nutter <headius@headius.com> - 2011-04-14 00:38 -0500
          Re: Ruby for beginners (was: Re: Hello) terryowen <terryo.ia@gmail.com> - 2011-04-15 11:45 -0700
      Re: Ruby for beginners (was: Re: Hello) jake kaiden <jakekaiden@yahoo.com> - 2011-04-12 15:30 -0500
    Ruby for beginners (was: Re: Hello) Jim Maher <jdmaher@jdmaher.com> - 2011-04-13 11:14 -0500
      Re: Ruby for beginners (was: Re: Hello) Josh Cheek <josh.cheek@gmail.com> - 2011-04-13 12:27 -0500
        Re: Ruby for beginners (was: Re: Hello) jake kaiden <jakekaiden@yahoo.com> - 2011-04-13 20:57 -0500

Page 2 of 2 — ← Prev page 1 [2]


#2882

FromVincent Manis <vmanis@telus.net>
Date2011-04-14 16:43 -0500
Message-ID<97E30DCF-6B16-470C-AB4A-3C0AEA8DA5AA@telus.net>
In reply to#2873
I've been out of the loop for the last day or so, so I've bundled up my comments rather than try to attach as replies to individual messages. 

1. The whole point of this is to have something useful for newbies. I think most of us put together the environments we each like, and this should probably continue. It's surprising how little of an IDE a beginner will actually use. For example, syntax coloring. I love it myself, but beginners often don't even notice it, or understand why the various words are in different colors. (I taught introductory computer science at the university level for a few decades, and that was what I saw in labs.) Most of the menu commands are unknown territory to most beginners. It seems to me that few beginners see what an asset a good editor is. They ask themselves (reasonably, in my opinion) `what's the least I have to know to get my program working?'. Therefore, while in general adding features isn't going to hurt a beginner, keeping the environment as simple as possible is highly desirable. 

2. I would identify four environments of immediate interest: Windows, OS X, Un*x/GNOME, and Un*x/KDE. Three of these come with quite reasonable editors: TextEdit (OS X), Gedit (GNOME), and Kedit (KDE). (You can argue for different editors on those three platforms, I'm just saying that they are reasonable.) Windows is the exception (you have to ask yourself `what kind of deranged company would ship an operating system without a decent editor?', but this is Windows we're talking about :). Notepad is an OK editor, modulo one `feature': it automatically appends ".txt" to file names. Teaching people to put quotes around their file names is not that big of a deal, I'd say. 

3. I would not care to say that *ix users are more or less sophisticated than any other users. It's certainly true that most unsophisticated users who go out to buy a computer come back with a Windows box, but unsophisticated users might be running on any system. 

4. I had a grand total of five minutes to look at the arcadia web page. It sounded somewhat interesting, and might factor well into these discussions. 

As I wrote this message, I think I'm coming up with a concrete proposal. The `Ruby for newbies' (`Rewbies'? :) page should lead to four different brief tutorials, one for each of the above operating systems/desktops, and should lead people through installing and running simple programs on each of thse systems, using the native text editor. The premium is on doing as few configuration steps as possible: Ruby programs will be run in a terminal/command prompt window, and editing is done using the system's native editor. A longer-term objective is finding an IDLE-like IDE that runs with no effort cross-platform. However, I'm inclined not to let that goal preclude us from doing useful things now. 

Comments? -- vincent

[toc] | [prev] | [next] | [standalone]


#2885

FromPhillip Gawlowski <cmdjackryan@googlemail.com>
Date2011-04-14 17:12 -0500
Message-ID<BANLkTimN5mFVHFd6kaaE8bMbh8wHx4QB4Q@mail.gmail.com>
In reply to#2882
On Thu, Apr 14, 2011 at 11:43 PM, Vincent Manis <vmanis@telus.net> wrote:
>
> 1. The whole point of this is to have something useful for newbies. I think most of us put together the environments we each like, and this should probably continue. It's surprising how little of an IDE a beginner will actually use. For example, syntax coloring. I love it myself, but beginners often don't even notice it, or understand why the various words are in different colors. (I taught introductory computer science at the university level for a few decades, and that was what I saw in labs.) Most of the menu commands are unknown territory to most beginners. It seems to me that few beginners see what an asset a good editor is. They ask themselves (reasonably, in my opinion) `what's the least I have to know to get my program working?'. Therefore, while in general adding features isn't going to hurt a beginner, keeping the environment as simple as possible is highly desirable.

In your experience: Did newcomers to programming achieve good results
with Notepad?

It wouldn't be much of a problem to write a quick batch file that
opens an editor as well as shell (properly linked to from the Start
Menu, too), to provide something like a "Ruby environment" to start
with, after all.


> 2. I would identify four environments of immediate interest: Windows, OS X, Un*x/GNOME, and Un*x/KDE. Three of these come with quite reasonable editors: TextEdit (OS X), Gedit (GNOME), and Kedit (KDE). (You can argue for different editors on those three platforms, I'm just saying that they are reasonable.) Windows is the exception (you have to ask yourself `what kind of deranged company would ship an operating system without a decent editor?', but this is Windows we're talking about :). Notepad is an OK editor, modulo one `feature': it automatically appends ".txt" to file names. Teaching people to put quotes around their file names is not that big of a deal, I'd say.

1) I don't think we should get too hung up on the editor question. I
mean, it'll turn into a holy war sooner rather than later about which
is the One True Editor.

2) Since the prospective Ruby user will be perusing a guide already,
teaching "ancillaries" like saving a file as "myscript.rb" really
*isn't* that big of a deal. They'd be following the guide anyway.

> 3. I would not care to say that *ix users are more or less sophisticated than any other users. It's certainly true that most unsophisticated users who go out to buy a computer come back with a Windows box, but unsophisticated users might be running on any system.

Point taken. Though, I doubt that less sophisticated users will use a
*nix flavour at home, but rather at work.

> As I wrote this message, I think I'm coming up with a concrete proposal. The `Ruby for newbies' (`Rewbies'? :) page should lead to four different brief tutorials, one for each of the above operating systems/desktops, and should lead people through installing and running simple programs on each of thse systems, using the native text editor. The premium is on doing as few configuration steps as possible: Ruby programs will be run in a terminal/command prompt window, and editing is done using the system's native editor. A longer-term objective is finding an IDLE-like IDE that runs with no effort cross-platform. However, I'm inclined not to let that goal preclude us from doing useful things now.


I'm in favour of an iterative approach, too (I didn't make that
obvious, did I?).

The big hurdle is getting a guide written in the first place.
Fortunately, there's pretty much no difference on the basics in Ruby
platform-wise, so the basic understanding of programming/Ruby wouldn't
change across platforms.

So, as a refinement on your proposal: the guides could "split" into
pages for different operating systems (how to get up and running on X,
familiarizing the user with the environment), and then merge back into
a "This Ruby, that's what you can do!" guide, if at all feasible.


The question remaining is: *how* to teach Ruby and/or programming. I'm
a task-oriented person, so I would prefer exercises / teaching along
those lines: teaching Ruby to get stuff done.

Example tasks:
- Sorting photos by name, and shuffling them around the file system
- Checking a news website for new content
- Sending emails to a number of people at once <- doubtful that this
would be useful
- Creating a website to show off photos that are in a directory

I wouldn't teach "high-level systems", like OOP immediately, but once
complex-ish tasks come up, nor would I teach anything that would
require a gem or something like that: Just using the core and standard
library should be sufficient, I think.


-- 
Phillip Gawlowski

Though the folk I have met,
(Ah, how soon!) they forget
When I've moved on to some other place,
There may be one or two,
When I've played and passed through,
Who'll remember my song or my face.

[toc] | [prev] | [next] | [standalone]


#2889

FromVincent Manis <vmanis@telus.net>
Date2011-04-14 18:03 -0500
Message-ID<03D75D07-BB0D-408E-B4CB-B9D47B986B4E@telus.net>
In reply to#2885
On 2011-04-14, at 15:12, Phillip Gawlowski wrote:
> In your experience: Did newcomers to programming achieve good results
> with Notepad?
When I taught people introductory programming, I never covered any more than what happens to be offered in Notepad. To write small-ish programs (say < 100 lines) you need to be able to load and save files, delete and insert text (including maybe cut and paste), and search for text. Global replace comes about the top of the skill set. 

> It wouldn't be much of a problem to write a quick batch file that
> opens an editor as well as shell (properly linked to from the Start
> Menu, too), to provide something like a "Ruby environment" to start
> with, after all.
Yes...set up the paths, ask for what directory is wanted, and away you go. Such a thing could be shipped as an installable file, and let the (tiny) installer add it to the Start menu.

> 1) I don't think we should get too hung up on the editor question. I
> mean, it'll turn into a holy war sooner rather than later about which
> is the One True Editor.
That's why I listed four editors that are likely to be found with each of those OSes. None of them is my favorite, but all are usable for editing small programs. 

> 2) Since the prospective Ruby user will be perusing a guide already,
> teaching "ancillaries" like saving a file as "myscript.rb" really
> *isn't* that big of a deal. They'd be following the guide anyway.
Agreed.

>> 3. I would not care to say that *ix users are more or less sophisticated than any other users. It's certainly true that most unsophisticated users who go out to buy a computer come back with a Windows box, but unsophisticated users might be running on any system.
> 
> Point taken. Though, I doubt that less sophisticated users will use a
> *nix flavour at home, but rather at work.
I think we forget that people who buy `white-box' computers because they're cheap often don't take a Windows license. Often they propose to use Windows illegally, but some use GNU/Linux *because* it's cheap. 

This particularly applies to high-school students, a group I'd think we particularly want to attract into Ruby programming. 

> So, as a refinement on your proposal: the guides could "split" into
> pages for different operating systems (how to get up and running on X,
> familiarizing the user with the environment), and then merge back into
> a "This Ruby, that's what you can do!" guide, if at all feasible.
Agreed.

> I wouldn't teach "high-level systems", like OOP immediately, but once
> complex-ish tasks come up, nor would I teach anything that would
> require a gem or something like that: Just using the core and standard
> library should be sufficient, I think.
Totally agreed. In fact, pedagogically, the current CS craze for `Objects First' is basically teaching students rituals that in fact get in the way of teaching concepts. 

That's why I like the Table of Contents of Chris Pine's _Learn to Program_. It matches the way I think students learn. Start with something simple that does something useful, and work up from there. 

I would not conceive of this newbies' page as being a tutorial on programming. When it gets to that point, a pointer to Pine's book (not the out-of-date first edition) gets inserted. (I verified that it is in at least two suburban Vancouver-area public libraries, so I expect a lot of libraries would have it, in keeping with the `low-cost' notion.)

Having said that, your list of `tasks' (along with perhaps example solutions) is a great idea. That really adds value to the whole thing, and would be relatively easy to build. 

This feels like it's ready to move forward. I volunteered to draft the main page, and I'm feeling like I know what that should look like. I'll circulate something in the next few days. 

-- vincent

[toc] | [prev] | [next] | [standalone]


#2825

FromCharles Oliver Nutter <headius@headius.com>
Date2011-04-14 00:38 -0500
Message-ID<BANLkTi=HxyCcgwCuPGmTN-QsHVxWeo4yiQ@mail.gmail.com>
In reply to#2767
On Wed, Apr 13, 2011 at 10:03 AM, Phillip Gawlowski
<cmdjackryan@googlemail.com> wrote:
> The downside is that JRuby, great as it is, doesn't allow for C
> extensions as seamlessly as the Windows Ruby with Devkit (I'm sure
> Charles will now drop in and correct me :) ). OTOH, the end of a "Ruby
> for newby" guide could include a means of getting a more, er,
> conventional Ruby installed and set up.

I think a DevKit tutorial was posted with JRuby instructions. They
should still be valid.

- Charlie

[toc] | [prev] | [next] | [standalone]


#2969

Fromterryowen <terryo.ia@gmail.com>
Date2011-04-15 11:45 -0700
Message-ID<bb74dbf6-accf-4616-870e-acb112bb2e7e@d19g2000prh.googlegroups.com>
In reply to#2719
On Apr 12, 8:30 pm, Vincent Manis <vma...@telus.net> wrote:
> OK, so here's another kick at the can.
>
> 1. I would be willing to draft a `Totally New To Programming' page for ruby-lang.org, if there's sentiment that this would be a useful thing.
>
> 2. tryruby.org is very meritorious, but doesn't really replace having Ruby on one's own machine. It gives you the experience of interacting with Ruby, but doesn't show you how to transfer that to writing and running programs on your own machine.
>
> 3. An IDE for beginners should be relatively limited, with relatively few dingbats and gizmos to confuse. It should focus on offering basic editing facilities, along with the ability to write and run programs. Beginners don't need API documentation, though a Ruby reference card would probably be handy.
> Such an IDE should be something that can be included with the installers, and depend upon nothing else. Of course the model here is Python's IDLE, which IMHO isn't suitable for serious programming, but on the other hand is very useful for getting started with Python. I used to use it in all my Python courses, even with programmers who presumably knew other editors well.
>
> And that suggests using Tk as the GUI, because that's included in every Ruby distribution. So the one-click installers could thus incorporate a basic IDE that was at least useful enough to get people started.
>
> Is there any sentiment that this would all be a worthwhile effort?
>
> -- vincent

Ruby is on my list of things to learn and every once in a while I go
check things out.  I have a programming background, of sorts (midrange
- think RPG/Cobol, Rexx, VB and Perl) although not recent. Most of my
work is done on Windows and I think the closest I came to actually
learning Ruby was when I downloaded Shoes. I liked playing with the
sample programs and thought the environment was nice, if quirky and
hard to modify. But I know some programming and I just thought there
were too many pieces to deal with. Especially gems that should have
been standard.  (IMO and YMMV)

I do like Scite as an editor, though. I don't remember if it's
Autohotkey or Autoit that comes with it installed and also has a help
file with runnable scripts but it's one of the best approaches I've
seen. I might still be using it if all the virus checkers didn't go
nuts with the resulting programs.

What I would like to see is a true portable version of Ruby, packaged
with a way to make your own executables (or some sort of self-
contained way to distribute programs) without too much trouble. I
think if I would have had that, I would have stuck with it long enough
to actually learn it. (If you look at the newbie questions on any
scripting language, creating an executable is usually one of the top
ten FAQs.)

I play around with Portable Python on my flash drive once in a while.
I don't like it that much but I do think learning either Python or
Ruby would be a good thing.

Terry (back to lurking)

p.s. the worst thing about Shoes was the Tricky Blocks section right
after the Intro. There has to be a better way to do that.  I usually
bail right there and go back to playing with the sample apps.

[toc] | [prev] | [next] | [standalone]


#2710

Fromjake kaiden <jakekaiden@yahoo.com>
Date2011-04-12 15:30 -0500
Message-ID<1c6dbb359023dbe10dbba60a860a613d@ruby-forum.com>
In reply to#2697
Andrew Mcelroy wrote in post #992351:

> This is what TryRuby.org is suppose to be.
>
  i think that TryRuby is a great start, though i agree that making the 
jump from an online irb to actual programming might be frustrating for 
the "total" beginner.  i was in fact confused by irb at first, thinking 
that it was some kind of command line ide or editor, rather than more of 
a reference tool.  obviously once you know what it's for, it's a great 
tool.

  i also used (and still do at times) scite for my first whacks at 
programming ruby, and i think the ease of pressing F5 and having output 
in another pane is a great idea for getting folks to see what they can 
do.

  ubuntu has a "Ruby Browser" package, which is a great concept, but is 
unfortunately incomplete and a bit buggy.  it's basically a list of all 
ruby base classes/modules, as well as Atk, Cairo, Gtk, Gst, and other 
library classes/modules.  the idea is that you click on a class or 
module and up pop the class and instance methods...  by clicking on a 
method, an explaination of the arguments appears.

  if these two could be combined, so that in one pane you'd have the API 
information, in another the text editor window, and in another the 
output - i think it could be a very useful tool for those who are new to 
ruby and programming in general.  this could be combined with the other 
suggestions (all very good in my opinion) about a package which manages 
installation and environment, and with some simple tutorials.

  it's a shame to see folks who would like to get started with 
programming and ruby get frustrated and give up...

 -j

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2772

FromJim Maher <jdmaher@jdmaher.com>
Date2011-04-13 11:14 -0500
Message-ID<3ecfeac02e6c907727e590add1b08fee@ruby-forum.com>
In reply to#2689
I agree that this is an important need.  I suspect Ruby is not as
broadly accepted as it could be because we all assume a basic knowledge
of computers that probably is WAY beyond most people.  But, really, Ruby
is just plain great and we need to figure out how to make it accessible
to the masses.

I believe that many people may balk at "Absolutely New to Programming",
since they may have taken an Intro to Programming using
Basic/Cobol/Whatever.  Perhaps just say "An Easy Start for Ruby", or
something.

I believe the vast majority of the under-served Ruby illiterate are
using Windows (not Macs and not Linux).  In Windows, I think all one
really needs is:
1.  How to download and execute RubyInstaller
2.  How to use Notepad as a program editor
3.  How to access and use a Command Window
4.  How to run a Ruby program in a Command Window

I've TALKED a few people through this, while standing over their
shoulder.  I ain't no great writer, so I'm not gonna be able to help
there.

But one thing I noticed when TALKING is that jargon is a killer.  Very
basic concepts (to me) are WAY beyond the newcomer.  They've never
downloaded and installed nothin' (at least, that they know).  They never
heard of Notepad.  They aren't aware that a Command Window is available
(or what it is or how to use it or why).  And every other word out of my
mouth is Greek to them  (e.g., What's a program?  What's a script?
What's an object? etc., etc.)

I thinkin' we need instructions a 5th grader could understand, who's
only used a Windows computer to play games on Facebook.  Just WHAT to do
and HOW to do it to get Ruby up and running on their Windows platform
and run a simple program (I beg you, please, NOT "Hello World").

After they have it, then we can point them to lots of doc (though
someone needs to prepare a "curriculum" for newbies).

If this takes off, I'll follow the thread and look to see if there's any
way I can help.

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2776

FromJosh Cheek <josh.cheek@gmail.com>
Date2011-04-13 12:27 -0500
Message-ID<BANLkTinGGh=YAzbnh2VWg5NJXuyp6VgCXA@mail.gmail.com>
In reply to#2772
[Note:  parts of this message were removed to make it a legal post.]

On Wed, Apr 13, 2011 at 11:14 AM, Jim Maher <jdmaher@jdmaher.com> wrote:

> 2.  How to use Notepad as a program editor
>
>
Can Notepad do syntax highlighting? I think their editor / IDE should be
able to at least highlight code and if it could also run Ruby, that would be
fantastic. I really liked SciTE. It highlighted the code, it had lines
indicating starting and closing of indentation (newbies need encouragement
to format their code well), and you could run it by pressing f5. I think it
is good to give them something simple enough to understand, yet something
clearly uniquely tailored to writing code (it is simply "cooler", which
makes it more motivating and helps to create an experience).

[toc] | [prev] | [next] | [standalone]


#2812

Fromjake kaiden <jakekaiden@yahoo.com>
Date2011-04-13 20:57 -0500
Message-ID<cccbea8050f08cb4d67008398321b5a1@ruby-forum.com>
In reply to#2776
Chad Perrin wrote in post #992591:

> It used to be the case that the standard Ruby installer for MS Windows
> came with SciTE.  Is that still the case?

  another vote for SciTE!  it helped get me motivated to start 
programming when i was still weary of the linux command line.  the 
syntax highlighting is decent, and the ability to run programs with a 
button push is a huge plus.  only downside i can see is that the "gets" 
command so common in early programs doesn't work with SciTE.
  the license is open source - and while it's an older program it seems 
that it is still actively developed.

-j

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.ruby


csiph-web