
Thinking Elixir Podcast
211: A Passion for Testing
Episode guests
Podcast summary created with Snipd AI
Quick takeaways
- Elixir 1.17.2 release focuses on bug fixes, Livebook updates for Kubernetes clustering, and new proxy API for webhooks.
- Explorer library now supports remote dataframes for cluster operations, optimizing data handling and enhancing machine learning functionalities.
- Herman Velasco emphasizes TDD's positive impact on software development, improving code confidence, aligning code with end-user objectives, and fostering efficient code maintenance.
Deep dives
Introducing Elixir 117.2 and Updates on Live Book
Elixir 117.2 was released, focusing on bug fixes. Live view received updates for clustering on Kubernetes, making it enterprise ready. Introduction of a new proxy internal API enhances Livebook's capabilities for receiving webhooks, making it easier to deploy as an app.
Explorer Introduces Remote Data Frames with Distributed Garbage Collection
Explorer, part of the NX project, added support for remote data frames, enabling proxy operations within a cluster. A weekend-long effort incorporating 1,100 lines of code brought distributed garbage collection features, optimizing data handling within processes. The update enhances data analysis and machine learning functionalities, offering a significant advancement in handling large data sets efficiently.
Phoenix Link Component Innovation Shared by Andrew Stewart
Andrew Stewart shared a significant Phoenix tip on Twitter regarding using the Phoenix link component for form submission actions. By incorporating the method attribute and passing parameters in the href, actions can be submitted similarly to a form submission. This functionality provides a convenient way to trigger actions outside of LiveView when accessing specific endpoints.
Release of Gleam 1.3.0 with LSP Improvements
Gleam 1.3.0 release highlights the improvement of LSP related features such as auto-importing standard lib functions and better completion support. The CLI program for Gleam includes numerous enhancements, including OTP27 keyword support, JavaScript hint integration, and updated CLI commands like gleam add and gleam remove for managing dependencies.
Ectowatch by Brian Underwood Enhances Real-time Database Change Notifications
Brian Underwood introduced Ectowatch, a library enabling real-time database change notifications directly from PostgreSQL. This innovative approach simplifies the implementation of PubSub notifications post database changes for specific events. Ectowatch streamlines the process by setting up triggers and subscription watchers within the application code, enhancing operational efficiency while reducing scalability concerns.
Significant Impact of Testing and TDD Advocated by Herman Velasco
Herman Velasco emphasizes the transformative impact of Test-Driven Development (TDD) on software development, citing improved code confidence and agility through the discipline of testing. TDD's reliance on writing tests first enables a behavior-driven approach, aligning code with end-user objectives. Velasco underscores how TDD positively influenced his career by fostering a clearer problem-solving perspective and facilitating efficient code maintenance through refactoring and experimentation.
News includes the recent release of Elixir 1.17.2, updates to Livebook v0.13 making clustering in Kubernetes easier and introducing a proxy API for webhooks, and exciting developments in the Explorer library with remote dataframes. We also discuss handy Phoenix tips from Andrew Stewart and the new Gleam 1.3.0 features. In our interview, German Velasco shares his journey from Rails to Elixir, his contributions like Elixir Streams and the Phoenix Test library, and his philosophy on TDD. German also speaks about his upcoming talk at ElixirConf and his desire for integrating JavaScript testing capabilities. Tune in to hear all this and more!
Show Notes online - http://podcast.thinkingelixir.com/211
Elixir Community News
- https://github.com/elixir-lang/elixir/releases/tag/v1.17.2 – Elixir 1.17.2 was released, which includes a Logger fix and some Mix-related bugfixes.
- Livebook updates - follow-up
- https://x.com/miruoss/status/1809633392088027193 – Michael Ruoss notes that Livebook v0.13 works well for clustering on Kubernetes.
- https://github.com/mruoss/livebook-helm – Michael Ruoss created a Livebook Helm chart for easier deployment in Kubernetes clusters.
- https://artifacthub.io/packages/helm/livebook/livebook – Helm chart for Livebook on Artifact Hub.
- https://news.livebook.dev/livebook-0.13-expose-an-http-api-from-your-notebook-2wE6GY – Livebook gains a proxy API to allow it to receive webhooks, useful for publishing Livebook as an app.
- https://x.com/livebookdev/status/1809203084154843279 – Details on the new proxy API feature in Livebook.
- https://x.com/hugobarauna/status/1809203637022863784 – Use
Plug.Router
andKino.Proxy.listen
for sending webhooks or events to your Livebook. - https://www.elixirstreams.com/tips/liveview-used-input
- LiveView 1.0 removes the
phx-feedback-for
annotation for showing and hiding input feedback. The update introduces theused_input?/2
helper on the server-side. - https://github.com/phoenixframework/phoenix_live_view/blob/main/CHANGELOG.md#backwards-incompatible-changes-for-10 – LiveView 1.0 Upgrade instructions, including a JavaScript shim for backwards compatibility.
- https://x.com/josevalim/status/1808560304172761191 – Explorer gets remote dataframes support.
- https://github.com/elixir-explorer/explorer/pull/932 – A PR was merged into Explorer to support remote dataframes, enabling transparent proxy operations in a cluster.
- Explorer is part of the Nx project for data analysis and machine learning, supporting one and two-dimensional data structures. The new feature also performs distributed garbage collection.
- https://x.com/src_rip/status/1810360113343115521 – Andrew Stewart shares a Phoenix tip on creating a link button to submit a post action without a form.
- https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html#link/1 – More details on using Phoenix's link component.
- https://github.com/phoenixframework/phoenix_live_view/blob/f778e5bb1a4b0a29f8d688bbc6c0b7182dea51ca/lib/phoenix_component.ex#L2734-L2737 – Underlying implementation details of Phoenix.HTML's
data
attributes. - https://gleam.run/news/auto-imports-and-tolerant-expressions/ – Gleam 1.3.0 release features LSP improvements, CLI commands for adding/removing dependencies, and support for Erlang/OTP 27 keywords.
- https://www.erlang-solutions.com/blog/let-your-database-update-you-with-ectowatch/ – EctoWatch by Brian Underwood allows notifications about database changes directly from PostgreSQL.
- https://github.com/cheerfulstoic/ecto_watch – EctoWatch GitHub repository.
- https://github.com/ityonemo/protoss – Isaac Yonemoto's Protoss library update, improving ergonomics of setting up protocols.
- https://www.youtube.com/watch?v=dCRGgFkCkmA – Watch a video explaining the Protoss library.
- https://hexdocs.pm/protoss/Protoss.html – Protoss documentation.
Do you have some Elixir news to share? Tell us at @ThinkingElixir or email at show@thinkingelixir.com
Discussion Resources
- https://www.elixirstreams.com/ – Short video tips that German creates and shares.
- https://www.testingliveview.com/ – Video course focused on testing LiveViews
- https://github.com/germsvel/phoenix_test – PhoenixTest provides a unified way of writing feature tests -- regardless of whether you're testing LiveView pages or static (non-LiveView) pages.
- https://www.youtube.com/watch?v=JNWPsaO4PNM – ElixirConf 2023 - German Velasco - Using DDD concepts to create better Phoenix Contexts
- https://www.mechanical-orchard.com/
- https://github.com/elixir-wallaby/wallaby
Guest Information
- https://x.com/germsvel – on Twitter
- https://github.com/germsvel – on Github
- https://www.germanvelasco.com/ – Blog
- https://www.testingliveview.com/ – Testing LiveView course site
- https://elixirstreams.com – Short video tips
Find us online
- Message the show - @ThinkingElixir
- Message the show on Fediverse - @ThinkingElixir@genserver.social
- Email the show - show@thinkingelixir.com
- Mark Ericksen - @brainlid
- Mark Ericksen on Fediverse - @brainlid@genserver.social
- David Bernheisel - @bernheisel
- David Bernheisel on Fediverse - @dbern@genserver.social
Sponsored By: