Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →
Elixir-Code-Smells Alternatives
Similar projects and alternatives to Elixir-Code-Smells
-
Elixir
Elixir is a dynamic, functional language for building scalable and maintainable applications
-
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
peridot
Discontinued A fast functional language based on two level type theory
-
credo
A static code analysis tool for the Elixir language with a focus on code consistency and teaching.
-
-
Hacking-F117A
My investigation into mission generation in the Stealth Fighter games by Microprose.
-
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
Elixir-Code-Smells reviews and mentions
-
Code Smells in Elixir
Results can be found in: https://github.com/lucasvegi/Elixir-Code-Smells
-
Hacker News top posts: May 10, 2022
Catalog of Elixir-specific code smells\ (21 comments)
-
Catalog of Elixir-specific code smells
Generally speaking, code smells are also context-sensitive structures. This means that a smell will not always represent pain in a specific project. It is just a possibility that must be analyzed in each context. It is a warning, not a judgment.
We are interested in knowing Elixir's community opinion about these code smells. Collaborations can be made via GitHub issues (https://github.com/lucasvegi/Elixir-Code-Smells/issues) or Pull Requests in our repo!
I agree. If I'm jumping into unfamiliar code or code I haven't read in a while, I strongly prefer to see what gets pattern-matched out of the incoming struct in as few places as possible. Jumping back and forth between a lot of small helper functions that could have been lines in a pattern match is rough.
In this specific case, I suspect the x_error_api_response would end up becoming half a dozen different functions and understanding what get_customer returned based on the Env struct would require quite a few trips back and forth.
It's a much smaller nit, but I also found the fix for "complex extraction clauses" slightly less readable than the original: https://github.com/lucasvegi/Elixir-Code-Smells#complex-extr...
I've been doing elixir professionally for 6 years. I realize I'm in the minority, but as someone who _reads_ a lot of code, I feel that the strong emphasis (and in some cases, requirement) to extract functions seriously hurts readability.
Quickly glancing through this, I see the Complex Branching case as an example (https://github.com/lucasvegi/Elixir-Code-Smells#complex-bran...). It makes my brain need to act like the runtime, storing the stack of the current function in my head, jumping to the function call, then returning back to the original function and restoring the stack (to be clear, I'm not talking about the actual execution, I'm talking about what my brain goes through reading this).
In a complex codebase, the jumping can be far (physically and figuratively), especially since there's a strong preference for pattern matching in function parameters (so in the given example, there might be 4 `success_api_response/2`.
Inline code is _often_ easier to read and reason about, even when you aren't concerned about a function mutating a parameter (as in the case with elixir).
-
A note from our sponsor - InfluxDB
www.influxdata.com | 17 Apr 2024
Stats
lucasvegi/Elixir-Code-Smells is an open source project licensed under MIT License which is an OSI approved license.
The primary programming language of Elixir-Code-Smells is Elixir.