Tu Hoang parttime Ruby dev, fulltime Bun Rieu maniac


There are so many things about this collection of people that I feel uneasy about, but isn’t that a thing about societies? You group like minded people together, and it’s personal that you don’t feel like you can go along with a certain strait of minds.

That’s fine. That’s why I have been traveling. After 5 years of hopping on and off continents, I find that almost all societies are alike.

Out of 100 people, 99 will most likely ask you How old are you and What do you do and stop dead when you tell them something they don’t know (ie: I manage a fleet of machines running various software and I spend most of my timing tweaking .cfg files). I guess that’s why Tinder and its Unmatch feature is such treasured. People oftentimes judge another person by their looks and professions. The same group of people don’t have enough mental attention and capability to take time diving into another’s walk of life. Time is literally worth more than gold for everyone. Everyone. Not just the rich.

I tend to give close ones a copy of The Fountainhead. People either hate it or like it. I always look forward to hearing what they think about this work, because almost always people get very opinionated about it. That’s fine. The point is to hear opinions, though opinions can change. Hence the follow-up discussion. This activity is for me to learn more about people around me. And for them to learn more about me. I’d go as far as saying that the discussion that follows is just as important as seeing whether they have an opinion about the book.

People often get mad at me because I’d like to learn how they arrive at a decision. Take this girl for example, she’s spending 2 years straight out of college to study German so that she can enroll in a master course on finance. I asked what the point of going for a master degree was, how she thought of an opinion that financial (or service, in general) workers are of abundance, how “enriching knowledge” (as per the given reason for going further the tuition chain) helps her in short and (if foreseeing allows) long term.

What I’d like to tell her in the end is it’s fine to not have an answer to all the questions, but she was too mad at me for firing all these questions, she assumed I was such an arse (which, I don’t think applies, because an arse tends to hurt people, whereas I truly tended to learn more about her).

Example above tells how I view the world as of now. Basically:

  • There are too many walks in life and as a mortal, I can’t afford going through all. The act of networking (from my side) is entirely selfish, I get to know you and try to befriend you because: (i) you bring a new set of views into my life and (ii) hopefully I can do the same thing. Be it selfish, befriending someone and taking their time off are critical deeds, ones that I don’t take lightly.

  • One needs to do things wholeheartedly. 99% of the society will tell you it’s not worth doing so, and you can hear feedbacks, but the decision is yours. Once you have decided, go all in. Don’t be half arsed. Hopping is fine, as long as you have given it your all before moving on. Don’t compare, because comparison is always subjective. It’s not absolute, hence it doesn’t weigh much in your decision. You can blame family and finance and residence status (this doesn’t apply for people living in warzones), but here is a fact: there’s no free lunch. Those people with a supporting family and readily available finance, why do they have to do with your decision? Living your passion (or trying it) is not easy, not because the environment isn’t always supportive (though sometimes they can be greatly not), but because it’s given. As given as being mortal. You can live in a hut off Son Doong, or you can stay at a penthouse in Mitte, life is always tough bruv. Power through.

That said, given I have been in it for some time, people often ask me for opinions. What’s fun is, this is not the act of me beaming my experience all over you and demanding respect, so don’t take it that way. This is me sharing my findings along the way and sincerely hope you can give me yours some other time. What’s even more fun, I half expect you to fire back at me, at how I arrived at those myself. The core of this is my absolute belief in performing good work. It’s mutual. Friends usually get surprised when I talk and discuss, work wise, to people I am extremely against. But then I reply: why does my personal feeling have to do with the good work itself?

Shower talk

I started thinking about writing this whilst taking a shower, at the time the idea of it sounded more like a retro. Then upon getting out of the shower I realized how my apartment was full of turtle shit (literally speaking); so I figured it’s better talking about how things are going in my life, because it’s been a while since I last talked to fellow humans about that topic.

Now before you move on clicking on blinking links on the right as a dear friend just surfaced and you dearly want to talk to him about Phuc Long being spectacular these days despite their significantly decreasing customer base, there is only one important thing here: to be content.

I believe I manage to hold a strong command of that phrase, and that I understand it to every bit, I’ve been counting it off in every decision during the last two years.

Giang asked me recently whether I still have a coffee friend (well, to frame it more properly: a milk tea friend), and that without one would I feel OK? Well, no and yes. The folks over Mac Thi Buoi are getting used to me ordering one cup of tea lately, and has long stopped asking why I am not with another one like I used to. I also long ago stopped thinking about me being actively acquainted with another human, for the sake of not being a loner, and start to digest the fact that I pull strings off just fine by myself, talking to myself throughout the day is absolutely under the line, and sometimes treating myself to a nice dinner at a dimly lighted restaurant with a paper will not put me in constant embarrassment.

At work I slowly transition myself to tasks that aren’t always customer facing. Ping me with this two years prior and I’d go crazy over the prospect of it. I’m the kinda guy who wants to see stuff I build being used by others. A lot of others. Now I see to tasks that may involve no one, sit unattended at the back, or talk to distributed systems scattered around dry data centers over continents but humans.

Or as a senior put it: It all gets to be technical in the end.

I still hold faith. Friends that have drifted away are a given. The seek for (new, reconnected) friends isn’t a bed thought anymore. I find myself reading more. Offscreen, how the congress is acting on, and Dan Brown.

I travel more and pause whilst traveling more. Sight seeing usually isn’t the thought top off my mind, but sitting reserved at a vendor somewhere looking at how people interact. I catch up with people quite at ease, often do I find myself talking to guards and street workers, leading them on random stuff like why their kids should learn the craft of making things, or putting a dent in the universe and putting a dent in Bai Dai sound equally awesome, or bột hôm nay chiên vàng ươm, dì bán phá lấu kế bên ngồi tấm tắc khen, nước tương của con đừng bỏ ớt trái nha dì.

I love how two years ago I stepped on a plan to a strange land, interacted with people who speak Balkan languages, walked the Ohrid lake side streets hundreds of times, feeling more conscious of myself all along. It excites me the moment I tell people I have a Muslim friend, who is young and always acts like a rascal, drives my to crazy religous discussions at 3AM which last till morning.

Mom has stopped putting me against walls for a few years now, 99 out of 100 times listen peacefully to my rambling. She wants nothing but health for her children. It took me a few miserable months to consciously accept the idea of moving away. Wasn’t that me 5 years ago who talked non stop about having a house of my own up some hill, realizing Mom got off her hill 18 years ago for me to be exposed to a more social, fledged, fulfilled world?

Doing business in Viet Nam

Upon writing this, I can’t help thinking back this time 7 years ago. I was a business student back then (another bedtime story), and I together with friends held a workshop on doing business in Viet Nam. Topic of the year was groupbuying, so we naturally invited a groupby executive who spent the majority of his time telling audiences how cool his business was. They ceased operations shortly after.

Fast forward to 2014, I pulled up a license just to look legitimate in the country. I still remember vividly how I had to wait 4 hours at the Department of Planning & Investment just to lodge my application. The air was humid, the ceiling fan didn’t work, the 40 meters square room was packed with sweaty businessmen in shirts and businesswomen with ridiculous makeups in skirts. I had to revisit this room for a few times mostly because the staff there wasn’t feeling particularly pleased with my application’s wording. So I smarten’d up and wore khakis and pulls from my second time, always taking a book and water with me, and somehow mastered meditation while waiting for my name to be called.

Not to mention, Charity Map being translated into Vietnamese sounded weird. I flushed a few times because people then would just stare at me for some sweet minutes because of the name.

And that wasn’t at all a hassle. Every month I had to contract someone to file a financial report for my entity, in person, at the local tax department. They also asked us to visit the local treasury office to pay for yearly license tax and everything, each visit consumed a few more hours. I had never felt more of my life coming past me at the time, feeling utterly useless and idle to some unbelivably great extent.

Above all, the (then) enterprise law dictated that you could only do businesses on categories that you were given written authorization to. That’s just another fcking bummer. The (updated) law tells you can do whatever the laws don’t see as illegal, which for sure opens up more freedom for the national business(wo)men to try out new waters and squeezed out some tiny chunks of corruption. Funny how people had to bribe to do business lawfully.

So it also came to be that I had to close my first and only business in the country. It hasn’t been a business per se, given we haven’t booked any active revenue. We didn’t do recruitments either, I was the sole legal representative cum CEO cum principal employee. That being said, on paper we looked like a ghost lingering for breaths and opportunities. That has been really the case here. I’m not going to be in the country for some time, so I think I need to close it down, to avoid complications. Once I heard they stopped a lady from traveling aboard because she neglected her tax duties. She forgot paying $100 or something, but that’s another story. I need to close this paper business down. And I’m glad to find the experience (after 3 years) has been way better.

First, I need to fulfill all the tax duties, that include submitting all the accounting reports on the entity’s income and VATs. That’s easy. What’s startling me is that they have pulled up an online system to let these reports be submitted online, securely and all. Heck, they (the tax department) even sends reminders on late submission. I was able to have direct communications with my tax officer, and the lady was giving prompt answers and above all, she was friendly.

Second, I need to pay some fees, and what startled me even more was I could do this online, from my bank account (using a different bank to the department’s bank), and the tax officer went out of her way to confirm those financial transactions. This saves me a bunch of travels, in Saigon’s heat. It’s just evolutionary, that’s what I’m thinking it is.

Third, admittedly closing down a business takes some talking back and forth, and going to places to return the stamp and everything, but you can always contract someone to do this for you, at an affordable price. I was referred to Gia Cat, and they charged me $75 for the complete package. That involves closing the tax account at the tax department, returning the stamp at the local police, and filing for closure at the department of planning and investment. What you’d be given in the end is a paper that tells you have creased your whole business, which means ultimate soul rest. I found Gia Cat a real lifesave, their staff even visited my place (which is 30 minutes away from their office on bike) to collect my signature for some missing papers.

All in all, I’ve ceased my business doings in Viet Nam but I’m hopeful about coming back.

CSV Processing (at a glance)

Not until recently did I find out Ruby’s native CSV.parse is not really performant. C’mon, loading 100_000 rows into memory? As if our beloved Ruby developer cum optimizer has not had enough on her table.

A quick Google search returned the smarter_csv gem. One more click led me to this writeup that planned out a better way when it comes to dealing with these nasty CSV processings.

I have only two things (which I deem relevant) to add to the above article:

  • If you’re a Sidekiq Pro user, Sidekiq offers Batches, whose handies include child jobs (say, you divide 100_000 rows into 100 jobs that take care of 10_000 rows each), callback (a nice email letting customers know his import was done will do) & statuses (how many child jobs are pending or have failed?)
  • If you’re concerned that each worker establishing a connection of its own will soon blow up your database instance, use pg_bouncer. Heroku users can use this handy buildpack the company has made available.
  • While having a direct route to your users table is nice and all, decently sized apps will come across cases when you have to do follow-ups when it comes to an import job. Things like: reindex ElasticSearch, spit out troublesome rows and let customers download these lines to perform revisions, generate log events, etc. My approach of preference is it’s best to steer away from doing these things. It should be the job of controllers or services, not the import workers. In an ideal environment, your worker(s) should only concern about splitting the file into chunks, put some nice headers to ‘em, and ping the relevant API(s) (ie: POST /api/v1/users) and let it do its job.

And yes, I ended up listing three things. I’m bad at numbers.

Thoughts on single-purpose services


If you think about it, your simple CRUD Rails app is likely started out with a codebase and a service. People usually refer to MySQL/SQLite/PostgreSQL/etc as persistence layer, which in translation is a service that does a single purpose: persistence.

That is to say whether you like it or not, your app will always have to interact with external layers when it reaches certain complexity level.


I used to determine whether a set of features fit in a problem domain, and thus extracted that set into a service. That worked for a while, until the cost of maintenance went too much for a small development team. Someone said we need decent monitoring infrastructure and deployment toolset before journeying into this land, and I can’t agree more. That being set, most of the times you need to sit down and rebuild your existing monolithic app on seperated classes that tie to problem domains, instead of spinning up a new fancy service.


Ruby isn’t always the answer to everything. Not for persistence, for sure. And not for many others. Imagine you have to talk to multiple APIs to get the data you want, then process that data in order to make sense out of them. Parralel-ing these requests is possible with Ruby, also processing, but it will rake up your loading time to seconds. And we all know sad pandas will be sadder once they see seconds on the analytics dashboard.