Monday, May 4, 2026

First interview 2026

CBTW (includes Positive Thinking) - Angular

Round 1: Hackerank test

- part 1: multiple choice questions

- part 2: Coding challenges

    2.1 movies ratings (dynamic programming)

    2.2 consolidating partitions


Round 2: English test

  1. Highlights of your CV
  2. What do you like about your work.
  3. Tell about a time you have a conflict with your colleague, how did you resolve the conflict?

=> Failed at Round 2 with result B1+

Saturday, May 31, 2025

Interview Limix (frontend dev)

The Thailand based start-up named Limix is very young (less than one year old!) and somehow I got an interview invitation from a Vietnamese head hunter. She had a short call to introduce the company, its benefits and the interview process. (they provided a 3-star hotel appartment for their employees, impressive!) 

There was some uncertainties about this company and I am a bit worried but I decided to take the chance anyways.

The interviewers were 2 guys, but they did not show their webcam, only me was the one showing face (to prevent cheating, you know, now AI is everywhere and it’s really intelligent). 


They asked me about my work, what are the challenges and how did I overcome them. Also the questions focused on SEO and web optimization (I don’t have much experience on these fields anyway). 


Lastly they asked if I am willing to switch to Vue because they are using this framework, and gave me a home test (using Vue of course). The test was about cloning  bitis.com.vn site using nuxt3 and vue3, with lighthouse score to be 100. I had one week to complete the test.


I tried my best to finish (worked my ass off really!). But I did not pass the test eventually.

Saturday, March 15, 2025

How to setup a monorepo app (Angular)

 Tech stacks:

  1. Angular 15+ (main framework)
  2. Nx (monorepo)
  3. ngRx (state management)
  4. cypress (e2e testing)
  5. jest (unit testing)
  6. prettier (code formatter)
  7. eslint (static code analysis)
  8. husky (git commit hook)
  9. SonarQube (code quality analysis)
  10. gitlab (CICD)
  11. strapi (CMS)
  12. lit element (UI web components)
  13. Kong (Gateway)
Workflow:
  1. Create new components with nx cli, or modify existing code (add tests if needed)
  2. Run unit test with jest, and e2e test with cypress
  3. Run sonar qube to check code quality
  4. Format the changes with prettier
  5. Commit code into appropriate feature branch (this will also trigger husky to check code format and eslint)
  6. See if the gitlab pipeline run success
  7. Create MR on gitlab
Configurations examples

1. Prettier

.prettierrc

{
"singleQuote": true,
"importOrderParserPlugins": ["typescript", "decorators-legacy"],
"importOrder": ["^@angular/(.*)$", "^@my-project/(.*)$", "^[./]"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}

 2. Eslint

.eslintrc.json

{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
}
]
}

3. Jest

jest.config.ts


const { getJestProjects } = require('@nrwl/jest');

export default {
projects: [
...getJestProjects(),
'<rootDir>/apps/my-app',
'<rootDir>/libs/my-ui',
'<rootDir>/libs/helpers',
],
};

 4. SonarQube

sonar-project.properties

# Required metadata
sonar.projectKey=my.project
sonar.projectName=MY-PROJECT
sonar.projectVersion=$(date +%Y-%m-%d)
sonar.host.url=http://sonar.my.domain.com:8080

# Comma-separated paths to directories with sources (required)
sonar.sources=apps, libs
sonar.exclusions=**/*.spec.*, **/*.mock.*
# Language
sonar.language=ts

# Encoding of sources files
sonar.sourceEncoding=UTF-8
sonar.typescript.lcov.reportPaths=coverage/lcov.info
sonar.typescript.tsconfigPath=tsconfig.base.json

sonar.coverage.exclusions=**/*.spec.*
sonar.tests.inclusions=**/*.spec.*
sonar.ts.tslint.outputPath=tslint-output.json

sonar.qualitygate.wait=true

 5. TypeScript config

tsconfig.base.json

{
"compileOnSave": false,
"compilerOptions": {
"rootDir": ".",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"module": "esnext",
"lib": ["es2017", "dom", "ES2018.Promise"],
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"baseUrl": ".",
"noUncheckedIndexedAccess": true,
"paths": {
"@my-project/config": ["config"],
"@my-project/e2e-utils/*": [
"libs/e2e-utils/src/lib/*"
],
"@my-project/helpers": ["libs/helpers/src/index.ts"],
"@my-project/shared/ui": [
"libs/shared/ui/src/index.ts"
],
"@my-project/my-ui/*": ["libs/my-ui/src/lib/*"],
}
},
"exclude": ["node_modules", "tmp"]
}

6. Gitlab CICD

################################################### Workflow rules ###################################################
include:
- template: Workflow-rules.gitlab-ci.yml

image: $DOCKER_REGISTERY/my-image-store/nodejs:20.14.0

stages:
- install
- quality
- test
- build
- deploy

##########################[ install ]###################################
yarn:install:
stage: install
tags:
- cache_dev
variables:
GIT_DEPTH: 0
CYPRESS_INSTALL_BINARY: '0'
HUSKY_SKIP_INSTALL: '1'
script:
- |-
if [ ! -d "node_modules" ]; then
yarn config set registry http://repo.my.domain.com/repository/npm-group/ -g
yarn install --frozen-lockfile
else
echo "node_modules has been retrieved from cache. No need to launch the yarn install."
fi
cache:
- key:
files:
- yarn.lock
paths:
- node_modules/
artifacts:
paths:
- node_modules/
expire_in: 15 days

##########################[ quality ]###################################
yarn:lint:
stage: quality
tags:
- deploy_prod
needs:
- job: yarn:install
artifacts: true
before_script:
- '[ $CI_COMMIT_BRANCH = $CI_DEFAULT_BRANCH ] \
&& export BASE_COMPARE_BRANCH=remotes/origin/master~1 \
|| export BASE_COMPARE_BRANCH=remotes/origin/master'
- git fetch origin
script:
- yarn run nx -- affected --target=lint --base=$BASE_COMPARE_BRANCH --parallel
- yarn run nx -- format:check --parallel --verbose --base=$BASE_COMPARE_BRANCH
allow_failure: false
when: always

sonar:
image: $DOCKER_REGISTERY/sonarsource/sonar-scanner-cli:latest
stage: quality
tags:
- deploy_prod
- sonar
script:
- sonar-scanner -Dproject.settings=./sonar-project.properties
artifacts:
when: on_success
expire_in: 15 day
paths:
- .scannerwork/
rules:
- if: $CI_COMMIT_BRANCH == 'master'
when: always
allow_failure: true

##########################[ test ]###################################

yarn:unit-test:
extends: yarn:lint
stage: test
script: yarn run nx -- affected --target=test --base=$BASE_COMPARE_BRANCH --parallel
when: always
allow_failure: false

yarn:e2e-test-chrome:
extends: yarn:lint
stage: test
script:
- yarn run nx -- affected --target=e2e --base=origin/master --parallel
when: manual

##########################[ build ]###################################

b:dev:
stage: build
dependencies:
- yarn:install
tags:
- cache_dev
needs:
- job: yarn:install
artifacts: true
before_script:
- echo `date`
script:
- 'yarn run nx -- run-many --target=build --projects=my-project,my-other-project --configuration=dev --parallel'
- 'yarn run nx -- run-many --target=server --projects=my-project,my-other-project --configuration=dev --parallel'
after_script:
- echo `date`
- 'mkdir -p target'
- 'tar -zcf target/package.tar.gz dist'
- echo `date`
cache:
- key: nx-cache-$CI_COMMIT_BRANCH
paths:
- tmp/nx-cache
artifacts:
when: on_success
expire_in: 15 day
paths:
- target/
rules:
- when: manual

b:staging:
extends: b:dev
script:
- 'yarn run nx -- run-many --target=build --projects=my-project,my-other-project --configuration=staging --parallel'
- 'yarn run nx -- run-many --target=server --projects=my-project,my-other-project --configuration=staging --parallel'
allow_failure: false

b:preprod:
extends: b:dev
script:
- 'yarn run nx -- run-many --target=build --projects=my-project,my-other-project --configuration=preproduction --parallel'
- 'yarn run nx -- run-many --target=server --projects=my-project,my-other-project --configuration=preproduction --parallel'
allow_failure: false

b:prod:
extends: b:dev
script:
- 'yarn run nx -- run-many --target=build --projects=my-project,my-other-project --configuration=production --parallel'
- 'yarn run nx -- run-many --target=server --projects=my-project,my-other-project --configuration=production --parallel'
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: always
- when: never
- allow_failure: false

##########################[ deploy ]###################################

d:dev:
stage: deploy
variables:
GIT_STRATEGY: none
tags:
- deploy_dev
environment:
name: dev
url: https://my.domain.com:4004
needs:
- job: b:dev
artifacts: true
script:
- bash /tools/deploy-tool
rules:
- when: manual
allow_failure: true

d:staging:
extends: d:dev
environment:
name: staging
url: https://my.domain.com:4004
needs:
- job: b:staging
artifacts: true

d:preprod:
extends: d:dev
tags:
- deploy_prod
environment:
name: preprod
needs:
- job: b:preprod
artifacts: true

d:prod:
extends: d:dev
tags:
- deploy_prod
environment:
name: prod
needs:
- job: b:prod
artifacts: true
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: manual
- when: never
- allow_failure: false

 7. Husky & other run scripts

{
"name": "my-project",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"start:my-project": "ng serve --project my-project",
"e2e:my-project": "nx e2e my-project-e2e",
"affected:build": "nx affected:build",
"affected:e2e": "nx affected:e2e",
"affected:test": "nx affected:test",
"affected:lint": "nx affected:lint --parallel --uncommitted",
"affected:dep-graph": "nx affected:dep-graph",
"affected": "nx affected",
"format": "nx format:write",
"format:check": "nx format:check --parallel --uncommitted",
"update": "nx migrate latest",
"update:check": "ng update",
"dep-graph": "nx dep-graph",

},
"husky": {
"hooks": {
"pre-commit": "yarn run affected:lint && yarn run format:check"
}
},
"private": true,
"dependencies": {
"@angular-devkit/core": "15.2.11",
"@angular-devkit/schematics": "15.2.11",
"@angular/animations": "15.2.10",
"@angular/cdk": "14.2.7",
"@angular/common": "15.2.10",
"@angular/compiler": "15.2.10",
"@angular/core": "15.2.10",
"@angular/forms": "15.2.10",
"@angular/material": "14.2.7",
"winston": "3.3.3",
"zone.js": "0.11.8"
},
"devDependencies": {
"@angular-devkit/build-angular": "15.2.11",
"@angular-eslint/eslint-plugin": "14.0.4",
"@angular-eslint/eslint-plugin-template": "14.0.4",
"@angular-eslint/template-parser": "14.0.4",
"@angular/cli": "~15.2.11",
"typescript": "4.8.4",
"webpack": "^5.58.1",
"yarn": "1.22.19"
}
}

8. Kong

proxy.conf.json

{
"/api": {
"target": "https://apim-kong-staging.dev.mydomain.com:8080/api-path",
"secure": false,
"logLevel": "debug",
"pathRewrite": {
"^/api": ""
},
"headers": {
"apiKey": "apikey..."
}
}
}

 

angular.json > projects > my-project > architect > serve

"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "my-project:build",
"host": "my.local.domain.com",
"proxyConfig": "proxy.conf.json"
},

 

Thursday, February 29, 2024

Interview questions for Angular dev

Basic FrontEnd

html

localstorage, sessionstorage, cookie

web components

shadow dom

accessibility

Which code sets the colspan attribute on the td element?

css/scss

box model

pseudo element

positions: static, absolute...

layouts: flex, grid

selectors: tag, id, class... specificity

scss: var, func, nesting

mobile first


js/ts

data types: number, string, null, undefined

ts type: unknown, any

scope: global/function/block

closure

prototype

array: map, filter, reduce, some, push, concat...

operators: ??, ||

arrow function vs. normal function, what's "this" value

async function: why js is single thread but can process async events


const obj = { a: "one", b: "two", a: "three" }; console.log(obj)

viết hàm async tính giai thừa của n (n >= 0)


Angular


Basic

how many years of exprience

Angular overall architecture

Angular directive (structive, attribute) 

directive vs. component

life cycle hooks

how 2 components communicate

syntax to lazy-load a module

UI library: primeNg, material

What is the syntax for a template reference variable?


Advanced

How a component get data from main app

change detection: onPush vs. Default

What is the default value of 'ViewEncapsulation'?

role of interceptor

type of valuechanges in formcontrol

selector used to style a component based on a condition outside of the view

when impure pipe run

How can you have a separate instance of service "MyMockService" in every instance of a component?

At what lifecycle hook will ViewChild query be accessible? @ViewChild(foo', (static: false}) foo: ElementRef

What is differential loading?

How can you specify an alternative class provider?

control value accessor

tại sao data trong 1 service không bị mất khi chuyển trang

làm thế nào để ng-content select đúng template

dùng gì để provide data cho một page trc khi chuyển đến

state management

ngrx

how it works

Example

Which syntax completes the following code so that it displays 

'Hello Angular!', given that isTrue = false; ?           <span>Hello

<span …›world</span></span><ng-template #hi>Angular</ng-template>


How many times will console.log be called in the following example? import {of} from 'rxjs';   of([2,3,41).subscribe({next: n => console.log(n)})

rxjs

các rxjs operator hay dùng

switchMap vs. exhaustMap, nếu có error thì có chạy tiếp k

forkJoin vs. combineLatest

Observable vs. promise

rxjs map vs. switchMap

Testing

unit test vs. e2e test

cypress, mocha...

TDD

clean code

SOLID

how to refactor code


design pattern

DI, Facade,...


code review

coding style

communicate BE vs FE


Debug 

- chrome dev tools

- angular dev tools

- redux


GIT

git flow

merge vs. rebase


BE

SQL schema

Restful (http verbs, put vs. patch)

PSR

Optimization

Debug

SQL index: btree, hash


others

 Describe your project architecture

Monday, February 5, 2024

First test in new year

 I've just taken a test provided by Hackerrank, to apply for a FE senior position in Positive Thinking Company.

The test contained 5 single-choice questions and 2 coding challenges.

I quickly moved over the first 5 questions, then stucked on the 6th one which is an algorithm coding exercise. 

The question asked to get the maximum value of ratings array if we cannot skip 2 concecutive numbers (can skip one then must take the next one). In this case we need to have 

Example:

input:

[-1, -2, -3, -4, -5]

output:

-6

explanation:

take [-2, -4] and skip others to have maximal number of -6

The last question was about moving data among parttitions in a hard disk to store data in the least partitions possible.

Example:

input:

- used: [3, 2, 1, 3, 1]

- total capacity: [3, 5, 3, 5, 5]

output:

2

explanation:

move first partition to second partition, move third and last partitions to 4th partition, then we have result of [0, 5, 0, 5, 0] which stores in 2 partitions.

I had feedback right away: FAILED :(

40% (need 50% to be mid and 60% to be senior)


I need to practice more algorithm then.

Thursday, March 30, 2023

Second interview with Niteco

Focus mostly on: SEO, Optimization (which I have very modest idea on sadly)

how to do SEO for Angular

what to consider while optimizing a page

design pattern: which ones you applied in your angular app

image: multiple images in one vector,  load priority

css: mixins, avoid duplicate (css~where), remove unused css

UI: style guide, how to compare styles in different versions

lazyload component

webpack: bundle split

3th party libs: how to make sure they don't affect current page

cdn: make it fast

API call: how to add header




Friday, March 24, 2023

My first interview in 2023

 This time is VNext

I received this home-work test just one day before the interview

ANGULAR TEST

(Duration: 2hours)

Follows bellow instructions

1. Clone code from this URL: https://github.com/phamcong/angular-test

2. Create a new branch with format: feat-enhance-filter-xxx-yyy 

a. xxx – Last name of candidate

b. yyyy – Date and month of candidate’s birthday

c. example: feat-enhance-filter-NGUYEN-3110

3. Complete the current code with following requirements

a. Sub-categories filter should contain all subcategories extracted from initial products list (on the right): not duplicated, ordered by A-Z. A select option should be an object with label and value, where the label is used for display purpose and the value is used for filter purpose. label and value are not required to be distinguished.

b. Countries filter should work as sub-categories. Country selection option should have label as country name, and value as 2digits code: { label: ‘Vietnam’, value: ‘VN’ } for example. List of countries with code could be found at app/product/data/countries.ts

c. Options in sub-categories and countries filter are dependent. That means when one or many sub-categories are selected, the list of options in countries filter should be adjusted accordingly and vise-versa. When selected options of a filter are changed, any invalid pre-selected options of the other filter should be removed. Note that, categories filter does not have any dependencies with others.

d. Submit button should work.

e. Add a Reset button on the right of Submit button, allowing reset the filter model. By click on this button, we should see the full list of products on the right panel.

 




Then I had a conversation with the Senior Angular dev, after some first words he switched immediately to English and asked about the homework. 

So far so good, I explained what I had done and what I missed, where to go next.

Then the Tech lead came in and discussed in Vietnamese about what they wanted to process with me.

Basically they will sell me for their customer and I will expect to have one more interview round with the customer.

This is just another outsource company, nothing too interested, but I have to say that the homework was fine, I like how the code was clean and well-organized.

UPDATE

After a week of waiting, I finally contacted the HR and she told me the feedbacks about me were all good, but since there are some delays from their customer, so she asked me to keep waiting.

More than 1 month has passed and I can conclude this is a dead-end interview. Still glad that I had those good feedbacks though.

Saturday, January 7, 2023

What to do in 2023?

 Although I am pretty happy with my current job at Pentalog, I am still looking for a new chapter in my career. Singapore is my next target! Not an easy one, but I will do my best with the preparation.

Firstly, I am practicing leetcode via neetcode, which is a nice tool for a clear roadmap. I will stick to daily practice no matter what.

Secondly, I am reading the book "crack the coding interview" - a bible in the software interview trusted by many many engineers.

Thirdly, I will get some references from people working in Singapore.

Lastly,  if possible get some mock interviews from real people.

More details on the milestone:

  • Finish the book "crack coding interview" by June.
  • Get first interview by April.
  • Prepare CV by March.

Sunday, August 7, 2022

Chặng đường tiếp theo với NordNet

Sau khi kết thúc dự án 3T một cách chớp nhoáng, mình được các sếp chuyển qua dự án NordNet. Đây là một dự án rất lâu đời rồi, khách hàng Pháp có sản phẩm trong lĩnh vực viễn thông, khách hàng của họ là người dân ở thị trường Pháp.

Do tính chất đặc thù là dự án long term, nên các quy trình khá rõ ràng, team dev chỉ có ở Việt Nam, còn bên khách hàng có 1 bạn PO và 1 bạn Tech lead làm việc trực tiếp với team Việt. Ban đầu sếp Hoàng gợi ý mình thử thách với vị trí Tech Lead cho team Elephant, nhưng do mình chưa có kinh nghiệm PHP nên cuối cùng lại thôi, chỉ join vào team Lotus với vai trò Dev bình thường.

Sáu thời gian onboard khá nhanh chỉ tầm 1 tuần mình bắt đầu nhận task, và sprint thứ 2 đã có thể hoàn thành được khá nhiều task nhỏ. Công việc dần dần cũng quen thì thấy tương đối nhàn so với các job trước đây. 

Từ khi vào dự án mới mình thường xuyên lên công ty thay vì ngồi nhà remote như trước đây. Không phải vì mình thích lên cty mà do cả team đều lên nên mình cũng phải lên thôi!!!

Thực ra lên cty sẽ làm việc hiệu quả hơn, đặc biệt nếu team đông thì trao đổi sẽ thuận tiện hơn nhiều. Mọi người trong team cũng rất nice, khách hàng dễ thương vui tính (bạn Amélie) nên lên cty rất vui chứ không hề mệt mỏi.

Ah đặc biệt có 1 điều mình chưa kể, khá là thú vị. Khi lên cty vào buổi sáng mọi người thường bắt tay chào hỏi nhau, rất hay và giúp tăng tình cảm sự đoàn kết giữa các thành viên dự án. Ngày trước vì làm dự án 1 mình nên chỉ có các sếp qua bắt tay cứ tưởng các sếp ưu ái hay thương mình =)))

Vừa làm hơn 1 tháng thì anh Tuấn teach lead báo nghỉ. Thật sự hơi sốc và buồn vì anh Tuấn là một người anh cực kỳ nice, vui tính dễ gần, trông giản dị và hay bắn thuốc lào =)). Vì anh Tuấn ra đi nên mình buộc phải thay thế làm tech lead, thực sự thì mình có chút phấn khích khi lần đầu làm tech lead, tuy nhiên cảm thấy chưa thực sự sẵn sàng. Hiện tại mình còn một dự án làm ngoài với Hiệp, 2 anh em còn đang loay hoay bắt đầu với project đầu tiên cho bác Mohamed. Mình cũng dự định làm thêm 1 job remote nữa nên quỹ thời gian không có nhiều, phải tranh thủ từng chút một.


Wednesday, June 22, 2022

Dự án chớp nhoáng - 3T Logistics

 Mình vào Pentalog từ đầu tháng 3 sau quá trình phỏng vấn và chờ đợi ...3 tháng, dự án đầu tiên làm với khách hàng 3T logistics là một công ty IT ở UK chuyên cung cấp giải pháp logistics giúp kết nối người gửi và người vận chuyển hàng. Công ty này ở Leicester City, nếu bạn nào theo dõi bóng đá Ngoại hạng Anh thì sẽ thân thuộc với cái tên này.

Sản phẩm

Bọn này xây dựng một nền tảng logistics tên là EVENT, trong đó nó có 1 product là ROUTE là cái mà mình trực tiếp làm việc. https://www.3t-event.com/how-does-route-work. Bản thân 3T không có 1 cái xe tải hay tàu thuyền bến cảng nào, mà nó chỉ cung cấp giải pháp và nền tảng cho các bên giao vận.

Product của 3T mà mình làm khá là cồng kềnh, nhiều thứ hầm bà lằng, có thể kể ra như:

  • Azure services: CosmosDB, SQL DB, Fabric Cluster, API Management, App insights, LogicApp...
  • Dotnet core
  • Angular 8, 13
trụ sở 3T khiêm tốn thế này thôi


Quy trình làm việc

Ấn tượng ban đầu với 3T là quy trình làm việc khá mù mờ vì nó ...quá thoáng :D, lúc đầu không thể hiểu nó theo mô hình nào Agile Scrum? Kanban? và buồn cười là làm suốt 4 tháng nhưng chỉ có 1 retro meeting duy nhất, cũng là lần duy nhất cả dự án meeting với nhau =)). Có điều nó cũng hay vì có nhiều thời gian code hơn là meeting ;) ngoài daily meeting hàng ngày lúc 3h chiều thì hầu như mình không phải dự cái meeting nào nữa <3. Project chia làm 3 team trong đó mình và 2 anh khác trong team C, báo cáo trực tiếp cho SM là Damon (ông này tính khá vui vẻ dễ tính, đã có bạn gái, 1 thằng ku 2 tuổi và đi xe ford fiesta)

Có 1 thuận lợi là có 1 bác tên Lượng học PhD bên UK từng làm cho 3T trong 3 năm trước khi về định cư ở VN, nên việc trao đổi phần nào thuận tiện hơn. Bác này tính khá hay, rất lịch sự và thoải mái, quê Thái Nguyên và có 2 ku nhóc sinh đôi. Tuy chưa gặp mặt trực tiếp nhưng nói chuyện cũng khá dễ gần <3

Cú sốc đến bất ngờ

Mình và ông anh cùng team mới bắt đầu quen với dự án thì vào một ngày đẹp trời nọ, nhận được meeting invitation của ông sếp khách hàng



Ủa, meeting gì kì vậy, k có thông tin gì cả? Lúc họp ông khách hàng mới từ từ vòng qua vấn đề chính: cắt giảm ngân sách => cắt giảm nhân sự :(( Xong! chỉ mới hơn 2 tháng bắt đầu làm thì phải nghỉ, quá là đột ngột hix hix.

Nhưng đó có lẽ là điều tất yếu, khi tình hình kinh tế khó khăn, chiến tranh U cà, lạm phát, xăng dầu... dẫn đến bao hệ lụy. Nhìn chung thì đây là thời điểm downtrend của Chứng, Coin, và IT. Sau đợt dịch bùng nổ thì mọi thứ lại trở nên khó khăn. Dù vậy cơ hội mới không thiếu, chỉ cần chúng ta sẵn sàng.

Những ngày cuối

Còn vài ngày nữa là chính thức nghỉ dự án này, mình vẫn làm việc bình thường, không có áp lực gì cả, ông khách hàng còn bảo mày cần thời gian đi pv thì cứ nói, nên mọi thứ khá thoải mái. Khoe với mọi người task cuối mình đang làm liên quan đến Tomtom map.






Wednesday, December 15, 2021

Angular interviews

 

1. Pentalog

TS quizzes

  1. how to write empty decorator
  2. oldest version of JS that TS can transpile to
  3. default target of tsconfig.json
  4. how to write TreeNode data type
  5. any type is for...
  6. outFile is for...
  7. type annotation is transpiled to JS as ...
  8. JS is compatible with TS
  9. array vs tuple
  10. supported types of TS
  11. access modifier of properties in class
  12. read-only type in class
  13. enum is for...

enum Direction {
Up,
Down,
Left,
Right,
}

14. what's value of Down

Angular quizzes

  1. role of interceptor
  2. syntax to lazy-load a module
  3. type of valuechanges in formcontrol
  4. selector used to style a component based on a condition outside of the view
  5. when impure pipe run
  6. Which syntax completes the following code so that it dis plays 'Hello Angular!', given that isTrue = false; ? <span>Hello <span …›world</span></span><ng-template #hi>Angular</ng-template>
  7. How can you have a separate instance of service "MyMockService" in every in stance of a component?
  8. How many times will console.log be called in the following example? import {of} from 'rxjs'; of([2,3,41).subscribe({next: n => console.log(n)})
  9. Which code sets the colspan attribute on the td element?
  10. At what lifecycle hook will ViewChild query be accessible? @ViewChild(foo', (static: false}) foo: ElementRef
  11. What is the syntax for a template reference variable?
  12. What is differential loading?
  13. What is the default value of 'ViewEncapsulation'?
  14. How can you specify an alternative class provider?

Interview questions with tech lead

  1. các rxjs operation hay dùng
  2. rxjs map vs. switchMap
  3. viewEncapsulation
  4. control value accessor
  5. tại sao data trong 1 service không bị mất khi chuyển trang
  6. directive
  7. làm thế nào để ng-content select đúng template
  8. nodejs nhiều version khác nhau thì quản lý như nào
  9. dùng gì để provide data cho một page trc khi chuyển đến
  10. dùng Promise ở browser thì có cần import thư viện gì k

1.1 QIMA

Interview questions with customer

  1. life cycle hook
  2. change detection
  3. Promise vs. Observable
  4. testing framework
  5. omit types
Pair programming
- create a simple app using mock data with interfaces

<failed>

1.2 3T Logistics

Interview questions with customer

  1. kể về project hiện tại, vai trò của bạn
  2. cách giao tiếp giữa 2 component
  3. trình bày về subject, observable
  4. bạn dùng primeNg, material chưa, version nào
  5. bạn đã dùng state management lib nào chưa
  6. dùng gì để manipulate dom
  7. bạn có câu hỏi gì cho chúng tôi


2. Produgie

Test

  1. pipe: date, currency, percent
  2. template attribute (div color)
  3. component input

1st interview (Tech member)

  1. Làm sao giải toả căng thẳng trong công việc

...

2st interview (CTO)

  1. Mô tả team đã làm trước đây: process, testing như thế nào?
  2. Code coverage có nên đạt 100%
  3. Nói thế nào với PO về TDD?
  4. So sánh multi-tenancy product (B2B) với end-user product (B2C) ở khía cạnh UI/UX
  5. Process để deploy hotfix lên production giả sử có 3 môi trường (dev, UAT, prod)
  6. Khái niệm micro-ui
  7. So sánh Angular với React? Chọn lựa cái nào?


3. FPT Da Nang

  1. Lifecycle hooks
  2. Promise vs. Observable
  3. Rxjs switchMap vs. mergeMap
  4. State management, dùng gì để qly state
  5. Performance profiling, thông số nào quan trọng
  6. Bạn đã làm ứng dụng real-time chưa?
  7. Thư viện để vẽ đồ thị (plotly)


4. Xebia

  1. Angular directive, ngIf vs ngShow
  2. Html5 vs html4
  3. JS hoisting
  4. JS prototype
  5. Describe your project architecture
  6. How a component get data from main app
<no response>


5. Nashtech

  1. mô tả task bạn khiến tự hào
  2. css architecture
  3. xử lý search input (debounceTime, switchMap)
  4. nếu gặp task khó thì xử lý như nào
  5. refresh token khi bị expire (interceptor)
  6. cắt html trang vnexpress hết bao lâu
  7. thiết kế app frontend như nào để dễ scale
  8. thiết kế lại 1 trang như cragslist để responsive mà k dùng frontend framework (e.g bootstrap)
  9. git - flow để fix 1 bug trên production
  10. Ngoài Angular thì bạn có biết React, Vue? chấm điểm mức thành thạo



6. Contemi

  1. component lớn nhất bạn đã làm
  2. angular change detection, so sánh onPush và Default
  3. làm sao angular phát hiện change của giá trị binding
  4. hàm async trong js, tại sao nói js là single thread nhưng xử lý được bất đồng bộ
  5. bạn đã làm chart, form chưa
  6. real-time app cơ chế như nào
  7. cơ chế của authentication (OAuth2, OIDC, SSO, 3-step handshake???)
  8. các issue hay gặp phải khi code angular
  9. bạn có dùng lazyload
  10. unit test dùng framework gì, code coverage bao nhiêu, có thấy hữu ích không

7. TDT Asia

  1. Tại sao JS single thread mà xử lý dc nhiều tác vụ cùng lúc
  2. nếu setTimeout = 4 rồi setTimeout = 3, thì cái nào chạy trước; với setTimeout = 0 thì sao?
  3. các form trong angular
  4. muốn gửi data theo format multi-path thì cần config như nào
  5. phân biệt Array map, filter, reduce
  6. làm sao query được item trong html theo 1 phần của id (e.g id="item-123")
  7. review code theo các tiêu chí nào
  8. phân biệt localstorage, sessionstorage, cookie
  9. pipe dùng để làm gì, có limit số pipe cho 1 variable k?
  10. làm sao để set global variable trong angular

8. Techcombank

  1. Phân biệt Array push và concat
  2. Các loại pipe, phân biệt pure và impure pipe
  3. Closure, ví dụ về trường hợp bạn đã dùng trong Angular
  4. Validator của ReactiveForm được viết như nào
  5. Các CSS position, dùng position absolute thì phải lưu ý gì?
  6. Grid của bootstrap 4 dùng kỹ thuật gì, nếu không dùng flex thì làm sao để tạo layout
  7. Responsive theo từng màn hình device như thế nào
  8. mobile first responsive
  9. phân biệt switchMap và exhaustMap, nếu có error thì có chạy tiếp k
  10. forkJoin vs. combineLatest

9. Tokenize

  1. tối ưu performance ở project bạn đã làm
  2. nếu 1 trang gallery có nhiều ảnh với các kích thước khác nhau muốn hiển thị theo chiều dọc hoặc ngang thì dùng layout như nào
  3. lazy load khi cuộn trang như nào
  4. phân biệt localstorage, session storage, cookie
  5. nếu muốn làm seo cho search engine thì cần thêm thẻ gì, ở client side thì config seo như nào
  6. toán tử ??, ||
  7. const obj = { a: "one", b: "two", a: "three" }; console.log(obj)
  8. tính chất của Observable, so sánh với mô hình pub/sub
  9. thiết kế component search call từ API với các button search, clear (mô tả rõ html, css, js)
  10. viết hàm async tính giai thừa của n (n >= 0)
  11. bộ nhớ heap và stack của browser
  12. arrow function khác gì function thường, con trỏ this dùng ở đó như nào
  13. cho biết kết quả của đoạn code sau
function Person(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
}

const lydia = new Person("Lydia", "Hallie");
const sarah = Person("Sarah", "Smith");

console.log(lydia);
console.log(sarah);


Tuesday, November 23, 2021

DevOps inverviews

TEKO

Interviewer là bạn Phương Programming Manager trông còn khá trẻ (chắc chưa đến 30), bạn này đang làm ở Sing vì là nhân viên xuất sắc được sang Sing ngồi cùng sếp.

Câu hỏi pv bắt đầu như mọi cuộc pv khác, đó là giới thiệu bản thân, các công việc đã làm. Sau đó là hỏi về những khó khăn đã gặp phải trước đây, cách để giải quyết như thế nào.  

Những bài toán bạn đã từng gặp phải trước đây?

- Bài toán chia gói hàng (packages) thành các giỏ hàng (buckets)

Làm sao để tiết kiệm thời gian cho shipper? Quy trình sẽ là: từ address dùng google map api để convert ra toạ độ x, y sau đó dùng thuật toán LMS để gom các điểm gần nhau. Cần tinh chỉnh các hệ số để tối ưu nhất có thể

- Check Gitlab pipeline mongodb đã import chưa?

thường thì import data từ QA sau khi tạo mongodb, vì vậy có thể check là nếu mongodb đã create thì lưu vào 1 biến trạng thái trong một file variables.json của gitlab artifact, sau đó get biến này để check có import không

- flexible platform: làm sao các component mềm dẻo, độc lập?

tạo ra một số quy tắc về dữ liệu và styling. về dữ liệu thì dùng input/output cho từng component. quy định không dùng css position absolute, fixed

 - angular: build dynamic components, frontend dựa vào schema từ backend

xử lý với các form dynamic, dung ngx-formly để generate form từ json schema

- Issue Grafana không get dc metric từ Prometheus

Liên quan đến DB của prometheus bị đầy, solution có thể là giảm retension time đến một giá trị phù hợp.

- Cách structure project/pipeline để đáp ứng được deployment cho nhiều service, tenant khác nhau

Chia ra các project khác nhau, tổ chức call từ project chứa config đến project chứa template

Bài Coding

Sau đó là 20 phút làm 1 bài coding đơn giản. Bài toán là parsing data từ dạng csv sang mảng 2 chiều. Trường hợp đơn giản nhất là chỉ có dấu phẩy để tách cột

Nguyễn Văn A, Đinh Tiên Hoàng, Đà Lạt, Việt Nam

Sau đó nâng cao hơn là dùng dấu nháy kép (") để gộp địa chỉ

Nguyễn Văn A, "Đinh Tiên Hoàng, Đà Lạt", Việt Nam

Expect là lời giải phải đáp ứng được cả 2 trường hợp này.

Vì thời gian khá ngắn nên mình đã không giải được trọn vẹn đề bài mà mới chỉ giải quyết từng case. Với bài toán này, để đáp ứng được cả 2 trường hợp thì việc split string đơn thuần không giải quyết được, cần thêm 1 bước xử lý nữa là check dấu nháy kép. Một solution có thể là split dấu phẩy sau đó check dấu nháy kép để cộng string.

VMO

- Cần xây dựng những gì cơ bản nhất để deploy một service lên AWS

- Nếu có khoảng 10 service thì cần chia subnet như nào (dải mạng/subnet mask)

- Làm thế nào để các service trong các subnet connect được với nhau

- Monitoring như thế nào, chẳng hạn Kafka MSK

- Các metric được get như thế nào, lưu ở đâu (prometheus db)

- Nếu Kafka consumer không get message kịp với tốc độ producer thì làm sao


Cyptopie

- k8s có những loại network nào (clusterIP, NodePort, với 1 loại k nhớ)

- có những loại health check nào, phân biệt liveness, readiness, startup health check

- nếu 1 trang gặp sự cố thì xử lý như nào

- chọn EC2 instance type như thế nào, loại M với C thì khác gì nhau

- nếu file image quá lớn thì làm sao 

- nếu Kafka leader down thì xảy ra điều gì

OCG

45'


Bạn đã tự build MySQL có nhiều replica chưa

Nếu RDS MySQL load nhiều thì xử lý như nào?

Scale pod, node trong k8s như thế nào?

Làm sao scale dựa vào kafka metric

Làm sao scale được gitlab runner

Bạn có dựng DB ở nơi khác ngoài AWS để tiết kiệm chi phí chẳng hạn

Cấu trúc k8s

Các tool devops hay dùng

Làm sao deploy app lên các node nhất định

IP của pod được xác định như nào

Làm sao giới hạn access đến DB trên k8s

Bạn có vận hành EKS không

Làm sao monitor hệ thống EKS

Vận hành alert như nào


Sunday, January 24, 2021

2021 - New Year's resolutions

 2020 was a strange but happy year. Now I'm a married guy with a baby who I love so much, she's a little cute creature came to my life just in the end of 2020. It was a year full of events and changes, and my life had turned around so different. I am much happier than I was a year ago, I am more focused on my family and my work than I was before. 

I'm a father of a new born baby girl.

I'm a devops engineer working for German customer.

2021 hopefully will be a better year for me. I'm getting more experience with my carieer, and starting to invest on different assets. Not sure how this year will end, maybe I will change my work and I will be working for a different company, or I will quit the job and work remotely. If it is the first one, I want to work for a product company not an outsource company as I have been working for for many years.

Wish you all have a wonderful year 2021!

Love,

:x Thong.

Sunday, July 26, 2020

Fullstack your.rentals

Vừa tạch cái interview. Tuy nhiên không thấy thất vọng, thay vào đó là cảm giác mình còn nhiều việc phải làm. Trước hết là mình biết những lỗ hổng trong kiến thức sau nhiều năm làm việc.

Còn đây là list câu hỏi.

NodeJS: Tại sao JS là single thread nhưng lại chạy dc nhiều tác vụ cùng lúc?
Message Queue vs Pub-Sub, ưu nhược điểm
Trong AWS Load balacing thì cơ chế để set scale instance là gì? Việc thực hiện scale này được thực hiện ở phân vùng nào?
Làm sao tăng tốc độ đọc của DB? Nhược điểm của việc đánh index?
DB Replicate là gì? cơ chế đọc ghi?
In memory DB là gì? Redis có phải là in memory DB?
Khái niệm View trong DB? lúc nào thì dùng View?
TDD là gì? Unit test có vai trò như nào?
Trong các dự án anh từng làm thì có phần nào đòi hỏi cao về performance? Nếu có thì giải quyết như nào? Thời gian đo đc đã cải thiện bao nhiêu?
CORS là gì? Khi enable/disable CORS thì tức là block cross-domain hay k?

Friday, July 17, 2020

The last interview

This is the interview I took months ago. I intended to write down immediately but my lack of commitment and layziness have been holding me from it until now.

The interview was for a frontend position, required some Angular/React/VueJS knowledge. I only had experience in Angular, so that might be the reason of my failure.

The interviewer was nice, as far as remember, he asked many questions and kindly explain them clearly. I cannot recall all the details but I will try to list some of the questions

- As usual, introduce youself
- What's your responsibilites on the current project
- Can you compare Angular/React/Vue
- What's the downside of Angular
- How to store values on browser: local storage, cookies
- How to keep states in the app
- Data binding in Angular

And so on...

I did not get an offer, although I thought the interview was OK. They of course did not reveal the reason but I guess that's because I demanded too much  for their package :)

Wednesday, January 1, 2020

2019 looking back

Today is the first day of new year 2020. So it should be a special day for everyone. 

For me, this is the perfect time to look back for what I have done the last year of 2019. Yup, it was a special year for me and I had been through many changes, ups and downs. 

I broke up with my ex
I had been dating with someone else but they did not go any where
Then I found a girl whom I am dating with now, and I hope this relationship will last long...

I quit FPT Software and joined IFI Solutions - the company which I had worked in a short time a long time ago.
I have been kicked out of the team because one of our customer thought I am not good enough for the project. A bit sad but I am not blaming anyone.

So is 2019 a successful year for me? Maybe, at least I am not as naive as before, and I accepted the reality and work hard to get what I want. 

Now I know how to let go.

Happy New Year my friends!

:x

Saturday, July 20, 2019

How about now?

I am not sure if I just go forward and marry her. She is a good girl, having a favorable body figure, only her skin is not very good-looking. I must say that I am not judging a book by its cover here, however a book needs a proper cover anyway, and her outer look is not really bad after all. The more important thing is her personality which should make our marriage success. 

Time is too constraint for me as I am not young anymore. It has been passing by so fast, and I am still not confident about whom I should marry to. My ex was a good girl, only that she is too childish and dependent. It's not fair to let her down like that but I could not think of a better way. 

I think what I need from my other half, is a smart and calm woman, the one that's funny enough but behave as a grown up. She must love me but still has her own life, which people often call "independent woman". Yet I am not looking for a perfect one, that is impossible for me anyway, so I will go with my heart ultimately.


Monday, June 3, 2019

Not a really good day...

She made her decision.

She broke up with me. Not really a break up though, because she never told me that she loves me, never... (I told her those words multiple times, ironically). We had a great time together, at least I thought so. I took her to lot of places around this chaotic city of Hanoi, for food and for fun. Although we knew each other for years, things just started since last year. I came home to visit my aunt as she had a stroke and was very ill. She saw me in the bus returning to Hanoi, I did not see her though but because she texted me so I knew she was there. I did not meet her that day but we began to chat alot anyways.

Things had been going so well since last Lunar New Year, she came visit my house and met my parents. Then I went to her aunt's party and I had some drinks with her big family, including her father. I even sang some karaoke with her parents, I was so drunk at the moment. She then took me for a coffee to recover from alcohol. I was so tired that I slept all the morning after, but I was happy.

After that we went for dating a lot, she even took me to visit her grandmother and meet her friends. She cooked lunch for me at my own house, especially she helped me prepare for my older brother's memorial day only several days ago. Despite she did not let me hold her hand on public, I thought she would choose me eventually. But I was wrong, so fucking wrong.

She broke up with me today.

I had no idea why she did so. When she told me not to text her anymore, I was so confused. I did not know what the heck she was thinking. Four days ago she said she went home. I was like: WHAT??? She did not tell me anything about that, and all of sudden, she was in her hometown. I was thinking of something not right just happened. I tried to text her and call her, but she did not answer. Yesterday, she told me that she will meet me for a talk when she returns to Hanoi. And today is the bad day.

We met at a lake near her place to have dinner just beside the lake. I asked her the reason why she wants to breakup with me, she refused to say at first, but I made her say eventually. She went home to see some other guy the other day. She told me that her parents want her to meet the guy. I did not know that I should believe her or not. But the reason is clear now. She is seeing some guy.

I was out.

I stayed at the lake for some more time, staring at the lake, then I returned home. I switched my phone to airplane mode, had a hot shower. I let myself screaming while showering. She never loved me, I am just one of the guys she could choose. And I am not the one she chooses. Sadly.

That's end of a story. I will think more carefully about my future relationships, if there will be one.

It hurts, man. It's really hurts.

Tuesday, February 20, 2018

new year and thoughts

I am so sorry for my parents and I feel so terrible and hopeless. This should have been a good time for us, new year and reunion, but my parents and I could not be happy because I could not get a girl friend. A year has passed and things haven't changed much. I am pretty happy with my career but with my relationship - something must go wrong so badly.

I have been trying to find my other half for so long, and haven't succeeded. There are the ones I liked so badly but they never had the same feelings for me. I stucked. I strived. Whenever a hope pops out, I am happy to take the chance, but then it would be more desperated and hopeless. I couldn't dream big anymore, I have to accept the reality and work hard on what I can change.

Life's tough

We are finding meaning of our existence, at the same time, we fight for the things we don't need. We want more and more stuffs, money, and luxury. But none of them really matters. I am not happy when I have a lot of money. I am looking for something else.

What's the real importance? That's when we find ourself in peace. We are truly ourself when we find the true half, the ones we love more than anything else in this world, and they feel the same way to us.

Love

We do not regret when we say "I love you". We regret that we didn't, many times. I did say those words to the one I love, and I feel relieved, despite that she didn't give me a chance. No problem!

Life's still going on

We look back and learn. We look ahead and plan. Pain hurts, but it is unavoidable.