The library that helps you remember about things done bad. With ShitLib you will be always aware of the shitty code inside your application.
Import the library, proabably the smallest library you'll every see Maven
<dependency>
<groupId>io.github.shitlib</groupId>
<artifactId>shitlib-java</artifactId>
<version>1</version>
</dependency>
Gradle
dependencies {
implementation 'io.github.shitlib:shitlib-java:1'
}
Are you writing unwanted code, antipatterns, magic numbers? Are you scared about what you are doing? Use ShitLib to refer your shitty code so you will remember it. How? Remove ShitLib and your code will not compile anymore until you will remove all of the shitty code.
Oh your boss forced you to get the first element of a list and you know that it's wrong: You can use OhShit!
import static io.github.shitlib.java.OhShit.*;
class MyBeautifulClass {
List<String> elements;//with some elements inside
void iDontWantDoThisButWeMustReleaseASAP() {
String element = elements.get(_0);//<--- OhShit Constant
doSomeThing(element);
}
void doSomeThing(String element) {
//everything
}
}
Maybe are you thinking where is the convenience in using this lib. It's simple, this is the most useful library when it is deleted. After that your project will not compile and you will be immediately aware of what to do. Fix it!
Other way to use ShitLib? Let's give a try to the method API
import static io.github.shitlib.java.OhShit.*;
class MyBeautifulUnConfigurableClass {
public static final int MAX_PASSWORD_SIZE = ohShit(7);//I cannot parameterize now
public void setPassword(String password) {
if (password.length() > MAX_PASSWORD_SIZE) {
throw new InvalidArgumentException("password");
}
}
}
- 20-02-2018 First release on maven central repo
- Add new methods:
crap
,holyCow
,wtf
,omg
; - Add new classes:
Crap
,HolyCow
,WTF
,OMG
.