• Unit testing anti-patterns

    I’m a big fan of unit tests, and tests in general. I wrote an article about unit tests previously, and although it’s not very complete, I wanted to write a follow up talking about unit testing anti-patterns. Testing private/protected methods directly I think one of the most asked questions when it comes to unit tests…

  • A quick guide to a producer-consumer using wait, notify, notifyAll in Java

    Let me start by saying that you should never end up directly using wait, notify, or notifyAll(unless you have a good reason). Use a concurrency library if you need to do multithreaded things. Building a producer/consumer using wait/notify/notifyAll is one of those interview questions that you may get when talking about multithreading in Java. Given…

  • A ramble on Unit Tests

    Before reading I’d like to issue a warning: this post is highly subjective based on my own experiences. You may not feel the same. It’s also worth mentioning that the topic of unit testing is so vast that this article barely scratches the surface. I’ll leave a list of references at the end of the…

  • Dependency Injection Container – simple implementation

    If you’ve ever used any modern framework you’ve most likely used a Dependency Injection Container, also known as a DI container. Sometimes it can feel like magic, you ask it for a class and it will give said class regardless of how many other classes it depends on. In this article I’ll implement a simple…

  • DNS response in Java

    The DNS request in Java article focused on the request part. Now that that is done, the next thing is to receive the response and actually parse it. If you’re more interested in the code without all the explanation skip to the end of the article. I’ll be sticking to the tools I’ve already used…

  • DNS requests in Java

    This is the first article in a series of articles focusing on the DNS protocol over UDP and its implementation in java. You can also find the original article I wrote on my medium.com. The next article focuses on the response of a DNS server and how to parse it. If you’re more interested in…

  • Singletons and how to use them

    I believe it’s customary for every coding blog to have a rant about singletons, and this one is no different. It is called coderambling after all. I’m not here to tell you how to live your life, if you want to use singletons feel free to do so. But I also believe it’s important to…