Open in app

Sign in

Write

Sign in

Minh Reigen
Minh Reigen

76 Followers

Home

About

Nov 23

Bad combo in ActiveRecord: polymorphic relationships, auto-generated numeric IDs and `includes`

Navigating the complexities of polymorphic relationships, auto-generated numeric IDs, and the use of “includes” in queries can indeed turn into a wild party in my model. The particular challenge I encountered involves a model called Selectionwith two polymorphic associations: bundle and product Here’s the snippet that caused the conundrum: class…

Rails

2 min read

Bad combo in ActiveRecord: polymorphic relationships, auto-generated numeric IDs and `includes`
Bad combo in ActiveRecord: polymorphic relationships, auto-generated numeric IDs and `includes`
Rails

2 min read


Nov 23

Navigating Workplace Dynamics: Dealing with Perceived Hostility in Co-workers’ Responses

In the intricate dance of workplace communication, the feeling of having asked a seemingly “stupid” question in a public setting is a familiar chord that resonates with professionals across various fields. Whether you’re in an office or out in the field, there’s a shared experience of feeling like a clown…

Teamwork

3 min read

Navigating Workplace Dynamics: Dealing with Perceived Hostility in Co-workers’ Responses
Navigating Workplace Dynamics: Dealing with Perceived Hostility in Co-workers’ Responses
Teamwork

3 min read


Oct 18

Testing a Rails controller concern (using RSpec)

Testing a Rails controller concern can be approached in various ways. Here are a few methods that come to mind, listed from my least preferred to most preferred: Including the concern test coverage inside a controller spec file The concept here involves invoking a method from your concern within your controller spec file. However, this approach can make controller tests…

Rspec

2 min read

Testing a Rails controller concern (using RSpec)
Testing a Rails controller concern (using RSpec)
Rspec

2 min read


Sep 6

The Impact of Paternity Leave on My Family

My wife and I recently had our second child, and it’s official — we’ve once again joined the illustrious “No Sleep Club.” Yes, that’s right, this isn’t our first rodeo with sleep deprivation; we’re repeat members! Sleep? Sleep is overrated anyway :) Watching TV or listening to our record collection…

Childbirth

5 min read

The Impact of Paternity Leave on My Family
The Impact of Paternity Leave on My Family
Childbirth

5 min read


Aug 27

Understanding the communication styles of immigrant engineers

Immigrants made up almost one-fourth, or 23.1 percent, of all STEM workers in the United States in 2019, a significant increase from just 16.4 percent in 2000. - American Immigration Council Disclaimer: This is only based on my personal observations and my self experience as an immigrant who also works…

Immigrants

6 min read

Immigrants

6 min read


Aug 21

What I learned from speaking very little English as an immigrant

Many of my friends who have met me recently would probably assume that I was born in America or came here at a very young age. You see, from a young age, I possessed a peculiar talent for mimicking accents. Vietnam, my country of birth, despite its relatively small size…

English

3 min read

What I learned from not speaking English as an immigrant
What I learned from not speaking English as an immigrant
English

3 min read


Aug 20

“Why did you come to the US at all? Vietnam is such a great country”

Several years back, I was assisting at my wife’s workplace when a colleague of hers posed this unexpected question. I had only recently met her, so her straightforward inquiry caught me off guard: “Vietnam is such a great country, why did you choose to leave? I don’t understand.” The immediate…

Vietnam

10 min read

“Why did you come to the US at all? Vietnam is such a great country”
“Why did you come to the US at all? Vietnam is such a great country”
Vietnam

10 min read


Mar 18, 2022

Elixir: Ecto.put_assoc V.S. Ecto.Multi.update when updating multiple child records

Today, let’s compare updating multiple child records using put_assoc vs Ecto.Multi.update. put_assoc is convenient if you want to do either 2 things: 1. associate a list of child records to the parent 2. add a new child record to the association. However, it might take more work and not optimal…

Elixir

2 min read

Elixir

2 min read


Feb 16, 2021

Elixir: Ecto — find records on empty associations

In my experience and the apps I worked on, there were a few times I needed to find records based on empty associations. Let’s imagine a silly example where you were writing a software to manage your franchise of electronic stores. You wanted to find store locations that run out…

Elixir

2 min read

Elixir: Ecto — find records on empty associations
Elixir: Ecto — find records on empty associations
Elixir

2 min read


Feb 8, 2021

Elixir: Handy debug chain-able pretty-print function

I picked up Elixir last year at work. While some debugging tools are good to casual debug things in Elixir, IO.puts/2 and IO.inspect/2 are sometimes much faster to show what I wanted to see in the console log output. The drawback of IO.puts/2 is that it can only take a…

Elixir

2 min read

Elixir: Handy debug chain-able pretty-print function
Elixir: Handy debug chain-able pretty-print function
Elixir

2 min read

Minh Reigen

Minh Reigen

76 Followers

http://minhreigen.com

Following
  • Alexandra Grosu

    Alexandra Grosu

  • Lucid Reality

    Lucid Reality

  • Joel Kemp

    Joel Kemp

  • James Christou

    James Christou

  • Komal Kamble

    Komal Kamble

See all (25)

Help

Status

About

Careers

Blog

Privacy

Terms

Text to speech

Teams