[ale] semi [OT] making learning ruby programming fun?

Ed Cashin ecashin at noserose.net
Tue Mar 26 09:18:43 EDT 2013


I've noticed that tech books are not fun unless I have something specific I
need to do.

So to have fun reading about how to use ruby, you need a reason to use ruby.

The nice thing about ruby is that it is pretty good for most high-level
software tasks.  You would be hard pressed to write a device driver for the
Linux kernel in ruby, but most of the time people aren't writing kernel
stuff, so ruby's great.  You just need to find some problem you have that
software can solve.

With that specific problem in hand, you'll be motivated to retain the stuff
you learn about ruby.

At least that's how my own brain works: I need some specific project to
hook my new knowledge onto.

Oh---About garbage collection---That's really a cultural thing.  There is
nothing technical preventing a C programmer from using the good old Boehm
garbage collection library or any other great garbage collection
technologies.  It's just that if you get hired by a team of C programmers,
they have probably already settled on an anti-garbage-collection bias.

  http://www.hpl.hp.com/personal/Hans_Boehm/gc/

Personally, I'm liking garbage collection lately, even though I'm pretty
good at getting by without it.

I was listening to a series of lectures by Richard Hamming lately.  He
pointed out that human beings aren't very good at repetitive tasks, and
you're better off writing software to take care of tedium instead of doing
it manually.  I think I've seen enough memory-allocation-and-freeing bugs
to convince me that humans are not very good at programming garbage
collection manually, so I think it's OK for software to do it.

  https://www.youtube.com/watch?v=2e5_Z6oZ0rM

One observation is that even in a context like Go, where you have garbage
collection in the runtime, you can avoid GC by simply maintaining free
lists and stuff.  That is, you still have a choice when the programming
environment provides GC to optimize away from it, assuming you find some
good reason not to let it do its thing.

They figured out how to make garbage collection take work pretty
efficiently, though, in the late 70s and early 1980's, though.  Because
it's a cultural thing, I doubt it's possible to do a real experiment:
People who dislike software-automated garbage collection won't want to use
it, and people who like it will not be interested in doing it manually.

  Baker 1978: List Processing in Real Time on a Serial Computer
  http://dl.acm.org/citation.cfm?id=359470

  Lieberman 1983: A Real-Time Garbage Collector Based on the Lifetimes of
Objects
  http://dl.acm.org/citation.cfm?id=358147

(If anybody knows other seminal papers on high-performance garbage
collection, please share.  It turns out it's relevant to stuff like
distributed file systems.)



On Mon, Mar 25, 2013 at 10:39 AM, Ron Frazier (ALE) <
atllinuxenthinfo at techstarship.com> wrote:

> Hi all,
>
> As some of you know who've been following my prior threads, I've had a
> long time interest in learning a modern programming language.  I've had
> difficulty putting the proper time into the studies, but I'm always
> genuinely interested in the information I learn here.  Leam had convinced
> me that GO was a great language, and I believe it is.  I was going to
> tackle that, but I have misgivings about its lack of popularity in the
> market place.
>
> According to:
>
> http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
>
> GO ranks between 51 and 100 in usage, and the percentage is so low it's
> not listed.  So, like it or not, learning GO might be a skill few people
> want.  I decided to defer that.
>
> Most recently, I decided to learn the specific language of the MetaTrader
> currency trading platform so I can build a tradebot.  I am working on that
> slowly.  Unless I get really good, it is unlikely someone will hire me for
> that.  The objective would be for the tradebot to make money using my own
> account.
>
> So, I still have an interest in learning a general programming language.
>
> I'm interested in a modern garbage collected language, preferably multi
> paradigm, with safe I/O and system calls, that can be compiled, and that
> doesn't care about white space.
>
> See this comparison:
>
> http://en.wikipedia.org/wiki/Comparison_of_programming_languages
>
> I've chosen Ruby as my project language.
>
> According to the link posted above, the top 10 languages, and some of the
> reasons I've rejected some of them, are as follows.  No offense is intended
> to anyone that programs in these languages.
>
> 01) Java - security problems
>
> 02) C - not modern garbage collected
>
> 03) Objective C - Apple centric primarily
>
> 04) C++ - not modern garbage collected
>
> 05) C# - MS centric primarily
>
> ------------
>
> 06) PHP - security problems
> per
> http://en.wikipedia.org/wiki/Php
> "About 30% of all vulnerabilities listed on the National Vulnerability
> Database are linked to PHP."
>
> 07) VB - MS centric
>
> 08) Python - cares about white space
>
> 09) Ruby - This is my choice.
>
> 10) Perl - does not have safe I/O and system calls
> per
> http://en.wikipedia.org/wiki/Comparison_of_programming_languages
>
> -------------
>
> So, having said all that, I have some Ruby questions.
>
> A) I have the "PickAxe" book on Ruby 1.9 by Dave Thomas.  Is that a good
> resource for learning, or do I need to upgrade to a Ruby 2.0 book now that
> version 2 is out?
>
> B) Does anyone have any experience compiling Ruby either through Rubinius
> or JRuby or otherwise?
>
> See http://patshaughnessy.net/2012/2/15/is-ruby-interpreted-or-compiled
>
> Finally, I've observed that reading one of these programming books is
> about as much fun as reading the US tax code.  You get a thousand little
> examples of things like using for next loops to do a factorial.  Now that's
> exciting.  I've seen maybe 1 of 100 books, primarily from Deitel and Deitel
> or the Head First series, that make learning programming fun.  They present
> you with real world applications, simplified, that are interesting.  They
> let you get something you can interact with on the screen quickly and work
> on learning how it works and tweaking it.  For example, a simulator of an
> ATM machine.  An actual working realistic program.
>
> C) So, does ANYONE know of a Ruby book that would make learning the
> language FUN, or at least moderately interesting?
>
> As always, any help is appreciated.
>
> Sincerely,
>
> Ron
>
>
>
> --
>
> Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9 Mail.
> Please excuse my potential brevity if I'm typing on the touch screen.
>
> (PS - If you email me and don't get a quick response, you might want to
> call on the phone.  I get about 300 emails per day from alternate energy
> mailing lists and such.  I don't always see new email messages very
> quickly.)
>
> Ron Frazier
> 770-205-9422 (O)   Leave a message.
> linuxdude AT techstarship.com
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



-- 
  Ed Cashin <ecashin at noserose.net>
  http://noserose.net/e/
  http://www.coraid.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20130326/c19370f3/attachment-0001.html>


More information about the Ale mailing list