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

Dylan Northrup ale at doc-x.net
Wed Mar 27 11:50:55 EDT 2013


On Wed, Mar 27, 2013 at 10:39 AM, Jim Kinney <jim.kinney at gmail.com> wrote:

>
> On Wed, Mar 27, 2013 at 10:16 AM, Ron Frazier (ALE) <
> atllinuxenthinfo at techstarship.com> wrote:
>
>>
>> It's just that I'm philosophically opposed to having the way the program
>> LOOKS to determine whether the program FUNCTIONS.  And, it seems to me,
>> that if the program doesn't function for that reason (whitespace), that it
>> would be insanely hard to determine where the flaw is, since you're looking
>> at the logic and you KNOW it works.
>>
>
> tying visual structure to operant functionality is not a bad thing. It
> actually makes some portions of debugging very, very easy - look for the
> visual pattern of improperly nested indentations (secret - use a 2 or
> 3-space indent - makes it clear without eating too much horizontal space).
> Set up vim or emacs to use your preferred space count on <tab> press.
>
> I find curly braces a visual distraction( and nearly impossible to write
> well by hand). Using pure whitespace as enclosures is subtle without being
> cryptic. As i learned more python, I found myself using very formal
> indentation is everything from bash to SQL.
>

Indentation and curly braces are not mutually exclusive.  I set up vi to
for my preferred tabspace (2) and to expandtabs by default.  The large
downside of defining blocks by space is there's no way to "Go to the end of
the matching whitespace" in vi (or some similar editor) like I can with
braces (or parens or brackets).  As soon as someone can show me how to do
that for python code, it'll be one huge hurdle for me.  I find the 'do ...
end' blocks in ruby annoying for precisely the same reason and end up using
braces there instead.

And, while the whitespace thing annoys me, my beef with Python (having
grown up a Perl hacker) is a) the idea that there's only ONE way to do it
in Python and b) the endless subclassing making it difficult to find out
what your code's doing without having a Python IDE.

-- 
Dylan Northrup
"Adversity is just change we haven't adapted ourselves to yet."
  - Aimee Mullins
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20130327/60780baf/attachment.html>


More information about the Ale mailing list