Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

preconditions

What’s the point of Guava checkNotNull [duplicate]

February 18, 2023 by Tarik

The idea is to fail fast. For instance, consider this silly class: public class Foo { private final String s; public Foo(String s) { this.s = s; } public int getStringLength() { return s.length(); } } Let’s say you don’t want to allow null values for s. (or else getStringLength will throw a NPE). With … Read more

Categories java Tags guava, java, null, preconditions Leave a comment

ReSharper Curiosity: “Parameter is only used for precondition check(s).”

December 24, 2022 by Tarik

It’s not judging, it’s trying to help 🙂 If ReSharper sees that a parameter is only used as a check to throw an exception, it greys it out, indicating that you’re not actually using it for “real” work. This is most likely a mistake – why pass in a parameter you’re not going to use? … Read more

Categories c# Tags c++, preconditions, resharper Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa