4 ms·
In the 80's, you would turn on your C-64 or ZX-Spectrum or Oric-1 or Dragon-32 or Atari 800, and type: PRINT "This is nice" and it would. Then, you would
by beagle3 9y ago
In the 80's, you would turn on your C-64 or ZX-Spectrum or Oric-1 or Dragon-32 or Atari 800, and type:
PRINT "This is nice"
and it would.
Then, you would type:
10 FOR I=1 TO 10
20 PRINT "This works too! Number ",I
30 NEXT I
40 GOTO 10
And it would.
Today, you go to your computer and ...
open an IDE, define a project, pick your Java environment, select "file new", write some random incantation of "public static void main", accept the suggesting missing imports if you are lucky (if your ide doesn't figure them out, you have to do them yourself), and after a while you actually start running.
In the BASIC example, the only "unnecessary detail" are the unreferenced line numbers 20 and 30, which indeed become optional in later basics. In the Java example, everything I described above is incidental. It is not useless in the grand scheme of things of projects with millions of LOC and tens of developers and stuff -- but it is unnecessary for small examples. Java does not scale down.
Python mostly scales both up and down, but it still isn't as easy to start writing stuff the way it was in the 80s.
The most popular programming environment, by far, is a spreadsheet - it's not imperative or object oriented, but rather functional. and it also fails to scale up or down.
- dukoid 9y agoWould you mind taking a look at https://github.com/stefanhaustein/codechat https://github.com/stefanhaustein/codechat ? WDYT?
- beagle3 9y agoCan't try on an Android right now, did watch the YouTube and looked at the examples. First, it looks awesome. You should do a Show HN sooner than later. Having a few decades of experience under my belt, I'm sure I'm blind to some things newcomers/starters would see, but what I did notice: - Camel case is bad for mobile typing, and bad for non-coders in my experience; underscore is better for the latter but not for mobile typing, so that's not really a solution unless you can add an underscore or some other character (non-minus-dash? center-dot?) that can be pressed directly. - Case sensitivity in general is best avoided in beginner languages, which if adopted might make the above point moot. - I personally find the pairing of "end" and ":" confusing, possibly because of years of "begin/end", "{/}" and "indent: dedent" experience. Most people seem to have a better intuitive grasp of the indent/dedent than any other block scoping, but for mobile I guess ":/end" is acceptable although "{/}" might be better. - What is the distinction between "let" and "variable" ? - The "#number" syntax is not intuitive - I goess it's a replacement for function names or line numbers, for refernece purposes? - One of the conceptual problems that some people have is with the "=" sign for assignment, as it conflicts with its use in mathematics. All overcome it sooner or later, but when I've shown APL ( where assigment of 3 to a is written A <- 3 ) or Pascal ( A := 3 ) to non-programmers, this confusion never comes up. I would recommend keeping = for comparison, and using another symbol for assignments. - Consider adding a variable value display. I've used PythonTutor[1] to teach basic JavaScript and Python non-programmers with great success. A complete value trace is likely beyond the scope of codechat, but a variable display might be very useful. All in all, I think it's awesome. Are you familiar with Atari VCS 2600 BASIC[0]? That's what it reminded me of. [0] http://boston.conman.org/2015/06/16.1 http://boston.conman.org/2015/06/16.1 [1] http://www.pythontutor.com/ http://www.pythontutor.com/
- dukoid 9y agoThanks! Case sensitivity: I'd prefer to make the language case-insensitive (or at least avoid uppercase in anything builtin), but then I'd need some other way to distinguish types and other identifiers. Any suggestions? There is already an issue for this: https://github.com/stefanhaustein/codechat/issues/1 https://github.com/stefanhaustein/codechat/issues/1 Blocks: I was using {} before but it was inconvenient on mobile. Significant indent also seemed tricky. So I went for this combination for now. let vs. variable: let declares a constant. Typing effort for let vs. variable is on purpose O:) The #number syntax is for identifying specific instances if they are not explicitly named. Makes sure editing an "on x" trigger replaces it (opposed to adding another one). Assignment syntax: Will change to := as suggested. Variable value display: Will add "something" to do this. I wasn't familiar with Atari VCS 2600 BASIC, but I must admit that my first programming language was (Spectrum) BASIC and I am trying to avoid some of the issues I found confusing in 1983 O:)
- pjmlp 9y agoLooks nice. Maybe some kind of GUI would be better, as a way to ease typing commands. Something like Pythonista or Lisping on iOS.
- phaemon 9y agoIt's not that bad. I turn on my computer and type: echo "This is nice." and it does. Then, I type: for i in {1..10}; do echo "This works too! Number $i" done And it does.
- beagle3 9y agoI appreciate this response... As you say, it's not too bad, although the {1..10} and the semicolon would be more confusing to the uninitiated (based on the fact that they are confusing to many bash veterans as well...) Now, how do you replicate SAVE "myprogram" and a later LOAD "myprogram" RUN without having to teach vi, redirection, chmod, source, $PATH, and friends? My point is that the old environments, while limited, scaled from zero to useful with much less requirements than today's environments, which scale much higher at the expense of a beginner's joy of experimentation.
- phaemon 9y agoI do get what you mean; my 48k Spectrum was certainly a simpler machine than my current laptop! But I still think there are simple things that beginners can do. The whole SAVE, LOAD, RUN concepts also had to be learned. And you only need to know some text editor to be able to save a file. It can then be run with `bash myprogram`. And then later you can add the concepts of adding a shebang and making the file executable. Also, the huge advantage of teaching shell commands is that it is actually, currently useful. I use those commands every day at work, despite having learnt them initially on an old Sun server many moons ago. I can't say the same for Spectrum Basic! :)
- flukus 9y agoYou raise a good point, but we could replicate that with a couple of trivial shell scripts too. Throw a curses library (https://bashsimplecurses.readthedocs.io/en/latest/ https://bashsimplecurses.readthedocs.io/en/latest/) into the default profile and you've got an environment capable of simple apps and games too.
- jlebrech 9y agoruby is your shell and you have no password?
- he_the_great 9y agoSeriously though, not being thrown into a program editor at boot is not what prevents getting started with programming. It probably is the fact that you can do non-programming on the computer. I mean, anyone using a computer would then know programming by definition. On another note [Flashing Block here]