Explore 11 different ways to solve the Protein Translation exercise on Exercism. We look at imperative approaches, functional concepts like pattern matching, recursion, and higher order functions, and dig into some low-level coding in C++ and Assembly.
Kick back and enjoy 50mins of learning with Jeremy and Erik, then go solve the exercise in your favourite way on Exercism.
Solve the exercise at: https://exercism.org/exercises/protei...
Join #48in24 at: https://exercism.org/challenges/48in24
Featured Solutions:
https://exercism.org/tracks/nim/exerc...
https://exercism.org/tracks/go/exerci...
https://exercism.org/tracks/python/ex...
https://exercism.org/tracks/lua/exerc...
https://exercism.org/tracks/awk/exerc...
https://exercism.org/tracks/gleam/exe...
https://exercism.org/tracks/erlang/ex...
https://exercism.org/tracks/scala/exe...
https://exercism.org/tracks/fsharp/ex...
https://exercism.org/tracks/cpp/exerc...
https://exercism.org/tracks/mips/exer...
Timestamps:
00:00:00 Introduction
00:01:08 Nim: for loop and switch
00:05:04 Go: for loop and switch with error handling
00:11:00 Python: for loop and dictionary
00:13:24 Lua: for loop and dictionary with regex to select codons
00:17:54 AWK: regex to separate codons, set number fields on STOP
00:23:02 Gleam: manual recursion and pattern matching
00:29:01 Erlang: manual recursion and dictionary
00:35:34 Scala: functional pipeline and pattern matching
00:39:42 F#: unfold higher-order function
00:45:34 C++: convert string to number to allow switching
00:50:08 MIPS Assembly: strings as numbers
00:55:53 Conclusion