I ran into this when I was cleaning up my local git. I deleted both a local and its remote branch on origin! 🤦‍♂ And the branch I deleted is still in a Merge (Pull) Request! 💀 I used a third party app called SourceTree (I’m sure you heard of it) to delete them, so my commit is not in the reflog

What I did to restore the local branch is as follow:

  1. Since my commit is not in the reflog, I had to do this to print out and ultimately find my commit’s sha

git fsck --full --no-reflogs --unreachable --lost-found | grep commit | cut -d\ -f3 | xargs -n 1 git log -n 1 --pretty=oneline > .git/lost-found.txt


I picked up ReactJS recently after a few years away from coding in Javascript at all. Since ReactJS is a powerful and useful framework with a lot of bells and whisles, in the midst of so many new things to learn, I lost sight of it being just a *javascript* framework. Yes, I can still use vanilla JS in my ReactJS app! (duh)

Here is one example:

My team wanted to implement a simple debounced auto-save function for our text box input. At first we used lodash's debounce to make it work. It seemed to be working and we launched it. But customers came back with a complaint that typing in the textbox appeared to be jittery. …


Image for post
Image for post
Hands up! Or I will dynamically access your property.

Recently, I’ve picked up Javascript again at my day job writing software using ReactJS and Elixir. It had been a while I hadn’t code javascript professionally since AngularJS 1. Since 2014, there are so many new changes to the JS libraries and communities! I need to catch up.

Today I learned the new way in ES6 to use a dynamic key to access or assign an object property.

ES6 enables developers to create or access an object by dynamic keys or names:

You can think of many ways you can apply this to your coding scenario. How about the case where you might need to create an object with an increasing number in the key name? …


I have recently talked to a friend of mine who had just gotten rejected for a job interview earlier that day. He mentioned that the company disqualified him because he was not as “senior” as he said in his resume. He was only working for 3 years as a software engineer. So where is the line where a software engineer can call him/herself a senior?

I think the answer to that question is very personal and there is no hard-and-fast rule to determine who is “qualified” as a senior engineer. Generally, the industry thinks the senior title is up to the company / organization. “You are what you say you are. And we’ll test you to make sure” — is the common way companies deal with hiring senior engineers as I observed. …


Image for post
Image for post

Please note that this post is not a tutorial and it requires knowledge of Rails 5 ActionCable and ReactJS / Javascript custom library building.

One of the awesome features that comes with Rails 5 is ActionCable. With ActionCable, you can build all the real-time features you can think of via websocket. While struggling to build a chat system, I had found multiple examples on the ‘net of how to build a chat app with Rails 5 ActionCable but they are extreme simple to even apply the concept for any real life chat application. …


A service is an independent module which contains logic that doesn’t belong to one model or controller. As the name indicates, it provides a service to a model, controller or even another service. It does one thing and does it well. The determination of creating or use a service based on a specific thing that the logic does (Single Responsibility)

Image for post
Image for post

Think of this example of a property owner who hires a property manager to manage this property. The property manager provides a management service. This manager in turns hires a plumbing contractor, a carpet cleaner, … to help him fix the property’s issues. These contractors including the manager provide a service that they do well: management, plumbing fixes and carpet cleaning service. At the end, the property owner only needs to know the manager and gets the report from him; s/he doesn’t need to deal with the other contractors or to know about their existence. That will keep things organized and simple to maintain. …


Like most parents, mine taught me from a young age that I should have a good job and be “someone” — a doctor, CEO or a lawyer, settle down and buy a house. I have to say they did such a good job programming my mindset. I went to an engineering school, graduated and landed an engineer job. As you might know in the IT industry, the salary went up and up with job hoppings and raises. Mine ended up from $40,000 to a stable $140,000+ annually (plus bonuses) only after a few years. Well, let’s cut to the chase, instead of $140,000+ a year, this is my life right now running a company with a few great friends; we took it off the ground, landed customers and $30 is how much we currently make a month. …


Image for post
Image for post

Code Climate is a good product. I used it at a company I worked for before. But then again, I’m cheap, and I’m a nerd. So I built my own and integrated it with my own Jenkins server, and have it run code check on each pull request on my GitHub repo. I’d spend the extra money on marketing.

So here it goes.

Since the setup uses the Jenkins pull request builder, and I already have a build project for RSpec using the plugin, so I created a new project copying from that project. …


Image for post
Image for post

One day, I got an email from a small company in Mountain View and they wanted to see me to talk more about YesLLama LLC. I took any chance to make connections, so I went to see them. I was sitting in this tiny meeting room in a back office when they rambled about their products. During the discussion, I don’t see the compatibility of their products and ours — not the mention the big culture different between two teams. Finally, they told me they wanted to merge our team into their team to work on a few other non related products — and they they already have a manager to manage our team. …


This short post is a summary of my ongoing journey so far with the LLama project. I think it’s a good practice to take frequent stops, look back and evaluate what we gained and pivot if needed. I have learned a lot from the process of running a company.

Image for post
Image for post

On a sunny Sunday, October 2015, I was sitting in a small coffee shop in Japantown, San Francisco — creating the first page for the LLama website. Inspired by a quote from Mother Teresa “Do small things, with great love.”, I put a lot of love on that page. …

About

Minh Reigen

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store