Test-driven training pad

Beyond the scope of the quickstart tutorial, «other resources» of «Learn Fortran» lists a number of books and internet resources to get familiar (again) with Fortran. In comparison to the tutorial’s character inviting the interested to probe interaction with the language, I perceive both categories as static references.

So my question is if the same page, or an other on fortran-lang.org would be suitable to mention a site like codewars.com/, perhaps below a section «on-line training».

The site in question hosts 6951 approved problems (kata) presented in an interactive, test-driven environment, grouped by difficulty (a little bit like learnlatex) of which 131 already are suitable for Fortran with automatic checks of the results. Because the problem sets are language agnostic (e.g., about basic language features, formatting, control flow, regular expressions, etc.), it is possible to compare how these are addressed in other languages, too. The successful solution then allows the users to discuss their approaches taken, and to score them for «cleverness» and «best practice»; or to adjust existing / create new problems to Fortran. It possibly could spur inspirations for packages of the Fortran package manager, too.


Hi @nbehrnd, welcome to the forum! I think this might be a good idea. @milancurcic, @lkedward and others, what do you think?

Sounds like a neat idea. 7 or 8 years ago I did a decent subset of the Project Euler problems in Fortran. That might be something interesting to list as well.

1 Like

This is a really good point and I agree that having links to online ‘active’ learning resources would be beneficial.

1 Like

Maybe also a link toward an online Fortran compiler? Some were cited in that post:


While Fortran is among the languages represented in Project Euler
(PE), it does not (this much) allow to narrow the tasks by category
(e.g., loops, regular expressions) or scale of difficulty to
translate a problem into a working solution. In PE, there is no
discussion possible /not/ revealing the solution; and by experience I
know if participants do not set a spoiler flag themselves, there is a
watch to put the relevant part of the discussion behind this temporary

For a question solved, PE offers access to all solutions for this
problem, regardless of the language the participants used. The
entries are labeled accordingly, but it may be more difficult to
focus on one language then. Speaking for myself, back then, I was
fine if my copy-pasted solution simply matched the result expected by
PE; and did little to revise my work to what could be (closer to)
«best practices». However, today I consider this particular indicator
by CW a valuable educational guide (think self-study); it is the
default criterion of sort offered.

Maybe also a link toward an online Fortran compiler?

This was a thought, too. Because the very first posts in this forum
constrain the number of links to be used to two, my reference to
https://www.learnlatex.org/ did not pass the filters as visible
internet address.

By passing, I know that there are examples of on-line testing e.g.
for Lua, too, e.g. on Lua: demo. A dedicated
interface of course would be more comfortable for the user than
starting a bash session on a service like replit_dot_com, eventually
invoking gfortran.

1 Like

I think this would be a great addition. Perhaps on the Learn page, we could add a section called “Practice” between the “Mini-book Tutorials” and “Other Resources”. There we could list links to “challenge” websites like Code wars and Project Euler, as well as links to interactive Fortran in the browser like Godbolt, Repl.it and others.


I definitely want to have interactive Jupyter based notebooks that are LFortran powered that explain how to use Fortran on examples. I have been super excited about exactly that for about 3 years, but we are not there yet with LFortran, but really close. For anybody interested, you can watch our progress here:

Once we deliver MVP, it will be enough features to start such tutorials.


Another code practice platform I found recently is called Exercism. If someone wants to help them develop their Fortran Track, visit the repository: GitHub - exercism/fortran: Exercism exercises in Fortran.

At least the initial exercises are focused on character processing, which is not really what Fortran excels at. It might provide beginners with the wrong impression of how Fortran is used in practice.