Mock methods that manipulate parameters

Recently, I’ve worked a little bit on redis cache for Imcache. I needed to mock a behavior of a method where the method manipulates given parameters e.g. change state or call another method. After a little bit of research, I’ve found out there’s a nice mockito feature that accomplishes what I want: doAnswer. Basically, doAnswer allows stubbing a void method […]

A guide for Code Reviews

Code reviews shouldn’t be about ego. Still, every time you send one, you’re putting yourself out there. You want your work reviewed but at the same time it makes you vulnerable. The point isn’t to tear each other down, it’s about shipping solid code and not screwing the team over. Bad CRs waste time: vague descriptions, missing tests, or five […]

Java Developer vs. Software Engineer

Java developer vs. software engineer is discussed quite often, especially among programmers trying to define what truly separates a coder from an engineer. One of my friends kept telling me what a “Javacı” would do for certain problems. “Javacı” is a de facto word that means a person who deals with Java or writes Java programs. The “cı” part comes […]

Moving from Java to Python

I recently started a new role in AWS networking, and it’s the first time I’ve gone from writing everything in Java to writing almost everything in Python. Honestly, the shift is bigger than I expected. Java gives you interfaces, structure, a strong compiler, and a debugger you can rely on. Python gives you freedom, but also fewer guardrails. It kind […]

Spring Cache Abstraction

Spring cache abstraction applies caching to the Java methods. It provides an environment where we can cache the result for the methods we choose. By doing so, it improves the performance of the methods by avoiding multiple execution of the methods for the same object. Note that this type of caching can be applied to the methods which return the […]