Dariusz Mydlarz

Dariusz Mydlarz

Java, Distributed Systems & Software Engineering

Switch Case Should Be Banned

  • I believe that switch-case construction is overused.
  • Every time you branch execution depending on switch-case you’re doing something wrong.
  • Instead of that you should move the logic into classes and rely on polymorphism.

Invert Yours No Habits

  • Do you have problems to keep up to yours no-commitments? Like do not eat sweets or do not buy yet another book?
  • If you have, like I do, instead of punishing yourself with notifications & reminders saying “do not buy a book this month” give yourself a permission. And put it to a specific date.

Java: Should I Return a Stream or a Collection?

  • For most of the cases you should return Stream. It is more flexible, is designed for better performance, and can be easily turned into Collection.
  • You should return Collection when there are strong consistency requirements and you have to produce snapshot of a moving target. Then you will want to put the elements into a collection that will not change.

Geecon 2017: Don't Forget to Interrupt Your Thread.

I was at Geecon Kraków this year. On the last day, there was a talk given by Yegor Bugayenko (@yegor256) about handling InterruptedException. Did you know how to do it properly?

<< page 2 of 2 >>