News for hackers. Stuff that matters.
Re:Fortran is easy to learn by BeetleB on Friday January 07, 2022 @11:15PM (#29848568)
First: Very convenient to provide a numerical program to showcase.

Mainly:

> Certainly things like I/O are still problematic for the novice programmer in these languages.

Poor I/O basically killed my interest in programming in most languages when I was a novice. BASIC was great for this. QuickBasic was, and probably still is king. People new to programming want to do fun stuff, and it's very hard to do without I/O. Me and most of my peers spent a fair amount of their hobby programming writing very simple games, or doing fun graphics stuff (drawing lines, circles, etc).

After doing this for a while in BASIC and QB, "serious" languages like C/C++ were pure Hell. I could literally do none of the cool things I used to with only a rudimentary command of the language. Did not know about Perl/Python until much later.

In my opinion, if you want learning languages to be fun, provide one where:

- Text I/O are no-brainers

- You can easily respond to keypresses (i.e. detecting if a button was pressed and not having to wait till the user hits Enter).

- Rudimentary graphics: Plotting a point, drawing a line and circle. Coloring it as desired.

- Easy way to generate random numbers.

Teach people these things, and they can have a lot of fun with loops, conditionals, and functions.

Re:Fortran is easy to learn by badsectoracula on Saturday January 08, 2022 @02:55AM (#29849632)
I remember some people i know learning programming using DarkBASIC which had a custom fullscreen IDE[0] very reminiscent of QBASIC, though unlike QBASIC it was focused on making games (especially 3D games). It provided out of the box commands for graphics, sound, music, etc (IIRC you could place and animate a 3D model with a couple of lines of code and the examples were simple 3D games[1]) and had integrated hypertext help that taught the basics of programming, among others[2]. Also had a CLI (inside the IDE) for quickly trying out stuff.

It was later replaced by DarkBASIC Pro (which was eventually open sourced years later) but that one used a more traditional IDE that was kinda reminiscent of a simplified Visual C++ 2005 and had a more complex language.

[0] https://i.imgur.com/UKZtMue.png

[1] https://i.imgur.com/lslPht6.png

[2] https://i.imgur.com/TqrSzEe.png

Re:Fortran is easy to learn by ravenstine on Saturday January 08, 2022 @12:15AM (#29848830)
That's exactly why it took me ages to finally get into other programming languages besides QBASIC and Visual Basic, and primitive ES3 era JavaScript. I'd try to learn C, but it was immediately obvious that there would be a long road to doing anything interesting. If I could easily do I/O with QBASIC, it was hard to justify spending hours reading a bunch of boring books to do the same thing with C/C++.

Looking back, I think QBASIC/QuickBasic had it right in contrast to other learning languages. You don't need a DSL, turtle graphics, drag-and-drop code blocks, or any of that stuff to teach programming. Just make the hurdle to getting useful input and output minimal, and the prospective programmer can take it from there.

On the other hand, I do wish I had been able to pick up things like C much earlier in life. Only recently did I actually learn C++ in my 30s, even though part of me wanted to learn it when I was 9. I think that things like QBASIC can also be a sort of trap because if the I/O is so easy then it can be difficult to leave it for something that actually is better but not in an obvious way to a novice.

Re:Fortran is easy to learn by noobermin on Saturday January 08, 2022 @07:34AM (#29851072)
Fortran is great for computational programmers (ie. scientists) who can code things up without worrying about certain details that you need to keep straight in other languages. A lot of the things you're talking about are for general programming for which Fortran is not well suited. May be your initial interest in programming comes from games essentially which is why Basic appealed to you. For a fortran programmer, the initial interest comes from "what tool does my advisor use to calculate light propagation in semi-ionized media" and for that Fortran excells.

When evaluating what is good for beginners it helps to remember not all beginners approach programming from the same place. Traditionally computational scientists were a distinct and equal in size subset of the users of computer resources in academic and industry research centers accross the nation, specifically distinct from computer scientists. Today they are smaller total fraction but that history continues to inform how they approach computation and mentor new scientists learning to use computers for science, which diverges from the way computer scientists do both in approach and requisite mental model.

Re:Fortran is easy to learn by BeetleB on Saturday January 08, 2022 @01:03PM (#29854282)
> A lot of the things you're talking about are for general programming for which Fortran is not well suited.

The article is about teaching programming in general, not teaching it for computational needs:

> in any respects modern Fortran is an exceptionally good language to teach programming in

> Partially it is because modern Fortran is easy to read and comprehend, which is an important factor for the individual learning to program for the first time.

> The idea of introductory languages is not necessarily that they are suited to commercial endeavours, but rather that they are (i) easy to implement algorithm in, (ii) readable, and (iii) do not contain things that will confuse and bewilder.

You can also see his prior blog posts where again he is speaking about learning programming in general - not limited to computation.

Re:Fortran is easy to learn by udbhavs on Saturday January 08, 2022 @03:18AM (#29849753)
This is pretty much embodied by creative coding environments[0] like Processing (https://processing.org/) which is how I got my start in programming and incredibly fun

[0] https://en.wikipedia.org/wiki/Creative_coding

Re:Fortran is easy to learn by wott on Saturday January 08, 2022 @05:03AM (#29850183)
Output (text output) isn't bad in C, but indeed input is another story (either lacking like keypresses, or when a convenience like scanf() is provided, it is full of traps for beginners).

Its origin is really showing: UNIXes and their line-oriented terminals. No notion of a screen-oriented console, let alone a graphical one, unlike most BASICs aimed at personal computers.

Re:Fortran is easy to learn by BeetleB on Saturday January 08, 2022 @01:11PM (#29854375)
> Output (text output) isn't bad in C

It's still poor compared to most languages I've used. String formatting is not simple for beginners. In Python you can do:

    print(num_eggs)
where num_eggs is an integer. In C you have to do:

    printf("%d", num_eggs);
One is much simpler than the other.

And on top of that, I detest languages that force you to manually enter newlines by default. Probably over 90% of use cases require a newline, so why not have the function add it by default, and either provide another print function or optional parameter for the times when you don't want a newline? The "I forgot to add a newline" headache is extremely annoying. Whereas in languages that add it by default, I rarely find myself saying "Ouch. I actually didn't want a newline there."

Re:Fortran is easy to learn by Aardwolf on Saturday January 08, 2022 @03:19AM (#29849756)
I had the same experience going from qbasic to c++, but then I found the SDL library that could do all these things (input, graphics, time, ...) and I could have fun writing simple games again!
Re:Fortran is easy to learn by usually on Saturday January 08, 2022 @12:24AM (#29848884)
Easy dependencies are also a huge boon for fun, I remember having a lot of frustration with python in that regard.
Re:Fortran is easy to learn by FabHK on Saturday January 08, 2022 @08:28AM (#29851461)
GFA Basic on the Atari ST was great in all respects you mentioned.
Re:Fortran is easy to learn by gurjeet on Friday January 07, 2022 @11:50PM (#29848724)
Something tells me you have more ideas on how to make a language or programming environment more welcoming, and less intimidating for new learners. Please go on :-)
Re:Fortran is easy to learn by BeetleB on Saturday January 08, 2022 @12:30AM (#29848911)
Never thought of it beyond what I wrote - mostly voicing my own personal frustrations with learning languages. I finally had to learn C/C++ in university, and was quite good at it, but avoided programming until I learned Perl some years later.

I do think that if one is an engineering student (not necessarily CS/CompE), then it's more useful to teach how to do useful stuff (e.g. automation) in languages like Python. In my day most schools used either C/C++ or Java - both of which are not very useful for people whose primary job is not coding. Engineering students would take that one course and that's it. However, I suspect most engineers will benefit greatly if they knew Python. Lots of tedious stuff to automate.

Even if the introductory course uses Python, I think they should cover useful tasks for automation - handling directories, and perhaps some basic network related stuff via requests. If you can't squeeze it into one course, make another one and make it mandatory. It'll be more useful than many engineering courses they'll take.