HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
lucasvegi
Elixir-Code-Smells
Elixir2022–2022
lucasvegi / Elixir-Code-Smells

Elixir-Code-Smells

Catalog of Elixir-specific code smells

5Distinct people
5Mentions
0Explicit recommenders
1.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Catalog of Elixir-specific code smells

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 2:04:58 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week5 dated mentions

Observed mentions: 2022-03-19 01:16:23 UTC to 2022-05-10 15:08:51 UTC. Weeks start Monday, UTC.

012342022-03-14 00:00:00 UTC to 2022-03-21 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsMar 142022-03-21 00:00:00 UTC to 2022-03-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-03-28 00:00:00 UTC to 2022-04-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-04-04 00:00:00 UTC to 2022-04-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-04-11 00:00:00 UTC to 2022-04-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsApr 112022-04-18 00:00:00 UTC to 2022-04-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-04-25 00:00:00 UTC to 2022-05-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-05-02 00:00:00 UTC to 2022-05-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-05-09 00:00:00 UTC to 2022-05-16 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 commentsMay 9

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Mar 142022-03-14 00:00:00 UTC2022-03-21 00:00:00 UTC110
Mar 212022-03-21 00:00:00 UTC2022-03-28 00:00:00 UTC000
Mar 282022-03-28 00:00:00 UTC2022-04-04 00:00:00 UTC000
Apr 42022-04-04 00:00:00 UTC2022-04-11 00:00:00 UTC000
Apr 112022-04-11 00:00:00 UTC2022-04-18 00:00:00 UTC000
Apr 182022-04-18 00:00:00 UTC2022-04-25 00:00:00 UTC000
Apr 252022-04-25 00:00:00 UTC2022-05-02 00:00:00 UTC000
May 22022-05-02 00:00:00 UTC2022-05-09 00:00:00 UTC000
May 92022-05-09 00:00:00 UTC2022-05-16 00:00:00 UTC413

What Hacker News says

5 sources
Exactly! 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!
In Catalog of Elixir-specific code smells
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...
In Catalog of Elixir-specific code smells
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 f
Read the rest
unction 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).
In Catalog of Elixir-specific code smells

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.