Olamide | Backend Developer (@Dev_Olamide) header
Olamide | Backend Developer (@Dev_Olamide) profile picture

Backend Developer | Node.js • Express.js • MongoDB Building REST APIs | Testing, learning & sharing my journey. ✝️ Jesus Lover

Joined December 2025
1/4 AAA Pattern in Testing🧵 When writing tests, there's a simple structure that makes them easier to read, understand, and maintain: the AAA Pattern. AAA stands for Arrange, Act, Assert. It divides a test into three clear steps:
1
1
19
3/4 3. Assert Check whether the result matches what you expected. Why does this matter? - Readability: Makes tests easier to follow. - Organization: Separates setup, execution, and verification. - Maintainability: Makes it easier to identify where a test is failing.
1
1
8
4/4 The AAA pattern isn't an in-built feature. It's a testing convention that can be applied across different testing frameworks and programming languages.
1
6
1/5 What should your API do when a user "updates" their profile with the same details? 🧵 Nothing. And that's the right answer. Here's the standard practice:
1
1
74
4/5 Be careful with uniqueness checks. When checking if an email or username is taken, exclude the current user from the search. Otherwise a user resubmitting their own username gets told it's "already taken" by themselves.
1
1
7
5/5 Treat passwords differently. Rejecting a new password that matches the old one is reasonable. The user wants a change, and this would do nothing. Small detail, but it separates solid APIs from fragile ones. What edge case has caught you out?
1
9
Olamide | Backend Developer retweeted
This is Dr. Cosmos Maduka, a self-made billionaire in dollars, preaching the word of God on the streets of Lagos. He has made it for life, but there is living water inside of him. This is truly who I can call a man of God. God bless you continually, sir.
6
124
2
877
6,536
1/5 Today I tested Node.js' built-in crypto module. I wrote Jest unit tests for it, using jest.spyOn to mock each method and verify return values and call arguments.
1
1
70
4/5 - createHmac(): Generates a hash using a secret key and a hashing algorithm. Used for signing data and verifying webhooks, such as payment callbacks.
1
1
21
5/5 - timingSafeEqual(): Compares two equal-length buffers while reducing timing-based information leaks. Used for safely comparing signatures, tokens and hashes. Powerful built-in tools for security, with no extra packages needed.
1
19
Olamide | Backend Developer retweeted
🚨🚨BREAKING: Jesus Christ is the Messiah, He died, He rose up again, and He is coming back.
20
167
2
1,963
19,257
1/6 HTTP STATUS CODES Your API returns "Something went wrong." Is that a server crash? A wrong password? A missing user? The frontend has no idea. This is why HTTP status codes exist. 🧵
2
2
113
5/6 Why not messages alone? "Something went wrong" can mean anything. A code like 404 tells the client exactly what kind of problem occurred, so frontend developers know what to do next.
1
1
17
6/6 Status codes are for applications. Messages are for humans. Both work together to make APIs clearer and more reliable.
1
14