Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Old
Maggie
Guest
 
Status:
Posts: n/a
Default 10-30-2007, 03:12 PM

I think it's a bug as well.

And yes, I can get it to happen in a somewhat simpler way.

1. Create a world and add two objects (cat and a bunny).
2. Create an object list and add cat and bunny.
3. In world.my first method (or wherever), create a number variable.
4. Set variable = to first index of bunny in list.
5. Drag cat into where it's bunny (first index of bunny), and you'll get that pop-up.

I printed a lot of the variables last night and they weren't that interesting. Oh, well, at least it's a mystery solved!

Maggie
   
Reply With Quote
A few list bugs?
Old
Maggie
Guest
 
Status:
Posts: n/a
Default A few list bugs? - 10-30-2007, 03:21 PM

Oh, sorry, and just as an aside, Dick -- I looked through your list stuff and I didn't see these bugs mentioned. Maybe I didn't look carefully enough. I wondered if you've seen these bugs before:

In my flea market game, I have a lot of shoppers (7) wandering around. I wrote a method that takes an object as a parameter. It randomly calculates a direction and distance to travel, and then it moves the object that distance in that direction. This works fine when I don't use a list. When I use a list of shoppers and embed the call to the method in a "for all together," it crashes -- sometimes. It still crashes, even when I reduce the number of shoppers to 1. It still crashes when I change "for all together" to "for all in order." In the method that moves them randomly, I had a nested if else that left one else as "do nothing." When I replaced that with a piece of code that also does nothing, the code worked on my machine (no more crashes), but when I brought it to school and did it with my class, it crashed again.

Is there a known problem with passing a list object as a parameter to a method?

The other bug is with "list contains." It seems to only realize that the list contains the last element in the list. I put it in an "if" statement and it didn't work. I got around it by comparing "first index of" to -1, but I'm wondering if this is a known bug with "list contains".

Thanks,
Maggie
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 10-30-2007, 06:51 PM

Hi Maggie,

The names of some of the properties that you found might indicate that they point to containers that hold the kinds of historical data that appears when you open a menu, but that is just a guess on my part.

I had not seen the list of bugs that you describe, but I have done very little with lists. Officially, lists are beyond the scope of the Programming Fundamentals course that I teach using Alice. The course is supposed to go only through one-dimensional arrays.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
Maggie
Guest
 
Status:
Posts: n/a
Default 10-31-2007, 11:02 AM

Thanks, I was just wondering. I have to admit that, among other things (such as lack of polymorphism) I find Alice's bugginess frustrating. The textbooks are written in such a way as to conceal both of these problems, so I got very excited when I skimmed my first Alice textbook. Then when I sat down and tried to write an actual program, I wanted to rip my hair out.

I read the article from the Providence Journal that's posted on the Alice website (partly because Providence is 20 minutes away), and laughed a little at the CS instructor who said you had to "unlearn what you know" about programming in order to program in Alice. Yeah, that's what I want, to "unlearn" all of the design principals I've spent twenty years trying to perfect!!

Maggie
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 10-31-2007, 12:14 PM

Quote:
Originally Posted by Maggie View Post

I read the article from the Providence Journal that's posted on the Alice website (partly because Providence is 20 minutes away), and laughed a little at the CS instructor who said you had to "unlearn what you know" about programming in order to program in Alice. Yeah, that's what I want, to "unlearn" all of the design principals I've spent twenty years trying to perfect!!

Maggie
I don't agree with that assessment from the Providence Journal. I haven't had to unlearn anything, although I have had to think a lot more about workarounds for bugs.

For example, although I don't recall the details at the moment, I also discovered what I consider to be a major bug in the behavior of simple arrays. The textbooks also ignore that bug, and it bugs me because it has a direct impact on the course that I teach using Alice. Most of the other bugs involve things that are beyond the scope of the course, so they don't cause me much in the way of difficulty in the classroom.

If anything, working in Alice has made me appreciate even more the things that I already knew. See for example the following articles and note the difference in effort required to create an animated interactive 3D program in Alice as compared to Java3D:

1540 Understanding Lighting in the Java 3D API
1541 Back to Basics in the Java 3D API
1542 Digging a Little Deeper into the Java 3D API
1544 Simple Animation with the Java 3D API

Sometimes I worry that using Alice may give students a false sense that programming is easy. Creating even simple 3D animations in Java3D is incredibly complex and clearly not for the faint of heart.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm

Last edited by DickBaldwin; 10-31-2007 at 12:22 PM. Reason: Clarification
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 10-31-2007, 04:19 PM

I'm afraid I'm going to have to come in at least partially on the side of the Providence Journal - though I'm afraid I don't see "unlearning what you know about programming" as a positive recommendation for Alice.

I'm not much of a programmer myself, but I have managed enough programming projects over the years to strongly agree with the following statement from the College Board's description of the scope of the Computer Science AP program (see
http://www.collegeboard.com/prod_dow...Sci-Locked.pdf ):

"One prerequisite for an AP Computer Science course, competence in written communication, deserves special attention. Documentation plays a central role in the programming methodology that forms the heart of an AP Computer Science course."

This is one "thing I know about programming" that I don't plan on unlearning - and the lack (or worse, only partially complete, and hence misleading) documentation for Alice 2.0 has only reinforced this lesson.
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 10-31-2007, 04:29 PM

Quote:
Originally Posted by DickBaldwin View Post
The names of some of the properties that you found might indicate that they point to containers that hold the kinds of historical data that appears when you open a menu, but that is just a guess on my part.
Actually, I believe you are correct in that these were some of the properties that were supported in the original release of Alice - the version that also supported Python-like scripting. I tried to check this but unfortunately all the documentation for Alice 1.0 seems to have been removed when the www.alice.org site was revised.
   
Reply With Quote
Old
Maggie
Guest
 
Status:
Posts: n/a
Default 10-31-2007, 05:53 PM

I feel completely paralyzed by Alice.

When I am learning a programming language, I usually set myself a few projects to build. The first thing I decided to build in Alice was a "Towers of Hanoi" project. I was going to program the game so the user could play it, and then program it to play itself. I managed A but got so disgusted (and it ran so slowly) that I never tried B.

The fact that you can't ask the rings questions about themselves (e.g. largerThan(ringX)) forced me to abandon object-oriented design. I don't want to unlearn object-oriented design in favor of an approach that has no information hiding and no polymorphism. If you could cast, as you can in a non-OO language such as C, then you could at least simulate good design. But even that isn't possible. So I find myself violating objects left and right, exposing their innards in order to get anything of interest accomplished, using lots of if/else statements that I'd never use in OOD. The code is appalling, and my brain is only half invested in what I'm doing because I don't want to jump whole-heartedly into this morass of sloppy style. I don't have a strategy to share with my students -- something that will give their programs a semblance of design decorum.

I would be interested to know if either of you have a particular design strategy that you've based your Alice strategy on (or that fits nicely with Alice). I'm a beginner, so maybe I'm just missing something very basic. (Or maybe your strategy is in your gut and you haven't spelled it out. My gut says OOD, and that's why I have a stomach ache.) Frankly many of my students are struggling with the concepts beginners always struggle with -- designing loops and passing parameters, for example, so there isn't too much time to worry about good design. (Beyond "write an event handler instead of having three copies of "while the world is running.") But I still don't have an overall sense of how to design an Alice program that is readable, extensible, and robust.

Thanks in advance for your advice,
Maggie
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 10-31-2007, 07:18 PM

Maggie,

If I were teaching a serious OOA/OOD/OOP course, I wouldn't be using Alice. Rather, I would be using Java, which is what I use to teach my three OO courses. In my opinion, if your objective is to teach OOA/OOD/OOP, you should not be using Alice. Rather, you should be using Java. If your objective is to teach interactive 3D in conjunction with OOA/OOD/OOP, you should be using Java3D.

Although I teach in a community college and not a high school, I use Alice to teach a course that is roughly equivalent to, and possibly less challenging than, a non-Advanced Placement programming course in a high school.

Although the course that I am teaching isn't so designated, in my opinion, it should be designated as a remedial high school course. The master syllabus for the course finally mentions "Objects,Classes,GUI" as a topic for the last week in the semester in addition to the final exam. There are only two classes per week, so according to the master syllabus for the course, we should teach "Objects,Classes,GUI" during one of those classes and administer the final exam during the other class. In case you are interested in viewing the master syllabus, click on the link to COSC 1315 at http://www.austincc.edu/cit/NSF%20Ma...%20Syllabi.htm

I don't believe that Alice was designed to teach OOA/OOD/OOP. Rather, I believe that it was designed to teach a beginning programming course in middle school, or perhaps a non-Advanced Placement programming course in high school. It is my understanding that Advanced Placement programming courses in most high schools are taught using Java and are not taught using Alice, except perhaps during the first few weeks as an introduction to programming. However, I would be interested in hearing what LanceA has to say about my impression in this regard.

At the beginning of this semester before the forum software broke, I was making a point of looking at the profiles of those members who were asking questions and who appeared to be students. Although I didn't keep a written tally, I believe that the majority of the student members were high school students with only a few college students.

I suspect that either your expectations for the course that you are teaching are too high, or you are using the wrong teaching tool. Since I don't have any information on the background of your student population, I don't know which, if either, is close to the truth.

In any event, everything that I use to teach the course (with the exception of the written exams) is freely available at http://www.dickbaldwin.com/tocalice.htm Feel free to use any of that material if it would be helpful.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm

Last edited by DickBaldwin; 10-31-2007 at 07:20 PM. Reason: Clean up some font problems
   
Reply With Quote
Old
Maggie
Guest
 
Status:
Posts: n/a
Default 10-31-2007, 08:55 PM

Thank you, Dick. I used some of your looping examples before and I have been looking through your materials when I have a chance.

I do teach Java, which is the Intro programming class at the university. I also teach C. I teach whatever they give me. :-P

This Alice course is new. I think it has two purposes: as a remedial course for students who shouldn't have been accepted into the CS program (IMNSHO), and as a sort of soft science course for non-CS majors. My bizarre version of the class is the honors version (of a remedial course, right), because the honors director thought the course sounded cool. He's right -- it is a cool idea, but I haven't exactly figured out what to do with it. I'm about to finish up with Alice and move on to ActionScript, and I'm not sure what I'll do next semester. Most of my students are not CS majors. I have a couple of art majors, an English major, and some students from other engineering and science majors. Some are bored and the others are able to build stuff but not well, and that is the norm in CS1 courses, in my experience. At least the bored ones are creating things they can have fun with, and the somewhat lost ones are able to build anything at all. That's the advantage of Alice over Java!

When I teach Java, I teach "design first." It's really hard to come up with examples in Alice where design makes things easier and neater -- it's a great big free-for-all! I don't think I have any business teaching any kind of programming without stressing good design.

That's my take. If just "get 'er dun" were my goal, then all of my students get A's. But I'd like them to take away the sensibility necessary to write a large or extensible project.

Thanks for listening to me complain. :-)

Maggie
   
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump



Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.