Thursday, September 28, 2017

A failed interview

I am feeling so bad now. The interview this afternoon did not go well and that made me so sad. To tell the story from beginning, I was reached out by an HR lady from FPT Software for a Fullstack JS developer position last week. I did not intend to leave CMC, but I wanted to see if I would be qualified for the job, and to see if there is anything interesting about the project. So I accepted the invitation and went on to the interview with some Vietnamese guys from several teams in FPT. I passed the interview and we discussed about the salary and so on after that. I was still not so interested in jumping job at the moment, so I said that I need to learn more about the project before deciding to join. Several days later, the HR girl asked me to join a discussion with their customer, I thought it was not an interview but some kind of talk in which they tell me about their project and requirements and so on. But it turned out that it was a real interview, even a white board coding interview with an old Japanese man. And the interview left me with a shame.

I did not say that the interviewer was bad or something, but his questions, I mean, all of the questions he asked me, were unexpected to me. I had not been prepared for those kinds of questions. First, he asked me to rewrite a JS function to not use the async keyword. I did it with an arrow function, as I used to do with my Angular project. Just that was not the answer he was looking for, so he wrote the correct answer for me, even explained his solution in details. I was there, not knowing what else to do except nodding regularly to him.

the function

async f(x) {
if (!x) {throw new Error()}
return x;
}

my answer

function f(x, () =>
if (x) => throw new Error();
return x;
)

His solution

function f(x: String): Promise {
return new Promise((x, rej) => rej(x));
}

The next question was about Express.JS which he wanted me to propose a solution to have version path of APIs in URLs, so that he could have many versions of an API working independently.

# url: server-address://users/v1/list
# url: server-address://users/v2/list

app = Express()

app.use('/users', userService)

app1 = Express()

app1.use('/users', userService1)

I, again, had no idea what to do whatsoever. I stood there, just wanted to find a hole to jump in. And finally, he wrote his solution for me

app = Express()

app1 = Express()
app1.use('v1', userService1)

app2 = Express()
app2.use('v2', userService2)

app.use('users', app1)

app1.setUp(app)

That moment the only thing I wanted to is to leave the interview immediately, despite I've learned a lot from him by watching him writing the solutions for me. He then asked me if I had any working experience with MongoDB, I hostnesly said that I only have a very limited knowledge with MongoDB and NoSQL in general. So he had to ask me about relational database. He wrote on the board

A
C
I
D

and asked me what does each of the letter stand for. The only word I remembered is the first one - Atomic. But I don't even remember what does it mean, and I couldn't figure out what other letters stand for. After a while letting me think, he had to write the words

Atomic
Consistency
Isolation
Duration

and asked me the meanings of Atomic and Isolation. I was not able to answer properly, despite that I was sweating so much that my T-shirt was almost wet. Then again, he answer the questions himself while asked me some more questions on the transactions, how to implement Atomic, or how to avoid Phantom read. I had no idea of those terms, so I let him go on.

The interview ended and I was in shame. I couldn't imagine how struggling the time I've spent there and I wished I had at least one answer for those questions. After the interview, I swear to myself that I will ask for more details on what the interview is about and what do they expect me to have. I will make sure that I focus only on my strong points. After all, noone knows everything, so be strong in some limited technologies and be good at commonly used knowledge.

Wednesday, September 27, 2017

Going to work and accident

This morning when I was going to work, I went across an accident. There was a motobike laying down on the right side of the street, when I approached the motorbike, I saw a young lady laying just below the bike, that means the bike actually lied on her, and she was not moving at all. I stopped to see what just happened, and was thinking whether I should help or not. There was a man tried to pull the bike out of her and take care of her then. Also there was another man stopped in front of me, and he told me to go if I was not intending to help. So I continued my trip to work, blamed myself not take action quickly and help her instantly. I was upset that I did take too much time thinking, I was somehow affraid of something that I didn't aware of. I swore with myself that I will be brave enough to take the action and help people without thinking too much.

Arrived my work place, I went on with my Odoo project after the breakfast as usual. Odoo is kind of an ERP (Enterprise Resource Planner), a software for Businesses to manage their resources including fixed assets, human resource, and also project management or sale. This software has been in trend for quite a while and it benefits lots of small and medium enterprises (SME) because it is free and open source. I did not have any idea how Odoo works and even what it's for untill the time I took the request from my boss. I began to study the software and try to get familiar with it. I have been working on it for one month and for now I at least know what to do with it, just not knowing how. I find it so strange and comlicated because it's a huge software and the fact that I never worked with any kind of ERP software before. Odoo is designed with M-V-C model, just the same as most of the websites today, but it's still different in how it implements each of the layers. Instead of using html, Odoo represents the view in form of XML files. And naming conventions are so much important that I had to take sometime to get used to.

My plan of writing and travelling

I decided to write something, just anything - one hour a day. It's not too long but it's not easy to keep this to be a habit. I am writing daily journal but it does not take much time because I write only three sentences at once. However, I missed some when I wake up late or just do something else instead. To make writing a habit, I need more discipline and the priority in each action. So to make this writing habit a reality, I wrote a note to remind myself of the task I need to work on. So after an hour writing, I will have a relax time doing anything I want, such as surfing facebook, reading news, or watching Youtube videos.

By the way, I'm planning to go to Laos and this will be a great trip because I've been to Thailand before and I have some experience in going abroad. After a while looking around and calculate the cost and time, I decided to go to Vientine and Vang Vieng only, and not go to Luang Prabang because it's too far and will take too much time. I will be in Vientian 1 and a half day and Vang Vieng for 1 and a half day. That's a whole four days including travel time in Laos. So I will take three days off and with two days in weekend, I will have total of five days.

Day 0

From HN at 18:00

Day 1

To Vang Vieng at 18:00
Get a bed
Go around the town

Day 2

Still go around the town

Day 3

Check out the hostel and head to Vientine
Get a bed
Go around the city

Day 4

Still go around
Get a bus to HN at 17:00

Day 5

Back to HN at 17:00
Take a rest and prepare for the work

While this plan seems to work, I still need more details on the time and the plan B if any unexpected things might pop out. The travels from HN to Vang Vieng and back both take a whole day, so it will be tired and I need to prepare quite a bit. Water and food, and clothes, and even toilet paper are crucial for the journey. I will prepare some money also, I already have some dolars, and now I need some Kips. The travel cost is about one and a half million vietnam dongs. So I will limit the total budget within four million vietnam dongs - that's quite a handsome money budget for just three days in Laos because three and a half million vietnam dongs is really enough for both acommodation, food, and tickets. The only problem now is how to find a good initerary to make the most out of this trip. I need to explore the city, the nature, and talk to people. There is also a great chance to meet people around the world, I can make some friends along the way.