@@ -75,12 +75,12 @@ <h2 id="basic-example">Basic example</h2>
75
75
< p > Let’s take a very simple and obvious example of a wrong RxJava
76
76
usage and go into theoretical details later.</ p >
77
77
78
- < p > It is often can be found that people inspired with RxJava
78
+ < p > Often, people inspired with RxJava
79
79
start turning everything into a stream.
80
80
We even got a new mantra - “Everything is a stream”.</ p >
81
81
82
82
< p > Say, you need to implement < code > int max(int, int)</ code > function (let’s pretend it does not exist yet).
83
- What will you think if you will discover an implementation like this
83
+ What will you think if you discover an implementation like this
84
84
that was proudly created for you by a newbie who can’t wait to apply the new magical hammer?</ p >
85
85
86
86
< h4 id ="figure-a "> Figure A.</ h4 >
@@ -93,8 +93,8 @@ <h4 id="figure-a">Figure A.</h4>
93
93
< p > “When you have a hammer everything looks like a nail.”</ p >
94
94
</ blockquote >
95
95
96
- < p > A sane developer will probably say “WFT ??!” and implement something
97
- less shiny and inspiring but more practical:</ p >
96
+ < p > A sane developer will probably say “WTF ??!” and implement something
97
+ less shiny and inspiring, but more practical:</ p >
98
98
99
99
< h4 id ="figure-b "> Figure B.</ h4 >
100
100
< div class ="highlight "> < pre class ="chroma "> < code class ="language-java " data-lang ="java "> < span class ="kt "> int</ span > < span class ="nf "> max</ span > < span class ="o "> (</ span > < span class ="kt "> int</ span > < span class ="n "> a</ span > < span class ="o "> ,</ span > < span class ="kt "> int</ span > < span class ="n "> b</ span > < span class ="o "> )</ span > < span class ="o "> {</ span >
@@ -119,17 +119,17 @@ <h4 id="figure-c">Figure C.</h4>
119
119
< p > In a large codebase it happens all the time.</ p >
120
120
121
121
< p > Or you can find a 20-line function of operators
122
- that is doing the job that can easily be done without RxJava
122
+ that is doing a job that can easily be done without RxJava -
123
123
with the same amount of code!
124
- Try debugging a flow of events while the person who wrote it
124
+ Try debugging a flow of events when the person who wrote it
125
125
did not even think about events.</ p >
126
126
127
- < p > I’m not telling that mantras do not work.
128
- I hope that at this point it is pretty obvious by itself . ;)</ p >
127
+ < p > I’m not saying that mantras do not work.
128
+ I hope that at this point that’s pretty obvious. ;)</ p >
129
129
130
- < h2 id ="so-what-is- exactly-wrong-here "> So what is exactly wrong here?</ h2 >
130
+ < h2 id ="so-what-exactly-is- wrong-here "> So what exactly is wrong here?</ h2 >
131
131
132
- < p > The entire rant is about simplicity.</ p >
132
+ < p > This entire rant is about simplicity.</ p >
133
133
134
134
< p > < strong > Figure B.</ strong > says:
135
135
“take two ints and return one of them that is bigger”</ p >
@@ -179,13 +179,13 @@ <h4 id="the-absence-of-events">The absence of events</h4>
179
179
It is an < em > event processing</ em > library.</ p >
180
180
181
181
< p > Events are more complex than data
182
- because in addition to data events have < em > time</ em > or < em > order of execution</ em > .</ p >
182
+ because, in addition to data, events have < em > time</ em > or < em > order of execution</ em > .</ p >
183
183
184
184
< p > If you need to process a list of items, do not turn it into an observable.</ p >
185
185
186
- < p > In addition to the complexity that will increase
187
- for the person who will try to understand
188
- the code there are additional downsides.
186
+ < p > Besides the complexity that will increase
187
+ for a person trying to understand
188
+ the code, there are other downsides.
189
189
Have you seen RxJava source code?
190
190
It contains quite complex logic, so it is hard to debug.
191
191
It also consumes additional resources to make multithreading safe.</ p >
0 commit comments