Elixirland - a collection of assignments, each with an idiomatic example solution

A more general note.

I’m starting start Elixirland small and simple. Setting it up fast. So it can serve as a conversation starter and something to critique.

My goal is to rely less on my own experiences and more on community feedback.

1 Like

If is ok I can share too some exercises for surface UI that were based on React exercises.

2 Likes

Yes, so it might be a good exercise to have something like a booking.com controller. It shows a list of properties and then there is a POST Book that does a whole lot of things like - check with 3rd party if the date is still available, make reservation, proceed to payment, on return check payment, et cetera, rollback payment on error.

All those calls can be implemented by a sleep 5 and maybe have them randomly throw an error when they need to be retried. As a start, you can make one big case statement in the controller dat does it all, and then as an exercise you have to decompose it into seperate steps using a specific tool for that exercise.

  • Refactor into managers (clean up controller)
  • OR Refactor into async background processes that keep the frontend updated
  • OR Refactor into a Workflow

How do other technical fields teach experience :)?

3 Likes

I definitely agree with your point that experience is crucial.

But at the same time, it makes me wonder what can be done to transfer others’ experience to newer generations as much as possible. A topic that interests me (and is my profession :stuck_out_tongue: ).

If there were plenty of junior to medior Elixir jobs then the road to gaining the aforementioned experience would be more accessible. At least, gaining that experience within the Elixir ecosystem from early on.

(Off topic and in small letters. Is Elixir adopted less than it merits? If yes, is it a branding issue?)

2 Likes

Even without junior or mid elixir jobs, you can cry in 90% of cases when looking at a elixir codebase that was written by someone that switched to elixir and still writes in the way it used to in their previous languages, and there are countless cases when this happens in companies, one of them I discovered recently.

The biggest value I see from this platform is teaching of how to write “standard” code, in a manner how credo enforces consistency at syntax level. At the same time this also means that the focus of the assignments should be on quality, not quantity. Each example should prove excellence in all aspects of what it makes a good codebase, namely: simplicity/clarity/documentation/tests.

5 Likes

Agreed which is why I think building things from the core library or top packages would provide the most value. You could easily check to see how Ecto or Ash or Nerves does the same thing.

Being able to view the code is only a small gain in this scenario. Building exercises from scratch all of the learning materials are the responsibility of the publisher, but basing them off of existing open source code bases lets you use the existing corpus of learning materials. Building the exercises off of existing Elixir packages gives the student access to the comments in the codebase, all of the GitHub issues and their solutions, all of the conversations on this forum about the implementation of those packages, etc. And as an added bonus it sets the pupil up quite nicely to contribute back into the eco system at large.

Perhaps library maintainers that are themselves interested in this project could submit exercises for concepts in their own codebases. This could serve as a nice “get started” page for would be contributors to their open source code bases

3 Likes

Can I tempt someone to review the code of the Book Club exercise?

1 Like

You can be direct and tell me when something stinks :grin:. I’ll be fine :wink:.

1 Like

I mean… That would be amazing. Then I could focus more on the presentation, organization and SEO.

Currently, the Elixirland website is being implemented as a simple UI in front of GitHub where all updates on GitHub are automatically pushed to the website. Should make it easy to add content for library maintainers.

All exercises will also have their own page on the website that optimizes the presentation of the exercise description and solution (compared to GitHub).

1 Like

I’ll be upgrading Elixirland.dev in releases. Here is the first release.

Release 0.1.0

Introduces

  • Landing page
  • Elixir ecosystem overview
  • Exercises overview
  • Dedicated exercise pages
  • “How can I contribute” page
  • Submission Guidelines
  • About page
  • Logo

Limitations

  • All content of the Elixirland website – like the exercises, the overview of the Elixir ecosystem and the Submission Guidelines – will be stored in GitHub repositories. Any updates will automatically be pushed to the website. However, currently not all content is stored on GitHub. Future releases of the Elixirland website will fix this issue.

Full Changelog: Commits · elixirland/xl-website · GitHub

1 Like

Release v0.1.1

Added

  • Breadcrumb navigation

  • GitHub source links

Changed

  • Text size on exercise pages

  • Introductory text on exercises page

Fixed

  • Task descriptions not showing in exercise pages
1 Like

Elixirland v0.2.0

Added

  • Dark mode
  • Breadcrumb navigation
  • GitHub source links
  • Play video of project preview on card when hovering thumbnail
  • Sanitize markdown before rendering its html

Changed

  • Allow words in exercise names that are not capitalized, like “API”
  • Source Elixir ecosystem data from a GitHub repository (GitHub - elixirland/ecosystem)
  • Terminology change: uses “projects”, instead of “exercises”

Fix

  • Task descriptions not showing on project pages

Release link

Most notably, in this release the Elixirland exercises are not called “exercises” (or “assignments”) anymore, but “projects”. I think having projects as the basic building blocks, together with example implementations (in idiomatic Elixir), has more potential.

Currently, the project pages on the Elixirland website look similar to their GitHub counterparts (worse even, I would say). Improving that is next on the agenda.

There were some problems with this release, so I deleted it and merged it with v0.2.0.

Elixirland v0.3.0

Added

  • Play preview video on project card on scroll (mobile)

Changed

  • Play preview video on project card on hover (desktop)
  • Improved styling of project pages
  • Updated Submission Guidelines

Release link

2 Likes

Thanks for this :slight_smile:

2 Likes