Jul 26, 2024

liquibase.exception.LockException

Unlock with the following SQL


UPDATE DATABASECHANGELOGLOCK SET LOCKED=0, LOCKGRANTED=null, LOCKEDBY=null where ID=1;

Jun 21, 2024

TestNG unable to find valid certification path to requested target

I have the following error when I run a test.

org.testng.TestNGException: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at org.testng.TestNG.parseSuite(TestNG.java:327)
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:348)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:39)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:105)
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)

The reason is Java keystore does not have testNG certificate. You need to add it.
Here is how to.

1. Download testng.org certificate.
    Visit https://testng.org/ and click filter icon on the address bar.


Click "Connection is secure"



Click "Certificate is valid"


Click "Details" tab







Click Export button.

Download "testng.org.crt" file.


2. Run the following command.
"C:\Program Files\Zulu\zulu-11\bin\keytool.exe" -importcert -file C:\dev\testng.org.crt -trustcacerts -keystore "C:\Program Files\Zulu\zulu-11\lib\security\cacerts"
   You will be asked to input password. The default password is "changeit". And input yes to trust testng certificate.


Now your test will pass or fail. Good luck!

May 15, 2024

2024 resolutions: Read 10 favorite books for software engineers

Alex shared his favorite 10 books. I plan to read 10 books in 2024.

https://x.com/alexxubyte/status/1788232858198556762


 General Advice

1 - The Pragmatic Programmer by Andrew Hunt and David Thomas
Done 15 years ago? 2 - Code Complete by Steve McConnell: Often considered a bible for software developers, this comprehensive book covers all aspects of software development, from design and coding to testing and maintenance. Coding 1 - Clean Code by Robert C. Martin 2 - Refactoring by Martin Fowler Software Architecture 1 - Designing Data-Intensive Applications by Martin Kleppmann 2 - System Design Interview (our own book :)) Design Patterns 1 - Design Patterns by Eric Gamma and Others 2 - Domain-Driven Design by Eric Evans Data Structures and Algorithms 1 - Introduction to Algorithms by Cormen, Leiserson, Rivest, and Stein 2 - Cracking the Coding Interview by Gayle Laakmann McDowell

If I completed above books early, I will try the following books.

The Pragmatic Programmer by David Thomas and Andrew Hunt.

Clean Code by Uncle Bob Martin.
Head First Design Patterns by Eric Freeman.
Refactoring by Martin Fowler.

Grokking Algorithms by Aditya Bhargava.
Introduction to Algorithms, by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein

Learning SQL by Alan Beaulieu (Free E-book).

Growing OO Software by Tests by Steve Freeman.
The Art of Unit Testing by Roy Osherove.
TDD by Example by Kent Beck.


Nov 10, 2023

[git] Delete all branches except master in windows

 Powershell command:

,@(git branch | Select-String -Pattern "[^(*?)\s? master]") | ForEach-Object{$_.Line.Trim()} | %{git branch -D $_}

Jul 14, 2023

How to measure the productivity of an engineering team

Fellow suggests the following 10 measures for engineering metrics. I agree some of them. Let me add my opinon in line. My opinion is based on current company situation that it releases every three months.

Lead time: Yes. It means from the time of customer request to the time of deployment in production.

Cycle time: Yes. It means from the time of staring of the developmnet to the time of deployment in production. However I would like to mearsure to the time of master branch merge.

Number of story points: Yes. I prefer to measure number of stories. Because story points are decided by engineers and it's not correct until the team gets stable. It takes about 1 or 2 years. The problem is after 1 or 2 years, engineers are not in the team.

Mean time to restore in production: No. Dev and Ops are separated. 

Days worked: Yes, but no. The formula of the productivity is output / input. We can use this as input. The challenge is engineers are in several countries. It's little bit hard to calculate work days with holidays of each country.

Context switching: No. There is no way to measure it objectively.

Deploy frequency: No. It should be YES, however current my company has fixed release cycle.

Change failure rate: Yes. I use this measure like defect count / total count of story and defect.

Rework ratio: No. There is no way to measure it objectively.

WIP balance: No. I don't want to measure the process. I prefer to measure the result.

https://fellow.app/blog/productivity/engineering-metrics-what-they-are-ways-to-measure-them/

Apr 29, 2023

Memo: Build sub module in the parent directory.

I had moved to the sub module directory and run the following Gradle command.

gradle build

 

Now I build it in the paraten directory.

gradle :sub-module:build

 

Mar 22, 2023

미국에서 부끄러움은 내 몫

  1.  Target 셀프 계산기가 갖고 있던 모든 동전을 먹어버림. 일본처럼 한꺼번에 넣어더니 인식 안 하고 다 먹어버림. 털린 돈만 $11가 넘음.
  2. SSN 신청하러 SSO 방문했더니 경비원이 "Sign Sign" 소리치길래 뭔 소리가 싶어 가까이 갔더니 더 크게 "Sign Sign" 그러며 밖을 가리키길래 밖을 봤더니 간판이 있길래 그 쪽으로 갔더니 OK라고 함.
  3. 물 500ml 24개와 치킨롤을 사서 Traders Joe's에서 계산하려 하니 나이니나인에잇이라 길래 50불 2장을 냈더니, 일단 50불을 돌려주고 잔돈을 챙겨주더라. 알고 보니 $9.98 였음.

Mar 4, 2023

미국 도착 후 할 일 순서대로

미국, 캘리포니아에 온 지 6개월 인 사람이 생각한 미국에 도착 후 할 일을 순서대로 나열 합니다.

0. 집: 미국 오기 전 https://www.theblueground.com/ 에서 3개월 살 집을 미리 구하시는 걸 추천합니다. 집 주소가 없으면 은행 계좌, 운전 면허을 받을 수 가 없습니다.

1. 전화: Target에서 Mint Mobile sim card prepaid $60 구입. 도착 당일 혹은 다음 날 바로 사세요. 밖에서 인터넷을 쓸 수 있으며 통화 무제한이므로 이후 볼 일 볼 때 큰 도움이 됩니다.

2. Social Security Number: 미국 내 주소가 없어서 안 하고 있었는데 은행 계좌 만들 때 필요하고 발급 받는데 2주까지 걸린다고 해서 회사 주소로 신청. 온라인으로 신청하고 여권, I-94(가장 최근의 출입국 기록), I-129S 챙겨서 그날 바로 Social Security Office 방문하니 간단히 끝남. 미국 도착 후 2일 째 하십시오. I-94가 반영되는데 하루가 걸린다고 합니다.

3. 집: 저는 미국에 오기 전에 회사에서 소개 시켜 준 Relocity라는 서비스를 사용했는데 최악임. 7월 초 미팅을 가지고 7월 중순부터 집 찾기로 해서 7월 말 후보 집들 몇 개 보내준다고 하더니 8월 중순부터 시작. 약속한 후보 집들 동영상 다 보내 주지도 않음. 첫 집만 보내주고 끝. 공항 근처라 소음은 어떠냐고 물어보니 대답 없음. 답답해서 Zillow에서 직접 집을 찾아 여기 내가 8월 말에 도착할 때까지 계약 끝내도록 했더니 8월 말까지 그 아파트 좋다라고 함. 그래서 신청은? 이러니 매니저한테 설명했으니 온라인으로 신청하라고 함. 8월 30일. 신청하고 이틀이 지나도 연락이 없어 아파트 매니저한테 전화했더니 신청 요금 아직 안 내서 심사 안 하고 있는데 이럼. 카드로 지불 했는데 그게 왜 지불이 안되냐고 따지고 확인하라고 했더니. 수입은 증명 됐으니 여권과 일본 은행 거래명세서(bank statement) 내라고 함. 거래명세서 발급 받는데 며칠 걸린다고 하니 지 퇴근 시간이라며 빨리 끊으라 그럼. 아 놔.
  호텔에 머물다가 0번에 소개한 사이트에서 3개월 지낼 집을 구함. 3개월치 월세를 한번에 지불하므로 몫돈이 필요함.

4. 은행 계좌: 일본에서 union bank 계좌를 만들었지만, 결국 집과 SSN을 해결하고 Bank of America에서 만듬. Chase는 운전 면허증이 없으면 안 된다고 함.

5. 자동차: 캘리포니아 운전 면허증이 없어도 구매 가능. 하지만 대출 이자가 비싸 일시불로 살 수 있는 중고차를 구입. 딜러가 필요한 서류나 절차를 다 해 줌. 신용카드로 $5,000 까지만 지불 가능하고, 계좌 이체도 하루 $7,000 이 한도라 2번에 나눠서 이체함.

6. 운전 면허증: 사실 집을 구하고 바로 취득할 수 있었으나 운전 학원 차를 빌려서 시험을 치러야 했기에, 돈이 들어서 차를 구매하고 운전 면허 실기 시험을 침. 필기는 집과 SSN이 나오고 바로 신청해서 합격 했음. 

7. 집 구하기: 다시 집 구하기. 가족과 함께 살 집을 https://www.zillow.com/ 에서 집을 몇 군데 보고 구함. 아직 credit score가 없어서 구하기 힘들었지만 운 좋게 좋은 집 주인을 만나 일반 주택을 구함. 대신 일반 계약 기간이 1년임에 비해 1년 7개월로 길게 계약.

8. 애들 학교: Elementary, Middle School은 다 같은 학군(District)라서 같은 학군 홈페이지에서 애들을 등록함. 등록에 필요한 서류들은 집 주소가 확인 가능한 집 계약서, 수도나 전기 요금서, Bank statement 등의 서류, 여권, 영어 예방 접정 기록 그리고 TB(결핵) Test 결과가 필요. TB Test 결과 없이 일단 온라인으로 등록 후 학교와 연락을 주고 받아 애들이 미국 입국 후 TB Test를 해서 각 학교 담당자에게 보내고 난 후에 학교 등교일을 확정 받음.

9. 예방 접종: 캘리포니아에서 요구하는 예방접종 종류와 횟수가 더 많아 학교 입학 후 병원을 예약하여 추가로 접종을 해야 함. 학교에서 의사와 상의하여 추가로 맞추라고 해서 했는데 예약이 2달 후가 됨. 막상 병원에 가니 바로 접종은 안 되고, 다시 예약하고 나중에 다시 와야 함. 아직 끝나지 않았지만 병원을 4번 방문. 학교 담당자에게 부탁해서 추가 접종이 필요한 백신과 횟수를 확인한 후 CVS minute clinic에서 맞추면 더 빨리 끝낼 수 하다.