Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby, brother of VB?

Reply
Thread Tools

Ruby, brother of VB?

 
 
Mike Cox
Guest
Posts: n/a
 
      03-21-2005
Hi. I am researching a language to switch to after Microsoft EOL'd classic
Visual Basic. Visual Basic.NET is nothing like the old VB. Having been
burned by relying on a commercial vendor, I am on a quest to find a VB like
language that is free from corporate whims. I went on a computer language
site that documented the history of computer languages and their lineage.

It was quite a shock to learn that Ruby may possibly be the brother of VB,
and that Ruby is the son of Algol 60. Just a cursery glance over Ruby
confirmed that my beloved "begin" and "end" are there. Sharing the same
genes as a Algol is quite a statement of pedigree. No wonder 60 percent of
all programers speak VB to their computers. And now, my fellow Algol 60
decendants, I am now close to making Ruby my langauge of choice. My
langauge, VB, is dying a cruel cancer of corporate apathy, but now I have
found its brother so I am rejoicing.

So my question is, what do I need to know to get started from a VB
background?

P.S. Here's the link to the comp. lang lineage chart:
http://www.levenez.com/lang/history.html


 
Reply With Quote
 
 
 
 
Phil Tomson
Guest
Posts: n/a
 
      03-21-2005
In article <(E-Mail Removed)>,
Mike Cox <(E-Mail Removed)> wrote:
>Hi. I am researching a language to switch to after Microsoft EOL'd classic
>Visual Basic. Visual Basic.NET is nothing like the old VB. Having been
>burned by relying on a commercial vendor, I am on a quest to find a VB like
>language that is free from corporate whims.


Well, I wouldn't call Ruby (the Ruby we all speak around these here c.l.r
parts) VB-like (some might call them fight'n words). But it is free
from corporate whims.

>I went on a computer language
>site that documented the history of computer languages and their lineage.
>
>It was quite a shock to learn that Ruby may possibly be the brother of VB,


There was apparently a language which was the precursor to VB which
was called Ruby. That Ruby became VB, however that other Ruby has
nothing to do with the Ruby we're dealing with here on this
newsgroup/mailing list. Actually, about a year ago one of the creators
of that other Ruby (Mike Geary) was hanging out here on c.l.r (I think
he even made the 100,000th post). If he is
still lurking, perhaps he can offer more info on that other Ruby.

>and that Ruby is the son of Algol 60. Just a cursery glance over Ruby
>confirmed that my beloved "begin" and "end" are there. Sharing the same
>genes as a Algol is quite a statement of pedigree.


Well, lots of languages came out of the Algol branch of the
computer language family tree.

>No wonder 60 percent of
>all programers speak VB to their computers. And now, my fellow Algol 60
>decendants, I am now close to making Ruby my langauge of choice. My
>langauge, VB, is dying a cruel cancer of corporate apathy, but now I have
>found its brother so I am rejoicing.
>
>So my question is, what do I need to know to get started from a VB
>background?


Having never coded in VB, I'm not sure I'm qualified to point you in the
right direction, however, I would start by getting a copy of Dave Thomas'
"Programming Ruby" 2nd edition. I suspect you'll find that Ruby is very
different from VB, but if you stick with it I suspect you'll be
pleasantly surprised and you'll probably learn a lot.

Phil

 
Reply With Quote
 
 
 
 
James Britt
Guest
Posts: n/a
 
      03-21-2005
Mike Cox wrote:
> ...
> So my question is, what do I need to know to get started from a VB
> background?


Forget all the VB you've ever learned. Really. I was a VB hacker for
some time. I liked it, it paid the rent, got me published. But habits
acquired using VB will get in the way of using Ruby.

There are essential aspects to Ruby that don't really have a counterpart
in VB. Certainly the approach to OO programming in VB is, um, quite
different than in Ruby.

As others have mentioned, go read Programming Ruby by Dave Thomas. But
also try to find a good book that explains object-oriented programming;
perhaps Designing Object-Oriented Software, by Rebecca Wirfs-Brock.

(I'd be leery of books that focused too much on Java or C#, as they have
their own OO quirks that might impede grokking Ruby goodness.)

And read a lot of Ruby code. Maybe start with the Weekly Ruby Quiz
(posted to this list). See if you can figure out what are doing. Ask
questions. Stick around.

>
> P.S. Here's the link to the comp. lang lineage chart:
> http://www.levenez.com/lang/history.html


Means nothing, really, as it does not indicate just what was borrowed
and to what degree.

James
--

http://www.ruby-doc.org
http://www.rubyxml.com
http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com


 
Reply With Quote
 
vruz
Guest
Posts: n/a
 
      03-21-2005
[sinp all good stuff]
> So my question is, what do I need to know to get started from a VB
> background?
> P.S. Here's the link to the comp. lang lineage chart:
> http://www.levenez.com/lang/history.html


Not sure of the resemblance with Algol, but no doubt there will be a
number of differences between VB and Ruby to get started with.

There are certain things you get with Ruby that you didn't have with
VB, and viceversa.

Bad news first:
* None of the Ruby IDEs available out there resemble to the VB IDE
* You can't create OCX/ActiveX components with Ruby
* The current implementation of Ruby doesn't compile to bytecode or
native executable binary

On the other hand, the good news are really great, and I think they
greatly outnumber the disadvantages
* You get a beautiful and very clean language that doesn't get in the way.
* You usually end up having more time to think about your code, and
you end up writing less due to Ruby's expresiveness.
* There's a great number of libraries available from everything (GUI,
database, web development, graphics, and a large etcetera)
* Ruby is cross-platform and runs wonderfully on unices and Linux as
well as Windows and other platforms.
* On Windows, you can have access to the full array of niceties that
come with the platform. ( COM objects, GUI, Windows API, Services,
etc. etc.)
* It's free !! Free of charge, and free for you to read, learn and
use the source code of Ruby itself (ever wished fixing any of the
bugs inside VB ?)
* Rubyscript2exe can pack your ruby programs inside of a regular .EXE
for deployment
* No Microsoft, no discontinuation of products


To get started with all this on Windows you need 3 things:

* Windows 2000, Windows XP, 2003 or newer (Ruby will work on older
versions of Windows, but the full array of possibilities is better
exploited in the newest

* One-click Ruby Installer downloadable from
http://rubyforge.org/frs/download.ph...ruby182-14.exe

* Optionally, a set of useful libraries for Win32 development:
http://rubyforge.org/frs/download.ph...ls-V.0.0.3.zip

I think most Ruby coders will agree that the best way to get started
is having a look at "Programming Ruby"

( 1st edition downloadable from:
http://www.bdelmee.easynet.be/ruby/pr03a_chm.zip Windows CHM format,
http://phrogz.net/ProgrammingRuby/ Phrogz' annotated PR online,
http://www.ruby-doc.org/downloads/pa...ammingRuby.pdb
Palm Plucker format)

or buy the 2nd. updated and corrected edition that covers Ruby 1.8.x
http://pragmaticprogrammer.com/titles/ruby/index.html

Also highly recommendable "The Ruby Way" by Hal Fulton
http://www.amazon.com/exec/obidos/AS...526443-8888002

Finally, if you're up to a non-traditional approach to technical
writing, not faint hearted and able to appreciate one of the best
things in life is "chunky bacon", there's "Why's (Poignant) Guide to
Ruby" here:
http://poignantguide.net/ruby/
by our fellow rubyist self baptised Why The Lucky Stiff.

Happy coding !

vruz


 
Reply With Quote
 
Dave Burt
Guest
Posts: n/a
 
      03-21-2005

"Phil Tomson" <(E-Mail Removed)> answered:
>Mike Cox <(E-Mail Removed)> wrote:
>>Hi. I am researching a language to switch to after Microsoft EOL'd
>>classic
>>Visual Basic. Visual Basic.NET is nothing like the old VB. Having been
>>burned by relying on a commercial vendor, I am on a quest to find a VB
>>like
>>language that is free from corporate whims.

>
> Well, I wouldn't call Ruby (the Ruby we all speak around these here c.l.r
> parts) VB-like (some might call them fight'n words). But it is free
> from corporate whims.


I have been noticing recently, writing both VB and Ruby, that they do often
look alike (ever so clean and beautiful), but, I think, for different
reasons.

VB looks clean because the syntax is very simple and inflexible, and doesn't
allow you to do all that much. 95% of all VB programs are built-in language
constructs and functions.
Ruby has "everything is an object" and that's a very powerful abstraction.
The clean syntax is clever window-dressing on this very powerful and
consistent system.

While VB makes it easy to do a lot of the things you need to do all the
time, Ruby makes doing more complicated things almost as easy. Dynamic
typing and being able to change classes or objects' behaviour as you need to
is cool. Blocks make it easy to pass code around, which is useful
surprisingly often (coming from a Basic/Java background).
OO + duck typing + blocks = you won't like VB as much afterwards.

>>I went on a computer language
>>site that documented the history of computer languages and their lineage.
>>
>>It was quite a shock to learn that Ruby may possibly be the brother of VB,

>
> There was apparently a language which was the precursor to VB which
> was called Ruby. That Ruby became VB, however that other Ruby has
> nothing to do with the Ruby we're dealing with here on this
> newsgroup/mailing list. Actually, about a year ago one of the creators
> of that other Ruby (Mike Geary) was hanging out here on c.l.r (I think
> he even made the 100,000th post). If he is
> still lurking, perhaps he can offer more info on that other Ruby.
>
>>and that Ruby is the son of Algol 60. Just a cursery glance over Ruby
>>confirmed that my beloved "begin" and "end" are there. Sharing the same
>>genes as a Algol is quite a statement of pedigree.

>
> Well, lots of languages came out of the Algol branch of the
> computer language family tree.


IMHO, Ruby is like Perl, but the object-orientation aspect of it is not
tacked on with sticky-tape, it's right at the foundation where it should be.
And it looks better.

>>No wonder 60 percent of
>>all programers speak VB to their computers. And now, my fellow Algol 60
>>decendants, I am now close to making Ruby my langauge of choice. My
>>langauge, VB, is dying a cruel cancer of corporate apathy, but now I have
>>found its brother so I am rejoicing.
>>
>>So my question is, what do I need to know to get started from a VB
>>background?

>
> Having never coded in VB, I'm not sure I'm qualified to point you in the
> right direction, however, I would start by getting a copy of Dave Thomas'
> "Programming Ruby" 2nd edition. I suspect you'll find that Ruby is very
> different from VB, but if you stick with it I suspect you'll be
> pleasantly surprised and you'll probably learn a lot.


I have coded in VB, but I haven't heard of anything specifically for VB-ers.
But the Pickaxe II [1] is great if it is (as it's reputed to be) as good as
Pickaxe I [2]which I have used, updated to Ruby 1.8. Also check out Why's
(Poignant) Guide to Ruby [3] and/or Matz' Ruby User's Guide [4].

Cheers,
Dave

[1] http://www.amazon.com/exec/obidos/ISBN=0974514055
[2] http://www.whytheluckystiff.net/ruby/pickaxe/
[3] http://www.poignantguide.net/ruby/
[4] http://www.ruby-doc.org/docs/UsersGuide/rg/


 
Reply With Quote
 
James Britt
Guest
Posts: n/a
 
      03-21-2005
Dave Burt wrote:
>
> VB looks clean because the syntax is very simple and inflexible, and doesn't
> allow you to do all that much. 95% of all VB programs are built-in language
> constructs and functions.


Wow. We have very different VB exposure. Most VB code I've worked with
involves numerous custom classes and interfaces, along with assorted
calls to the Win32 API.

Late binding and the Variant data type are quite handy, too, for dynamic
programming.

Writing apps that exposed an OLE automation API (so you can script
instances using external scripts), as well has hosting the Windows
script control (so your application itself can load scripts), was quite
entertaining.



 
Reply With Quote
 
vruz
Guest
Posts: n/a
 
      03-21-2005
> > VB looks clean because the syntax is very simple and inflexible, and doesn't
> > allow you to do all that much. 95% of all VB programs are built-in language
> > constructs and functions.

>
> Wow. We have very different VB exposure. Most VB code I've worked with
> involves numerous custom classes and interfaces, along with assorted
> calls to the Win32 API.


Yeah, you get all sorts of language constructs both in VB and Ruby...
But I bet in VB you can't get something like "Microsoft's Poignant
Guide to Visual Basic" !

you can't beat that


 
Reply With Quote
 
James Britt
Guest
Posts: n/a
 
      03-21-2005
vruz wrote:
>>>VB looks clean because the syntax is very simple and inflexible, and doesn't
>>>allow you to do all that much. 95% of all VB programs are built-in language
>>>constructs and functions.

>>
>>Wow. We have very different VB exposure. Most VB code I've worked with
>> involves numerous custom classes and interfaces, along with assorted
>>calls to the Win32 API.

>
>
> Yeah, you get all sorts of language constructs both in VB and Ruby...
> But I bet in VB you can't get something like "Microsoft's Poignant
> Guide to Visual Basic" !
>
> you can't beat that


Not specifically VB, but:

Mr. Bunny's Guide to ActiveX

http://www.mrbunny.com/mbgtax.html
and
http://www.amazon.com/gp/reader/0201485362

James
--

http://www.ruby-doc.org
http://www.rubyxml.com
http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com


 
Reply With Quote
 
Dave Burt
Guest
Posts: n/a
 
      03-21-2005
"James Britt" <(E-Mail Removed)> came back with:
> Dave Burt wrote:
>>
>> VB looks clean because the syntax is very simple and inflexible, and
>> doesn't allow you to do all that much. 95% of all VB programs are
>> built-in language constructs and functions.

>
> Wow. We have very different VB exposure. Most VB code I've worked with
> involves numerous custom classes and interfaces, along with assorted calls
> to the Win32 API.


I've certainly imported chunks of Windows API, and built pages of wrapper
functions to have them make sense in the VB context... I guess I sometimes
block those memories - maybe a psychological response. But I never got any
value whatsoever out of VB clunky classes. Classes made sense when I learned
Java.

The only VB I code now is behind MS Office, and in ASP (VBScript at least).

> Late binding and the Variant data type are quite handy, too, for dynamic
> programming.


True, but if you declare Variants you don't get context-menus full of
applicable properties and methods in the IDE's code editor. I often end up
declaring a fake variable just to get that list, then deleting it after
writing the line of code. Anyone?
Dim x as RecordSet
x.<look through list, pick the method, check the params it needs...>

> Writing apps that exposed an OLE automation API (so you can script
> instances using external scripts), as well has hosting the Windows script
> control (so your application itself can load scripts), was quite
> entertaining.


Gee, James, that does sound like fun, but I'll leave it to you!

Back to Ruby on the topic of scripts: I often imported
"Scripting.Dictionary" and "Scripting.Regexp" into VB/VBA/VBScript, and
Ruby's syntax sugar around these (hashes and regexps) I found a major
advantage over VB. Not to mention arrays, and having to ReDim Preserve them
to append to them. Argh.

Cheers,
Dave


 
Reply With Quote
 
James Britt
Guest
Posts: n/a
 
      03-21-2005
Dave Burt wrote:
> "James Britt" <(E-Mail Removed)> came back with:
>>Writing apps that exposed an OLE automation API (so you can script
>>instances using external scripts), as well has hosting the Windows script
>>control (so your application itself can load scripts), was quite
>>entertaining.

>
>
> Gee, James, that does sound like fun, but I'll leave it to you!


That was in another life, but, given another thread going on here, I'm
amused to recall that back when I was doing VB (late '90s) I was also
writing what are now buzzworded as "AJAX" apps, using Internet Explorer
and ASP.


James


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Brother MFC 7820N - Brother can't help Chaudhry Nijjhar Computer Support 1 11-03-2006 04:04 PM
Brother printer with server att1016@gmail.com Wireless Networking 2 10-12-2005 04:40 AM
My brother failed 70-315 Robert MCSD 3 03-24-2005 06:57 PM
My little brother Taheah passed Thommy Peanuttkasrarian MCSE 4 06-28-2004 09:05 PM
Brother Intellifax 1270 Fax Machines ? John D Computer Support 4 06-30-2003 12:32 PM



Advertisments