CityTesting (@cityTesting) header
CityTesting (@cityTesting) profile picture

Testing and technology

Joined May 2018
Hello, Testing Community! Iโ€™ve put together a collection of Software Testing tutorials that can help you learn, practice, and refresh your skills ๐Ÿ‘‡ Basics of Software Testing ๐Ÿ“ฝ๏ธ youtube.com/playlist?list=PLโ€ฆ #SoftwareTesting #QA #Testing #SDET #Tutorial #Learning #SoftwareDevelopment Continued ๐Ÿ‘‡๐Ÿ‘‡
1
1
139
CityTesting retweeted
Docker vs Kubernetes ๐——๐—ผ๐—ฐ๐—ธ๐—ฒ๐—ฟ is a containerization platform that solves the โ€œit works on my machineโ€ problem. It builds images, runs containers, and primarily runs them on a single host. Applications are packaged with everything they need and run as lightweight, isolated containers. The focus is on running software consistently with simple primitives like images and containers. ๐—ž๐˜‚๐—ฏ๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜๐—ฒ๐˜€ is a cluster orchestration system. It manages containers across multiple machines using a control plane that schedules and maintains containerized workloads. It works with Pods and reconciles actual state to desired state. The focus is on operating software at scale with capabilities like self-healing, autoscaling, and rolling updates. Kubernetes doesnโ€™t create containers. It orchestrates them. Docker runs containers. Kubernetes keeps them running. What else would you add? โž• Follow me ( @NikkiSiapno ) to improve at system design.
13
66
414
15,688
CityTesting retweeted
Do you think the SOLID principle is still useful in the age of AI?
20
86
2
576
31,014
CityTesting retweeted
Give me 2 mins, and I'll teach you about API versioning:
13
28
1
134
8,892
CityTesting retweeted
Hereโ€™s a full 3-hour data structures course built for real use. I'll walk you through the core topics in a way that actually helps with technical interviews and problem solving. So if you want a stronger foundation for interviews, LeetCode, or CS, watch this video.
13
89
4
607
36,244
More and more people are asking me about testing resources so let's put everything I've written in one post. Bookmark, share, and, most importantly, please read these. The True Purpose of Testing epicweb.dev/the-true-purposeโ€ฆ Developers often overlook the fundamentals and rush into writing tests without properly understanding what a test is and what is its function. No test is inherently useful just because it exists. Read this one to learn what makes it useful. The Golden Rule of Assertions epicweb.dev/the-golden-rule-โ€ฆ There's a lot of debate over what makes a good test. In this one, I'm defining a short and objective way to grade a test's quality no matter the language or the tested system. This is, without a tinge of exaggeration, a game-changer in how you approach your tests. Anatomy of a Test epicweb.dev/anatomy-of-a-tesโ€ฆ Let's talk about the building blocks that make up any automated test. From JavaScript to Go and Rustโ€”these blocks power tests everywhere. Know your blocks. Implicit Assertions epicweb.dev/implicit-assertiโ€ฆ Did you know there's a way to express expectations in tests without writing "expect"? Those are called implicit assertions and they are tremendously powerful because they help you express more by writing less. Inverse Assertions epicweb.dev/inverse-assertioโ€ฆ Sometimes you need to assert that something did not happen. That can be tricky, especially if that something is asynchronous. The last thing you want are false positives. What you actually want is inverse assertions. Making Use of Code Coverage epicweb.dev/making-use-of-coโ€ฆ Code coverage has been an ongoing debate in the engineering circles. Is 100% code coverage in tests good? Bad? When should you strive for it? Why do people say it's harmful? I'm answering all those questions in this one and giving you practical tips on when to use (and not to use) code coverage. Good Code, Testable Code. epicweb.dev/good-code-testabโ€ฆ You've gathered by now that some code is easier to test than the other. But why? Let's take a look at the characteristic of code's testability, what defines it, what is its relationship with complexity, and how to make your code more testable. What is a Test Boundary? epicweb.dev/what-is-a-test-bโ€ฆ Automated tests rarely involve your entire system (yes, even the end-to-end ones have exceptions). There's often a place where you draw the line. The boundary. Learn what it is and how to use test boundaries efficiently to focus on the exact behaviors you want to test. Be S.M.A.R.T. About Flaky Tests epicweb.dev/be-smart-about-fโ€ฆ Flakiness is the scourge of reliability. If you've written a test before, you likely had experience with flakiness. But what is it at its core and what causes it? And how should you deal with flakiness? Writing Tests That Fail epicweb.dev/writing-tests-thโ€ฆ You write tests for them to fail. We all enjoy a green CI, but the true value of tests is when they fail. What matters is when and how they fail.
4
50
9
387
45,184
CityTesting retweeted
I loved reading the first edition of "Designing Data-Intensive Applications". It is the most comprehensive book on the types of systems I work on. I recently started reading the second edition. It was a pleasant surpriseโ€”and rather humblingโ€”to read the references in Chapter 1.
14
30
1
699
45,276
CityTesting retweeted
7 Must-Know Big-O Complexities for Coding Interviews: 1. ๐Ž(1) - ๐‚๐จ๐ง๐ฌ๐ญ๐š๐ง๐ญ ๐ญ๐ข๐ฆ๐ž - The runtime doesn't change regardless of the input size. - Example: Accessing an element in an array by its index. 2. ๐Ž(๐ฅ๐จ๐  ๐ง) - ๐‹๐จ๐ ๐š๐ซ๐ข๐ญ๐ก๐ฆ๐ข๐œ ๐ญ๐ข๐ฆ๐ž - The runtime grows slowly as the input size increases. Typically seen in algorithms that divide the problem in half with each step. - Example: Binary search in a sorted array. 3. ๐Ž(๐ง) - ๐‹๐ข๐ง๐ž๐š๐ซ ๐ญ๐ข๐ฆ๐ž - The runtime grows linearly with the input size. - Example: Finding an element in an array by iterating through each element. 4. ๐Ž(๐ง ๐ฅ๐จ๐  ๐ง) - ๐‹๐ข๐ง๐ž๐š๐ซ๐ข๐ญ๐ก๐ฆ๐ข๐œ ๐ญ๐ข๐ฆ๐ž - The runtime grows slightly faster than linear time. It involves a logarithmic number of operations for each element in the input. - Example: Sorting an array using quick sort or merge sort. 5. ๐Ž(๐ง^2) - ๐๐ฎ๐š๐๐ซ๐š๐ญ๐ข๐œ ๐ญ๐ข๐ฆ๐ž - The runtime grows proportionally to the square of the input size. - Example: Bubble sort algorithm which compares and potentially swaps every pair of elements. 6. ๐Ž(2^๐ง) - ๐„๐ฑ๐ฉ๐จ๐ง๐ž๐ง๐ญ๐ข๐š๐ฅ ๐ญ๐ข๐ฆ๐ž - The runtime doubles with each addition to the input. These algorithms become impractical for larger input sizes. - Example: Generating all subsets of a set. 7. ๐Ž(๐ง!) - ๐…๐š๐œ๐ญ๐จ๐ซ๐ข๐š๐ฅ ๐ญ๐ข๐ฆ๐ž - Runtime is proportional to the factorial of the input size. - Example: Generating all permutations of a set. โ™ป๏ธ Repost to help others learn this
5
146
6
760
36,594
When your tests are harder to manage than your Spring Boot app, something's off. Daniel Garnier-Moiroux, author of Testing Spring Boot Applications, breaks down: โ€ข what to test vs skip โ€ข what to mock (and avoid) โ€ข why test suites become slow and brittle They're practical ways to build tests that scale with your code, not against it. Check out what he has to say: hubs.la/Q049WCs50
1
21
163
7,105
CityTesting retweeted
In 2019, MIT professor Patrick Winston gave a legendary 1-hour lecture called โ€œHow to Speak.โ€ It has 18M+ views for a reason. His frameworks: โ€ข Your ideas are like your children โ€ข The 5-minute rule for job talks โ€ข Why jokes fail at the start 15 lessons on communication:
226
8,379
228
39,791
5,997,592
CityTesting retweeted
The most popular Spring Boot AI skill has 9.8K installs and its advice is "use constructor injection" ๐Ÿ’€ That's why I built jvmskills.com โ€” a curated directory of expert-authored AI coding skills for JVM developers.
5
31
230
19,548
CityTesting retweeted
Using AI to simplify my day-to-day work ๐Ÿ‘‡ As part of my work, I often need to create Spring Boot projects, implement REST APIs to try some new features of #SpringBoot or #IntelliJIDEA. So, I created an IntelliJ IDEA Plugin to generate CRUD implementation for a selected JPA entity ๐Ÿ˜Ž
5
11
1
99
6,954
CityTesting retweeted
Networking 101: Port Forwarding ๐Ÿง™โ€โ™‚๏ธ Have you ever been in a situation where a service that listens on localhost needed to become accessible on the server's external interface? While a proper solution is likely to stop, reconfigure, and restart the service, Port Forwarding offers a quick-and-dirty alternative: make all data sent to one port forwarded to another (and vice versa). There are several ways to implement Port Forwarding: - With a user-space proxy process like socat or netcat - Transparently on the network level (e.g., using iptables) Practice forwarding ports by solving these hands-on exercises: - socat labs.iximiuz.com/challenges/โ€ฆ - netcat labs.iximiuz.com/challenges/โ€ฆ - iptables labs.iximiuz.com/challenges/โ€ฆ
7
70
496
17,298
Most developers can name 10 types of testing But only a few can explain when to use each one Here's a quick breakdown: ๐Ÿญ. ๐—ฆ๐—บ๐—ผ๐—ธ๐—ฒ ๐—ง๐—ฒ๐˜€๐˜๐—ถ๐—ป๐—ด Does the app even launch? ๐Ÿฎ. ๐—™๐˜‚๐—ป๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐—ฎ๐—น ๐—ง๐—ฒ๐˜€๐˜๐—ถ๐—ป๐—ด Does each feature give the right output? ๐Ÿฏ. ๐—œ๐—ป๐˜๐—ฒ๐—ด๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—ง๐—ฒ๐˜€๐˜๐—ถ๐—ป๐—ด Do the modules still work when connected? ๐Ÿฐ. ๐—ฅ๐—ฒ๐—ด๐—ฟ๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป ๐—ง๐—ฒ๐˜€๐˜๐—ถ๐—ป๐—ด Did your latest commit break something that worked yesterday? ๐Ÿฑ. ๐—Ÿ๐—ผ๐—ฎ๐—ฑ ๐—ง๐—ฒ๐˜€๐˜๐—ถ๐—ป๐—ด Can the system handle real traffic without choking? ๐Ÿฒ. ๐—ฆ๐˜๐—ฟ๐—ฒ๐˜€๐˜€ ๐—ง๐—ฒ๐˜€๐˜๐—ถ๐—ป๐—ด What happens when you push past the breaking point? ๐Ÿณ. ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ถ๐˜๐˜† ๐—ง๐—ฒ๐˜€๐˜๐—ถ๐—ป๐—ด Can someone exploit a hole you didn't know existed? ๐Ÿด. ๐—จ๐—œ ๐—ง๐—ฒ๐˜€๐˜๐—ถ๐—ป๐—ด Does the interface behave the way a user expects? ๐Ÿต. ๐—™๐˜‚๐˜‡๐˜‡ ๐—ง๐—ฒ๐˜€๐˜๐—ถ๐—ป๐—ด What breaks when you throw garbage data at the app? ๐Ÿญ๐Ÿฌ. ๐—ฅ๐—ฒ๐—น๐—ถ๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐˜† ๐—ง๐—ฒ๐˜€๐˜๐—ถ๐—ป๐—ด Does the system hold up after running for days, not minutes? Most teams test if features work. Few test if they survive. You don't need all 10 on every project. But knowing when each one matters makes the difference. Pick one that your team doesn't do today. Start there.
16
116
2
596
26,947
CityTesting retweeted
SOLID Principles Explained with Clear Examples: ๐’ - ๐’๐ข๐ง๐ ๐ฅ๐ž ๐‘๐ž๐ฌ๐ฉ๐จ๐ง๐ฌ๐ข๐›๐ข๐ฅ๐ข๐ญ๐ฒ ๐๐ซ๐ข๐ง๐œ๐ข๐ฉ๐ฅ๐ž A class should have only one reason to change. - Example: Instead of one giantย Userย class that handles authentication, profile updates, and sending emails, split it intoย UserAuth,ย UserProfile, andย EmailService. ๐Ž - ๐Ž๐ฉ๐ž๐ง/๐‚๐ฅ๐จ๐ฌ๐ž๐ ๐๐ซ๐ข๐ง๐œ๐ข๐ฉ๐ฅ๐ž Classes should be open for extension but closed for modification. - Example: Define aย Shapeย interface with anย area()ย method. When you need a new shape, just add aย Circleย orย Triangleย class that implements it. ๐‹ - ๐‹๐ข๐ฌ๐ค๐จ๐ฏ ๐’๐ฎ๐›๐ฌ๐ญ๐ข๐ญ๐ฎ๐ญ๐ข๐จ๐ง ๐๐ซ๐ข๐ง๐œ๐ข๐ฉ๐ฅ๐ž Subtypes must be substitutable for their base types without breaking behavior. - Example: Ifย Birdย has aย fly()ย method, thenย Eagleย andย Sparrowย should both work anywhere aย Birdย is expected. ๐ˆ - ๐ˆ๐ง๐ญ๐ž๐ซ๐Ÿ๐š๐œ๐ž ๐’๐ž๐ ๐ซ๐ž๐ ๐š๐ญ๐ข๐จ๐ง ๐๐ซ๐ข๐ง๐œ๐ข๐ฉ๐ฅ๐ž Don't force classes to implement interfaces they don't use. - Example: Instead of one fatย Machineย interface withย print(),ย scan(), andย fax(), break it intoย Printable,ย Scannable, andย Faxable. Aย SimplePrinterย only implementsย Printable. ๐ƒ - ๐ƒ๐ž๐ฉ๐ž๐ง๐๐ž๐ง๐œ๐ฒ ๐ˆ๐ง๐ฏ๐ž๐ซ๐ฌ๐ข๐จ๐ง ๐๐ซ๐ข๐ง๐œ๐ข๐ฉ๐ฅ๐ž High-level modules should not depend on low-level modules. Both should depend on abstractions. - Example: Yourย OrderServiceย should depend on aย PaymentGatewayย interface, not directly onย Stripeย orย PayPal. The real power of SOLID is not in following each principle in isolation. It's in how they work together to make your code easier to change, test, and extend. โ™ป๏ธ Repost to help others in your network
8
333
3
1,640
68,436
Most developers are using Claude Code wrong. They install itโ€ฆ run a few promptsโ€ฆ and treat it like a terminal chatbot. Thatโ€™s why the results feel average. Claude Code is actually a 4-layer system ๐Ÿ‘‡ 1๏ธโƒฃ CLAUDE.md Your projectโ€™s persistent memory. It defines: โ€ข what the system does โ€ข how the repo is structured โ€ข rules Claude should follow Think of it as the brain of the project. 2๏ธโƒฃ Skills Reusable knowledge packs Claude automatically invokes. Examples: โ€ข code review rules โ€ข refactor playbooks โ€ข debugging workflows โ€ข release procedures Skills make Claude behave like a specialized engineer, not a generic model. 3๏ธโƒฃ Hooks Deterministic safety gates. Important detail: Rules in CLAUDE.md โ†’ followed ~70% of the time Hooks โ†’ enforced 100% of the time Use hooks for: โ€ข running tests โ€ข formatting code โ€ข blocking risky directories 4๏ธโƒฃ Agents Sub-agents with their own context windows. This lets Claude handle complex multi-step work without losing context. Most engineers miss the setup that makes all of this work. The difference between average and exceptional results is the initial configuration: โ€ข run /init on day one to generate CLAUDE.md โ€ข structure the .claude/ folder (skills, hooks, permissions) โ€ข write skill descriptions that actually trigger correctly โ€ข use memory hierarchy (global โ†’ project โ†’ subfolder) โ€ข enforce rules with hooks instead of relying on prompts When this is configured properly, the workflow becomes: Plan Mode โ†’ Auto-Accept โ†’ Iterate โ†’ Commit. If you're using Claude Code without CLAUDE.md + Skills + Hooks, you're probably using 20% of what it can actually do. #ClaudeCode #AIAgents #AIEngineering #GenAI #DeveloperTools
38
201
2
1,095
73,419
CityTesting retweeted
If you are a backend engineer who wants to get better at advanced algorithms and data structures, read these 12 articles: โ†“
6
107
2
806
31,418
If youโ€™re developing locally and donโ€™t want to burn money on APIs, use Claude Code with Ollama, and e.g., the GLM-5 model. It's a pretty powerful and free option.
22
34
3
378
47,795
CityTesting retweeted
Saga Pattern for Java/backend interviews: When a user places an order, you need to withdraw money, reserve the product, and notify the warehouse. All in different services. What to do if one of them crashes? A regular transaction won't help here. Welcome to Saga. The idea is simple: break a large distributed transaction into a chain of small local ones. Each step is its own transaction in its own service. If something goes wrong, we launch compensating transactions in reverse order. [Two approaches]:- 1. Choreography Services communicate via events. Each one knows what to do next. OrderService โ†’ [OrderCreated] โ†’ PaymentService PaymentService โ†’ [PaymentDone] โ†’ InventoryService InventoryService โ†’ [Reserved] โ†’ NotificationService - Simple, no single point of failure - Hard to track the entire flow, spaghetti of events 2. Orchestration There's a conductor โ€” the Saga Orchestrator. It knows the entire script and commands the services. (code eg. in the image) - The flow is visible in one place, easy to debug - The orchestrator can become a bottleneck [Important to understand]: a compensating transaction โ‰  a DB rollback. This is a business operation. If the money has already been withdrawn, we don't roll back the DB row, we issue a refund. In the Java ecosystem, Saga is used with: โ†’ Apache Kafka / RabbitMQ - for events between services โ†’ Axon Framework - built-in Saga support out of the box โ†’ Spring State Machine - for managing the orchestrator's state โ†’ Temporal / Conductor - infrastructure-level workflow orchestration [When to use] :- โœ”๏ธ Microservice architecture โœ”๏ธ Multiple DBs, no possibility to use 2PC โœ”๏ธ Long-lived business transactions โŒ A monolith with one DB, just use @Transactional Saga isn't a silver bullet, it's a compromise. You sacrifice isolation for scalability. Data can be temporarily inconsistent, and that's okay if the business is fine with it.
6
24
290
17,522