-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
113 lines (97 loc) · 2.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
layout: home
title: ShitLib (Oh Shit!)
description: The only library you hope to remove!
permalink: /
---
<div>
<h2>The only library you hope to remove!</h2>
<p>
The library that helps you remember about things done bad.
With ShitLib you will be always aware of the shitty code inside your application.
</p>
</div>
<div>
<h2>Installation</h2>
<p>Import the library, proabably the smallest library you'll every see</p>
</div>
<div>
<h3>Maven</h3>
<p>
{% highlight xml %}
<dependency>
<groupId>io.github.shitlib</groupId>
<artifactId>shitlib-java</artifactId>
<version>1</version>
</dependency>
{% endhighlight %}
</p>
</div>
<div>
<h3>Gradle</h3>
<p>
{% highlight groovy %}
dependencies {
implementation 'io.github.shitlib:shitlib-java:1'
}
{% endhighlight %}
</p>
</div>
<div>
<h2>Usage</h2>
<p>
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.
</p>
<p>
Oh your boss forced you to get the first element of a list and you know that it's wrong: You can use OhShit!
</p>
<p>
{% highlight java %}
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
}
}
{% endhighlight %}
</p>
<p>
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!
</p>
<p>
Other way to use ShitLib? Let's give a try to the method API
</p>
<p>
{% highlight java %}
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");
}
}
}
{% endhighlight %}
</p>
</div>
<div>
<h2>News</h2>
<ul>
<li>20-03-2022 ShitLib for Swift was updated to be a modern Swift Package in version 5.0.0</li>
</ul>
<ul>
<li>20-02-2018 First release on Maven central repo</li>
</ul>
</div>