proj-jasper-jasperLearnToProgramNotes1

Difference between revision 1 and current revision

No diff available.

---

when i went to http://scratch.mit.edu/projects/editor/?tip_bar=getStarted , there is a tutorial where you make a cat sprite dance.

i created a simple script with 3 commands. The commmands are presented as GUI puzzle piecs, but here is some text that sort of corresponds to them:

On green flag clicked: repeat 10: move 10 steps

(note: the 'move' seems to implicitly reference the cat sprite, i think because i had it selected in the sprite selector area in the GUI while these commands were displayed)

one discoverability issue was in the very first step; when i opened this page, there was an authoring tool with various panes. It was unclear what i was supposed to do. I eventually noticed in the rightmost pane that there was some tutorial text. But it confused me because it said:

"Step-by-Step Intro

Want to get started with Scratch? Try this!

(picture of cat dancing in disco ballroom)

(picture of star) 1 Start Moving

Drag a MOVE block into the Scripts area.

(picture of a MOVE block in the appropriate area) "

it confused me because i thought i was supposed to "try" (picture of cat dancing in disco ballroom). But there was no disco ballroom anywhere except right there, and when i clicked on it nothing happened.

also at the bottom of each tutorial section there was a hyperlink to the next section, but apparently no way to get back to the previous one

There is a File menu with options:

New --- Upload from your computer Download to your computer --- Revert

i tried 'Download to your computer' to see what format the script would be in. It downloaded as an .sb2 file. An .sb2 file is a .zip file. When i unzipped it, it had 4 graphics files (2 .pngs and 2 .svgs), 2 sound files (.wavs), and 1 'project.json' file. Here is the contents of project.json:

{ "objName": "Stage", "sounds": [{ "soundName": "pop", "soundID": 1, "md5": "83a9787d4cb6f3b7632b4ddfebf74367.wav", "sampleCount": 258, "rate": 11025, "format": "" }], "costumes": [{ "costumeName": "backdrop1", "baseLayerID": 3, "baseLayerMD5": "739b5e2a2435f6e1ec2993791b423146.png", "bitmapResolution": 1, "rotationCenterX": 240, "rotationCenterY": 180 }], "currentCostumeIndex": 0, "penLayerMD5": "5c81a336fab8be57adc039a8a2b33ca9.png", "penLayerID": 0, "tempoBPM": 60, "videoAlpha": 0.5, "children": [{ "objName": "Sprite1", "scripts": [[18, 55, [["whenGreenFlag"], ["doRepeat", 10, [["forward:", 10]]]]]], "sounds": [{ "soundName": "meow", "soundID": 0, "md5": "83c36d806dc92327b9e7049a565c6bff.wav", "sampleCount": 18688, "rate": 22050, "format": "" }], "costumes": [{ "costumeName": "costume1", "baseLayerID": 1, "baseLayerMD5": "f9a1c175dbe2e5dee472858dd30d16bb.svg", "bitmapResolution": 1, "rotationCenterX": 47, "rotationCenterY": 55 }, { "costumeName": "costume2", "baseLayerID": 2, "baseLayerMD5": "6e8bd9ae68fdb02b7e1e3df656a75635.svg", "bitmapResolution": 1, "rotationCenterX": 47, "rotationCenterY": 55 }], "currentCostumeIndex": 0, "scratchX": -92, "scratchY": 3, "scale": 1, "direction": 90, "rotationStyle": "normal", "isDraggable": false, "indexInLibrary": 1, "visible": true, "spriteInfo": { } }], "info": { "flashVersion": "LNX 11,2,202,359", "videoOn": false, "scriptCount": 1, "swfVersion": "v419", "spriteCount": 1, "userAgent": "Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko\/20100101 Firefox\/29.0" } }

note that my source code is represented not as plaintext but as an AST in children.scripts.

http://wiki.scratch.mit.edu/wiki/Scratch_File_Format_%282.0%29

---

so, from the .sb2 file format, i think we should take the project file format and use the idea of objects with scripts and included sprites, sounds, etc, but have have text files for the actual source code, rather than representing code as a JSON object (hard to edit in text editor)

note that Scratch currently uses Flash but we'll use HTML5

--

http://twolivesleft.com/Codea/

--

http://twdkz.wordpress.com/2014/06/26/teenage-haskell/

https://news.ycombinator.com/item?id=7956627

--

https://news.ycombinator.com/item?id=8001337

Python is now the most popular introductory language at top U.S. universities (acm.org)

blahedo 3 days ago

link

This methodology is suspect, and the headline is extremely deceptive. Note that Guo has conflated CS0 (meaning: CS for non-majors) with CS1 (meaning: intro to CS major). He is upfront about this fact and he does it intentionally, but comments about "first officially-sanctioned exposure in college" and such make it sound like he's unaware that most CS majors do not ever take a CS0 course; and among instructors of CS, phrases like "introductory language" without further qualification is usually understood as referring to CS1.

If we then look at the table of actual data to filter a little bit, the story changes. There are certainly some schools, big ones, that use Python in CS1. But a lot of the Python representation is coming from CS0 at schools where CS1 is taught using Java.

(I can also clarify one of his other comments: he says of the AP exam using Java that "it's unclear whether that will change anytime soon." This is untrue. It will not change in the next 3-4 years at the very minimum---and that would be the time frame if the College Board said right now today that a change was happening. In fact, though, although the idea's been mentioned, there has been no study or apparent motion on that front, so a more realistic earliest-date-of-change would be around 2019 or 2020. And I wouldn't count on it, given how many CS1 courses are still taught in Java.)

reply

pgbovine 3 days ago

link

Author here. Thanks for your comments blahedo. I'm a bit short on time right now, but I will convert some parts of this response into more coherent form and edit my article accordingly to clarify.

I'll address each of your paragraphs in turn:

1.) Re: CS0 vs. CS1. Like you mentioned, I was very upfront about the methodology for this analysis. And I am very aware that most CS majors do not ever take a CS0 course. But please also be aware that there are a minority of CS majors that do take CS0 before moving onto CS1, usually because they feel ill-equipped to take CS1 right away. I harp on this point because even though this is a minority population, it's a very important one since those are students who, without CS0, would not major in CS. These students are more likely to be female or from underrepresented minority groups. On a related note, a larger and larger fraction of non-CS majors are taking CS courses because they recognize the value of programming and computational thinking. (Again, these non-CS majors are more likely to be female and from underrepresented minority groups.) So I would argue that CS0 is just as important as an "introductory programming" course as CS1, if not more important, due to the rise of the non-software-engineers-who-want-to-learn-programming population. [Edit: And I think that a CS department's choice of language to offer to the CS0 student population is still very significant, and a decision that is not made hastily.]

2.) Re: Python CS0 and Java CS1. You are absolutely right, and in my original article, this sentence appears in the discussion section: "Some schools have fully switched over to Python, while others take a hybrid approach, offering Python in CS0 and keeping Java in CS1."

3.) Re: AP exams using Java. Thanks for the clarification. I will remove "it's unclear whether that will change anytime soon." from the article.

[Also, as to cyorir's comment that the chosen data may have been cherry-picked, please rest assured that I tried my best NOT to cherry pick. If I had cherry picked, wouldn't I have made Python look even better? ;) Any incomplete data is strictly due to human error or oversight on my part, and I gladly welcome any correction requests via email.]

reply

---

candeira 3 days ago

link

I work at Monash University in Melbourne, Australia. Last year we moved our foundational course in data structures and algorithms from Java to Python, with great success. This is a course that used to be taught in C, then moved to Java. I tutored it as a Java course, and was in charge of adapting the tutorial (classroom exercises) and laboratory (programming assignments) materials when we started using Python to teach the unit.

The main content of the course hasn't changed. Complexity, Big O notation, sorting and searching are introduced in the first two or three weeks. Students work through the usual implementations of arrays, linked lists, stacks and queues (both array and linked-list based), trees, heaps, tries, etc. All these data structures are explained first as chunks of data with external functions for the operations; then a second time as objects with methods for operations, once object orientation is introduced in week 5 or 6. Iterators are introduced as an abstract interface to list-, array- and tree- walking. Where relevant, we explain every operation twice, showing the iterative and recursive approaches. The course ends with two weeks of lower level work, where the students hand-compile pseudo-Python to working MIPS assembly.

The move to Python gained us, among other things, the freedom not to have to explain Java's generics and access modifiers. Many of our students have never programmed with a text editor before our unit, and dropping them into the big boilerplate world of Java micro-management was not good for them or for the course. We used to spend too much time on syntax and other details ("native types are like this, reference types are like htat") that we should have been spending on data structures and algorithms.

With Python, we even have time to explain idiomatic Python iterators and generators, and to discuss Python scoping rules (which come up again when we work on local variables in their hand-compilation tasks).

mandalar12 2 days ago

link

I have a different experience tutoring (exercises and labs) in an engineering school in France for programming / CS beginners.

We moved from Java to python this year and I miss a few things. Due to the absence of explicit typing the students don't bother to understand types anymore and it leads them to a lot of mistakes and misunderstandings: confusion between simple types, lists, dictionaries, instances of a user created class, etc. Besides I think the verbose and rigid syntax of Java forced them to understand what their wrote and for a first language that was a good thing.

Overall I found that since it is easier to write code in python they rush to writing anything without understanding the algorithmic problem first. Thus they are less able to decompose a problem in sub-problems and write atomic functions to solve each of them.

Note that I think teaching python as a first language is a viable option but in our case the course needs to be intensively rewritten and the labs adapted. For instance my lattest point about algorithms is not a problem with the language: it could be resolved by having a part of the lab being pure algorithmics and then an implementation part.

reply

simonw 3 days ago

link

I think C makes a great second language. Use Python to teach if statements, variables, control structures etc - then later use C to teach low-level algorithms, pointers and how computers actually work.

I don't think there's any harm in learning Python first. I think they may be harm in learning C first - it's much more likely to frustrate people and potentially even put them off programming.

This is the same reason I dislike Java as a teaching language: having to tell people "don't worry about what public static void main(String[] args) means just yet" when teaching "hello world" isn't a great introduction to programming.

reply

---

how would "public static void main(String[] args)" look in jasper?

if jasper defaults to 'public' access modifier (don't need 'public'), and has gradual typing (don't need 'void' or 'String[]'), and has 'bare' functions (don't need static), then main would just be:

main(args)

(or whatever function defn syntax we choose)

or perhaps it's better to execute the top-level, like in Python?

---