# Test-driven training pad

**URL:** https://fortran-lang.discourse.group/t/test-driven-training-pad/978
**Category:** Tutorials
**Created:** [April 7, 2021, 8:09am UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978 "2021-04-07T08:09:13Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![nbehrnd](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@nbehrnd](https://fortran-lang.discourse.group/u/nbehrnd)
#### Post date: [April 7, 2021, 8:09am UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/1 "2021-04-07T08:09:13Z")

</div>

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](http://fortran-lang.org) would be suitable to mention a site like [codewars.com/](https://www.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.

---

<div class="post-metadata">

### Author: ![certik](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/certik/32/4_2.png) [@certik](https://fortran-lang.discourse.group/u/certik)
#### Post date: [April 7, 2021, 1:35pm UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/2 "2021-04-07T13:35:17Z")

</div>

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

---

<div class="post-metadata">

### Author: ![everythingfunctional](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/everythingfunctional/32/176_2.png) [@everythingfunctional](https://fortran-lang.discourse.group/u/everythingfunctional)
#### Post date: [April 7, 2021, 1:58pm UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/3 "2021-04-07T13:58:30Z")

</div>

Sounds like a neat idea. 7 or 8 years ago [I did](https://gitlab.com/everythingfunctional/Project-Euler) a decent subset of the [Project Euler](https://projecteuler.net/) problems in Fortran. That might be something interesting to list as well.

---

<div class="post-metadata">

### Author: ![lkedward](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/lkedward/32/72_2.png) [@lkedward](https://fortran-lang.discourse.group/u/lkedward)
#### Post date: [April 7, 2021, 2:20pm UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/4 "2021-04-07T14:20:15Z")

</div>

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

---

<div class="post-metadata">

### Author: ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)
#### Post date: [April 7, 2021, 2:42pm UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/5 "2021-04-07T14:42:21Z")

</div>

Maybe also a link toward an online Fortran compiler? Some were cited in that post:  
[https://fortran-lang.discourse.group/t/embed-a-jupyter-notebook-in-fortran-lang-org-learn/724](https://fortran-lang.discourse.group/t/embed-a-jupyter-notebook-in-fortran-lang-org-learn/724)

---

<div class="post-metadata">

### Author: ![nbehrnd](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@nbehrnd](https://fortran-lang.discourse.group/u/nbehrnd)
#### Post date: [April 7, 2021, 2:59pm UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/6 "2021-04-07T14:59:13Z")

</div>

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  
blind.

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.

---

<div class="post-metadata">

### Author: ![nbehrnd](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@nbehrnd](https://fortran-lang.discourse.group/u/nbehrnd)
#### Post date: [April 7, 2021, 3:11pm UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/7 "2021-04-07T15:11:53Z")

</div>

> 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/](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 [https://www.lua.org/cgi-bin/demo](https://www.lua.org/cgi-bin/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.

---

<div class="post-metadata">

### Author: ![milancurcic](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/milancurcic/32/2_2.png) [@milancurcic](https://fortran-lang.discourse.group/u/milancurcic)
#### Post date: [April 7, 2021, 3:34pm UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/8 "2021-04-07T15:34:16Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![certik](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/certik/32/4_2.png) [@certik](https://fortran-lang.discourse.group/u/certik)
#### Post date: [April 7, 2021, 4:12pm UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/9 "2021-04-07T16:12:38Z")

</div>

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:

> **[MVP: Roadmap to compile the SNAP project (#313) · Issues · lfortran / lfortran](https://gitlab.com/lfortran/lfortran/-/issues/313)**
>
> The roadmap at #272 is a general roadmap. In this issue I am...

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

---

<div class="post-metadata">

### Author: ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)
#### Post date: [April 15, 2021, 6:59pm UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/10 "2021-04-15T18:59:45Z")

</div>

Another code practice platform I found recently is called [Exercism](https://exercism.io/). If someone wants to help them develop their Fortran Track, visit the repository: [GitHub - exercism/fortran: Exercism exercises in Fortran.](https://github.com/exercism/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.

---

<div class="post-metadata">

### Author: ![Beliavsky](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)
#### Post date: [January 26, 2022, 7:59pm UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/11 "2022-01-26T19:59:07Z")

</div>

MathWorks is the successful company behind Matlab, and it’s worth looking at how they promote it.

They have a site called [Cody](https://www.mathworks.com/matlabcentral/cody/problems) with 4000+ problems to solve, many submitted by users, categorized by topic and difficulty, each with a thread where the problem can be discussed. When logged in with your Matlab account (free, although the software is not), problems can be solved and verified online, and your progress is tracked.

> [Cody](https://www.mathworks.com/matlabcentral/about/cody/)™ is a MATLAB Central game that challenges and expands your knowledge of MATLAB and Simulink®. As a web service provided to the community, Cody helps you sharpen your programming skills by solving problems and interacting with other members of the community. With Cody, you can:
> 
> - [Solve problems](https://www.mathworks.com/matlabcentral/about/cody/#solve_problems) related to MATLAB code
> - [Find problems](https://www.mathworks.com/matlabcentral/about/cody/#find_problems), [solutions](https://www.mathworks.com/matlabcentral/about/cody/#find_solutions), and [players](https://www.mathworks.com/matlabcentral/about/cody/#find_players)
> - [Use search directives](https://www.mathworks.com/matlabcentral/about/cody/#use_search_directives) to find content
> - Challenge the community by [contributing problems](https://www.mathworks.com/matlabcentral/about/cody/#contribute_problems) that you create
> - Comment on any problem or solution
> - Like a problem or a solution
> - [Earn badges](https://www.mathworks.com/matlabcentral/about/cody/#earn_badges)

---

<div class="post-metadata">

### Author: ![fortran4r](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@fortran4r](https://fortran-lang.discourse.group/u/fortran4r)
#### Post date: [January 26, 2022, 10:57pm UTC](https://fortran-lang.discourse.group/t/test-driven-training-pad/978/12 "2022-01-26T22:57:31Z")

</div>

The Algorithms at GitHub has the highest exposure, which makes it a great platform to showcase Fortran’s problem-solving capabilities.

> [@Fortran is missing in The Algorithms](https://fortran-lang.discourse.group/t/fortran-is-missing-in-the-algorithms/2650):
>

Websites like Project Euler or Rosetta Code have much lower exposure.

People have put the C solutions to Project Euler in The Algorithms:

> <https://github.com/TheAlgorithms/C/tree/master/project_euler>
>
> //github.com/TheAlgorithms/C/tree/master/project\_euler
