Feedback for fpm based on teaching my son

Not at all, I am very happy with all your suggestions, almost all of which I agree. I am sorry if it came out that way, I should have formulated it differently. I tried to explain what I meant by this in my post that had this quote. Essentially these are such fundamental issues that the more people actively work on them, the better, and especially those that feel strongly about it (such as you and I) should be present, to ensure things get done as we like it. I suspect actually implementing them (in terms of lines of code) might be quite easy, but the hard part is to design things well. Anyway, thank you and I’ll see you at the call tomorrow.

2 Likes

I hope veering into general discussion of learning to program is OK.

May I ask what his math background is? I wonder what the math prerequisites are to learn Fortran. I think at least some algebra is needed, although = in Fortran often has a different meaning than in algebra, where one does not write i = i + 1.

Some U.S. textbooks for high school math from the 1980s would have code examples and exercises in BASIC, which was available on personal computers running DOS. Today students may be exposed to Scratch, take an elective web design class in high school, and take AP Computer Science as an elective in 11th or 12th grade using Java. I have one son who started programming in early elementary school, when I exposed him to it, and is now majoring in computer engineering. The two other children have done little programming. Almost everyone who attends a selective university in the U.S. will have studied math for 12 years, through calculus or pre-calculus. But since computer science teaching is haphazard and not required, some students enter college with literally 10 years more experience than others, and those with no background, even if they have aptitude, may be intimidated by peers who are far ahead of them.

Having seen only LOGO and BASIC at school, I was shocked when I saw i=i+1 for the first time in my freshman college year. It is a poor choice of symbols which just got famous, IMHO. In fact, i <- i+1 is a clearer syntax. I often define a subroutine add_to for derived types in Fortran to replace a=a+b by call add_to(a,b).

Scratch is the new LOGO. Either is a good choice to introduce children to programming. One of my most revered programmers, John Carmack, uses Racket to teach his children. Idea is to choose a language with minimum syntax, so as to not allow the learner get bogged down with semantics and loose sight of problem solving capacity.

Sure. He knows addition of any numbers, multiplication (of any digits number if any digit number), exponentiation of smaller integers, and single digit division. He can also multiply some real numbers / floating point. It seems you don’t need more than that to enjoy what Fortran can do for you.

2 Likes

So this has a long history. It used to be mathematical convention to use := for assignment and =for equality. I think this is probably because equality is a more frequently and more fundamental concept in math so it gets the simpler notation.

Computer science being an child of mathematics even inherited that convection, like in ALGOL (which I know is a few year newer than Fortran), Pascal and probably a few more languages I’m not familiar with (i think Mathematica also uses this syntax) it’s also used in a few pseudo-code conventions.
But, in programming, assignment is a more frequently used operation, and a lot of the comparison operators are already 2 characters long (>=, <=, !=, etc) so using == for equality got popular.
It’s annoying to have different conventions for different fields but I don’t think we need a new one (speaking for computer programming in general, not any particular language).

To be fair i found out that Plankalkül used a => syntax for assignment which is nice because it reads naturally form the left to the right. But that brings up more questions, if assignments are denoted with “arrow” operator wouldn’t people expect them to be “pointed”? Obviously <= is not going to fly because it conflicts with the usual syntax for “less or equal”. It turns out -> conflicts with a pointer assignment operation in C, which is a monster I would rather not go against, but nothing else that I could find.

1 Like

I teach 10-14 years old an introduction to programing (in C because they will need C++ STL when they are >15 for competitive programing). This is a universal problem and a lot of students get annoyed with it, Word auto saves, Google Docs auto saves, everything modern auto saves. Which most of us with “Ctrl+S” PTSD from microsoft office really appreciate, every (graphical, at least) text editor should autosave by default.

1 Like

Never.Leave.Emacs.

2 Likes