Re: Fruit basket program in Boo

  • From: "Octavian Rasnita" <orasnita@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Mon, 22 Oct 2007 17:19:22 +0300

Yes I know that, but how can this help me?
It could help me if I will hear that the indentation level is at 2 chars and if I would also remember that the indentation level should be 2 chars (or something else) because the code should allign with another part of the code.

But I don't use to remember the indentation level of other parts of the code, and I don't find it productive to need to go back or forward just to find the correct level of indentation I would need to use.

It could be easier for the sighted to create blocks of code by using the same indentation level, but for the blind it is not an advantage.

Octavian

----- Original Message ----- From: <james.homme@xxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Monday, October 22, 2007 2:05 PM
Subject: Re: Fruit basket program in Boo


Teddy,
EdSharp tells you at what level the indent is. For example, if you set it
to indent your code two spaces, it will tell you that your code is indented
at level 1. You can get JAWS to tell you anything you want when you set up
a sound scheme for it. I have mine set up to play piano notes at different
indent levels because I have perfect pitch and can associate notes with
levels.

Jim

James D Homme, , Usability Engineering, Highmark Inc.,
james.homme@xxxxxxxxxxxx, 412-544-1810

"It's more important for me to start to do the right thing than it is to
wait until I think I
can do it just right."





            "Octavian
            Rasnita"
            <orasnita@xxxxxxx                                          To
            om>                       programmingblind@xxxxxxxxxxxxx
            Sent by:                                                   cc
            programmingblind-
            bounce@freelists.                                     Subject
            org                       Re: Fruit basket program in Boo


            10/21/2007 01:48
            PM


            Please respond to
            programmingblind@
              freelists.org






Yes I know but that is not what I mean. I hear that the indentation of a
certain line is 3 chars, but I don't remember if it should be at 3 chars or

more, because I don't like to put Jaws to tell me automaticly that
information, so I don't hear it by default for each line.

If I would absolutely need that information, I could make the effort of
listening that information for each line, but it is not necessary at all.

I can't say I can do something in Python or Boo that I cannot do in perl,
so
I don't need to make that effort.

On the other hand, I can do something in C# that I can do in perl much
harder, and that's why the effort of learning C# could be necessary.
(I can use WinForms in Perl.net, but the syntax is not nice at all, and it
is easier to use WinForms in C#).



Octavian

----- Original Message -----
From: "rrdinger" <rrdinger@xxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Sunday, October 21, 2007 6:34 PM
Subject: Re: Fruit basket program in Boo


Just a quick point Teddy.  You may not recall, but jaws will tell you
what
indentation level if you do a SayLine command.  That may help you if you
can't remenber what indentation level you are at.
----- Original Message -----
From: "Octavian Rasnita" <orasnita@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Sunday, October 21, 2007 8:01 AM
Subject: Re: Fruit basket program in Boo


I know that even Jaws allows us to set it to warn us when the indentation

changes, but I never liked that way of working.
That's because I don't remember the indentation levels, so I never use
indentation. When I was sighted I considered a program code a bad code
by
default if I saw that it doesn't use indentation. But now I don't find
it
useful.

I am so used to (not) hear the (){} and the quotes that sometimes when I

want to be sure that a certain line really contains quotes or some other

chars, I need to read it char by char, because I almost don't hear Jaws
saying "quote" or "left param", "right param", so it is not a problem
for
me.

I like to hear the punctuation signs, because then I know that
everything's all right. That's why I never like to put the first { after

a subroutine definition on the next line after the subroutine signature.

It might be friendlier for the sighted to put it that way, because some
programmers might use indentation and it might align with the ending },
however I don't need indentation, so the code would become bigger with a

line, with no benefit.

I don't need { and } just for jumping from the start of a block to its
end, but to select the content of that block also, for pasting it into
another place in the program source.

I also need them because that way I can detect if I wrote a correct
code.
For example, if I see that the start { doesn't match with the ending },
it generally means that something was not correct, and the match will be

usually with a { or } which would another pair { or } and this way would

be easier to detect where I've made the mistake.

(This is important in a perl program where I use many hash elements
wrote
with { and }. In other languages it might be not so important).

Octavian

----- Original Message -----
From: "Jamal Mazrui" <empower@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Sunday, October 21, 2007 4:50 PM
Subject: Re: Fruit basket program in Boo


I realize you are expressing your own opinion.  Mine is different.  I
find both advantages and disadvantages.  Braces do have the advantage
of
easier navigation by matching a brace that starts or ends a block of
code.  The lack of braces, parentheses, and semicolons, on the other
hand, makes the code cleaner, less verbose with speech, easier to read,
and less prone to common syntax errors of forgetting to include a
punctuation mark in code that is otherwise correct syntax.

I know you prefer TextPad, but let me make sure others are aware that
TextPal and EdSharp include several commands that help manage
indentation in speech friendly ways.

Jamal
On Sun, 21 Oct 2007, Octavian Rasnita
wrote:

Date: Sun, 21 Oct 2007 15:51:42 +0300
From: Octavian Rasnita <orasnita@xxxxxxxxx>
Reply-To: programmingblind@xxxxxxxxxxxxx
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: Fruit basket program in Boo

Yes, the fact that it can be used as a scripting language is an
advantage.
But the fact that it doesn't use { and } to include blocks, and ; to
end the
statements, it is a big disadvantage.

Just like python, it is friendlier for sure for sighted users, but not

for
the blind.

Octavian

----- Original Message -----
From: "Jamal Mazrui" <empower@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Sunday, October 21, 2007 3:11 PM
Subject: Re: Fruit basket program in Boo


> Boo does have the indentation issue of Python.  The language is
> considerably more concise and friendly than C#, however.  This
> probably
> does not show in the example I posted because I used an automatic
> converter from C# that did a more or less literal translation rather

> than
> taking advantage of Boo idioms.  I will try to write a more Booish
> version
> when I get a chance (or anyone else can feel free to do so).
>
> Besides more convenient syntax (except for the indentation
> requirement),
> Boo has the advantage of an interpretive mode over C#.  Thus, one
can
> test expressions in an interactive environment.  When the code is
> refined, one can still compile to a stand-alone executable like C#.
>
> Jamal
> On Sat,
> 20 Oct 2007, Octavian Rasnita wrote:
>
>> Date: Sat, 20 Oct 2007 09:39:08 +0300
>> From: Octavian Rasnita <orasnita@xxxxxxxxx>
>> Reply-To: programmingblind@xxxxxxxxxxxxx
>> To: programmingblind@xxxxxxxxxxxxx
>> Subject: Re: Fruit basket program in Boo
>>
>> Well, I'd say that this language also borrows the disadvantages of
>> python
>> and the disadvantages of C#.
>>
>> It is harder to use by a blind because of its python style without
>> punctuation signs, it requires same much code as C#, and it is not
>> portable.
>>
>> If Windows need to be the target platform, I think C# is much
better
>> for
>> creating such a program.
>>
>> Octavian
>>
>> ----- Original Message -----
>> From: "Jamal Mazrui" <empower@xxxxxxxxx>
>> To: <programmingblind@xxxxxxxxxxxxx>
>> Sent: Saturday, October 20, 2007 6:22 AM
>> Subject: Fruit basket program in Boo
>>
>>
>> > From the zip archive at
>> > http://www.EmpowermentZone.com/boo_fruit.zip
>> >
>> > This fruit basket program is written in Boo  -- Full source code
>> > in the
>> > zip archive and pasted below.  The batch file compile.bat invokes

>> > the
>> > command-line compiler for this scripting language.  The resulting
>> > executable, boo_fruit.exe, is about 12K in size.  No other files
>> > are
>> > needed to run the program -- as long as the .NET Framework 2.0 is
>> > installed.
>> >
>> > Boo borrows syntax from Python, seeks to improve it, and combine
>> > strengths
>> > of both static and dynamic languages.  Its home page is at
>> > http://boo.codehaus.org
>> > Boo resources, including the interpreter, compiler,
documentation,
>> > and
>> > examples are available from there.
>> >
>> > I am still learning Boo, but was able to produce a working
program
>> > by
>> > converting the first C# fruit basket program I did via a web form
>> > available at
>> > http://codeconverter.sharpdevelop.net/Convert.aspx
>> > For comparison, the C# code is available in the file cs_fruit.cs.
>> >
>> > Jamal
>> >
>> > /*
>> > content of boo_fruit.boo
>> > Fruit Basket program in Boo
>> > Public domain by Jamal Mazrui
>> > */
>> >
>> > namespace MyNamespace
>> >
>> > import System.Windows.Forms
>> >
>> > // define class inherited from Form
>> > public class MyForm(System.Windows.Forms.Form):
>> >
>> > private lblFruit as Label
>> >
>> > private txtFruit as TextBox
>> >
>> > private lblBasket as Label
>> >
>> > private lbBasket as ListBox
>> >
>> > private btnAdd as Button
>> >
>> > private btnDelete as Button
>> >
>> >
>> > public def constructor():
>> > // define constructor
>> > // set window title
>> > self.Text = 'Fruit Basket'
>> > //this.Width = 328;
>> > self.Width = 400
>> > self.Height = 285
>> >
>> > // create two rows of controls with three controls in each
>> > row
>> > // label, textbox, button and label, listbox, button
>> > lblFruit = Label()
>> > lblFruit.Text = '&Fruit:'
>> > lblFruit.Left = 14
>> > lblFruit.Top = 14
>> > lblFruit.Width = 44
>> > lblFruit.Height = 16
>> >
>> > txtFruit = TextBox()
>> > txtFruit.Left = 64
>> > txtFruit.Top = 14
>> > txtFruit.Width = 200
>> > txtFruit.Height = 16
>> >
>> > btnAdd = Button()
>> > btnAdd.Text = '&Add'
>> > btnAdd.Left = 272
>> > btnAdd.Top = 14
>> > btnAdd.Width = 100
>> > btnAdd.Height = 20
>> > //  make it the default button
>> > self.AcceptButton = btnAdd
>> > btnAdd.Click += self.OnAddClick
>> >
>> > lblBasket = Label()
>> > lblBasket.Text = '&Basket:'
>> > lblBasket.Left = 14
>> > lblBasket.Top = 38
>> > lblBasket.Width = 44
>> > lblBasket.Height = 16
>> >
>> > lbBasket = ListBox()
>> > lbBasket.Left = 64
>> > lbBasket.Top = 38
>> > lbBasket.Width = 200
>> > lbBasket.Height = 200
>> >
>> > btnDelete = Button()
>> > btnDelete.Text = '&Delete'
>> > btnDelete.Left = 272
>> > btnDelete.Top = 38
>> > btnDelete.Width = 100
>> > btnDelete.Height = 20
>> > btnDelete.Click += self.OnDeleteClick
>> >
>> > // add controls to form
>> > self.Controls.Add(lblFruit)
>> > self.Controls.Add(txtFruit)
>> > self.Controls.Add(btnAdd)
>> > self.Controls.Add(lblBasket)
>> > self.Controls.Add(lbBasket)
>> > self.Controls.Add(btnDelete)
>> >
>> > // center form on screen
>> > self.StartPosition = FormStartPosition.CenterScreen
>> >
>> >
>> > // define event handlers for add and delete buttons
>> > protected def OnAddClick(sender as object, e as
System.EventArgs):
>> > sFruit as string
>> > sFruit = txtFruit.Text
>> > if sFruit == '':
>> > MessageBox.Show('No fruit to add.', 'Alert')
>> > else:
>> > lbBasket.Items.Add(sFruit)
>> > txtFruit.Text = ''
>> > lbBasket.SelectedIndex = (lbBasket.Items.Count -
>> > 1)
>> > txtFruit.Focus()
>> >
>> >
>> > protected def OnDeleteClick(sender as object, e as
>> > System.EventArgs):
>> > iFruit as int
>> > iFruit = lbBasket.SelectedIndex
>> > if iFruit == (-1):
>> > MessageBox.Show('No fruit to delete.', 'Alert')
>> > else:
>> > lbBasket.Items.RemoveAt(iFruit)
>> > if iFruit > (lbBasket.Items.Count - 1):
>> > iFruit = (lbBasket.Items.Count - 1)
>> > lbBasket.SelectedIndex = iFruit
>> > lbBasket.Focus()
>> >
>> >
>> > // define main entry point of application
>> > public static def Main():
>> > Application.Run(MyForm())
>> >
>> > MyForm.Main()
>> >
>> > //End of program
>> >
>> > __________
>> > View the list's information and change your settings at
>> > //www.freelists.org/list/programmingblind
>> >
>>
>> __________
>> View the list's information and change your settings at
>> //www.freelists.org/list/programmingblind
>>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: