Skip to content

Tag: Java

Verifying passed arguments partially

Recently, I was working on a project and I missed a case in unit tests. I didn’t want to verify each argument but rather wanted to check if an object has a certain attribute set. In the older versions of mockito, this wasn’t doable. Since mockito 2.1, you can now do argument verification through argThat. Let’s see an example of this in action. @Test public void testWritesWithAttributes(){…

Leave a Comment

Simple Mutual Exclusion

Nowadays, for almost all services, we would like to set up at least poor man’s HA. This means we would have more than one node/server/pod at a time. This is great for load balancing and availability purposes. Nevertheless, there’s a simple problem with this setup. What if you want to execute a piece of code in only one node? We can do this via a simple mutual…

Leave a Comment

Hype in Software Development

Increasingly often we come across a new technology, a new trend and most possibly a new hype. And, we, developers, somehow lose our sight of the goal we want to achieve and sadly embrace the hype. In an effort to bring the hype into the game, we can create a very big technical depth from day one. In this post, I’d like to share some of the…

1 Comment

Consistency Matters

Consistency in software development process involves the consistency between methods names, interfaces and more. Consistency issues during software development should be addressed through arrangements of individual pieces. These arrangements can differ from system to system as well as software team’s preferences. In my opinion, a team’s preferences matters more than anything else; however, it should still conform to most of the style guidelines. I’ll go through some…

Leave a Comment

Java Developer vs. Software Engineer

Java developer vs. software engineer is discussed quite often. One of my friends kept telling me what would “Javacı” do for certain problems. “Javacı” is a de facto word which means a person who deals with Java or a person who writes Java programs. “cı” part comes from Turkish and makes the word to correspond to the meanings described above. Throughout this post, I’ll use Javacı and…

Leave a Comment