proj-oot-ootLearnToProgramNotes1

---

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 oot?

if oot 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?

---

http://zedshaw.com/2015/06/16/early-vs-beginning-coders/

totalBeginner 3 hours ago

I would find some resource of assumed knowledge useful in my career field of chemistry and biology, but what really resonated with me from zedshaw's piece was something even more basic to the field. The biggest hurdle I had to learning to code was finding a text editor. The next big hurdle I had was finding somewhere to host my one-page HTML site. I ended up asking a friend who suggested Sublime Text and Amazon AWS. At that point I'd been reading HN for two years and had heard of these things, but not understood their central utility (or the utility of similar such general services) to doing anything with code. This is the level of beginner that I would hope zedshaw's efforts would target, someone like me from last year.

I want to emphasize that while learning abstract functions, and understanding that code syntax is an abstraction for electrons moving through logic gates are fundamental concepts for an early programmer, learning those concepts was less frustrating for me than finding somewhere to write the text I had learned from codecademy. I am a chemist by formal training, I took an extremely abstract multivariable calc course in college that taught me Big and Little O, and functionalized concepts most people learn by rote "drills," and I consider learning new concepts my strongest career skill. I don't mean to humblebrag here, but rather to refute the only-somewhat-popular sentiment I've seen on HN that non-coders "can't get shit done." No. I am a non-coder that does shit. In moving from chemistry to neurobiology and biophysics, there are basic skills that can't be found in a textbook, like _this is a pipette_, and _this is a flask to grow cells_, and if you don't know those things you won't be able to do experiments, and you'll fail the informal subtext of an interview. The best resource I've found in (three years of reading HN anonymously) for analogous tool-teaching in code has been Michael Hartl's book on learning Rails, so thanks again mhartl! The first two chapters of that resource were more treacherous (but ultimately well-guided and successful) than teaching myself d3.js. A true, zero-level, adult beginner's guide to some code---manipulating an excel sheet in Python, writing an API-interacting tweet bot---would be a great boon to people like me.

SCHiM? 11 hours ago

This is good. I've had problems that were somewhat related to what the author talks about.

When I was learning C# and was already quite fluent in C/C++. I had a big problem with the C# type system/management. I'd been reading guides that were in the first category the author mentions, eg. "not really a beginner, but new to this language".

I was trying to retrieve the bytes that a certain string represented. I was looking for ages and everywhere everyone mentioned that "this shouldn't be done", "just use the string", etc. A stack overflow answer mentions a way to use an 'encoding' to get the bytes and this seemed to be the only way.

How strange I thought, I just want access to a pointer to that value, why do I have to jump through all these hoops. None of the guides I was reading provided an answer, until I found a _real_ beginners book. This book, helpfully starting at the real beginning of every language: the type system, finally gave me the answer I was looking for:

.net stores/handles all strings by encoding them with a default encoding. It turned out that the whole notion of 'strings are only bytes' that I carried over from C++ does not work in C#. All those other helpful guides gleefully glossed over this, and started right in at lambdas and integration with various core libraries. Instead of focusing at the basics first.

reply

wolf550e 5 hours ago

This has nothing to do with learning a programming language and everything to do with learning how to process text in a computer. Being a C programmer doesn't mean you have only a PDP-11's understanding of text ("it can be ASCII or EBCDIC, and I know how to convert between the two!").

When I learned C# (in 2003?), I learned that String in an array of Char and Char is 16 bit, and that .NET used the same encoding as Windows NT (UTF-16 in native endian).

I knew that both WinNT? and Java made the mistake of being designed at a time when people assumed 16 bits are enough and consequently caused the surrogate pairs mess. I knew that Java assumes UTF-16BE and Windows assumes UTF-16LE. I knew what UTF-16 means in C/C++ and how to work with it or transform such data to and from UTF-8 and UCS-4.

When learning a new programming language, I know to look up whether strings are mutable and whether they're sequences of bytes, code units or code points. If they's immutable, I look up how to create a copy instead of a reference when using substring and when they're not bytearrays I look up how real bytearrays are called in this language.

Should early programmers be taught this? Absolutely. At what stage? I don't know. But they must be taught from the start that this has nothing to do with a programming language and everything to do with how data is represented in memory.

reply

---

WalterGR? 2 hours ago

The above link is to a Hyperbole and a Half cartoon image of a person and the words "No, see, that solution is for a different problem than the one I have."

Blind links aren't polite. :)

reply

danso 10 hours ago

I've been teaching coding to beginners for the past year now...and even after having done coding workshops/tutorials for many years previous, I've found I can never overestimate how wide the knowledge gap is for new coders.

Yesterday I was talking to a student who had taken the university's first-year CS course, which is in Java...she complained about how missing just one punctuation mark meant the whole program would fail...While I can't passionately advocate for the use of Java in first-year courses (too much boilerplate, and the OOP part is generally just hand-waved-away)...I've realized that the exactness of code must be emphasized to beginners. And not just as something to live with, but something to (eventually) cherish (for intermediate coders, this manifests itself in the realization that dynamic languages pay a price for their flexibility over statically-typed languages).

Is it a pain in the ass that missing a closing quotation mark will cause your program to outright crash, at best, or silently and inexplicably carry on, at worst? Sure. But it's not illogical. Computers are dumb. The explicitness of code is the compromise we humans make to translate our intellectual desire to deterministic, wide-scale operations. It cannot be overemphasized how dumb computers are, especially if you're going to be dealing with them at the programmatic level...and this is an inextricable facet of working with them. It's also an advantage...predictable and deterministic is better than fuzziness, when it comes down to doing things exactly right, in an automated fashion.

I think grokking the exactness of code will provide insight to the human condition. While using the wrong word in a program will cause it to fail...we perceive human communication as being much more forgiving with not-quite-right phrasing and word choices? But is that true? How do you know, really? How many times have you done something, like forget to say "Please", and the other person silently regards you as an asshole...and your perception is that the transaction went just fine? Or what if you say the right thing but your body (or attire) says another? Fuzziness in human communication is fun and exciting, but I wouldn't say that it's ultimately more forgiving than human-to-computer communication. At least with the latter, you have a chance to audit it at the most granular level...and this ability to debug is also inherent to the practice of coding, and a direct consequence of the structure of programming languages.

reply

alphast0rm 7 hours ago

A good analogy I've heard to explain this is how you'd request a glass of water from the kitchen from a friend versus a computer. You can simply tell your friend "get me a glass of water" and they'll understand what you're asking. With a computer though, you must be completely explicit with your instructions, for example: walk to the kitchen, open the top left cabinet, take out a glass, put it underneath the faucet, turn the faucet on until the glass is 80% full... etc.

reply

Lawtonfogle 6 hours ago

Day one CS 101 class.

Bring in a few loaves of bread, jars of peanut butter, and jars of jelly, with a few utensils. Also, lots of paper napkins.

Have the students spend 10-15 minutes writing a 'how to make PB&J sandwiches'. Select volunteers to read their instructions while you follow them as a computer would. Explain that this is how computers work.

Get some bread: grabs entire loaf of bread, uses the entire loaf for following instructions.

Open the loaf of bread: Rips open the entire package.

Open the jar of peanut butter: Fails to rip the lid off.

Spread peanut butter onto bread: Grab a big handful of peanut butter and spread it messily over the bread.

You can demonstrate how a more flexible language allows you to not just stop and crash (ie. Unknown command 'open peanut butter') but can result in far worse results.

You can even get into the different levels of languages by showing the difference between a motion by motion (assembly) instructions vs. one which assumes general sandwhich knowledge (C/C++/etc).

reply

---

nekopa 5 hours ago

bwy, I am writing this to you, from a current teacher to maybe a future teacher. I have a big issue with this line of your response:

Otherwise, your efforts may be futilely spent on explanation when all they want is to get things working.

Now this attitude is fine in a work environment, or many other places. But this is death for learning. Learning is not about getting things to work, it is about understanding why things work, so you can apply that understanding elsewhere, to unrelated fields even.

So, for example, I do agree with you when you say: don't go back and explain that the interpreter is this thing with very strict constraints and everything you type matters But I disagree with what you say next: That's not the point. Explain what's wrong, why, and how to fix it!!!

What would be better, in my experience, is to lead the student to find out, for themselves, what is wrong, you can supply the why, and get them to figure out how to fix it. These are what we in teaching call teachable moments, random events which present an opportunity to give the student a deep learning experience, one which will stick with them for a long time.

Your 'explain what's wrong, why, and how to fix it!!!' can be done via google, doesn't add to a real learning experience, and can turn people into cargo cultists.

reply

jordanpg 9 hours ago

The only important trait I see that matters for either of these groups is a willingness to try things, push buttons, see what happens.

A beginner worries about breaking the computer and doesn't yet understand that any question they have can be typed into a search engine verbatim and will probably be answered with 20 SO posts and 50 blogs posts. And early programmer is stumbling down this road.

I don't know that this ethos can be communicated with a book.

---

 kazinator 8 hours ago

I can still visualize what it's like to know nothing, because when I saw a BASIC program for the first time when I was ten, I thought the = signs denoted mathematical equality (equations). How the heck can X be equal to Y + 1, if in the next line, Y is equal to X - 2?

Later, I tried using high values for line numbers just for the heck of it. Can I make a BASIC program that begins at line 100,000 instead of 10? By binary search (of course, not knowing such a word) I found that the highest line number I could use was 65,000 + something. I developed the misconception that this must somehow be because the computer has 64 kilobytes of memory.

reply

scribu 3 hours ago

> I thought the = signs denoted mathematical equality (equations).

I had the same confusion! My very first roadblock in programming was when the teacher told me to write `x = x + 1` on the blackboard, which didn't make any sense, mathematically.

reply

top1nice1gtsrtd 11 hours ago

I actually worked on teaching my 71 year old father Python using this book. One point of difficulty that struck me during that exercise was that I as a programmer had completely internalized the idea that an open paren and a close paren right after a function is a natural way to invoke a function with zero arguments (e.g.: exit() exits Python's prompt. exit doesn't.). The whiplash I felt from finding the questioning of the convention silly to finding the convention silly was amusing to feel. Like it makes sense to a parser but not to a flesh-and-blood contextual-clues-using human. We don't vocalize "open paren close paren" whenever we say an intransitive verb. We just "know" that it's intransitive. Anyway, great article.

reply


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

agentultra 1 hour ago

parent flag

I think the real problem here is pedagogy.

I don't begin teaching someone programming by explaining objects and types.

I generally start by introducing three fundamental concepts: variables, conditionals, and loops. And I keep it simple to begin with:

    a = 1
    print(a) # 1
    a = 2
    print(a) # can you guess what it will print?

Then I add conditionals:

    if a == 2:
        print("it is two!")
    else:
        print("it is not two...")

And I only really cover 'for' at first:

    groceries = ["ham", "cheese", "eggs"]
    for item in groceries:
        print(item)

Along the way I explain some of the primitive data types: string, integer, float; and containers such as list and dictionary. And that is usually enough to get started with simple tasks. I tend to elide what functions are and just call them "commands" until later on so that I can demonstrate why looping is so cool:

    import turtle
    
    turtle.setup()
    
    for amount in range(100):
        turtle.forward(amount)
        turtle.left(75)

And that usually drives home the point: grouping commands together to repeat them as many times as we wish using loops; variables hold data; and conditionals let us do different things depending on whether something is True or False.

I haven't had much trouble with this approach for years. I don't even get to explain iterables to newbies most of the time! Once in a while someone tries something like:

    a = "foo"
    a + 1

And they get TypeError? or they pass in an object of the wrong type to a function and get ValueError?. Early on this usually isn't a problem because some things just don't make sense like adding numbers and strings. However it can get confusing when learning how to look up functions and use them because we can only informally document what kinds of things a given function will take in its signature... it's an advantage and disadvantage of the duck-typing philosophy. It's a wart but one that I haven't really encountered with anyone I've taught until they're pretty far along and able to help themselves.

---

 	John Carmack 	

We “released” my 10 year old son’s game that was done in Racket: www.1k3c.com

...I can’t recommend 2htdp/universe for this sort of thing, though. ...He didn't have any difficulty applying the functional image model, but when you have 20 lines of text drawing composed together, it really looks like you are just drawing things one after another, but backwards. The cases where it has value, like building a character up out of multiple things, then placing it somewhere in the world, tend to be the minority of operations compared to just drawing independent elements on the screen....The idea that you functionally compose images like this: (place-image image-1 x y (place-image image-2 x y (place-image image-3 x y)))

Which draws image1 on top of image2 on top of image 3, which is backwards from the "painters order" that would draw image 3, then image 2, then image 1. ...

My wife managed programmers for years, and she has opinions about pragmatic developers, which usually involve Java or C++.

Unity/C# can be incredibly rewarding, but the entire ecosystem almost drives you away from programming as a beginner -- find the right script on the asset store and figure out how to configure it in the editor, rather than reinventing the wheel and writing it yourself.

... He reacted very positively to the initial "intro to racket with pictures", which was a contributing factor to settling on Racket. Java / C# work seemed to feel more like homework, but changing numbers and colors in the REPL had him smiling and excited.

...(replies)...

This would be where I would reach for a let* to handle intermediate results, because code like this is very awkward. ... Or something like this, with the rackjure package: (require rackjure/threading 2htdp/image) (~>> background-img (place-image image-1 x y) ; the background-img will be inserted as the last argument, because that's what ~>> does (place-image image-2 x y) ; the background + image-1 will be inserted as the last argument (place-image image-3 x y) ; and so on ...) Or if you don't want to use rackjure, then with let* it would be: (let* ([img background-img] [img (place-image image-1 x y img)] [img (place-image image-2 x y img)] [img (place-image image-3 x y img)] ...) img) ... make a macro like a `(place-images* ([imag1 x y] ...))` ... (define (pipe . d) (apply compose (reverse d))) ...

(define (render.v2 w) (let* ((s (empty-scene 100 100)) (s (place-image (circle 30 'solid 'yellow) 5 20 s)) (s (place-image (rectangle 10 20 'solid 'blue) 90 90 s)) (s (place-image (triangle 100 'solid 'red) 90 10 s))) s)) ...

(define (render.v3 w) (foldr (lambda (x s) (apply place-image- s x)) background pieces))

... We do need a for/image so that #lang racket programmers can do even better.

"

myth_buster 3 hours ago

  Dropping a newbie into Eclipse or MonoDevelop makes them feel like 
  they are walking around in a byzantine museum, afraid to touch 
  things, while DrRacket feels closer to old-school personal computers 
  where you felt like you were in command of the machine. 

I think this is a very important observation. As with most things, it's extremely important to get in during the humble beginning stage and then tracing your way up to grok more complicated systems. Similar to the "first principle" approach.

reply

bliti 2 hours ago

My 7 year old is learning on a Raspberry Pi that does not load X by default. She gets around the terminal pretty well (changing, dirs, calling python scripts, etc.). The GUI is just overwhelming at this point. She prefers the terminal. In fact, she will boot it up and type:

    nano story.txt

To start writing simple stories (she loves doing that). And yes, she saves it by pressing Ctrl-x, y, and enter. :D

reply

616c 1 hour ago

I am so jealous when I hear these damn stories. Another 5 or more years to go.

Does anyone have a book about the method they develop? I bet that, following it to the T or not, it would sell here with the HN crowd.

reply

Rabidgremlin 58 minutes ago

I started putting together a "book" when I was teaching my 6 year old a bit about coding. It uses a BBC Micro emulator and BBC BASIC as the intro language. Never got around to finishing it... http://c4k.rabidgremlin.com/

reply

Rabidgremlin 43 minutes ago

However it did encourage him to want to make games... this is the first one: http://ackson.nz/

I did the coding but it was his concept, he did all the graphics (scanned pictures he drew), the font (generated from his handwriting) and sound effects (that's him making all the sounds).

He also built the levels and used a music generator to create the background music (not in the version that is on the website yet). This was all done in Unity with a lot of prefabs to make it easy for him to build the levels.

I'm totally going to introduce him to PICO-8 (see link below) next to see how he gets on :)

reply

jsingleton 2 hours ago

You can set a Raspberry Pi to boot straight into Scratch. It's a great introductory graphical programming language.

The next step is usually Python but I'm not sure kids will get the significant whitespace. Go is an option or maybe BASIC (on RISC OS perhaps).

reply

bliti 1 hour ago

We tried scratch, but it bored her for whatever reason. Its a nice environment, though. Python is something she is slowly learning through command line games like rock, paper, scissors. Go, well, I don't want to have her suffer through Go's syntax just yet. BASIC is outdated and too verbose. She has typed C code before and found it fun. Dunno, I don't want her to be anything but herself. This is just a way to spend time together.

reply

platz 2 hours ago

I find this fascinating given that kids are exposed to things like the iPads which are purely graphical

reply

bliti 2 hours ago

She has an iPad, but treats it like I used to treat a TV back when I was her age in the 80s. The RPi is to her what the C64 was to me. Tablets and phones are entertainment (read music, video and games) gadgets. The RPi is more like something to tinker with. However, just like Carmack's son, the environment where she learns is heavily biased towards technology. Having designed and built her own little robot at age six because I build robots myself. She also breadboards for fun because all the required parts are at her reach. If I had a quarter for every LED she has burnt...

reply

 Rabidgremlin 3 hours ago

Something like PICO-8 would work great for young programmers I think http://www.lexaloffle.com/pico-8.php

reply

 Rabidgremlin 2 hours ago

It Rocks. Bought it yesterday, had a simple game up and running in 10 minutes....and 80's flashbacks the rest of the day :)

reply

---

 ChicagoBoy11 3 hours ago

How widespeard of a belief is this in the teaching community? I happen to completely agree with it, but I've also heard the opposite -- suggestions that dropping kids into professional coding environments would give them the feeling they were doing something "for real" and help motivate them. I feel that the cognitive load of these kinds of environments is so high, and the possibility to click something that breaks everything unexplainably so great, that introducing kids to programming using systems whose environment they could completely comprehend seemed like a no-brainer. Was wondering if there was evidence to this intution (or contrary to it).

The school where I work at is incidentally piloting a intro to computer programming course that uses Blender and Python for completely green 10yr olds. I don't see this turning out well; how doesn't it just devolve into a CTRL-C/CTRL-V bonanza?

reply

edgyswingset 3 hours ago

This is just a personal anecdote, but my first experience with programming was in an introductory CS course where Visual Studio was the default (but not mandatory) dev environment. Naturally, I used it instead of any CLI because I was an absolute beginner.

This is coming from someone who loves VS, but it is not something beginners should have to deal with. Some of my questions that distracted me from actually solving problems (note the technically incorrect usage of certain terms; this is intentional):

I think that a CLI or super basic IDE with minimal options and capabilities is the way to go when dealing with people who are beginners. On that same note, I do find it disheartening that many upper-division courses at college never bother with IDEs, and teachers tell students to just "figure it out on your own".

reply

 dpcan 2 hours ago

Awesome!

My 11 year old son submitted his first LudumDare? Jam game this morning. It's a Javascript / HTML5 clicker/incremental game (think Cookie Clicker) built on a game engine I created. He's been getting so much better at coding all summer long. I had to help a lot at first, but now he's implementing everything on his own, and only comes to me when he can't hunt down a bug - which 99.9% of the time is a missing end-quote, ) or }

...

bitwize 2 hours ago

> DrRacket? feels closer to old-school personal computers where you felt like you were in command of the machine.

This motivates the design of my Scheme IDE, Glass Table [1], which is modelled on old-school micro BASICs (notably from Microsoft).

GT is implemented as a series of hooks into the REPL, which listen to all typed input for variable, procedure, or macro definitions and log them in a "workspace" which can then be saved as a Scheme file. Individual definitions in the workspace can then be edited with an inferior editor (or, if you are working from inside emacs, with emacsclient).

Not to take anything away from DrRacket? of course. Any programming tool that puts direct, immediate command of the machine at your fingertips is a good thing.

reply

Osiris 1 hour ago

I have never done any game development and my primary programming experience for the last few years has been JavaScript?.

My 10 year old daughter has a lot of ideas for games, but since I have no game programming experience I literally have no idea where to start with her. Does anyone have any suggestions for a good framework / toolset to get started for a simple game?

reply

krapp 1 hour ago

Game Maker[0] has a pretty intuitive UI and comes with a very basic (albeit proprietary) scripting language, so making 2d games at least is quite simple. Although the scripting language may be too simple for more than a rudimentary introduction to programming languages. Better than Alice though.

Construct 2[1] is a game framework for HTML5 and javascript, and Unity[2] has tutorials[2a] for basic games and it uses javascript, C# and "boo" (basically python) for scripting.

[0] http://www.yoyogames.com/studio

[1] https://www.scirra.com/construct2

[2] https://unity3d.com/

[2a] for versions prior to 5 - I don't know how many tutorials for the current version of Unity there are - you may want to check first and consider an older version.

reply

vivekian2 3 hours ago

Nice!

A bit off-topic here, but still related I guess. I have a 1 year old daughter and I keep wondering what would be the right time to introduce her to computers and programming in the future?

I have always thought that she should spend time reading books, playing in the backyard and lego before she delves into computers.

Have any other programmer parents thought about this as well? Or any other experiences on how they introduced programming to their kids?

reply

bentcorner 2 hours ago

I've tried introducing my son to Scratch (and one other language - it was a long time ago so I forget), and it was hard to keep him motivated without a meaningful sense of forward progress.

A class provides better structure with an end goal in mind. We enrolled him in several "make a game" camps that I think he enjoyed more than open-ended exploration.

These days, he takes CS courses in high school and enjoys them, I think getting them into programming at a young age is fine but not a necessary condition if you would like them to have it as a skill later in life.

As a parent, I'd say to introduce them to many different sorts of experiences and indulge them if they show interest, and be willing to let them change their mind. Be interested in what they do.

reply

acbart 1 hour ago

One of the more valuable things I've found when teaching is to always establish "the path forward". I wish that the CS Ed community had more established paths that I could share out. It's easy to point people towards CodeCademy?, for instance, but I don't always have a glib answer after that.

reply

unknownknowns 1 hour ago

Agreed. When I started learning to program around 12, I was very motivated by what I wanted to make, not follow some bland tutorial ala CodeCademy?.

From my experiences in university so far (Comp Sci), this experience seems to be pretty rare. If I ever have kids, I hope to be able to guide them in a similar way I learned as a kid. If they want to mod Minecraft, sure, let's start with that and not a boring tutorial for TodoApp?#5034.

reply

wjh_ 0 minutes ago

What you say about Minecraft rings true. I've been trying to get my 12 year old brother into programming for a while, never really succeeded. Today I setup Forge and taught him how to make an item for Minecraft. That got him excited about programming (or at least what one can do with it) more than anything else.


grayclhn 1 hour ago

My oldest daughter is 6. I introduced her to programming by letting her type in a full-screen emacs buffer with large letters. We'd change the colors, make a "rainstorm" or "snowstorm" (fill the screen with '/' or '*'), type words together, etc., and for a while she had a notebook with commands like "M-x set-foreground-color" listed in it.

My youngest daughter prefers to rip the keys off my laptop, so she gets to do less typing....

reply

---

personal note: that idea about IDEs being too complex/intimidating for beginners rings true and sounds very important to me. There needs to be simpler environments for beginners.

---

http://www.lexaloffle.com/pico-8.php

" PICO-8 is a fantasy console for making, sharing and playing tiny games and other computer programs. When you turn it on, the machine greets you with a shell for typing in Lua commands and provides simple built-in tools for creating your own cartridges.

Display 128x128 16 colours Cartridge Size 32k Sound 4 channel chip blerps Code Lua Sprites 128 8x8 sprites Map 128x32 cels Controls 2 6-button joysticks

The harsh limitations of PICO-8 are carefully chosen to be fun to work with, encourage small but expressive designs and hopefully to give PICO-8 cartridges their own particular look and feel. "

Very short initial manual, sprite and map editor builtin, Lua scripting: http://www.lexaloffle.com/pico-8.php?page=manual

the same company is making a 'voxel'/lego/minecraft-style 3d one too: http://www.lexaloffle.com/voxatron.php

now if only they'd make it for mobile (possibly just via HTML5) (the PICO-8 page says 'Linux - OSX - Win - Web - Voxatron' at the top but down below it says "To use PICO-8, you'll need Windows, Linux or a Mac with a 700MHz cpu and any video card.")

correction: you CAN play on the web: http://www.lexaloffle.com/bbs/?cat=7&sub=2

not sure what you need Window, Linux or Mac for then.. perhaps creating a new game can't be done on the web, but playing a game can?

"

 PICO-8 is built with:
 	SDL2 http://www.libsdl.org
 	Lua 5.2 http://www.lua.org  // see license.txt
 	GIFLIB http://giflib.sourceforge.net/
 	"

excerpts from the manual:

"

Hello World
	After pico-8 boots, try typing some of these commands followed by enter:
		PRINT("HELLO WORLD")
		RECTFILL(80,80,120,100,12)
		CIRCFILL(70,90,20,14)
		FOR I=1,4 DO PRINT(I) END
	
	(Note: PICO-8 only displays upper-case characters -- just type normally without capslock!)
	
	You can build up an interactive program by using commands like this in the code editing
	mode along with two special callback function _update and _draw. For example, the following
	program allows you to move a circle around with the cursor keys. Press escape to switch
	to the code editor and type or copy & paste the following code:
	X = 64  Y = 64
	FUNCTION _UPDATE()
	 IF (BTN(0)) THEN X=X-1 END
	 IF (BTN(1)) THEN X=X+1 END
	 IF (BTN(2)) THEN Y=Y-1 END
	 IF (BTN(3)) THEN Y=Y+1 END
	END
	FUNCTION _DRAW()
	 RECTFILL(0,0,127,127,5)
	 CIRCFILL(X,Y,7,8)
	END
	Now press escape to return to the main console and type RUN to see it in action.
	See the example cartridges for more complex programs.
Example Cartridges
	These cartridges are included with pico-8 and can be installed by typing:
	INSTALL_DEMOS
	CD DEMOS
	
	API       Demonstrates most PICO-8 functions
	JELPI     Platform game demo w/ 2p support 
	CAST      2.5D Raycaster demo
	MANDEL    Mandelbrot explorer
	AUTOMATA  1D automata explorer
	SERP      Serpinsky triangle
	DRIPPY    Draw a drippy squiggle
	STOMPY    Music cart
	WOO       Music cart
	To run a cartridge, open pico-8 and type:
	LOAD JELPI
	RUN
	
	Press escape to stop the program, and once more to enter editing mode
Filesystem
	These commands can be used to manage files and directories (folders):
	
	DIR        list the current directory
	CD BLAH    change directory
	CD ..      go up a directory
	CD /       change back to top directory (on pico-8's virtual drive)
	MKDIR      make a directory
	FOLDER     open the current directory in the host operating system's file browser
	LOAD BLAH  load a cart from the current directory
	SAVE BLAH  save a cart to the current directory
	If you want to move files around, duplicate them or delete them, best use the 
	FOLDER command and do it in the host operating system.
	

...

Backups
	If you quit without saving changes, or overwrite an existing file, a backup of the 
	cartridge is aved to pico-8/backup.
	...
Sharing Cartridges
	There are two ways to share carts:
	
		1. Share the .p8 or .p8.png file directly with other pico-8 users
	
		2. Post the cart on the Lexaloffe BBS to get a web-playable version
			http://www.lexaloffle.com/pico-8.php?page=submit
		See save() for notes on how to generate .p8.png versions. (search for .png)

...

Screenshots, Videos and Cartridge Labels
	While a cartridge is running use:
		F6 Save a screenshot to desktop
		F7 Capture cartridge label image
		F8 Start recording a video
		F9 Save video to desktop (max: 8 seconds)	
	

...

	Editor Modes
	Press escape to toggle between console and editor
	Click editing mode tabs at top right to switch or press ALT+LEFT/RIGHT
Code Editor
	Hold shift to select (or click and drag with mouse)
	CTRL-X, C, V to cut copy or paste selected
	CTRL-Z, Y to undo, redo
	CTRL-F, G to search for text, repeat search
	ALT-UP, DOWN to navigate to the previous, next function
Sprite Editor
	The sprite editor is designed to be used both for sprite-wise editing and for freeform 
	pixel-level editing. The sprite navigator at the bottom of the screen provides an 8x8-wise 
	view into the sprite-sheet, but it is possible to use freeform tools (pan, select) when
	dealing with larger or oddly sized areas.
	Draw Tool
		Click and drag on the sprite to edit
		Applies to visible area
		Hold LCONTROL to search and replace a colour
		Use left moust button to select colour
	Stamp Tool
		Click to stamp whatever is in the 
		Hold LCONTROL to stamp with transparency
	Select Tool // shortcut: LSHIFT or S
		Create a selection
		Enter or click to select none.
		
		If a pixel-wise selection is not present, many operations are instead applied
		to a sprite-wise selection. To select sprites, shift-drag in the sprite navigator.
	
	Pan Tool // shortcut: space
		View the spritesheet.
	
	Fill Tool
		Fill with the current colour
		Applies to the current selection
		If no selection, applies to visible area
	Extra keys
		CTRL-Z to undo // single step only in 0.2.0
		CTRL-C to copy selected area or selected sprites
		CTRL-V to paste to current sprite location
		Q,W to switch to previous/next sprite
		1,2 to switch to previous/next colour
		Tab to toggle fullscreen view
		Mousewheel to zoom (centered in fullscreen)
	
	
	Operations on selected area or selected sprites:
		f to flip
		v to flip vertically
		r to rotate (must be square selection)
		Cursor keys to move (loops if sprite selection)
		
	Sprite flags
		The 8 coloured circles are sprite flags for the current sprite.
		Each one can be true (on) or false (off), and are accessed by
		using the FSET and FGET functions. They are indexed from 0, from
		the left (0,1,2..7). See fset() for more information.
	
Map Editor
	Place selected sprite in grid cel
	Each cel only stores one 8-bit value (normally used as an index into the sprite sheet)
	Drawing to cels with y >= 32 clobbers shared data (bottom half of sprite sheet)
	To draw multiple sprites, select from sprite navigator with shift+drag
	To copy a block of values, use the selection tool and then stamp tool to paste
	To pan around the map, use the pan tool or hold space
	Q,W to switch to previous/next sprite
Sfx Editor
	Click and drag current instrument
	Shift click an instrument to set all notes to that instrument
	Hold control while painting frequencies to snap to Cm pentatonic
	
	Click/right-click on SPD to decrease/increase speed (lower value means faster)
		// hold shift for x4
	LP0 LP1 determines looping start and end points
	
	SPACE to start/stop
	a to release a looping sample
	
	Use the view mode buttons to edit the sfx's data as a graph or tracker-style.
	
	Tracker mode: 
		each note shows: frequency octave instrument volume effect
		Shift-click instrument / effect / volume to set for all notes
		
		To enter a note, use q2w3er5t6y7ui zsxdcvgbhnjm (musical keyboard layout)
		New notes are given the selected instrument/effect values
		To delete a note, press backspace or set the volume to 0
		(Setting volume to 0 can be used to delete a string of notes more easily)
		
		Effects: 0 none 1 slide 2 vibrato 3 drop 4 fade_in 5 fade_out 6 arp fast 7 arp slow
		Arpeggio commands (6,7) iterate over groups of 4 notes at speed 2 and 4
		
Music Editor
	Click/Right-click pattern numbers to indicate which sfx will be played for that pattern
	Top right: use loop start, loop back and stop flags to control playback flow.
	Space to start/stop
	Lua Syntax Primer

PICO-8 programs are written using Lua syntax, but do not use the standard Lua library. The following is a brief summary of essential Lua syntax.

For more details, or to find about proper Lua, see www.lua.org.

Comments
	-- use two hyphens like this to ignore everything until the end of the line
	
Types and assignment
	Types in Lua are numbers, strings, booleans and tables;
	NUM = 12/100
	S = "THIS IS A STRING"
	B = FALSE
	T = {1,2,3}
	
	Numbers in pico-8 are all 16:16 fixed point. They range from -32768 to 32767.
	Integer values can be written in hexidecimal. e.g. 0x11 = 17.0
	
Conditionals
	IF NOT B THEN
		PRINT("B IS FALSE")
	ELSE
		PRINT("B IS NOT FALSE")
	END
	IF (4 == 4) THEN PRINT("EQUAL") END
	IF (4 ~= 3) THEN PRINT("NOT EQUAL") END
	IF (4 <= 4) THEN PRINT("LESS THAN OR EQUAL") END
	IF (4 > 3) THEN PRINT("MORE THAN") END
Loops
	FOR X=1,5 DO
		PRINT(X)
	END
	-- prints 1,2,3,4,5
	X = 1
	WHILE(X <= 5) DO
		PRINT(X)
		X = X + 1
	END
	
	FOR X=1,5,3 DO PRINT(X) END   -- 1,4
	FOR X=5,1,-2 DO PRINT(X) END  -- 5,3,1
	
Functions and Local Variables
	Y=0
	FUNCTION PLUSONE(X)
		LOCAL Y = X+1
		RETURN Y
	END
	PRINT(PLUSONE(2)) -- 3
	PRINT(Y)          -- 0
Tables (Arrays and Objects)
	Arrays use 1-based indexing by default
	A = {1,2,3,4}
	A[3]=A[4]
	FOREACH(A, PRINT) -- 1 2 4 4
	
	Indexes can also be strings, and written as member variables
	
	B = {}
	B.X = 2 -- is equivalent to B["X"]
	B.Y = 2
Iterating over tables (PICO-8 implementation)
	A = {"hello", "blah"}
	ADD(A, "world")
	DEL(A, "blah")
	PRINT(COUNT(A)) -- 2
	
	FOR ITEM IN ALL(A) DO PRINT(ITEM) END
	-- or, equivalently:
	FOREACH(A, PRINT)
	
	-- also equivalently, using an anonymous function:
	FOREACH(A, FUNCTION(I) PRINT(I) END)
End-lines
	end-of-line characters have no meaning except to terminate comments.
	X = 1 Y = 2 PRINT(X+Y) -- this line will run ok
	
	An exception is shorthand IF statements (see the next section)
pico-8 shorthand
	pico-8 also allows several non-standard, shorter ways to write common patterns.
	
	1. IF THEN END statements on a single line can be expressed without the THEN & END
	
	IF (NOT B) I=1 J=2
	
	-- is equivalent to: IF (NOT B) THEN I=1 J=2 END
	-- note that the condition must be surrounded by brackets.
	
	
	2. unary math operators
	
	a += 2  -- equivalent to: a = a + 2
	a -= 2  -- equivalent to: a = a - 2
	a *= 2  -- equivalent to: a = a * 2
	a /= 2  -- equivalent to: a = a / 2
	a %= 2  -- equivalent to: a = a % 2
	
	
	3. != operator
	
	Not shorthand, but pico-8 also accepts != instead of ~= for "not equal to"

"

	API

(much of this is quoted from the same page as above, but note when copying into here: heavily excerpted without bothering to add ...s; you want the details, look at the real manual; also, i changed the name of some functions to make me understand their function just from the name, also i reformatted/rewrote some things; all this is because i'm just interested in what functions are provided)

	PICO-8 is built on the Lua scripting language, but does not include the Lua standard library.
	Instead, a small api is offered in keeping with pico-8's minimal design and limited screen
	space.

load, save: Load or save a cartridge

folder: Open the carts folder in the host operating system.

files: ls run: Run from the start of the program. Can be called from inside a program to reset program.

resume: Run from the existing cart state

reboot

stat, info (memory and CPU usage, cartridge size)

flip: Flip the back buffer to screen and wait for next frame (30fps). Don't normally need to do this -- _draw() calls it for you.


	Program Structure

	There are 3 special functions that, if defined by the user, are called during program 
	execution:
	
		_update()
			Called once per update at 30fps
	
		_draw()
			Called once per visible frame
		
		_init()
			Called once on program startup

	Graphics

	The draw state is reset each time a program is run. This is equivalent to calling:
	clip() camera() pal() color()

clip [x y w h]: Sets the screen's clipping region in pixels. clip() to reset

pget, pset: get or set pixel color

sget, sset: get or set spritesheet pixel color

fget, fset: Get or set the value (v) of a sprite's flag

print str [x y [col]]

cursor x y: Set the cursor position and carriage return margin

color col: Set default color to be used by drawing functions

cls: Clear screen

camera [x y]: Set a screen offset of -x, -y for all drawing operations. camera() to reset

circ, circfill (Draw a circle or filled circle at x,y with radius r), line, rect, rectfill

pal c0 c1 [p]: Draw all instances of colour c0 as c1 in subsequent draw calls. pal() to reset to system defaults (including transparency values)

palt c t: Set transparency for colour index to t (boolean)

spr: draw sprite n (0..255) at position x,y

sspr: Stretch rectangle from sprite sheet (sx, sy, sw, sh) given in pixels and draw in rectangle (dx, dy, dw, dh)


	Collections

a = {} add(a, "hello") add(a, "blah") add(a, "world") del(a, "blah") -- deletes first occurance of value in collection for item in all(a) do print(item) end foreach(a, print) print(count(a))

c = {1,2,3} foreach(c, print)


	Input

btn [i [p]]: get button i state for player p (default 0)

btnp [i [p]]: Same as btn() but only true when the button was not pressed the last frame


	Audio

sfx: play sfx n on channel (0..3) from note offset (0..31). n -1 to stop sound on that channel

music: play music starting from pattern n (0..63). n -1 to stop music


	Map

mget, mset: get or set map value (v) at x,y

map cel_x cel_y sx sy cel_w cel_h [layer]: draw section of map (in cels) at screen position sx, sy (pixels)

PICO-8 has 3 types of memory:

	1. base ram (32k): see layout below. Access with peek() poke() memcpy() memset()
	2. cart rom: same layout as base ram until 0x4300. Copy from cart to base ram with reload()
	3. lua ram (256k): compiled program + variables. Pay no attention to the man behind the curtain.
Base ram memory layout 0x0 gfx 0x1000 gfx2/map2 (shared) 0x2000 map 0x3000 gfx_props 0x3100 song 0x3200 sfx 0x4300 user-defined 0x5f00 draw state [,cart data] (192 bytes incl. unused) 0x5fc0 (reserved for persistent data -- in development) 0x6000 screen (8k)
	Colour format (gfx/screen) is 2 pixels per byte: low bits on the left
	Map format is one byte per cel (normally used as a sprite index)

peek, poke, memcpy, reload (Same as memcpy, but copies from cart rom), cstore (Same as memcpy, but copies from base ram to cart rom), memset (set len bytes to val)


	Math

max(x,y), min(x,y), mid(x,y,z) (middle value of parameters; for example, mid(7,5,10) returns 7), floor, cos sin atan2 sqrt abs rnd random_seed

Bitwise operations: band, bor, bxor, bnot, shl, shr


	Strings

s = "the quick brown fox" length: #s concatenate: .. substring: sub()

others have compared PICO-8 to http://computercraft.info/wiki and to the Lua game framework https://love2d.org/wiki/love and of course the PICO-8 company's similar 3d block/voxel-style other 'fantasy console' Voxatron. quick thoughts:

---

someone mentioned that (voxatron or PICO-8) uses 'ray casting', i looked up what that is, it seems like a cheap variant of ray tracing, so mb appropriate for resource-constrained environments: https://en.m.wikipedia.org/wiki/Ray_casting

---

probably not relevant but you never know: "the everything machine": http://www.fastcodesign.com/3050238/this-app-for-kids-makes-iphone-app-programming-as-easy-as-lego

scratch on the ipad?: https://www.google.com/search?client=ubuntu&channel=fs&q=scratch+hopscotch&ie=utf-8&oe=utf-8

---

PeCaN? 1 day ago

> Once below-1000€-laptops/desktops disappear in favour of oversized tablets, how are children going to learn coding?

Simple enough; they'll code on tablets.

I'm actually currently working on a prototype for how a simple, useful development environment might look on a phone or tablet. It's a stack-based concatenative array language with a zoomable user interface. Instead of representing code as lines of text, it takes a more Smalltalk-like approach of a live environment. The benefit of being a concatenative language is that it naturally lends itself to a tree-like format where each word can be viewed and edited on a phone screen. Since semantically it's closer to a weird mashup of J and Perl(!), it can be concise (hopefully still readable) and the vector aspect makes drawing graphics pretty straightforward.

The downside, of course, is that it can be quite hard to reason in. Truthfully, I'm not really sure how to work around that—and I don't think most children will easily think in a function composition/matrix manipulation way. That said, I'd like to find something since I'm fairly sold on the idea that tacit programming with arrays is key to making coding on a tablet work (I think it's fairly clear that imperative or even conventional function languages would be a royal pain to use in such an environment). Maybe something Lisp-like where the user zooms around the AST would be an alternative.

> Poor people in developed countries?

Much cheaper phones and tablets are already vastly more popular than laptops or desktops among poor people. The solution is to move coding forward on mobile, not simply keep rather trashy cheap laptops around.

reply

---

http://www.nicolasbize.com/blog/30-years-later-qbasic-is-still-the-best/

:

" My quest has led me to endless forums, through which I have tried countless suggestions: SmallBasic?, Pico-8, Smalltalk, Scratch, etc. I have even inquired of the Great Oracles of StackOverflow?, to no avail. After 5 months, I ended up with a disappointing conclusion: nothing is even close to what I had back in another era. 30 years later, QBasic is still the best when it comes to discovering programming. ... Yes, QBasic is a terrible procedural language. It introduces one to concepts widely considered harmful, uses awkward syntax for implicit declarations, is not case sensitive, is non-zero-based...each served a very specific purpose at the time: to keep the language simple and accessible ... As I dictated the formula, he slowly searched for each key, carefully typing with his right finger the magic words: PRINT “hello world”

He pressed F5 and looked amazed as he saw his code being compiled into text rendered on his black screen. ... We went on to a couple more commands: CLS, COLOR, PLAY, INPUT, and IF. There was nothing to explain: no complexity, no awkward operator, no abstract concepts, no documentation that needed to be read, no notion of objects/class/methods, no framework to install, no overwhelming menu/buttons in the IDE, no special keyword or parenthesis. ... Qbasic has a limited set of simple keywords (the entire help fits on a single F1 screen and is packed with simple examples!), does not distract the coder with any visual artifacts, has a very confined and cosy dev environment, shows errors as early as possible, compiles and executes the code in a heartbeat with a single key, and is extremely straightforward. "

in the comments are also suggested (in no particular order):

comments say:

" Wouldn’t using a subset of a scripting language like Python or Ruby provide a similar experience? Even though they have OO/functional designs, these aspects can be entirely ignored.

Ruby in particular is designed to work well as an unstructured/procedural scripting language. And its keywords almost exactly match those of BASIC. if .. else, for .. in, while, until, begin .. end while, def, puts, gets. The only thing it’s missing is goto, but… ew.

    Nicolas Bize says:	
    I thought of that… But just printing and getting input from the user into a variable is really a lot more complex than what Basic offers, don’t you think?
        Chris says:	
        It’s not so different in python, especially with the input function in python 3:
        name = input('what is your name? ')
        if name == 'noah':
        print('noah is the best')
        else:
        print('you are the worst')
        > python3 name.py
        what is your name? noah
        noah is the best
    ProgrammerDude says:	
    “it would be harder to teach a young kid that spacing is significant… let alone that the type of spacing is also important.”
    ^ Not any harder than teaching a young kid that every line must have a line number at the beginning. I think you give young kids too little credit.

Nicolas Bize says:

you’re right! somehow I was stuck with raw_input in my mind but it’s really cool to see the new input function in python 3.

UNIX administrator says:

Yeah install umpteen bazillion files and libraries, just in order to be able to get a Python prompt… that’s the ticket!

Brilliant idea. No wonder our industry has turned into living hell. Reply

" Ruby and Python are a lot more complicated than QBasic, but Lua isn’t. You’ve got strings, numbers, functions, and tables; that’s it. And if you start with the Love2D game engine, you’ve got all the graphics capabilities of QBasic "

" I teach middle school kids to code in an after-school robotics and computer science club. This year I switched to teaching the kids Python and it worked exceptionally well! Python is a modern, yet simple language. With add-ons such as pygame kids can easily write simple games with only a small amount of code.

The whitespace issue with Python (which admittedly I don’t like either) turned out to not be that bad and with a some practice kids got used to it. "

" this is exactly how I started programming – by learning and playing with QBasic, and writing things down in a notebook. My curiosity led me to read the code for the Gorilla and Snake games that are written in QBasic to see what *could be done*. "

"why didn’t you like smallbasic ... Just seemed that TextWindow?.WriteLine? (“Hello world”) was already too complex to simply print out some text. ... plicated

I started out with doing doing a one line program :-

Turtle.Move(100)

then

Turtle.Move(100) Turtle.TurnRight?() Turtle.Move(100) "

"I wish I had some guidance back in the day though. I distinctly remember arrays being too abstract for me to understand what they were, how to use them etc."

"QBasic is not the best. “Noah is the best!” I read your article in the bus and I was wondering if you had thought about Python. I just tried re-creating the little program Noah wrote and it’s quite simple using IDLE (which takes care of the indentation for you and can run the script with the F5 shortcut as well). In addition, Python has nice little libraries for teaching children, such as the turtle module that allows to get nice graphical output, which is quite stimulating for children I think :) "

"I now program PHP for the web and love it because it allows you to code how you want to code. Yet OOP was forced upon PHP and now it just isn’t as fun. I wish some would bring a new language that is fun and easy that goes beyond Basic and PHP."

todo: read related HN article https://news.ycombinator.com/item?id=11636383

---

https://glitch.com/

---

[2]

" And for the past 5 months, I have been looking for the holy grail of language/IDE for kids in the hope of turning that spark of interest into a memorable experience…

My quest has led me to endless forums, through which I have tried countless suggestions: SmallBasic?, Pico-8, Smalltalk, Scratch, etc...After 5 months, I ended up with a disappointing conclusion: nothing is even close to what I had back in another era. 30 years later, QBasic is still the best when it comes to discovering programming.

“OMG please don’t teach him GOTOs!!” Yes, QBasic is a terrible procedural language. It introduces one to concepts widely considered harmful, uses awkward syntax for implicit declarations, is not case sensitive, is non-zero-based, etc. the list goes on...while most of those QBasic concepts are today generally considered as red flags by our peers, they each served a very specific purpose at the time: to keep the language simple and accessible, a notion that every other language has left behind in favor of flexibility, complexity and logic.

...

He double clicked the icon on his desktop and in a split second, we were in the IDE...He pressed F5 and looked amazed as he saw his code being compiled into text rendered on his black screen....We went on to a couple more commands: CLS, COLOR, PLAY, INPUT, and IF. There was nothing to explain: no complexity, no awkward operator, no abstract concepts, no documentation that needed to be read, no notion of objects/class/methods, no framework to install, no overwhelming menu/buttons in the IDE, no special keyword or parenthesis

...

in more than 30 years, we have not been able to come up with something better for our kids: Qbasic has a limited set of simple keywords (the entire help fits on a single F1 screen and is packed with simple examples!), does not distract the coder with any visual artifacts, has a very confined and cosy dev environment, shows errors as early as possible, compiles and executes the code in a heartbeat with a single key, and is extremely straightforward

"

"

meuk 1 day ago [-]

Oh, how many hours I spent in front of that TUI. QBasic was how programming should be. It's amazingly simple to understand (at the cost of ugly and somewhat verbose syntax). It doesn't force any mental burdens on you, and it included both a compiler and a interpreter, so you could run your programs instantly (with array out-of-bounds and overflow checking) and have a fast, compiled version.

I wrote plenty of programs that worked the first time I ran them, something that seldom happened to me in more modern programming environments, which put many mental burdens on you, and encourage writing fast and sloppily, and then improving your mistakes afterwards. You don't need any boilerplate - I regularly used QBasic to just plot a graph for example (in a program written from scratch).

Also, I like the approach to pointers is very nice, I think. There are no pointers. You need to PEEK or POKE into memory! In C you do

    a = *b

In QBasic you do

    a = PEEK(b)

Which is so easy to understand that I sometimes wonder if pointers is C are even an improvement to this ... The help system was absolutely amazing. It was possible to read a keyword for the first time, press F1, and two minutes later you would actually understand the statement. Something I never experienced afterwards. "

---

https://basicengine.org/ https://news.ycombinator.com/item?id=17674944

---

---

https://repl.it/site/blog/gfx?ref=updates https://news.ycombinator.com/item?id=19457324

---

something as easy as flash to create

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

 javajosh 1 day ago [–]

Some of the best games (and game ideas) I've ever seen, bar none, were on Kongregate. Flash (and particularly later versions of ActionScript?) were just so good for this kind of programming, and really, even the modern web hasn't caught up yet. Looking forward though to the next iteration which is HTML5 based...

reply

slimsag 1 day ago [–]

I am going to miss this a lot, too.

I don't think the "next big thing" here will be HTML5, though. Unity is _ridiculously_ easy and has led to large swaths of indie games on Steam - people don't quite understand just how easy it is to make games in Unity these days. You can pass without understanding coding at all to a large extent, and reminds me a _lot_ of working in Flash.

If you don't believe me, look up Sam Hogan on YouTube? - or search YouTube? for "unity game in 24h". I'm not saying these are all good - but it reminds me a _lot_ of how Flash enabled rapid development of game ideas.

reply

tomgp 20 hours ago [–]

Unity was approachable in its early days. Now it’s a mess , not to say that there aren’t many fantastic games produced using it, but anyone coming to it now is going to find it very hard to get a foothold. Having had a good experience with it when it first started making waves I installed it for a family member recently and found the whole process excruciating, none of the tutorials seem to work out the box and there’s a lot of specialised vocabulary you need to know before you can make use of the tools. It seems like Unity is competing with Unreal now rather than going for the market vacated by Flash.

reply

---

" A simple editor, with an inbuilt help page and a run button is all you need. "

---

---

 Razengan 23 hours ago [–]

Is there any modern development system/language/whatever that lets us directly draw pixels and play notes with single commands/calls without any setup or preparation?

reply

MauranKilom? 15 hours ago [–]

Check out Processing!

https://processing.org

reply

Razengan 14 hours ago [–]

Processing seems to use a draw() event, unlike Basic where you can just issue graphic commands anywhere as you go.

reply

MauranKilom? 4 hours ago [–]

If you write your code only within the draw() function (which is pretty common), it's the same as an infinite loop around your code. If you want it to execute just once, just call noLoop() at the end of your setup.

Elsethread there's also links to tweets involving a "golfified" version of Processing if that's what you're looking for.

reply

---

https://opensource.com/article/21/6/teach-python-raspberry-pi

https://thonny.org/

https://codewith.mu/

---

hypercard-like:

https://lively-kernel.org/

---

https://github.com/joshiemoore/snakeware

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

---

old-timey computers that were better at intro to programming

https://en.wikipedia.org/wiki/TRS-80 https://en.wikipedia.org/wiki/Commodore_64 https://en.wikipedia.org/wiki/BBC_Micro

(https://news.ycombinator.com/item?id=23392062 thinks "The Beeb probably had the best implementation at the time ((of basic)) with the Spectrum coming second.")

---

https://github.com/akkartik/teliva

---

https://www.amazon.com/Illustrating-Basic-Simple-Programming-Language/dp/0521217040 https://archive.org/details/cambridge-university-press-illustrating-basic-a-simple-programming-language_202110/mode/2up

---

https://news.ycombinator.com/item?id=34079543 flash, hypercard, visual basic

CharlesW? 2 hours ago

parent prev next [–]

> It blows my mind that no one has made a tool like that in so long. […] Why has the pinnacle of ease of use in game creation been achieved and never replicated since?

FWIW it never went away¹ and targets standards-based runtimes these days. I'm sure there are many kids every month having the same kind of epiphanies with it!

That being said, because Adobe Animate is marketed as a tool for professionals rather than kids/enthusiasts, orders of magnitude more kids are having the kind of experience you had with Minecraft and Roblox instead.

¹ https://www.adobe.com/products/animate.html

reply

ecshafer 2 hours ago

root parent next [–]

There is a small but major difference with Flash vs Minecraft and Roblox. Flash let you create something from scratch (or close to it). You aren't just modding a game, you are making a game or a cartoon. It was fantastic. Minecraft you are limited to the world of minecraft.

reply

---

https://news.ycombinator.com/item?id=37470318 mentions visual basic (VB6), MS Access, HyperCard?, Flash, FoxPro?, Delphi

a lot of talk about integrated GUI building (RAD)

some say that Python replaced VB6 but others say, but it's harder to build a GUI

---

[3]

---