SSH Tunnelling with Java
You heave a sigh of relief, as the QA has approved a long-awaited feature for deployment on Prod. However, as a part of the process, it is first deployed on the UAT env, where there are test accounts that can be used to certify the feature works outside of the local developer and QA testing systems. ...
Handling limited sudo access through Ansible
Running specific commands with sudo using Ansible It seems a trivial use case, but it’s not. Consider a situation when you’re not the user allowed a full sudo access on the remote machine. However, you are only allowed the sudo access on certain commands, which, of course, requires a password. For example, starting or stopping a service. ...
Stupid Patterns
We know about companies using Dark Patterns (more on this post by TechCrunch: WTF is dark pattern design?), and how they affect users. But can there be something like a “Stupid Pattern”? A thing that most companies do, and they don’t even realize it’s stupid? This blog post is a part real-life case study, and a major rant about one such pattern that is almost definitely, very stupid. ...
Dynamic Enums
But can one even make Enums dynamic? Enums, by definition, are static. They are used to “predefine” constants. I’ll let the official Oracle Java Tutorial on Enums to help explain the definition. ...
The Java Constants Interface Anti-Pattern
How do you define and use constants in Java? Most advice on Internet has the following opinions: Declare public static final for constants in a class Do not use Interfaces for constants The most common way to define a constant is in a class and using public static final. One can then use the constant in another class using ClassName.CONSTANT_NAME. Constants are usually defined in upper cases as a rule, atleast in Java. ...